Page MenuHomeFreeBSD

LinuxKPI: fix sg_pcopy_from_buffer()
ClosedPublic

Authored by bz on Jun 7 2021, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 9:01 AM
Unknown Object (File)
Oct 9 2024, 9:35 AM
Unknown Object (File)
Oct 9 2024, 5:27 AM
Unknown Object (File)
Oct 8 2024, 8:25 AM
Unknown Object (File)
Oct 5 2024, 8:51 AM
Unknown Object (File)
Oct 2 2024, 5:30 PM
Unknown Object (File)
Oct 2 2024, 4:24 PM
Unknown Object (File)
Oct 2 2024, 11:52 AM
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