Page MenuHomeFreeBSD

kld: Reject kernel modules with PT_LOAD segments where filesz > memsz
ClosedPublic

Authored by jhb on Jul 29 2026, 7:23 PM.
Tags
None
Referenced Files
F169191356: D58542.id183071.diff
Mon, Aug 31, 6:47 PM
Unknown Object (File)
Sun, Aug 30, 12:06 PM
Unknown Object (File)
Sat, Aug 29, 8:05 AM
Unknown Object (File)
Fri, Aug 28, 8:01 PM
Unknown Object (File)
Wed, Aug 26, 5:09 PM
Unknown Object (File)
Wed, Aug 26, 4:45 PM
Unknown Object (File)
Wed, Aug 26, 3:00 PM
Unknown Object (File)
Wed, Aug 26, 2:06 AM
Subscribers

Details

Summary

All sorts of places in the ELF loading code assume that filesz <=
memsz, so check that explicitly up front.

Reported by: Jane Smith <thebugfixers@pm.me> (via D57785)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Jul 29 2026, 7:23 PM
This revision is now accepted and ready to land.Jul 30 2026, 8:12 AM

I just used their email address for Reported by because given (a) the lack of history with the project (b) no trace of them existing anywhere else online (c) the low-quality suspicious nature of the patches (d) the name being one of *the* quintessential placeholders, I am suspicious as to whether it's their real name.

I just used their email address for Reported by because given (a) the lack of history with the project (b) no trace of them existing anywhere else online (c) the low-quality suspicious nature of the patches (d) the name being one of *the* quintessential placeholders, I am suspicious as to whether it's their real name.

It might indeed be a placeholder (though who knows for anyone's name unless you've met them in person really), but it's already present in the author field of various other commits in src (including one misspelling as Jana):

> git log --author thebugfixers --format="%h %an <%ae>"
9724f3f89749 Jane Smith <thebugfixers@pm.me>
be23edc1e402 Jana Smith <thebugfixers@pm.me>
635ad6f2ec97 Jane Smith <thebugfixers@pm.me>