Re: WARNING in arch_install_hw_breakpoint

Kees Cook
2019-12-10T00:10:17Z

On Sun, Dec 08, 2019 at 07:33:00AM -0800, syzbot wrote:
> syzbot suspects this bug was fixed by commit:
>
> commit b3e5838252665ee4cfa76b82bdf1198dca81e5be
> Author: Christian Brauner <christian@brauner.io>
> Date: Wed Mar 27 12:04:15 2019 +0000
>
> clone: add CLONE_PIDFD

That seems ... unlikely? I suspect this WARN should just be pr_err or
something:

if (WARN_ONCE(i == HBP_NUM, "Can't find any breakpoint slot"))
return -EBUSY;

If it's reachable through normal code, it shouldn't be possible to trip
a WARN.

-Kees

>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1268377ae00000
> start commit: fd1f297b Merge tag 'drm-fixes-2019-03-22' of git://anongit..
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=9a31fb246de2a622
> dashboard link: https://syzkaller.appspot.com/bug?extid=370a6b0f11867bf13515
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15d8bd93200000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15439f27200000
>
> If the result looks correct, please mark the bug fixed by replying with:
>
> #syz fix: clone: add CLONE_PIDFD
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

--
Kees Cook