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:   Thu, 26 Aug 2021 18:16:56 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>,
        Networking <netdev@...r.kernel.org>
Subject: Question about inet_rtm_getroute_build_skb()

Hi Roopa

I noticed inet_rtm_getroute_build_skb() has this endian issue 
when building an UDP header.

Would the following fix break user space ?

Thanks.

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a6f20ee3533554b210d27c4ab6637ca7a05b148b..50133b935f868c2ae9474eea027a0ad864a43936 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3170,7 +3170,7 @@ static struct sk_buff *inet_rtm_getroute_build_skb(__be32 src, __be32 dst,
                udph = skb_put_zero(skb, sizeof(struct udphdr));
                udph->source = sport;
                udph->dest = dport;
-               udph->len = sizeof(struct udphdr);
+               udph->len = htons(sizeof(struct udphdr));
                udph->check = 0;
                break;
        }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ