Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp7395lqk; Fri, 8 Mar 2024 20:54:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6DQmNF1+e5mr5RmpnxgPUsYWiepa1IgXZIQ8vbMz9sAfthfgkIo6JZhacAAK9WKa8pEubBeWyAeuVIJtGdFMdN5plQlqSJXme/PecNQ== X-Google-Smtp-Source: AGHT+IGA5Twv9h6P7pSArYuizZp4mhGZirJplmFNHP7vpvkKzGQgvoRx4nkqzHDqSq2Ye+kN1Ljo X-Received: by 2002:a17:902:d302:b0:1dd:6a1b:2736 with SMTP id b2-20020a170902d30200b001dd6a1b2736mr539017plc.65.1709960055273; Fri, 08 Mar 2024 20:54:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709960055; cv=pass; d=google.com; s=arc-20160816; b=V/waM+6JGQ/QWpKJovi3AOcjnIjBY77To/rUAN/FA0FxhdQilaXR5IOWz1E1KPtSSu x1iYRZ7YnIF2PUKxztFZkRbI3Ney8vHRFZkm3/Xwif+V1zHTf/mm3e+owOqxX+6qDBHG si3XGoa1PlqRy8x9i0B5jg/V363Dpw5pGFpW/pVrfwyqOJcHYO4b9kxbtBBp1mB/g0M+ zxgq2H+UHLroB7pwM3H+34jaU+Meje1tkKtJ5hmmcDCIOMfdlWwcjCsw9orbd93pvq4t DvFqs1tcoD/RE4C4+2u1Kq3Hz5NkHCLeaRUykU6dyx72IhQ+sFUDfbO3qUGpVLgthenQ /ZhA== 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=sGI2tmN407NCvWX/62W5Xs239gabkA1MZLw0PV32qu4=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=CLiCCEuvkPbFRbulCeJ6ISVjH4enwxlgarhmwLdPcdK7H4JMA7eIih51FfOQZsKuG+ hdGOQhpqe36MJndzsuCqwk1bxF9wO+AHXPXHrntkQhy52IvgzKLafVXQLvNxnD/W0RHq oEMLwIzLDwjd7jVxPJmRHem/e3/0wRhp3TDZutAEi6sx8tvrsFAz/WQAWZtDYaOTgWBJ QnkPC09voRVVn1UINhAk72K9ujlCfy6+0CFkxGl0xqYp+/vyT7VFRb/nLkpRhrAU9SrN rmYEjUcuexWJ2k/RyPdOphPqU8iwBG8NYEAhBsVZpsJF3gvHtaB98tG3PLF3c48axIPN Mt8Q==; 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-97771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97771-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i1-20020a170902cf0100b001d8a9162f22si806108plg.60.2024.03.08.20.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 20:54:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-97771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97771-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 C23C928230C for ; Sat, 9 Mar 2024 04:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 318C736AE1; Sat, 9 Mar 2024 04:53:53 +0000 (UTC) Received: from mail115-63.sinamail.sina.com.cn (mail115-63.sinamail.sina.com.cn [218.30.115.63]) (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 2A24B16423 for ; Sat, 9 Mar 2024 04:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.63 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709960032; cv=none; b=QQVRQMLFBJs9Sz22FXvN3SdarN4w4rfjxDyYmtbVQHc2WWSXWH65R/FMneU2g0f1YitKte/DprBbyIy5ZTJitAWfEUB5HXGFs+gxd+yS2xOpY0QgZF8ZAWBmXalBULd6DBZnah0x3//rBvWocSDp2HoHgGFuuPrUcjfDEMYNDWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709960032; c=relaxed/simple; bh=8Kpf18XqyzxzsllkACOAHQXdWbsiql7yFH5fhKXF2e0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IgA5eIksSSRmZd0oHyPGJeZqjecoPyKxRNZLR1Y2GgbqIUub6J8mVNImp+jsfOhsKq19lrdn/miFUZXhyhPTMXTmV/gsbLe5CPtFCDHusHhQJNfHlCd6faCAkHzyjc1Yq0FXml2G1VNO6mMz4JEgBt+hQcwaGTx1xoVxTMxFqwc= 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.63 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 (10.75.12.45) with ESMTP id 65EBEB4F0000511B; Sat, 9 Mar 2024 12:53:37 +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: 46513731457852 X-SMAIL-UIID: 6A027B1896064BC9946C2C01DDDC20D6-20240309-125337-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 12:53:24 +0800 Message-Id: <20240309045324.1891-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 stable --- 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 --