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:   Sat, 20 Aug 2022 03:24:34 -0700
From:   lily <floridsleeves@...il.com>
To:     ziw002@....ucsd.edu, lizhong@...d.edu, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     lily <floridsleeves@...il.com>, davem@...emloft.net,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com
Subject: [PATCH v1] net/ipv6/addrconf.c: Check the return value of __in6_dev_get() in addrconf_type_change()

The function __in6_dev_get() could return NULL pointer. This needs to be
checked before used in ipv6_mc_remap() and ipv6_mc_unmap(). Otherwise it
could result in null pointer dereference.
---
 net/ipv6/addrconf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b624e3d8c5f0..b5e490fe0bcd 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3718,6 +3718,9 @@ static void addrconf_type_change(struct net_device *dev, unsigned long event)
 
 	idev = __in6_dev_get(dev);
 
+	if(!idev)
+		return;
+	
 	if (event == NETDEV_POST_TYPE_CHANGE)
 		ipv6_mc_remap(idev);
 	else if (event == NETDEV_PRE_TYPE_CHANGE)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ