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]
Message-ID: <20240210063527.792-1-hdanton@sina.com>
Date: Sat, 10 Feb 2024 14:35:25 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+5a630f8ca0120ab43f55@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in __unix_gc

On Fri, 09 Feb 2024 06:57:17 -0800
> HEAD commit:    e7689879d14e ethtool: do not use rtnl in ethnl_default_dum..
> git tree:       net-next
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=165f9cec180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git  main

--- x/net/unix/garbage.c
+++ y/net/unix/garbage.c
@@ -119,6 +119,7 @@ void unix_inflight(struct user_struct *u
 		if (!u->inflight) {
 			WARN_ON_ONCE(!list_empty(&u->link));
 			list_add_tail(&u->link, &gc_inflight_list);
+			sock_hold(&u->sk);
 		} else {
 			WARN_ON_ONCE(list_empty(&u->link));
 		}
@@ -350,6 +351,11 @@ static void __unix_gc(struct work_struct
 	}
 #endif
 
+	list_for_each_entry_safe(u, next, &gc_candidates, link) {
+		list_del(&u->link);
+		sock_put(&u->sk);
+	}
+
 	spin_lock(&unix_gc_lock);
 
 	/* All candidates should have been detached by now. */
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ