|
From: <vl...@us...> - 2017-05-20 03:00:31
|
Revision: 7190
http://sourceforge.net/p/scst/svn/7190
Author: vlnb
Date: 2017-05-20 03:00:28 +0000 (Sat, 20 May 2017)
Log Message:
-----------
scst: fix possible NULL dereference in TM code
TM command accessing a non-existing LUN might lead NULL dereference in
scst_call_dev_task_mgmt_fn_done().
Reported-By: <Ilan Steinberg <ila...@ka...>>
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2017-05-20 02:04:16 UTC (rev 7189)
+++ trunk/scst/src/scst_targ.c 2017-05-20 03:00:28 UTC (rev 7190)
@@ -7393,7 +7393,8 @@
case SCST_CLEAR_TASK_SET:
case SCST_PR_ABORT_ALL:
case SCST_LUN_RESET:
- scst_call_dev_task_mgmt_fn_done(mcmd, mcmd->mcmd_tgt_dev);
+ if (mcmd->mcmd_tgt_dev != NULL)
+ scst_call_dev_task_mgmt_fn_done(mcmd, mcmd->mcmd_tgt_dev);
break;
case SCST_TARGET_RESET:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|