]> git.proxmox.com Git - mirror_zfs.git/commit - lib/libzfs/libzfs_pool.c
zpool_load_compat() should create strings of length ZFS_MAXPROPLEN
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Mon, 12 Sep 2022 19:54:43 +0000 (15:54 -0400)
committerGitHub <noreply@github.com>
Mon, 12 Sep 2022 19:54:43 +0000 (12:54 -0700)
commit710fd1ded68491a164d85aedc69ffd4675ec5c59
treef805c4d7a304b4760dfe014c2d2e4bebdeb7823a
parente5327e7f9790ed7e884a7f8d9fa412632506b826
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
lib/libzfs/libzfs_pool.c