Conversation

Lorenzo Stoakes

Edited 1 month ago
It was a null pointer deref apparently... (lol)
4
1
2

@ljs I still do not understand what's the problem with NULL pointers. If you see it, just don't dereference it. It's easy. All that memory safety concept is just a hype.

5
3
3

DougMerritt (log😅 = 💧log😄)

@ljs
Kernels that don't keep something useful and interesting at @0x0 are just wrong.

1
0
2

@ljs lol, wtf is that first reply. I haven’t been on twitter in ages but it seems to be even more insane these days

1
0
2
@dougmerritt yeah I have a patch series to keep plain text system passwords there
1
0
3

DougMerritt (log😅 = 💧log😄)

@ljs
You have my vote.

1
0
2
@sven lol christ I hadn't even fucking noticed that. Ugh.

Might edit and crop that... madness
1
0
2
@sven Done lol. Just to be clear I find that opinion revolting and bullshit ffs.

Twitter is a mess yes
1
0
2

@ljs yeah, I assumed that you just hadn’t noticed it :)

1
0
2
@sven mate forwarded me the post was probably pointing out how ludicrous that reply was, I got nerdsniped by the null ptr deref
0
0
1

@lkundrak @ljs

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index e6c469b323ccb..d1a936451153b 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -534,10 +534,12 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code, unsigned long ad
 				from_kuid(&init_user_ns, current_uid()));
 	}
 
-	if (address < PAGE_SIZE && !user_mode(regs))
+	if (address < PAGE_SIZE && !user_mode(regs)) {
 		pr_alert("BUG: kernel NULL pointer dereference, address: %px\n",
 			(void *)address);
-	else
+		// do nothing to prevent crash
+		return;
+	} else
 		pr_alert("BUG: unable to handle page fault for address: %px\n",
 			(void *)address);

Thank me later.

0
0
1

@oleksandr @ljs I don't disagree, but there is usually a question of who should check.

Should you check "this" in all methods? Should you check all byref arguments? Should you check in an api called internally for something that should always be valid? Often the check is moved out to the first place a pointer is checked. But over time, this may lead to mistakes.

Any time you don't check, you risk this bug.

1
0
0

@ljs @oleksandr I know, just expanding on various stupid decisions made by C/C++

0
0
0

@ljs @gigantos Sir, I'm not shitposting, I'm highlighting issues with shitcoding. Otherwise, feel free to implement "sarcasm" spoiler for ActivityPub as a nice addition to "content warning".

0
0
0
@ljs i still that in this case more relevant than what type of memory error we are talking about, is how long the rollback process took ;-)

i'd expect large cloud companies to test their emergency procedures, not just red teaming but also simulate faulty patches getting through.
1
0
0
@jarkko see my toot feed, I say this. This one was just amusement at what the issue was.
1
0
1
I'm happy I got to see this sight in my lifetime ;-) The blue egg of death.
1
0
0
@jarkko @ljs was that pic real though?
2
0
1
@vbabka @jarkko as real as your talent
0
0
3
@vbabka @ljs does it matter ;-)
1
0
1
@vbabka @ljs this one goes to crowdstrike and microsoft: https://www.youtube.com/watch?v=lNHRnhOP3hE ;-)
0
0
1

@oleksandr @ljs More over if it was something like std::optional, then you would get an uncaught exception instead. Almost exactly the same issue. Though rust requires you to match on std::option but that is just fluf really and does not cause much safety except for in the mind.

0
0
0