From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 42C1427472; Thu, 26 Feb 2026 10:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102506; cv=none; b=Hujx76jUKkPWEz+M3EQZP194KNgiMCZsAqgcBZ2IBBzWc39hDq5nLURn6xKSQs2FPNBMCCvW6irP3f7khkBAZ6UKKQxkfEgP1fdF82LZgkr5/SP5s5ysi3+oAlkH07ZPj1ZlzFo/6eAGuL21ex6s/bh+mSuTg+yeH6c2/0bpzn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102506; c=relaxed/simple; bh=NMzeyOxAYXzF4sthIP3D/i7E+x8X8zh6cTJ8kUu7Pu0=; h=Content-Type:MIME-Version:Message-Id:In-Reply-To:References: Subject:From:To:Cc:Date; b=gWvI8GFMqpJLYNYzy3g+ZcrdRE5wYGv3YCTa9WqVJ8l3KULoeX3tJ2HD+xKKD/5dGTahQhzT65wBFQXK1n4h+ccSiX41Sq+vHriLWXSugVL7kEusgwgvd/7rRqoI7cauZi+WvSo1Ns0vbbyvq+BnhIpFcH1I9xr3HscL32t6wq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ACEXSJS3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ACEXSJS3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40F6EC116C6; Thu, 26 Feb 2026 10:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772102505; bh=NMzeyOxAYXzF4sthIP3D/i7E+x8X8zh6cTJ8kUu7Pu0=; h=In-Reply-To:References:Subject:From:To:Cc:Date:From; b=ACEXSJS3B2fQEadkGEJl1zvYqazqXvxdDOIOjcbjXB34DqReGyuQ8Wp+EbHWE2Ncq Jc7w5zfeuir54PgUCwibSqog7dUFxMcOvmYp+vaBoBq6FHdcBRJLUyuHWdy4ysp7iY SYEqIkalGg5GK4C3XqpU023DIzxi9BGwhxw3UqE3WgGYAsnC+uVao+AIXyvQU7b+up TMG6qECmP/DLCaFHL/VHztCoFzhbqKw2ui47E2MtNKe+Nw/t4tFvYzDGgEd2e84eKi KP2FDbdNtPxQ7fUNQPTnR0s63oVU0sHX5xhtiMGg5CYg+ztqWhboa5qiSLfxuPScIA VHqDULfc8kGKQ== Content-Type: multipart/mixed; boundary="===============7185096252700937842==" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20260226095156.117996-2-yangfeng59949@163.com> References: <20260226095156.117996-2-yangfeng59949@163.com> Subject: Re: [PATCH v7 bpf-next 1/2] bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap From: bot+bpf-ci@kernel.org To: yangfeng59949@163.com,davem@davemloft.net,edumazet@google.com,kuba@kernel.org,pabeni@redhat.com,horms@kernel.org,posk@google.com,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,martin.lau@linux.dev,eddyz87@gmail.com Cc: bpf@vger.kernel.org,netdev@vger.kernel.org,linux-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,yangfeng59949@163.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,clm@meta.com,ihor.solodrai@linux.dev Date: Thu, 26 Feb 2026 10:41:44 +0000 (UTC) --===============7185096252700937842== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c > --- a/net/bpf/test_run.c > +++ b/net/bpf/test_run.c > @@ -1156,6 +1156,18 @@ > skb->ip_summed = CHECKSUM_COMPLETE; > } > > + if (prog->type == BPF_PROG_TYPE_LWT_XMIT && !skb_dst(skb)) { > + if (!ipv6_bpf_stub) { > + pr_warn_once("Please test this program with the IPv6 module enabled\n"); > + goto out; Should this set ret to an error code before goto out? At this point ret is 0 from the earlier convert___skb_to_skb() success path, so the function returns 0 to the bpf() syscall without ever running the BPF program. Every other early exit in bpf_prog_test_run_skb() assigns a negative errno before goto out, for example: ret = -EINVAL; goto out; ret = -ENOMEM; goto out; ret = -ENODEV; goto out; Returning 0 here means userspace sees a successful test run that never actually executed. Something like ret = -EOPNOTSUPP would let the caller know the test could not proceed. > + } > [ ... ] --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/22437468613 AI-authorship-score: low AI-authorship-explanation: Patch iterated through 7 versions over 3 weeks with detailed maintainer interaction, consistent with human development. issues-found: 1 issue-severity-score: low issue-severity-explanation: Missing error return code on early exit path causes bpf() syscall to return success without executing the BPF program when IPv6 is unavailable. --===============7185096252700937842==--