[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_171E741F760F671C3CCD379896E236784A09@qq.com>
Date: Thu, 28 Mar 2024 06:55:08 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+af9492708df9797198d6@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bpf?] [net?] general protection fault in dev_map_enqueue
please test null ptr deref in dev_map_enqueue
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 66a27abac311
diff --git a/net/core/filter.c b/net/core/filter.c
index 8adf95765cdd..721b85aebf58 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -4381,6 +4381,10 @@ static __always_inline int __xdp_do_redirect_frame(struct bpf_redirect_info *ri,
err = dev_map_enqueue_multi(xdpf, dev, map,
ri->flags & BPF_F_EXCLUDE_INGRESS);
} else {
+ if (unlikely(!fwd)) {
+ err = -EINVAL;
+ break;
+ }
err = dev_map_enqueue(fwd, xdpf, dev);
}
break;
Powered by blists - more mailing lists