Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp465604lqc; Fri, 8 Mar 2024 02:51:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWeTSy4Kir05f9yqlKZfvdHg5aOfw/WC5b5rhCBJGiVTwdlpAfHzxc/lxh7GW56FogqlzTn2BXB7lk+My/sdE16vjve8CN9+jjSULaAKQ== X-Google-Smtp-Source: AGHT+IFZGLMrR6N8t8dMEGI6x/ZTr9dDiVUAJfoyPyGCrKy+GSh30qX0mHHfMoEEPmSuRucl4k+P X-Received: by 2002:a17:902:f64c:b0:1dd:6dfd:3df6 with SMTP id m12-20020a170902f64c00b001dd6dfd3df6mr656482plg.21.1709895095483; Fri, 08 Mar 2024 02:51:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709895095; cv=pass; d=google.com; s=arc-20160816; b=CuClr6m+w+qeqW+VNQz/dg2R5N/1uqwEpItQzhHLKaWVySsfgPh2LUFFupH8WwlO9a 1mVQFnrN9bQoR72wqDwl8+1fRrRBh5Y2vBTe6wx51jb1o9r4sceoGZLMl5j5rIwD/NMf x6c5VHymEeI3Ed1W7+dzyXllGHm9DqwjmI5GdwhaV7oDCVAIBUd+8EBRzTf14EXaP5U+ 1BGiJE9GIAT1L2V72cpO2JjJq5SKpLz7P1i7VyybdEiCXZOrmH8+H14rKyIQcZhfB7fy wkfiSZMUaLIxVjIBIn87MIKnw/nQLaAfSJfU5zCrB/xlxYB1/Hxcue0u9szFxjCFL8Sf N53Q== 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=AjfSluEhW0cLc8Pa99pphykDlg8Oba6Yy2yyp9Oj4Yw=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=KwWG3RB5pX1lR6WQJBZs4zUsiYbnGG5ADhMKz8/NHC7ow0RVMYPUuPhW96U3a3XPrw Ma0I9C2J5JGZRE5gla98TEUfufhWPG/zd7Lh81OqollQX7GuwD46RiHwP6SIw8shn1w/ Yn1eRxNOKSzctemKxb3Leboee9AKdoB9BLmD1NL/Y28OXpezLVvKHGxMGeLONm0mmYWW S3vppPxgPVZO/s1rUE+E2wobN1gUiRUyZ3NowRGIa2l9u0ZyZROuB7FWgroqQVai5s4x Bfd5RYSJFICCBf0L9pAW8kqxgGZt/i9PJNcPEr/buymF63NtNIZQcuiMwGyRP+Oa0Eul YM/Q==; 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-96871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96871-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e10-20020a170902cf4a00b001dd5a0a1e23si2562382plg.561.2024.03.08.02.51.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-96871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96871-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 33434B21252 for ; Fri, 8 Mar 2024 10:51:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A22855780; Fri, 8 Mar 2024 10:51:22 +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 21D7853E01 for ; Fri, 8 Mar 2024 10:51:16 +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=1709895082; cv=none; b=AFKtxap2SWZMo5sGbHSYSnwJ0Yh8uu6VUzmElBPbQJW9fMNvXE8eMcP1p5Dsv2TtN44quH8enCXoqEzLVYdyIRRBs0/CSKwNfUjSp1vt8UdmQtzUZOHBrErmSc0giHVXvfbpBr+mzaRFnPgDfNdbySb+cmKfEja6bB4+kFKTAcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895082; c=relaxed/simple; bh=HKKmwPokzeOnsazasyJ4qqi+8LB9VrLZUir14E9dx+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PWjHigI2jrjLinYyXPipRh7/98Aftotp42GRRkXbXuNbHCDNcHsKsALkzzySXH6J6TD+cdq1qcOnH5iEfl5MSzJfbpFf+Xo2Ii2JgTmcbU0lhcpog0gaQtaHEHRniV5+A7upcJl5/3VzsYI7srifV1uDcfBzmSix//v1e1rgrYM= 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.118.64.186]) by sina.com (10.75.12.45) with ESMTP id 65EAED9900006EA2; Fri, 8 Mar 2024 18:51:08 +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: 7857831457937 X-SMAIL-UIID: 91E987F7BEFC43AB890708690BA6036D-20240308-185108-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 18:50:58 +0800 Message-Id: <20240308105058.1649-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,10 @@ static noinline_for_stack int ipvlan_pro memset(IPCB(skb), 0, sizeof(*IPCB(skb))); + sk = skb->sk; + 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 --