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: <20250703052837.15458-1-linma@zju.edu.cn>
Date: Thu,  3 Jul 2025 13:28:37 +0800
From: Lin Ma <linma@....edu.cn>
To: davem@...emloft.net,
	kuba@...nel.org,
	linma@....edu.cn,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	gregkh@...uxfoundation.org
Cc: stable@...nel.org
Subject: [PATCH v1 2/2] appletalk: Fix type confusion in handle_ip_over_ddp

This code uses "ipddp0" calling __dev_get_by_name(), believing it must
return device created in ipddp_init() function, ignoring the fact that a
malicious user could hijack the interface name.

Fortunately, the upstream kernel already removed the code via commit
85605fb694f0 ("appletalk: remove special handling code for ipddp"). This
fix should be applied to other stable versions.

Cc: stable@...nel.org
Signed-off-by: Lin Ma <linma@....edu.cn>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 net/appletalk/ddp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 8daa3a1bfa4c..9ecf90102d62 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1296,7 +1296,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
 	struct net_device_stats *stats;
 
 	/* This needs to be able to handle ipddp"N" devices */
-	if (!dev) {
+	if (!dev || dev->type != ARPHRD_IPDDP) {
 		kfree_skb(skb);
 		return NET_RX_DROP;
 	}
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ