Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp71777lqk; Sat, 9 Mar 2024 00:47:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWiDjAKQMKRtL5VKSpsRSviQver9I0sP94XdK3Dl+ok28yfd9lXgTZ4tlEhBjg2s/dxXVGZadxZDo7ovYAphm/UjY1u8WH5mICjv+4Og== X-Google-Smtp-Source: AGHT+IGLvkW8N3s8kGMN9WRmQpy/lkWL+nDOGksOIW72ZaWLIeVdlsHDcCsaSiKESNianxhxswHJ X-Received: by 2002:a05:6808:4498:b0:3c2:3afb:d2 with SMTP id eq24-20020a056808449800b003c23afb00d2mr2363299oib.32.1709974043997; Sat, 09 Mar 2024 00:47:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709974043; cv=pass; d=google.com; s=arc-20160816; b=yMdvG5FVfxHfT2/9VG/FABxp0JVwysPyXyvU5Zg8U7TyyFSdRakWcODbbJxdDZOhjx VG8obFo80XmY0uUCmdfBctiX0c0xtnNc0A0QwFQpBM0xYiQ24wj63diE0JlLfGTgU0AC ssktmzkUv+GmJLOZcAZD4Kr36jPU+9foN6lNlQ2kopw5E13GJdXGZj8HVMgJoCi2yqTP GXYwh9no//QHQsnMKhnE0dxetYSsTXsrcR3Lwt9uIPm7KpeBFUIIUnME/nYj74mghG6J kdoMw0Gt7u7peMGVqXqlWwLjrBetmjqRdCJ4udx15ASfL7TuFLCqZMa4jkqdexnnN+9Q vKTQ== 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=6cYGeLYuJ3kZjKczrleSBGNr4O8r3X1zQ42evy7q2QM=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=UfkU24wflSBi7jHHQ5SAS6yBP3kmawXP7lsUqpkCTOPyouHnrw5rVLCC78+FDOB4pq s1G9blLK4+3SJ3t7PQEpvdBPjzRi4Bling3fcwdUidIbIffQk2gGmzEgPN4AJg7BwwVX KA+ND55XtNq8CPgz/iGlKX0IfOyFKhM6K3LH16/tEszSI/kiQyFRq4fZdzx/zY2tsGQC dhOhjQMdgghC50KsNt9HoXWiWnEkBWht/PX3UnDnn9vejSvAI9n0IQCkwj61vd/V03Wc YuxYYeo7xJqZCj5/p+lLiX5xPjanWL7pd8Z9Nd1vcECCmTlC5586zv1GMeJxQxUX12qv AVcA==; 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-97816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97816-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 e12-20020a63f54c000000b005e43cb68d87si1115233pgk.438.2024.03.09.00.47.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 00:47:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97816-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-97816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97816-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 A49E2280E1A for ; Sat, 9 Mar 2024 08:47:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F44F374DD; Sat, 9 Mar 2024 08:45:55 +0000 (UTC) Received: from mail115-24.sinamail.sina.com.cn (mail115-24.sinamail.sina.com.cn [218.30.115.24]) (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 5DF8A1DA58 for ; Sat, 9 Mar 2024 08:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709973954; cv=none; b=uRG8Tzn+3c1HlSN5Anr3E5m0D26GwGrZcehZ1v6QGPguf5OnndAoHmXtmlik0tps1z4n1jCtDWNjZ9QtEITPPQtm2ZmnpUcNXtOwYH61uyp0N+DO1H37QEBv+GO1D3nxjsSubua0V0Kfda2CLsqKZQngxn6yRrq2uBH2pjHhD9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709973954; c=relaxed/simple; bh=z0vziq730r0rbGxpWWfEs2MxuHCDeJDqpQf7hapyd3M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rGZfIxU1bAodXoQM+PPg0jOoAWpU3Dw6q8hBVq8iybiX45PFMTfT9bXf9BSbIkHAAHSfUQYnuCKkybgDd6KJ+xAQhLdZM9wtcd3kaJJrd+DMFvNPF1m31oUBR5f/K6lrP/HGzkDBOGzfXJnPr7O7xJzBKjkY/8E/dhZlgcBoLJo= 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.24 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 65EC21B100000E77; Sat, 9 Mar 2024 16:45:42 +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: 78475331457290 X-SMAIL-UIID: 1E7A401DEEEE444C935E6B9CC412C67D-20240309-164542-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 16:45:27 +0800 Message-Id: <20240309084527.1943-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://github.com/fbq/linux.git rcu-exp.2024.01.29b --- 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 --