Re: git: ded77e0237a8 - main - Allow the BPF to be select for write. This is needed for boost:asio which otherwise fails to handle BPFs. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D31967

From: Mark Johnston <markj_at_freebsd.org>
Date: Thu, 14 Oct 2021 14:25:37 UTC
On Wed, Oct 13, 2021 at 07:54:50AM +0000, Hartmut Brandt wrote:
> The branch main has been updated by harti:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=ded77e0237a8534230746031f373d8a8ae80cdaa
> 
> commit ded77e0237a8534230746031f373d8a8ae80cdaa
> Author:     Hartmut Brandt <harti@FreeBSD.org>
> AuthorDate: 2021-10-10 15:03:51 +0000
> Commit:     Hartmut Brandt <harti@FreeBSD.org>
> CommitDate: 2021-10-10 15:03:51 +0000
> 
>     Allow the BPF to be select for write. This is needed for boost:asio
>     which otherwise fails to handle BPFs.
>     Reviewed by:    ae
>     Differential Revision:  https://reviews.freebsd.org/D31967

Hi,

syzbot found a bug in this change:
https://syzkaller.appspot.com/bug?id=a99f705b2b8b854d70ec4d47eed481c90046bd3c

It seems that filt_bpfwrite() needs to check whether d->bd_bif == NULL
before dereferencing.