HomeFreeBSD

zpool_load_compat() should create strings of length ZFS_MAXPROPLEN

Description

zpool_load_compat() should create strings of length ZFS_MAXPROPLEN

Otherwise, strlcat() can overflow them.

Coverity found this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13866

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Sep 12 2022, 7:54 PM
GitHub <noreply@github.com>Committed on Sep 12 2022, 7:54 PM
Parents
rGe5327e7f9790: vdev_draid_lookup_map() should not iterate outside draid_maps
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG710fd1ded684: zpool_load_compat() should create strings of length ZFS_MAXPROPLEN (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Sep 12 2022, 7:54 PM