[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id:
<172599423251.358597.13079333302470383178.git-patchwork-notify@kernel.org>
Date: Tue, 10 Sep 2024 18:50:32 +0000
From: patchwork-bot+netdevbpf@...nel.org
To: Kuan-Wei Chiu <visitorckw@...il.com>
Cc: qmo@...nel.org, ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
martin.lau@...ux.dev, eddyz87@...il.com, song@...nel.org,
yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org,
sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, jserv@...s.ncku.edu.tw,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] bpftool: Fix undefined behavior in qsort(NULL, 0, ...)
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@...nel.org>:
On Tue, 10 Sep 2024 23:02:07 +0800 you wrote:
> When netfilter has no entry to display, qsort is called with
> qsort(NULL, 0, ...). This results in undefined behavior, as UBSan
> reports:
>
> net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null
>
> Although the C standard does not explicitly state whether calling qsort
> with a NULL pointer when the size is 0 constitutes undefined behavior,
> Section 7.1.4 of the C standard (Use of library functions) mentions:
>
> [...]
Here is the summary with links:
- [v2] bpftool: Fix undefined behavior in qsort(NULL, 0, ...)
https://git.kernel.org/bpf/bpf-next/c/f04e2ad394e2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists