HomeFreeBSD

Fix NULL pointer dereference in spa_open_common()

Description

Fix NULL pointer dereference in spa_open_common()

Calling spa_open() will pass a NULL pointer to spa_open_common()'s
config parameter. Under the right circumstances, we will dereference the
config parameter without doing a NULL check.

Clang's static analyzer found this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14044

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Oct 16 2022, 4:19 AM
Tony Hutter <hutter2@llnl.gov>Committed on Dec 1 2022, 8:39 PM
Parents
rGbbec0e60a8e7: Fix NULL pointer passed to strlcpy from zap_lookup_impl()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG409c99a1d3e5: Fix NULL pointer dereference in spa_open_common() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Dec 1 2022, 8:39 PM