Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp507987lqc; Fri, 8 Mar 2024 04:22:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVBt2PH8ql3/A2gr8STu6tqr1s2D6x6XgDpwrSL7Xb+owbFnX576jyIWGdZSlNRvNzg6lsP2EM3pG00NcZZ1KR19amQHhvXoyYp1vnb7w== X-Google-Smtp-Source: AGHT+IGC2/dWjgrkvl7Ew8iLw1Sy3gA/JdrS7cGv/pZvzRMi7slgrxEZF9PtsQEeDXSo0euu1zvg X-Received: by 2002:a05:6a20:d495:b0:1a1:87c7:2d03 with SMTP id im21-20020a056a20d49500b001a187c72d03mr587768pzb.33.1709900540263; Fri, 08 Mar 2024 04:22:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709900540; cv=pass; d=google.com; s=arc-20160816; b=lw/HV0CXkGT+57g0UjmBkKn/PjfgqJy5QzP2vy9AlgM317sB7hYeD38mEjmJK8NaAx UZV9NkcaY5+i0QkS+TJHESrCoKjZToPku2QYcrbHT7FzkR1TjL5HmYni8Us1YzCgCXkI OKsRLPNSzm3lciOu7rpHANaywUyAhkRJ1N9JJzaim6dSljhIjCN6Q3mqHtTJbZsTojOr eZc2PLgG0YPt7xdpqrOrBFxJz3UH+9pgHwxyi+wOzT6w7o5XmavCa+sbCl3FCEHjs6UT je+ZMqP1MLlcbxEA1G0CegJj2QdLOutHffXVv6Izq5Zbm+7OnpH7or886EU1NFRJVU7S dyTg== 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=oFWm8xF50w3BTGGDeSWUi47XG74XGMuxfMopgpzdTN4=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=t0Mi43hMnO3odoGnlsfkqNQFrmjVFa/QS3j5zWJvAhkjT6eHfCzQq4nuZ+LfqJVvAG EqUtssL1KKzOngWrW/5/qa7um87QhgaFxdL5mR5y2RuNxMPKnS61iDlC2ktbPKkIu5+1 R8bVDwl/byAHR85uwKvHFedhUtu23roVhPw8VADlXTFn6iFpUcezjxTLE9NYcr4foNDg UtrFJMCrbWO5FcYSvUB7xETlg39VhEPZxDpKMqJbyvZDrH2RNC60/IlqRs2ao8k1eh86 YKnipUgYTQ2g/ynAiSA5gDUM1+6kx1RamCTS5LxuqHFwoeUJKDS4NCmTX3IHb6q7wYry FtTw==; 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-96990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96990-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 d7-20020a63ed07000000b005d8b49c9b43si15888192pgi.693.2024.03.08.04.22.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 04:22:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96990-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-96990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96990-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 345B8284B35 for ; Fri, 8 Mar 2024 12:16:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA1F756768; Fri, 8 Mar 2024 12:16:24 +0000 (UTC) Received: from mail78-58.sinamail.sina.com.cn (mail78-58.sinamail.sina.com.cn [219.142.78.58]) (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 F3ED356756 for ; Fri, 8 Mar 2024 12:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709900184; cv=none; b=Z10sUZK8XnKsYx7mmoZkRAcuy1w8CEgZEGSI0RxPYdUV3GVMe3HwHAmsIbsHsWyzGTyuo9QRSmsmUTxkOi+74XsEtpuYHaP90MJkv+Ym2Z3+3wkLgbQxGQH+rWirFdjHQyLzhYUkZaR4jW1Iik3/tc3pSw5ixTjMXuRtRjt4OwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709900184; c=relaxed/simple; bh=2QGSRu7BUzleeEDO/yhReetdaBO6XLLG2HCqyTrLhi0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GxeFJD6acOPWj4ub6q4kHlh9r2pjKCYE0F6pGIDicLExXbj/wIPZw8DUAGwvQHHP7MPLshFprjNu90ORi9xNVhLmwv6E7I/hPRppZhwAgjaUG8nPKNRQqBg4/hDmClHmLmfS7Ph1zzrJhSgH933/W5Rqt38oY9usaLlzuG8h+Hk= 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=219.142.78.58 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.10.223]) by sina.com (172.16.235.25) with ESMTP id 65EB018600000EC6; Fri, 8 Mar 2024 20:16: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: 94914634210400 X-SMAIL-UIID: 278DBD6DEDDD43C9AC93399E2BB7018B-20240308-201612-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: Fri, 8 Mar 2024 20:15:58 +0800 Message-Id: <20240308121558.1773-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 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 --