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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 May 2014 22:53:19 +0930
From:	David Newall <>
To:	Netdev <>
Subject: Re: Bad checksum on bridge with IP options

I've got a patch which fixes the faulty checksums, and now ping works 
with RR or TS set.  I'm not quite sure, though, that it fixes the right 
thing.  I wonder if the problem is less that the checksum becomes wrong, 
and more that the route and timestamps ought not to be changed by the 
bridge interface.

Anyway, for discussion, here's the patch:

--- br_netfilter.c.orig	2014-05-12 22:10:59.809988125 +0930
+++ br_netfilter.c	2014-05-12 22:27:46.769299379 +0930
@@ -261,8 +261,10 @@
  static int br_parse_ip_options(struct sk_buff *skb)
  	struct ip_options *opt;
-	const struct iphdr *iph;
+	struct iphdr *iph;
  	struct net_device *dev = skb->dev;
+	__sum16 oldsum;
+	int err;
  	u32 len;
  	if (!pskb_may_pull(skb, sizeof(struct iphdr)))
@@ -298,8 +300,15 @@
  	if (iph->ihl == 5)
  		return 0;
+	oldsum = iph->check;
  	opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
-	if (ip_options_compile(dev_net(dev), opt, skb))
+	err = ip_options_compile(dev_net(dev), opt, skb);
+	ip_send_check(iph);
+	if (iph->check != oldsum)
+			pr_fmt("br_parse_ip_options: bad sum %x replaced by %x\n"),
+			                       oldsum, iph->check);
+	if (err)
  		goto inhdr_error;
  	/* Check correct handling of SRR option */

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists