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
F170622197: D58542.id.diff
Sat, Sep 5, 4:42 PM
F170517279: D58542.diff
Sat, Sep 5, 5:03 AM
F170516959: D58542.diff
Sat, Sep 5, 5:00 AM
Unknown Object (File)
Fri, Sep 4, 12:22 PM
Unknown Object (File)
Fri, Sep 4, 10:10 AM
Unknown Object (File)
Thu, Sep 3, 12:48 PM
Unknown Object (File)
Tue, Sep 1, 6:57 PM
Unknown Object (File)
Tue, Sep 1, 12:50 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 75277
Build 72160: arc lint + arc unit

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>