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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Sep 2014 08:55:21 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Linux Netdev List' <netdev@...r.kernel.org>,
	'David Miller' <davem@...emloft.net>
Subject: [PATCH V2 net] core: Don't attempt to load the "" driver.

Requests like 'ifconfig ""' cause dev_load(net, "") be called, since
request_module("") return 0 (success) this generates the error message:
"Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev- instead."

Since dev_load() doesn't have to work, just ignore such names.

Signed-off-by: David Laight <david.laight@...lab.com>
---

V2: Added sign off.

If you search for the above error message, you'll find a lot of complaints.
While the applications shouldn't be calling an SIOCxxx ioctl with ifr_name[0] == 0
the kernel shouldn't be tracing the error either.

Due to the complaints from users, this might be a backport candidate.

net/core/dev_ioctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index cf999e0..84edf16 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -358,6 +358,9 @@ void dev_load(struct net *net, const char *name)
 	struct net_device *dev;
 	int no_module;
 
+	if (!name[0])
+		return;
+
 	rcu_read_lock();
 	dev = dev_get_by_name_rcu(net, name);
 	rcu_read_unlock();
-- 
1.8.1.2



--
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