Page MenuHomeFreeBSD

kern___realpathat(): fix uninitialized memory read
ClosedPublic

Authored by kib on Nov 25 2024, 6:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 24, 8:21 PM
Unknown Object (File)
Thu, Nov 20, 11:51 AM
Unknown Object (File)
Sat, Nov 15, 11:15 AM
Unknown Object (File)
Oct 22 2025, 9:52 AM
Unknown Object (File)
Oct 14 2025, 3:59 AM
Unknown Object (File)
Sep 24 2025, 5:26 PM
Unknown Object (File)
Aug 7 2025, 3:55 PM
Unknown Object (File)
Aug 5 2025, 4:25 AM
Subscribers

Details

Summary
kern___realpathat(): style

kern___realpathat(): do not copyout past end of string    
Reported and tested by:    pho

kern___realpathat(): honor uio_seg argument

Diff Detail

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

Event Timeline

kib requested review of this revision.Nov 25 2024, 6:58 PM

Just realized that this is a kernel memory exposure.

kib retitled this revision from kern___readlink(): fix uninitialized memory read to kern___realpathat(): fix uninitialized memory read.Nov 25 2024, 7:01 PM
In D47739#1088673, @kib wrote:

Just realized that this is a kernel memory exposure.

Yes :(

It looks like the problem can happen "only" when a nullfs file mount is present?

This revision is now accepted and ready to land.Nov 25 2024, 7:29 PM
In D47739#1088673, @kib wrote:

Just realized that this is a kernel memory exposure.

Yes :(

It looks like the problem can happen "only" when a nullfs file mount is present?

Yes, the mount over a file.