ACK: [SRU][J:linux-bluefield][PATCH v1 0/1] UBUNTU: SAUCE: mlxbf-bootctl: Fix kernel panic due to buffer overflow

Bartlomiej Zolnierkiewicz bartlomiej.zolnierkiewicz at canonical.com
Fri Jul 21 15:20:27 UTC 2023


Acked-by: Bartlomiej Zolnierkiewicz <bartlomiej.zolnierkiewicz at canonical.com>

On Thu, Jul 20, 2023 at 10:38 PM Asmaa Mnebhi <asmaa at nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2028309
>
> SRU Justification:
>
> [Impact]
>
> Running the following LTP (linux-test-project) script, causes
> a kernel panic and a reboot of the DPU:
> ltp/testcases/bin/read_all -d /sys -q -r 10
>
> The above test reads all directory and files under /sys.
> Reading the sysfs entry "large_icm" causes the kernel panic
> due to a garbage value returned via i2c read. That garbage
> value causes a buffer overflow in sprintf.
>
> [Fix]
>
> * Replace sprintf with snprintf. And also add missing lock and
> increase the buffer size to PAGE_SIZE.
>
> [Test Case]
>
> * Run from linux:
> ltp/testcases/bin/read_all -d /sys -q -r 10
>
> [Regression Potential]
>
> * no known regression
>



More information about the kernel-team mailing list