Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1443220rdb; Sat, 10 Feb 2024 02:14:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9ZSyC7tlAyWaK70yeqI93anomLJSj2kIA7fYfSLoZ2WicEF1olpf+xiZdyXGDO7SMOnrd X-Received: by 2002:a05:6a20:c990:b0:19e:a1b5:e765 with SMTP id gy16-20020a056a20c99000b0019ea1b5e765mr1877043pzb.9.1707560096918; Sat, 10 Feb 2024 02:14:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707560096; cv=pass; d=google.com; s=arc-20160816; b=aSuE/3Yictt0QOts3/B5eeWSWeVrUgDBAABWBk+fL2ArMfGiUafTuz64SYrowlnysa YPjYWXvor5+NPZ6CU7aa76P3fNxvtjIh00KCtJFd/GyifvvJQsdS/jbDKLqXm6bVQZT+ IF58hBfA3B4PK9L+1j5LUv7DegRcLhAd63tj02+icRvg7pt528v4zGYWTcLU6hX2YveI QfohSP6xt0WA8Lj26azT2BUr8xYqtFHeGYJmfg9q5Cne0dzb+VH/mMLZTY2Qqv67DFbO 39wscttX6nOgm5Gy6sHFMQ7xIkrC3OODrXJED3VOpHb0SZUErqNQFk928gHFZUWUGc8v YKrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=+PJypyaw69QrwnKOZYqtooTIiqkgcv5ol7HLfrqZQb0=; fh=fkSGdVU4tws3fqS+PhVoXFlwcpFlhmUSH51s3QKgAtU=; b=A4bOuk3eYtUklh7P4EYcms3vgB7J7qkjZ4kmi3vp7wLuaIo0AcArFpi806gz3onEq+ nQrcHBJ3LA7toC2MZQ2tp/AjB9O/tJoeNrMPghysQxWf7cIC8eYwTZvycZfutdsD7D+J W7nTkz10zp9NRs+I2jfPs0YZg05iT/JRbNb709tvtpk7M4NC2N13Xg+HFDIlavelM3Fc BPtNUT6uU64YDbf0WSoPx6eSf1gv3tWIYFFmaaGJfaae2yEPnjwGC1jwOEM0fKpniO+E rEF9pBeLRRhGlEhSSvgear+dZr7BlB+Dqub9TDA2pj3n5Ox3NyTq1wOqVFVw3ohavDG6 E2Dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-60359-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60359-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWtfNXBT1O7HKknKHTmktOhTTJtQm8AbvrvrXr2Y8R42LpDh4ET/hx7xdDBQ/WnIFhZRMEUQzDVgo+POaDYCIhc0an/BUMqblqnUIESaA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id cz3-20020a17090ad44300b00296f87a7ae4si3235524pjb.107.2024.02.10.02.14.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 02:14:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60359-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-60359-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60359-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A153F2878DB for ; Sat, 10 Feb 2024 10:07:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30AFD364B4; Sat, 10 Feb 2024 10:07:28 +0000 (UTC) Received: from r3-11.sinamail.sina.com.cn (r3-11.sinamail.sina.com.cn [202.108.3.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E4973FF4 for ; Sat, 10 Feb 2024 10:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707559647; cv=none; b=kK0Vg1xbCKZJ7m/lUVFsGq/u/jUTONhR+108vCnmytcqfpwT8q1vzC5nZ9yxiWITQ37U/LeWB7cXBw/CPYqZELvU6qs/4uSAKYwlQbvy7FYEx71oWLr040obkeZNtyW3TdxVJCMO+hc0hvbxdH53FZERUGIPwmviMIPRxwxHhZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707559647; c=relaxed/simple; bh=bncHp+KynKit5GdnRUvkkBOQVy4uDJEyH4StRfN55pY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uauj7gRgdrvYtefexqpvwsBK3VWYnFPjuPpg7ykiYA5xnAfhizXEUZbmNxFTDf1HOVzB6t6cTZRYK5Fc1F1TI+1geeONiPjzjC//jd5klxhgyVW1BVhmDWuf+321/5n9gdy1XcmrHV3HyFXb5Nu7adNaNdTQT/8F2bM/xe9Buf4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=202.108.3.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.59.61]) by sina.com (10.182.253.22) with ESMTP id 65C74AD5000024FA; Sat, 10 Feb 2024 18:07:19 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 5193346816294 X-SMAIL-UIID: 19E4F75DB47141EDADB04BEC8D45A340-20240210-180719-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Kuniyuki Iwashima Subject: Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in __unix_gc Date: Sat, 10 Feb 2024 18:07:05 +0800 Message-ID: <20240210100707.817-1-hdanton@sina.com> In-Reply-To: <000000000000ee09930610f42470@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Test KI's fix [1]. [1] https://lore.kernel.org/netdev/20240209220453.96053-1-kuniyu@amazon.com/ #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 @@ -340,10 +340,11 @@ static void __unix_gc(struct work_struct __skb_queue_purge(&hitlist); #if IS_ENABLED(CONFIG_AF_UNIX_OOB) - list_for_each_entry_safe(u, next, &gc_candidates, link) { - struct sk_buff *skb = u->oob_skb; + while (!list_empty(&gc_candidates)) { + u = list_entry(gc_candidates.next, struct unix_sock, link); + if (u->oob_skb) { + struct sk_buff *skb = u->oob_skb; - if (skb) { u->oob_skb = NULL; kfree_skb(skb); } --