HomeFreeBSD

savecore(8): Fix buffer overrun inspecting disks with varying sector size

Description

savecore(8): Fix buffer overrun inspecting disks with varying sector size

A premature optimization lead to caching a native-sector sized memory
allocation. If the program examined a 512 byte sector disk, then a 4096
byte sector disk, the program would overrun the cached 512 byte buffer.

Just remove the optimization to fix the bug. This was introduced with the 4Kn
dump support in r298076.

Reported by: markj
Reviewed by: markj, rpokala
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8162

Details

Provenance
cemAuthored on
Reviewer
markj
Differential Revision
D8162: savecore(8): Fix buffer overrun inspecting disks with varying sector size
Parents
rS306751: Disable loop unrolling in skein for sys/boot
Branches
Unknown
Tags
Unknown