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]
Message-Id: <20180805194801.173032-1-willemdebruijn.kernel@gmail.com>
Date:   Sun,  5 Aug 2018 15:48:01 -0400
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, stephen@...workplumber.org,
        Willem de Bruijn <willemb@...gle.com>
Subject: [PATCH net-next] net: report netlink extack only if set

From: Willem de Bruijn <willemb@...gle.com>

Initialize extack in dev_set_mtu and report only if set.

Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
Reported-by: syzbot <syzkaller@...glegroups.com>
Signed-off-by: Willem de Bruijn <willemb@...gle.com>
---
 net/core/dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 36e994519488e..1d0122a766019 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7580,11 +7580,11 @@ int dev_set_mtu_ext(struct net_device *dev, int new_mtu,
 
 int dev_set_mtu(struct net_device *dev, int new_mtu)
 {
-	struct netlink_ext_ack extack;
+	struct netlink_ext_ack extack = {};
 	int err;
 
 	err = dev_set_mtu_ext(dev, new_mtu, &extack);
-	if (err)
+	if (err && extack._msg)
 		net_err_ratelimited("%s: %s\n", dev->name, extack._msg);
 	return err;
 }
-- 
2.18.0.597.ga71716f1ad-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ