mirror_zfs/cmd/zpool
Syed Shahrukh Hussain 78a7c78bdf
Added fix for zpool get state segfaults with two or more vdevs (#15972). (#17213)
The problem was identified in handling of the zpool get state command
line arguments. A pointer vdev was used to point to the argv[1], and
its address set to cb.cb_vdevs.cb_names(pointer to array of strings)
so any increment to cb_names resulted in a segfault. Fix covers a
special case of root parameter at argv[1] and remaining cases are
handled by passing in the argv + 1, which allows cb_names iteration
of next command line arguments (vdevs).

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>

Signed-off-by: Syed Shahrukh Hussain <syed.shahrukh@ossrevival.org>
2025-04-04 15:34:38 -07:00
..
compatibility.d Update compatibility.d files 2024-10-02 20:59:35 -07:00
os SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpool.d zed: misc vdev_enc_sysfs_path fixes 2023-11-07 09:09:24 -08:00
Makefile.am Update compatibility.d files 2024-10-02 20:59:35 -07:00
zpool_iter.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpool_main.c Added fix for zpool get state segfaults with two or more vdevs (#15972). (#17213) 2025-04-04 15:34:38 -07:00
zpool_util.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpool_util.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpool_vdev.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00