[PATCH v2] net: fix a data race when get vlan device

2021-04-19 Thread zhudi
From: Di Zhu We encountered a crash: in the packet receiving process, we got an illegal VLAN device address, but the VLAN device address saved in vmcore is correct. After checking the code, we found a possible data competition: CPU 0: CPU 1: (RCU read lock)

Re: [PATCH] net: fix a data race when get vlan device

2021-04-19 Thread zhudi (J)
> On 2021/4/17 20:33, zhudi (J) wrote: > >> On 2021/4/16 11:27, zhudi (J) wrote: > >>>> dependencyOn 2021/4/15 11:35, zhudi wrote: > >>>>> From: Di Zhu > >>>>> > >>>>> We encountered a crash: in the packet rece

Re: [PATCH] net: fix a data race when get vlan device

2021-04-17 Thread zhudi (J)
> On 2021/4/16 11:27, zhudi (J) wrote: > >> dependencyOn 2021/4/15 11:35, zhudi wrote: > >>> From: Di Zhu > >>> > >>> We encountered a crash: in the packet receiving process, we got an > >>> illegal VLAN device address, but the VLAN dev

Re: [PATCH] net: fix a data race when get vlan device

2021-04-15 Thread zhudi (J)
> dependencyOn 2021/4/15 11:35, zhudi wrote: > > From: Di Zhu > > > > We encountered a crash: in the packet receiving process, we got an > > illegal VLAN device address, but the VLAN device address saved in > > vmcore is correct. After checking the code, we foun

[PATCH] net: fix a data race when get vlan device

2021-04-14 Thread zhudi
From: Di Zhu We encountered a crash: in the packet receiving process, we got an illegal VLAN device address, but the VLAN device address saved in vmcore is correct. After checking the code, we found a possible data competition: CPU 0: CPU 1: (RCU read lock)

答复: [PATCH] net/sched: act_pedit: fix a NULL pointer deref in tcf_pedit_init

2021-03-09 Thread zhudi (J)
> > hello, thanks for the patch! > > On Tue, 2021-03-09 at 11:47 +0800, zhudi wrote: > > From: Di Zhu > > > > when we use syzkaller to fuzz-test our kernel, one NULL pointer > dereference > > BUG happened: > > > > Write of size 96 at

[PATCH] net/sched: act_pedit: fix a NULL pointer deref in tcf_pedit_init

2021-03-08 Thread zhudi
From: Di Zhu when we use syzkaller to fuzz-test our kernel, one NULL pointer dereference BUG happened: Write of size 96 at addr 0010 by task syz-executor.0/22376 == BUG: unable to handle kernel NULL pointer dereference a

Re: [PATCH] bonding: 3ad: fix a use-after-free in bond_3ad_state_machine_handle

2021-03-07 Thread zhudi (J)
> >From: Di Zhu > > > >I use the similar test method described in link below with KASAN enabled: > >https://lore.kernel.org/netdev/4c5e467e07fb410ab4135b391d663ec1@hua > wei. > >com/ > >soon after, KASAN reports: > >[ 9041.977110] > >= >

[PATCH] bonding: 3ad: fix a use-after-free in bond_3ad_state_machine_handle

2021-03-05 Thread zhudi
From: Di Zhu I use the similar test method described in link below with KASAN enabled: https://lore.kernel.org/netdev/4c5e467e07fb410ab4135b391d663...@huawei.com/ soon after, KASAN reports: [ 9041.977110] == [ 9041.977151] BUG: KASA

[PATCH] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-01-25 Thread zhudi
From: Di Zhu pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and if the two cpus are not equal, BUG_ON() will take effect causin

[PATCH v3] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-20 Thread zhudi
From: Di Zhu "ip addr show" command execute error when we have a physical network card with a large number of VFs The return value of if_nlmsg_size() in rtnl_calcit() will exceed range of u16 data type when any network cards has a larger number of VFs. rtnl_vfinfo_size() will significant increas

[PATCH v2] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-19 Thread zhudi
"ip addr show" command execute error when we have a physical network card with a large number of VFs The return value of if_nlmsg_size() in rtnl_calcit() will exceed range of u16 data type when any network cards has a larger number of VFs. rtnl_vfinfo_size() will significant increase needed dump s

Re: [PATCH] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-18 Thread zhudi (J)
> On Sat, 17 Oct 2020 14:34:11 +0200 Michal Kubecek wrote: > > On Fri, Oct 16, 2020 at 10:02:38AM +0800, zhudi wrote: > > > "ip addr show" command execute error when we have a physical > network > > > card with number of VFs larger than 247. > >

答复: [PATCH] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-18 Thread zhudi (J)
! > > CC: David Ahern > > As he's mentioned this bug. > .. > Kernel documentation says for you to use your real name, please do so, > unless you're a rock star and have officially changed your name to zhudi. > May be I should use name such as di.zhu to

Re: [PATCH] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-18 Thread zhudi (J)
> On Fri, Oct 16, 2020 at 10:02:38AM +0800, zhudi wrote: > > "ip addr show" command execute error when we have a physical network > > card with number of VFs larger than 247. > > > > The return value of if_nlmsg_size() in rtnl_calcit() will exceed range > &

[PATCH] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-15 Thread zhudi
promoting min_dump_alloc data type to u32 to avoid data overflow and it's also align with the data type of struct netlink_callback{}.min_dump_alloc which is assigned by return value of rtnl_calcit() Signed-off-by: zhudi --- include/linux/netlink.h | 2 +- net/core/rtnetlink.c| 8 2 f

[PATCH] netlink: fix a data race in netlink_rcv_wake()

2020-08-26 Thread zhudi
of skb_queue_empty() for the read in netlink_rcv_wake() Signed-off-by: zhudi --- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index b5f30d7d30d0..d2d1448274f5 100644 --- a/net/netlink/af_netlink.c +++ b/