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)
Sun, Feb 1, 12:14 PM
Unknown Object (File)
Fri, Jan 30, 4:39 PM
Unknown Object (File)
Mon, Jan 26, 10:43 AM
Unknown Object (File)
Sun, Jan 25, 1:19 AM
Unknown Object (File)
Nov 24 2025, 8:21 PM
Unknown Object (File)
Nov 20 2025, 11:51 AM
Unknown Object (File)
Nov 15 2025, 11:15 AM
Unknown Object (File)
Oct 22 2025, 9:52 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.