Page MenuHomeFreeBSD

LinuxKPI: fix sg_pcopy_from_buffer()
ClosedPublic

Authored by bz on Jun 7 2021, 3:16 PM.
Tags
None
Referenced Files
F150443019: D30676.diff
Wed, Apr 1, 6:17 AM
Unknown Object (File)
Mon, Mar 23, 2:00 AM
Unknown Object (File)
Sat, Mar 14, 8:25 PM
Unknown Object (File)
Thu, Mar 12, 2:01 PM
Unknown Object (File)
Sun, Mar 8, 2:48 AM
Unknown Object (File)
Sat, Mar 7, 9:08 PM
Unknown Object (File)
Feb 22 2026, 7:48 PM
Unknown Object (File)
Feb 17 2026, 2:37 PM
Subscribers

Details

Summary

In sg_pcopy_from_buffer() is an error in that skip can underflow
and lead to bogus page arithmetics which may lead to memory corruption
or more likely panics. Once we found a s/g page to copy into there
is nothing to skip anymore so simply set skip to 0.

Sponsored by: The FreeBSD Foundation
MFC after: 5 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable