HomeFreeBSD

libsa: Fix infinite loop in bzipfs & gzipfs

Description

libsa: Fix infinite loop in bzipfs & gzipfs

A bug in the loader's bzipfs & gzipfs filesystems caused compressed
kernel and modules not to work on EFI systems with a veriexec-enabled
loader. Since the size of files in these filesystems are not known
_a priori_ stat would initialize the size to -1 and the loader would
then hang in an infinite loop while trying to seek (read) to the end
of file since the loop termination condition compares the current
offset to that negative target position.

Reviewers: vangyzen, imp, Bret Ketchum (Bret.Ketchum@dell.com)
Differential Revision: https://reviews.freebsd.org/D30414
Sponsored by: Dell EMC Isilon
MFC to: stable/12, stable/13
MFC after: 1 week

Details

Provenance
dabAuthored on May 24 2021, 5:12 PM
Differential Revision
D30414: libsa: Fix infinite loop in bzipfs & gzipfs
Parents
rG33764e3fd080: libexec/getty/ttys.5: document correct "dialup" flag.
Branches
Unknown
Tags
Unknown