* [PATCH net-next] net/sched: Fix kernel NULL pointer dereference
@ 2019-07-10 13:45 wenxu
2019-07-10 22:03 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: wenxu @ 2019-07-10 13:45 UTC (permalink / raw)
To: pablo, davem; +Cc: netfilter-devel, netdev
From: wenxu <wenxu@ucloud.cn>
[ 697.665184] BUG: kernel NULL pointer dereference, address: 0000000000000030
[ 697.665550] #PF: supervisor read access in kernel mode
[ 697.665906] #PF: error_code(0x0000) - not-present page
[ 697.666297] PGD 800000104e636067 P4D 800000104e636067 PUD ff4b02067 PMD 0
[ 697.666710] Oops: 0000 [#1] SMP PTI
[ 697.667115] CPU: 31 PID: 24466 Comm: modprobe Kdump: loaded Tainted: G O 5.2.0-rc6+ #1
[ 697.667867] Hardware name: Huawei Technologies Co., Ltd. RH1288 V3/BC11HGSC0, BIOS 3.57 02/26/2017
[ 697.668620] RIP: 0010:tc_indr_block_ing_cmd.isra.52+0x4c/0xb0
[ 697.669029] Code: 83 ec 40 65 48 8b 04 25 28 00 00 00 48 89 45 e8 31 c0 f3 48 ab 48 8b 06 49 8b b3 e8 04 00 00 44 89 45 b0 c7 45 b4 01 00 00 00 <8b> 48 30 48 89 75 c0 85 c9 48 8d 4d b0 0f 95 45 b8 48 85 c0 4c 8d
[ 697.670132] RSP: 0018:ffffc90007bf7958 EFLAGS: 00010246
[ 697.670537] RAX: 0000000000000000 RBX: ffff88905e2cbae8 RCX: 0000000000000000
[ 697.670938] RDX: ffff88905e2cbcd8 RSI: ffffffff823a8480 RDI: ffffc90007bf7990
[ 697.671352] RBP: ffffc90007bf79a8 R08: 0000000000000000 R09: ffff88905e2cbcc0
[ 697.671761] R10: ffff888107c07780 R11: ffff88902c249000 R12: ffff88905e2cbcd0
[ 697.672173] R13: ffff88905e2cbac0 R14: ffff88885596bc00 R15: ffff88905e2cbcc0
[ 697.672582] FS: 00007fe0b4095740(0000) GS:ffff88905fbc0000(0000) knlGS:0000000000000000
[ 697.673335] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 697.673746] CR2: 0000000000000030 CR3: 0000000ff46b4005 CR4: 00000000001606e0
[ 697.674156] Call Trace:
[ 697.674563] __tc_indr_block_cb_register+0x11e/0x3c0
[ 697.674998] mlx5e_nic_rep_netdevice_event+0x9e/0x110 [mlx5_core]
[ 697.675411] notifier_call_chain+0x53/0xa0
[ 697.675812] raw_notifier_call_chain+0x16/0x20
[ 697.676223] call_netdevice_notifiers_info+0x2d/0x60
[ 697.676633] register_netdevice+0x3fa/0x500
get indr_dev->block after check it.
Fixes: 955bcb6ea0df ("drivers: net: use flow block API")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
net/sched/cls_api.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 638c1bc..be899f7 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -684,13 +684,14 @@ static void tc_indr_block_ing_cmd(struct tc_indr_block_dev *indr_dev,
.command = command,
.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
.net = dev_net(indr_dev->dev),
- .block_shared = tcf_block_shared(indr_dev->block),
};
INIT_LIST_HEAD(&bo.cb_list);
if (!indr_dev->block)
return;
+ bo.block_shared = tcf_block_shared(indr_dev->block);
+
indr_block_cb->cb(indr_dev->dev, indr_block_cb->cb_priv, TC_SETUP_BLOCK,
&bo);
tcf_block_setup(indr_dev->block, &bo);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/sched: Fix kernel NULL pointer dereference
2019-07-10 13:45 [PATCH net-next] net/sched: Fix kernel NULL pointer dereference wenxu
@ 2019-07-10 22:03 ` Pablo Neira Ayuso
2019-07-10 23:13 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-07-10 22:03 UTC (permalink / raw)
To: wenxu; +Cc: davem, netfilter-devel, netdev
On Wed, Jul 10, 2019 at 09:45:04PM +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> [ 697.665184] BUG: kernel NULL pointer dereference, address: 0000000000000030
> [ 697.665550] #PF: supervisor read access in kernel mode
> [ 697.665906] #PF: error_code(0x0000) - not-present page
> [ 697.666297] PGD 800000104e636067 P4D 800000104e636067 PUD ff4b02067 PMD 0
> [ 697.666710] Oops: 0000 [#1] SMP PTI
> [ 697.667115] CPU: 31 PID: 24466 Comm: modprobe Kdump: loaded Tainted: G O 5.2.0-rc6+ #1
> [ 697.667867] Hardware name: Huawei Technologies Co., Ltd. RH1288 V3/BC11HGSC0, BIOS 3.57 02/26/2017
> [ 697.668620] RIP: 0010:tc_indr_block_ing_cmd.isra.52+0x4c/0xb0
> [ 697.669029] Code: 83 ec 40 65 48 8b 04 25 28 00 00 00 48 89 45 e8 31 c0 f3 48 ab 48 8b 06 49 8b b3 e8 04 00 00 44 89 45 b0 c7 45 b4 01 00 00 00 <8b> 48 30 48 89 75 c0 85 c9 48 8d 4d b0 0f 95 45 b8 48 85 c0 4c 8d
> [ 697.670132] RSP: 0018:ffffc90007bf7958 EFLAGS: 00010246
> [ 697.670537] RAX: 0000000000000000 RBX: ffff88905e2cbae8 RCX: 0000000000000000
> [ 697.670938] RDX: ffff88905e2cbcd8 RSI: ffffffff823a8480 RDI: ffffc90007bf7990
> [ 697.671352] RBP: ffffc90007bf79a8 R08: 0000000000000000 R09: ffff88905e2cbcc0
> [ 697.671761] R10: ffff888107c07780 R11: ffff88902c249000 R12: ffff88905e2cbcd0
> [ 697.672173] R13: ffff88905e2cbac0 R14: ffff88885596bc00 R15: ffff88905e2cbcc0
> [ 697.672582] FS: 00007fe0b4095740(0000) GS:ffff88905fbc0000(0000) knlGS:0000000000000000
> [ 697.673335] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 697.673746] CR2: 0000000000000030 CR3: 0000000ff46b4005 CR4: 00000000001606e0
> [ 697.674156] Call Trace:
> [ 697.674563] __tc_indr_block_cb_register+0x11e/0x3c0
> [ 697.674998] mlx5e_nic_rep_netdevice_event+0x9e/0x110 [mlx5_core]
> [ 697.675411] notifier_call_chain+0x53/0xa0
> [ 697.675812] raw_notifier_call_chain+0x16/0x20
> [ 697.676223] call_netdevice_notifiers_info+0x2d/0x60
> [ 697.676633] register_netdevice+0x3fa/0x500
>
> get indr_dev->block after check it.
>
> Fixes: 955bcb6ea0df ("drivers: net: use flow block API")
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/sched: Fix kernel NULL pointer dereference
2019-07-10 22:03 ` Pablo Neira Ayuso
@ 2019-07-10 23:13 ` Pablo Neira Ayuso
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-07-10 23:13 UTC (permalink / raw)
To: wenxu; +Cc: davem, netfilter-devel, netdev
On Thu, Jul 11, 2019 at 12:03:37AM +0200, Pablo Neira Ayuso wrote:
> On Wed, Jul 10, 2019 at 09:45:04PM +0800, wenxu@ucloud.cn wrote:
> > From: wenxu <wenxu@ucloud.cn>
> >
> > [ 697.665184] BUG: kernel NULL pointer dereference, address: 0000000000000030
> > [ 697.665550] #PF: supervisor read access in kernel mode
> > [ 697.665906] #PF: error_code(0x0000) - not-present page
> > [ 697.666297] PGD 800000104e636067 P4D 800000104e636067 PUD ff4b02067 PMD 0
> > [ 697.666710] Oops: 0000 [#1] SMP PTI
> > [ 697.667115] CPU: 31 PID: 24466 Comm: modprobe Kdump: loaded Tainted: G O 5.2.0-rc6+ #1
> > [ 697.667867] Hardware name: Huawei Technologies Co., Ltd. RH1288 V3/BC11HGSC0, BIOS 3.57 02/26/2017
> > [ 697.668620] RIP: 0010:tc_indr_block_ing_cmd.isra.52+0x4c/0xb0
> > [ 697.669029] Code: 83 ec 40 65 48 8b 04 25 28 00 00 00 48 89 45 e8 31 c0 f3 48 ab 48 8b 06 49 8b b3 e8 04 00 00 44 89 45 b0 c7 45 b4 01 00 00 00 <8b> 48 30 48 89 75 c0 85 c9 48 8d 4d b0 0f 95 45 b8 48 85 c0 4c 8d
> > [ 697.670132] RSP: 0018:ffffc90007bf7958 EFLAGS: 00010246
> > [ 697.670537] RAX: 0000000000000000 RBX: ffff88905e2cbae8 RCX: 0000000000000000
> > [ 697.670938] RDX: ffff88905e2cbcd8 RSI: ffffffff823a8480 RDI: ffffc90007bf7990
> > [ 697.671352] RBP: ffffc90007bf79a8 R08: 0000000000000000 R09: ffff88905e2cbcc0
> > [ 697.671761] R10: ffff888107c07780 R11: ffff88902c249000 R12: ffff88905e2cbcd0
> > [ 697.672173] R13: ffff88905e2cbac0 R14: ffff88885596bc00 R15: ffff88905e2cbcc0
> > [ 697.672582] FS: 00007fe0b4095740(0000) GS:ffff88905fbc0000(0000) knlGS:0000000000000000
> > [ 697.673335] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [ 697.673746] CR2: 0000000000000030 CR3: 0000000ff46b4005 CR4: 00000000001606e0
> > [ 697.674156] Call Trace:
> > [ 697.674563] __tc_indr_block_cb_register+0x11e/0x3c0
> > [ 697.674998] mlx5e_nic_rep_netdevice_event+0x9e/0x110 [mlx5_core]
> > [ 697.675411] notifier_call_chain+0x53/0xa0
> > [ 697.675812] raw_notifier_call_chain+0x16/0x20
> > [ 697.676223] call_netdevice_notifiers_info+0x2d/0x60
> > [ 697.676633] register_netdevice+0x3fa/0x500
> >
> > get indr_dev->block after check it.
> >
> > Fixes: 955bcb6ea0df ("drivers: net: use flow block API")
> > Signed-off-by: wenxu <wenxu@ucloud.cn>
>
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Please, toss this patch.
Vlad's patch provides a more complete fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-10 23:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 13:45 [PATCH net-next] net/sched: Fix kernel NULL pointer dereference wenxu
2019-07-10 22:03 ` Pablo Neira Ayuso
2019-07-10 23:13 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).