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, Jan 6, 7:33 AM
Unknown Object (File)
Mon, Jan 6, 12:07 AM
Unknown Object (File)
Sun, Jan 5, 10:12 AM
Unknown Object (File)
Sun, Jan 5, 8:15 AM
Unknown Object (File)
Nov 29 2024, 6:47 PM
Unknown Object (File)
Nov 25 2024, 7:44 PM
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 Skipped
Unit
Tests Skipped

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.