Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp237774lqb; Sat, 16 Mar 2024 02:00:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYw6YZftk04czcmrlleKVFr/g2KkyRs1Q7Q61r4unTYlzLX7cddE7TRFczAqdC7bXimFGeFRM/G8FSVxysenCx2K/+n3eiEDmo2DuZTg== X-Google-Smtp-Source: AGHT+IFfGPZZRscH9uIAryC1K+RUBb2vQYXHuFvNrwTgLTDu81mLPydcLw+33AsWZU8ZSFpkSSMU X-Received: by 2002:a17:90b:1192:b0:29f:7fad:ba50 with SMTP id gk18-20020a17090b119200b0029f7fadba50mr17303pjb.8.1710579657939; Sat, 16 Mar 2024 02:00:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710579657; cv=pass; d=google.com; s=arc-20160816; b=GyfoE+YHmWI8CLFKmpG5HGstVSo5kQf0AG+LjPO3oSv7MUViDI4Oo0K9FWY4ibb6ge 6VbCZjmJIooYbFO/lC/t0IkyzvwiJkz19nTFS0V2H3yczDpWw63PO1LTG+cGHfTarRTt g0YDGJwNpqBC3cFsh5Q3em3XiNVy0ZrK+eTVv2bxkIUomUPUkcZOeF+ZCkij9oEo0FG7 lsSv2GkSBqmRZjciPb6N/wEbUCUpkK79MJvuD8Q1VOtE9OEty7gBv+gJwiUQ3w83z2wH RveErh8jJ9O2UV2h7UA/OZeet6EdU2aTtAplZGA7JPutWea4BWvwD17rhulcGYYKesTY zcdA== 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=E+PdhTRI7bRewtQQpC5+HOt8qURkSsHSUlAcyoOLo5Q=; fh=glKboySafPrYWBs7MJq4QPIITGVCrOrhRsc7ZzxOIgU=; b=Jy3XiBLc1g3NlXUOq9q/shnC7Jtt6op0moDvw1/hlxcEua9XyhKyBh7ynDO3hlcWAP WSIgL5WQJkTS8MasB1PJIs6TXDk8TQyiyD6HyGTj8/s40wJN6eyhS33jqcrGpFdxEEyk J4yKE0HZrrp91HSY8PA7ITgsUHmiZXJWIVqd4HWsIE6JfeXETEKN8/bCbUPxhocfR/ij m8YHaBki8fhrnVQEC9Bxj4OI7lusirq+YowruL5cO/1Z6iyof0WRiKo0ydR9TMSRhcIb gINx8/rbYS1Kn/TfncdOOLFoYivj8/e1FKk6AWakGSlCCZQMCLo+eMx6meYXBQAQdufJ zwVA==; 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-105121-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105121-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 m7-20020a635807000000b005dc86450fc8si4237554pgb.515.2024.03.16.02.00.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 02:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105121-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-105121-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105121-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 999F328226A for ; Sat, 16 Mar 2024 09:00:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D44C107A0; Sat, 16 Mar 2024 09:00:51 +0000 (UTC) Received: from mail115-95.sinamail.sina.com.cn (mail115-95.sinamail.sina.com.cn [218.30.115.95]) (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 176EB79F2 for ; Sat, 16 Mar 2024 09:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.95 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710579651; cv=none; b=T2cO48coD3dyL+EeGuRtvC3vi20zKX1p+4h1WGYfjCJ/FDmCSAfN8yuhi3VQHcqabO7OtRvSg7weEfQXjh9SGBnjXQXtB3qYVRzvKfv0O0zsuiwXrrUwSVSw4N6A19TkvR0V4OozI+BXK+zUtujEFp/aSvhoW1FyaOKYPlEPLUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710579651; c=relaxed/simple; bh=ZVegiQPS5+8I1ahet6J5rYnfmSyWlCOY352DU1JHyoE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uTjf60qBTcn9rVo2cpuOStH2UWX85y3/skexLycFyQvKHldyGPulWRjFELAe6IuK80IEynKP8fINFiTWmK0KrIn2iJFWle3Gf900icxivRCHvtTQIZdgcSantGHPcA3HySaKQIeJC/iQr9iYTOJWU92QL2U2fMmP6x4du0aXcts= 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.95 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.25.117.148]) by sina.com (172.16.235.24) with ESMTP id 65F55FB700006E2C; Sat, 16 Mar 2024 17:00:41 +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: 1369645089437 X-SMAIL-UIID: E72123976B914BAD87C3CB9453EC155A-20240316-170041-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, 16 Mar 2024 17:00:30 +0800 Message-Id: <20240316090031.1922-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 fe46a7dd189e --- 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 --