lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  8 Aug 2020 03:16:01 -0400
From:   Paul Hollinsky <phollinsky@...technik.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, andriin@...com,
        ast@...nel.org, bpf@...r.kernel.org, daniel@...earbox.net,
        hawk@...nel.org, john.fastabend@...il.com, kafai@...com,
        kpsingh@...omium.org, songliubraving@...com, yhs@...com,
        Paul Hollinsky <phollinsky@...technik.com>
Subject: [PATCH] xdp: ensure initialization of txq in xdp_buff

xdp->txq was uninitialized and could be used from within a bpf program.

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

Signed-off-by: Paul Hollinsky <phollinsky@...technik.com>
---
 net/core/dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 7df6c9617321..12be8fef8b7e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4649,6 +4649,8 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
 	rxqueue = netif_get_rxqueue(skb);
 	xdp->rxq = &rxqueue->xdp_rxq;
 
+	xdp->txq = NULL;
+
 	act = bpf_prog_run_xdp(xdp_prog, xdp);
 
 	/* check if bpf_xdp_adjust_head was used */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ