Post AEhwRkWGJUsRC7xtom by robey@mastodon.technology
(DIR) More posts by robey@mastodon.technology
(DIR) Post #AEhwRjVs3SyC4cm4ZM by brion@mastodon.technology
2021-12-23T20:13:15Z
0 likes, 0 repeats
can you just mmap something in at page 0 and own the NULL pointer? or does the operating system prevent that
(DIR) Post #AEhwRjyaKhwFVgD0KG by brion@mastodon.technology
2021-12-23T20:30:02Z
0 likes, 0 repeats
macos doesn't seem to let me do a fixed mapping at null, it returns ENOMEM :D
(DIR) Post #AEhwRkWGJUsRC7xtom by robey@mastodon.technology
2021-12-23T20:52:38Z
0 likes, 0 repeats
@brion (rusty but) on some systems, dark-mapping 0 - 1MB is *how* null pointer traps happen
(DIR) Post #AEhwRlojUJFJDhcAFM by mansr@society.oftrolls.com
2021-12-23T21:19:36Z
0 likes, 0 repeats
@robey @brion I have done it in the past for debugging purposes, but I think modern systems disallow it, at least by default. It's a reasonable precaution, IMHO.
(DIR) Post #AEhyd3JYyQJea3XiD2 by penguin42@mastodon.org.uk
2021-12-23T21:44:05Z
0 likes, 0 repeats
@brion I think most architectures used to allow that; Linux added a low mapping limit to stop it; it's better to have stuff crash if they accidentally dereference NULL rather than access potentially attacker controlled data.