HomeFreeBSD

Fix several dev_clone callbacks to avoid out-of-bounds reads

Description

Fix several dev_clone callbacks to avoid out-of-bounds reads

Use strncmp() instead of bcmp(), so that we don't have to find the
minimum of the string lengths before comparing.

Reviewed by: kib
Reported by: KASAN
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29463

(cherry picked from commit 3428b6c050d102ba7f95514b29f4f5685d76b645)

Details

Provenance
markjAuthored on Mar 28 2021, 3:08 PM
Reviewer
kib
Differential Revision
D29463: Fix several dev_clone callbacks to avoid out-of-bounds reads
Parents
rGe99aa5c2cf6b: pf tests: pfsync bulk update test
Branches
Unknown
Tags
Unknown