On Thu, Apr 28, 2022 at 01:33:17PM +0200, Moritz Buhl wrote: > With the current snapshot the flock test lands me in ddb: > > OpenBSD 7.1-current (GENERIC.MP) #484: Wed Apr 27 09:30:18 MDT 2022 > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > ==== run-flock-25 ==== > ./flock 25 > kernel: protection fault trap, code=0 > Stopped at lf_clearlock+0x1c2: movq %rax,0(%rcx) > ddb{3}> bt > lf_clearlock(fffffd827a3f7b60) at lf_clearlock+0x1c2 > lf_advlock(ffff800000c1e920,0,fffffd823dffe1c8,2,ffff80002225f908,40) at > lf_advlock+0x2b8 > VOP_ADVLOCK(fffffd823df03548,fffffd823dffe1c8,2,ffff80002225f908,40) at > VOP_ADVLOCK+0x45 > closef(fffffd823d7f4b40,ffff8000221c3cf0) at closef+0x8f > syscall(ffff80002225fa20) at syscall+0x374 > Xsyscall() at Xsyscall+0x128 > end of kernel > end trace frame: 0x7f7ffffc6a00, count: -6
You need a newer kernel including the following commit. CVSROOT: /cvs Module name: src Changes by: [email protected] 2022/04/27 12:01:23 Modified files: sys/kern : vfs_lockf.c Log message: Remove the lock if an identical overlapping one is already present. Preventing a use after free discovered by syzkaller. ok visa@ Reported-by: [email protected] Reported-by: [email protected] Reported-by: [email protected] Reported-by: [email protected]
