Re: [PATCH] board: amlogic: fix buffler overflow in serial & usid read

2024-03-20 Thread Tom Rini
On Wed, Mar 20, 2024 at 09:26:29AM +0100, Neil Armstrong wrote: > On 20/03/2024 06:28, Dan Carpenter wrote: > > On Tue, Mar 19, 2024 at 03:53:24PM +0100, Neil Armstrong wrote: > > > While meson_sm_read_efuse() doesn't overflow, the string is not > > > zero terminated and env_set() will buffer

Re: [PATCH] board: amlogic: fix buffler overflow in serial & usid read

2024-03-20 Thread Neil Armstrong
On 20/03/2024 06:28, Dan Carpenter wrote: On Tue, Mar 19, 2024 at 03:53:24PM +0100, Neil Armstrong wrote: While meson_sm_read_efuse() doesn't overflow, the string is not zero terminated and env_set() will buffer overflow and add random characters to environment. In the Linux kernel we would

Re: [PATCH] board: amlogic: fix buffler overflow in serial & usid read

2024-03-19 Thread Dan Carpenter
On Tue, Mar 19, 2024 at 03:53:24PM +0100, Neil Armstrong wrote: > While meson_sm_read_efuse() doesn't overflow, the string is not > zero terminated and env_set() will buffer overflow and add random > characters to environment. > In the Linux kernel we would give this a CVE because it's

[PATCH] board: amlogic: fix buffler overflow in serial & usid read

2024-03-19 Thread Neil Armstrong
While meson_sm_read_efuse() doesn't overflow, the string is not zero terminated and env_set() will buffer overflow and add random characters to environment. Signed-off-by: Neil Armstrong --- board/amlogic/jethub-j80/jethub-j80.c | 6 -- board/amlogic/p200/p200.c | 3 ++-