HomeFreeBSD

if: Remove unnecessary validation in the SIOCSIFNAME handler

Description

if: Remove unnecessary validation in the SIOCSIFNAME handler

A successful copyinstr() call guarantees that the returned string is
nul-terminated. Furthermore, the removed check would harmlessly compare
an uninitialized byte with '\0' if the new name is shorter than
IFNAMESIZ - 1.

Reported by: KMSAN
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ad22ba2b9f3b6ff5d85be14627d3a59ca389f5e4)

Details

Provenance
markjAuthored on May 12 2021, 2:05 PM
Parents
rGeea4a0b81aed: vn_open_cred(): disallow O_CREAT | O_EMPTY_PATH
Branches
Unknown
Tags
Unknown