O_PATH: disable kqfilter for fifos
Filter on fifos is real filter for the object, and not a filesystem events filter like EVFILT_VNODE. Reported by: markj using syzkaller Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
72a42ec63b
commit
2082565798
@ -427,7 +427,10 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
|
||||
return (error);
|
||||
}
|
||||
if ((fmode & O_PATH) != 0) {
|
||||
error = VOP_ACCESS(vp, VREAD, cred, td);
|
||||
if (vp->v_type == VFIFO)
|
||||
error = EPIPE;
|
||||
else
|
||||
error = VOP_ACCESS(vp, VREAD, cred, td);
|
||||
if (error == 0)
|
||||
fp->f_flag |= FKQALLOWED;
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user