Re: [PATCH net] niu: bounds-check phy-type and model VPD strings

From: Akshay Ubale

Date: Tue Nov 03 2026 - 16:20:01 EST


Hi,

Answers to the questions about this patch:

- Discovery: manual code inspection. While reviewing unchecked strcpy()
calls in the kernel, I found that niu_get_of_props() copies the
"phy-type" and "model" device-tree properties into fixed-size buffers
without checking their length. No syzbot report, production report,
or static analysis tool was involved.

- Triggered: not triggered. This is theoretical, found by code
inspection. No symptoms were observed. Triggering needs a property
longer than the destination buffer, which I have not seen reported.

- Hardware: not tested on real hardware. The change was verified with a
SPARC64 cross-build (gcc 13.3, W=1, no warnings) and a standalone test
harness for the length-check logic.

Thanks,
Akshay Ubale