Page MenuHomeFreeBSD

loader: dosfs can corrupt memory
ClosedPublic

Authored by tsoome on Nov 26 2016, 12:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 10, 1:00 AM
Unknown Object (File)
Mar 6 2024, 1:48 AM
Unknown Object (File)
Jan 15 2024, 11:51 AM
Unknown Object (File)
Jan 14 2024, 1:21 PM
Unknown Object (File)
Jan 5 2024, 7:12 AM
Unknown Object (File)
Jan 5 2024, 7:12 AM
Unknown Object (File)
Jan 5 2024, 7:12 AM
Unknown Object (File)
Jan 1 2024, 9:40 PM

Details

Summary

Apparently the libstand dosfs optimization is a bit too optimistic
and did introduce possible memory corruption.

This patch is backing out the bad part and since this results in
dosfs reading full blocks now, we can also remove extra offset argument
from dv_strategy callback.

In addition, fixed list of cstyle issues in dosfs related to return keyword
usage.

The proposed patch is from:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214423

Diff Detail

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

Event Timeline

tsoome retitled this revision from to loader: dosfs can corrupt memory.
tsoome updated this object.
tsoome edited the test plan for this revision. (Show Details)
tsoome added reviewers: allanjude, imp.

Does this also catch the bits that were done as followup commits? It looks like you got pc98, but we don't want to break the build again.

Does this also catch the bits that were done as followup commits? It looks like you got pc98, but we don't want to break the build again.

I did search and walk over entire libstand and boot tree, I think I got them all (including md module;)

tsoome edited edge metadata.

missed memcpy.

I have tested this patch in my environment and confirm that it works as expected (fixes PR214423).

Hmmm, I'll have to see if I can get my pc98 machine back up and running to test this...

btw: I did build this update + part device rewrite and did verify by reading the loader.efi reading the EFI system partition - part update because the CURRENT does eat the part devices and did leave only one (from illumos disk) visible... Also I did test on illumos, and confirmed there is no visible load performance degradation.

tsoome edited edge metadata.

update after r309369

bapt edited edge metadata.

LGTM I would like to see a test on pc98 but given this is mostly a revert and a cleanup I'm pretty confident

This revision is now accepted and ready to land.Dec 18 2016, 11:06 PM

We stopped shipping install media and downgraded PC98 to Tier2 with FreeBSD 9.0

I think we are ok to go ahead with this

allanjude edited edge metadata.

Approved for commit

This revision was automatically updated to reflect the committed changes.