HomeFreeBSD

Avoid releasing object PIP in vn_sendfile() if no pages were grabbed.

Description

Avoid releasing object PIP in vn_sendfile() if no pages were grabbed.

sendfile(2) optionally takes a set of headers that get prepended to the
file data. If the request length is less than that of the headers,
sendfile may not allocate an sfio structure, in which case its pointer
is null and we should be careful not to dereference. This was
introduced in r356902.

Reported by: syzkaller
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on
Parents
rS357573: Fix map locking in the CLEAR_PKRU sysarch(2) handler.
Branches
Unknown
Tags
Unknown