]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix NULL pointer dereference in __btf_resolve_helper_id()
authorPeilin Ye <yepeilin.cs@gmail.com>
Tue, 14 Jul 2020 18:09:04 +0000 (14:09 -0400)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 15 Jul 2020 20:53:39 +0000 (22:53 +0200)
commit42fd97e157b55bbdc1e901dcdb6d2dfa5fb6a342
treeb48c46430339fca6903d01995a8c6b5a57a9cf59
parentb348bf0ccfbf7bf3254d7b614f0798e26cc7342c
bpf: Fix NULL pointer dereference in __btf_resolve_helper_id()

Prevent __btf_resolve_helper_id() from dereferencing `btf_vmlinux`
as NULL. This patch fixes the following syzbot bug:

    https://syzkaller.appspot.com/bug?id=f823224ada908fa5c207902a5a62065e53ca0fcc

Reported-by: syzbot+ee09bda7017345f1fbe6@syzkaller.appspotmail.com
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200714180904.277512-1-yepeilin.cs@gmail.com
kernel/bpf/btf.c