memory safety with phy names

Leon M. Busch-George leon at georgemail.de
Fri Mar 1 15:16:19 PST 2024


Hi there :-)

While reviewing code using libiwinfo, I noticed that are no length garantuees for the size of the phy name buffer.
These patches should help making phy names easier to deal with internally.
The strcpy that copies the internal buffer into the user-supplied buffer can still overflow.
Maybe we could expose PHY_NAME_BUFFER_SIZE and turn it into a weak contract?

The two other patches are meant to be general improvements.

regards,
Leon




More information about the openwrt-devel mailing list