INIT zero out sensitive data before its freed
The iscsi_url and iscsi_context might contain clear text login credentials for an iscsi target. As Linux zeroes on allocate this data might remain in memory for a long time.
This commit is contained in:
@@ -331,6 +331,7 @@ try_again:
|
||||
iscsi->frees+=old_iscsi->frees;
|
||||
|
||||
memcpy(old_iscsi, iscsi, sizeof(struct iscsi_context));
|
||||
memset(iscsi, 0, sizeof(struct iscsi_context));
|
||||
free(iscsi);
|
||||
|
||||
old_iscsi->is_reconnecting = 0;
|
||||
|
||||
Reference in New Issue
Block a user