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:	Fri, 29 Aug 2008 11:53:31 -0300
From:	Breno Leitao <leitao@...ux.vnet.ibm.com>
To:	David Miller <davem@...emloft.net>
CC:	netdev <netdev@...r.kernel.org>, Lorandi <rafaello@...ibm.com>
Subject: [PATCH 1/1 net-2.6] Re-enable IP when MTU > 68

Actually if you run "ifconfig ethX mtu 56; ifconfig ethX mtu 1500",
then your interface will get corrupted. On an attempt to assign an IP
to the interface, it'll result in:
SIOCSIFADDR: No buffer space available
This happens because when decreasing the MTU under 68, it'll destroy the
in_dev reference forever, even after getting MTU higher than 68 bytes.

This patch just checks if the in_dev is NULL on a NETDEV_CHANGEMTU event
and if MTU is bigger than 68, then re-enable in_dev 

Signed-off-by: Breno Leitao <leitao@...ux.vnet.ibm.com>

---

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 91d3d96..758b4f6 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1048,6 +1048,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
 				IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
 				IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
 			}
+		} else if (event == NETDEV_CHANGEMTU) {
+			/* Re-enabling IP */
+			if (dev->mtu > 68)
+				in_dev = inetdev_init(dev);
 		}
 		goto out;
 	}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ