aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/split
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-10-02 15:45:49 +0000
committerMark Johnston <markj@FreeBSD.org>2019-10-02 15:45:49 +0000
commit4a7b33ecf4d85cc3d2fea014db55f3d6af9e6641 (patch)
tree63353174c2d0a8a66bfe65d1d8ad2fc38709e3b0 /usr.bin/split
parent8495fa081bb0c8a4be80488972fca09c9400f53c (diff)
downloadsrc-4a7b33ecf4d85cc3d2fea014db55f3d6af9e6641.tar.gz
src-4a7b33ecf4d85cc3d2fea014db55f3d6af9e6641.zip
Disallow fcntl(F_READAHEAD) when the vnode is not a regular file.
The mountpoint may not have defined an iosize parameter, so an attempt to configure readahead on a device file can lead to a divide-by-zero crash. The sequential heuristic is not applied to I/O to or from device files, and posix_fadvise(2) returns an error when v_type != VREG, so perform the same check here. Reported by: syzbot+e4b682208761aa5bc53a@syzkaller.appspotmail.com Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21864
Notes
Notes: svn path=/head/; revision=353010
Diffstat (limited to 'usr.bin/split')
0 files changed, 0 insertions, 0 deletions