Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp890480lqc; Fri, 8 Mar 2024 15:15:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUuvSlFW+Lp3yI8qKVkqJB3U71CEDR3ZPHoXDduroIwjXcuNKpRjvieKTC47rHdvuXC53JXYI2cfvaviPA+NMd+/TIIWVEkqfcmhRpqgA== X-Google-Smtp-Source: AGHT+IF+qcekwkL2c6ngEWsER/dh18sGRBDTCzDoPviRo8S7r5fkeLilH0PR4WbN98fZk1DPjrOD X-Received: by 2002:a05:6a20:e68d:b0:1a0:e66f:e46 with SMTP id mz13-20020a056a20e68d00b001a0e66f0e46mr172876pzb.24.1709939731543; Fri, 08 Mar 2024 15:15:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709939731; cv=pass; d=google.com; s=arc-20160816; b=yJeAodyAEh017B6bztvQCcs1reYyZABtaskeXgQLmjyr3pMOYTc+sw5zPhAHy7lcI1 NLOBjVax/5yglpX67jaItc4ShRX6H0PfZzo3h2bV1eREUSvxUi18Ni9T9O1To99vHIKp Cxzfz2yxy+Or1tJsOb2wWdALGPROfZ6BpxI9kQRWIF1PGM7jDidOYhjCaj1lZORcpHPd NRVWW4RLkH3ljCXCj7vugHXNfUGVziZtX4NgYmDv2XYBR7lHrHY6JBGr3nEKu3ASYeg5 QQoC7zuwZq9IZkQ4Ag9Y0bxExrbJvhADl7/Ls2aaBTCtfnRTO7EYkDsh/bqvvZJTwbEp oTKQ== 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=16i1bO7iJG8ChUGPbb6af9z3OFKV1IUadI5ZL+7/Md4=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=qEWeSxyeE97cKiv5XvVZHnI6lDnsSAyN1g/eSIyor4Xdk/aIDbVvRHt1ArlWckus67 BmfrnhVAw0rakb0G1RKCTjbqjIcCgpG2LAkyPR/x5u777zZLC9mMLZJ/Z5/vVfuR6so7 Za98cZYFSTIPYr8NvlNCTAkSxsT/dEBRCvHe1El/OgAFhLk1lbOxhjUxYXSBUueyVOv6 B7MhOtSWtKC7PEdWhL+D2bVQT0imKzrvZpO1OBYC3J/uDMTXNqr6bu6sd35nTnJMYG+p nKCXObFjEbSWRNnS6Mi9QNC9ly5b7D4MlbBohc7tXKCJ+iNA29IKpvaukWAh8magZG1Z lmuQ==; 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-97688-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97688-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 ct27-20020a056a000f9b00b006e39d08cae0si424577pfb.31.2024.03.08.15.15.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 15:15:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97688-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-97688-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97688-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 37BF4282F25 for ; Fri, 8 Mar 2024 23:15:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D8F63BBC6; Fri, 8 Mar 2024 23:15:26 +0000 (UTC) Received: from mail115-100.sinamail.sina.com.cn (mail115-100.sinamail.sina.com.cn [218.30.115.100]) (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 76B872747F for ; Fri, 8 Mar 2024 23:15:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709939725; cv=none; b=bXOLIWpI9VYXiWyIsgfIb2HgaqI23dMhlcUMlkD/IjDqQQ5lqif+C5k5EbysoQpNFw8U+KC0kYfD4Hb01M1gZfKIO3PU1OBmT3ke+bFsqLNCGNPMvgX15SiNIwXKbFSKp5HE1q6lJeI6xV9hLYr58Av1F7S2884DapmXPC2rxOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709939725; c=relaxed/simple; bh=rpCivHGH1SvRdCp0RpPsL5ntpZhbHjIK5/qJ9OVB2WU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qmD6xI7gDMLtyDf9Y2A4MWh8XodDfLPR+oOdfFpgNkBh1d4UfXbcOmd4mgNM7eGxNJusReDNuy5/WkojdwpywUosSjpKSLJVE5r8lgTMszwBDBL14rHgONz8BZe9aoCzIs837armDr1G/xhnYqmvXlEQHFL9mQYIpV5GhJNBHAc= 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.100 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)([113.88.49.120]) by sina.com (172.16.235.24) with ESMTP id 65EB9BFD00007AE5; Fri, 9 Mar 2024 07:15:12 +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: 8372645089178 X-SMAIL-UIID: 7CE1160D4D6D4C32AB61D30819D572E6-20240309-071512-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: Sat, 9 Mar 2024 07:14:59 +0800 Message-Id: <20240308231459.1827-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/next/linux-next.git master --- 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 --