Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp706248lqb; Sun, 17 Mar 2024 03:09:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSEcJllAj0gbXStlDNh02wwPQWqN6BmS1zLm8Q+zhW+KtDMtA2qBBh58ez68ZoH8+U3q165ZsCmL2fmealuF2NfiHhhfYH6tbv5r6mjg== X-Google-Smtp-Source: AGHT+IHQ74yGAg6XYxOQydb0QP9JrOWlHo00qZhxPpCq66vSNF2fDPb/e6XtytfDMnrGC+nmJfGl X-Received: by 2002:a05:6a20:3943:b0:1a3:50be:b3bb with SMTP id r3-20020a056a20394300b001a350beb3bbmr5487546pzg.53.1710670156049; Sun, 17 Mar 2024 03:09:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710670156; cv=pass; d=google.com; s=arc-20160816; b=kt+SeJSUv6P4AQJLiJDQ6RYjkU91QqYAX1DxQWKioDQDB853VdgXO6Q0PKMpIpyfci /EgYc/C25yPFel30Fe+SqslBotMMopn+7h92xanxsO5QRYHSvVeibbeJ0Vrwl0jm03qX BWKVTxKLBY4pjHNBerEtPm+DPdIjdUd+2zC+e7ZntcPs5/NW3C2hKPwYl7KYQuZFMXei fBKxevwEBs2kMzrfr1h+0dyJ2kRsGN4y+FbdOtR6I+r7Zi6YHAdgrc9GUPPqwN2ktvXd aSp7XmLvGqiFNT4ctD/bYRkOVdUTRxMvgHZpGSq7ykXThAkz1xrNJBr+5M1s51o0MuOg Gehg== 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=fMlnLDJlvqOZHXCTdTjL0zXeqD495Qlboc+Sc39bAXs=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=YzcH2GR+d1Ph1En9TrTFd5dFMSt8qowLxfDg3jS5ntD2HcoZluYZUcIcVNsSYaL1Mt jEa8KwgLYuJxQhCctNwSyeMGtAp61uovMvEAP+rExquumSxOyBiXqOAVHRuMR8huVa/I eoQkm+S5P/IpuRqPXI3AyKTz/O4qj4YRxFAu+VVGDwrPBi5t81kSIdRlo0IEl97Y+mOt Yj3WElQpcw9IzrjE+fi9eXfEsG2CHuPCzQlEXavSSU8w1yIV80oka+CgxmXxo9W7mnJu l1lnb6kw8lgYzi7KGp7pUqD549FVJd498ls97kb9QlARqU5bmZRWCE9M6HxTUYbwqXlZ Bd2A==; 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-105372-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105372-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q5-20020a17090a9f4500b0029c785020c3si6105180pjv.23.2024.03.17.03.09.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 03:09:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105372-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-105372-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105372-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 ABB69281127 for ; Sun, 17 Mar 2024 10:09:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 489A718E1D; Sun, 17 Mar 2024 10:07:41 +0000 (UTC) Received: from mail115-95.sinamail.sina.com.cn (mail115-95.sinamail.sina.com.cn [218.30.115.95]) (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 6588D1429E for ; Sun, 17 Mar 2024 10:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.95 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710670060; cv=none; b=d5tGuwhsC5ejxF2skEeGBIOw+reUcoJJo+jxeH5xb1loN+DAT1x2KQeE5TPcuOkxPtpUgnXUxlrWCozj59NhuTNYMmW8WzX6Tj33YZCaXfIRkX/o/uK6ckTQt9RuaMS8JfmGuNAJZuE3hmOQf4M2OoVhKf/Y27cSCwokL3LZEqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710670060; c=relaxed/simple; bh=Dd+txECsWPxDo8/UX9xOHTYg/YqF/JMxmfWhmQhjSdk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N6Jwt+OmRo+dFouI1wK4/MBNt9O2UNO/SpYT1TIGMn43lUsM+3DWfEYrM2FlabHozacIEzu7yPw/v7e6wPmk+3/75+lcKl6bGuQiIXerpnywNrktp1n2OOSoJ06v+OwqU+wFs4pYeEQQ1K/jnQ6oB1V0zEvLpvh92PplNyg24mM= 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=218.30.115.95 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)([116.24.9.14]) by sina.com (172.16.235.24) with ESMTP id 65F6C04B00001617; Sun, 17 Mar 2024 18:05:02 +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: 20741545089403 X-SMAIL-UIID: B3FC33FDA7A341D68DA4CFD9E69C11CF-20240317-180502-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [netfilter?] KASAN: slab-use-after-free Read in ip_skb_dst_mtu Date: Sun, 17 Mar 2024 18:04:51 +0800 Message-Id: <20240317100451.2053-1-hdanton@sina.com> In-Reply-To: <0000000000008b9c410612fbd266@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 Wed, 06 Mar 2024 02:57:18 -0800 > syzbot found the following issue on: > > HEAD commit: 805d849d7c3c Merge tag 'acpi-6.8-rc7' of git://git.kernel... > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1025fa6a180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e --- x/drivers/net/ipvlan/ipvlan_core.c +++ y/drivers/net/ipvlan/ipvlan_core.c @@ -426,6 +426,7 @@ static noinline_for_stack int ipvlan_pro .daddr = ip4h->daddr, .saddr = ip4h->saddr, }; + struct sock *sk; rt = ip_route_output_flow(net, &fl4, NULL); if (IS_ERR(rt)) @@ -439,7 +440,12 @@ static noinline_for_stack int ipvlan_pro memset(IPCB(skb), 0, sizeof(*IPCB(skb))); + sk = skb->sk; + if (!sk) + goto err; + refcount_inc(&sk->sk_wmem_alloc); err = ip_local_out(net, skb->sk, skb); + sk_free(sk); if (unlikely(net_xmit_eval(err))) DEV_STATS_INC(dev, tx_errors); else --- x/kernel/rcu/tree.c +++ y/kernel/rcu/tree.c @@ -4025,6 +4025,7 @@ static void rcu_barrier_entrain(struct r wake_nocb = was_alldone && rcu_segcblist_pend_cbs(&rdp->cblist); if (rcu_segcblist_entrain(&rdp->cblist, &rdp->barrier_head)) { atomic_inc(&rcu_state.barrier_cpu_count); + wake_nocb = true; } else { debug_rcu_head_unqueue(&rdp->barrier_head); rcu_barrier_trace(TPS("IRQNQ"), -1, rcu_state.barrier_sequence); --