Thread (7 messages) 7 messages, 4 authors, 2020-07-29

Re: [Linux-kernel-mentees] [PATCH v2] net: ipv6: fix use-after-free Read in __xfrm6_tunnel_spi_lookup

From: David Miller <davem@davemloft.net>
Date: 2020-07-29 00:36:34
Also in: lkml, netdev

From: B K Karthik <redacted>
Date: Sun, 26 Jul 2020 08:38:55 +0530
quoted hunk ↗ jump to hunk
@@ -103,10 +103,10 @@ static int __xfrm6_tunnel_spi_check(struct net *net, u32 spi)
 {
 	struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
 	struct xfrm6_tunnel_spi *x6spi;
-	int index = xfrm6_tunnel_spi_hash_byspi(spi);
+	int index = xfrm6_tunnel_spi_hash_byaddr((const xfrm_address_t *)spi);
We can cast this a thousand times to make the compiler quiet, but the
fact is that this function does not expect an integer SPI as an
argument.

It expects a protocol address.

Please stop forcing this fix, I fear you don't understand how this code
works.  Come back to us when you do.

Thank you.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help