Page MenuHomeFreeBSD

Fix a read past the end of a buffer in fsck.
ClosedPublic

Authored by mckusick on Feb 2 2018, 1:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 8:08 AM
Unknown Object (File)
Dec 20 2023, 4:14 AM
Unknown Object (File)
Oct 20 2023, 11:12 AM
Unknown Object (File)
Oct 20 2023, 11:03 AM
Unknown Object (File)
Oct 19 2023, 5:57 PM
Unknown Object (File)
Oct 19 2023, 5:58 AM
Unknown Object (File)
Aug 31 2023, 9:21 PM
Unknown Object (File)
Aug 6 2023, 2:26 AM
Subscribers

Details

Summary

We normally use the first byte of the first block, but if there are no
blocks this results in reading beyond the allocated structure. In this
case sort on the number of blocks.

Submitted by: andrew
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mckusick requested changes to this revision.Feb 2 2018, 9:33 PM

I concur with the problem, but differ on the solution. When I tried to upload my proposed change it created a whole new report https://reviews.freebsd.org/D14177. How do I just attach a new diff here?

This revision now requires changes to proceed.Feb 2 2018, 9:33 PM

You can use: arc diff --update D14163. It may require you to commandeer the this review in the UI (which is fine by me).

mckusick updated this revision to Diff 38798.
mckusick edited reviewers, added: brooks; removed: mckusick.

I agree with the problem, but propose this new diff as the correct solution.

If I read this correctly, you're always allocating one block now? That seems fine to me.

This revision is now accepted and ready to land.Feb 8 2018, 8:14 PM

In response to brooks. You are correct that this always allocates one block and initialises it to zero. Thus all zero-length directories will sort to the front of the list so that they will all be reported in a block.

This revision was automatically updated to reflect the committed changes.