Page MenuHomeFreeBSD

netsmb: Add bounds checking to smb_t2_placedata
ClosedPublic

Authored by jhb on Jul 28 2023, 10:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 10:15 PM
Unknown Object (File)
Sun, Oct 13, 2:39 AM
Unknown Object (File)
Sun, Oct 13, 2:11 AM
Unknown Object (File)
Sun, Oct 13, 2:10 AM
Unknown Object (File)
Oct 4 2024, 1:09 AM
Unknown Object (File)
Oct 1 2024, 5:01 PM
Unknown Object (File)
Sep 28 2024, 11:59 AM
Unknown Object (File)
Sep 18 2024, 2:49 PM

Details

Summary

Verify that the requested region of the mbuf chain is not beyond the
end of the chain before trimming it from the end. If it is out of
bounds, fail with an error (EPROTO).

While here, properly handle the case that the amount of data at the
end of the chain might span more than one mbuf by using m_adj to drop
the extra bytes rather than assuming m_len of the last mbuf can be
adjusted directly.

PR: 258504
Reported by: Robert Morris <rtm@lcs.mit.edu>
Co-authored-by: Robert Morris <rtm@lcs.mit.edu>
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52888
Build 49779: arc lint + arc unit