Page MenuHomeFreeBSD

kern___realpathat(): fix uninitialized memory read
ClosedPublic

Authored by kib on Nov 25 2024, 6:58 PM.
Tags
None
Referenced Files
F110557297: D47739.id.diff
Thu, Feb 20, 3:01 AM
Unknown Object (File)
Sun, Feb 2, 9:21 PM
Unknown Object (File)
Fri, Jan 31, 5:09 PM
Unknown Object (File)
Sat, Jan 25, 2:28 PM
Unknown Object (File)
Jan 10 2025, 1:40 PM
Unknown Object (File)
Jan 6 2025, 7:33 AM
Unknown Object (File)
Jan 6 2025, 12:07 AM
Unknown Object (File)
Jan 5 2025, 10:12 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.