Re: [PATCH 5.10.y 0/1] bpf: fix warning ftrace_verify_code

From: kovalev
Date: Mon Jan 29 2024 - 13:34:23 EST


29.01.2024 19:20, Greg KH wrote:
On Mon, Jan 29, 2024 at 12:17:45PM +0300, kovalev@xxxxxxxxxxxx wrote:
Syzkaller hit 'WARNING in ftrace_verify_code' bug.

This bug is not a vulnerability and is reproduced only when running
with root privileges on stable 5.10 kernel.
What about 5.15.y? We can't take a patch for older kernels and not for
newer ones, right?

Indeed, this patch was not backported at 5.15.

I fixed it, successfully tested it on the 5.15.148 kernel and sent the patch [1]

However, at the time of the kernel build, I noticed a compiler warning about an unused "*tmp" variable,

that I fixed in the patch for 5.15, but remained in this patch 5.10:

..

+ void *new, *tmp;
..
need to fix on
..
+ void *new;
..

Therefore, I resend the patch with a fix (deleted the unused tmp pointer). [2]

[1] https://lore.kernel.org/bpf/20240129180108.284057-1-kovalev@xxxxxxxxxxxx/T/#u

[2] https://lore.kernel.org/bpf/20240129183120.284801-1-kovalev@xxxxxxxxxxxx/T/#u

--

Regards,
Vasiliy Kovalev