You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no file open failure check when opening
/etc/dfs/sharetab. The NULL hdl->libzfs_sharelib file pointer
will lead to a null pointer deference when this is closed, for
example, in the case where libzfs_core_init() fails and the
subsequent cleanup closes hdl->libzfs_sharelib.
I'll send a patch to fix this issue shortly.
The text was updated successfully, but these errors were encountered:
Currently there is no file open failure check when opening
/etc/dfs/sharetab. The NULL hdl->libzfs_sharelib file pointer
will lead to a null pointer deference when this is closed, for
example, in the case where libzfs_core_init() fails and the
subsequent cleanup closes hdl->libzfs_sharelib.
Fix this by checking for an open failure and performing the
necessary clean up if it fails and return NULL.
Found by static analysis with CoverityScan 0.8.5
Closesopenzfs#4902
Signed-off-by: Colin Ian King <[email protected]>
It's probably better to remove this entirely from libzfs_init() / libzfs_close(). It's only used in It's only ever used in is_shared() and it would be better to just handle the open/close there.
libzfs_util.c, libzfs_init()
Currently there is no file open failure check when opening
/etc/dfs/sharetab. The NULL hdl->libzfs_sharelib file pointer
will lead to a null pointer deference when this is closed, for
example, in the case where libzfs_core_init() fails and the
subsequent cleanup closes hdl->libzfs_sharelib.
I'll send a patch to fix this issue shortly.
The text was updated successfully, but these errors were encountered: