Skip to contentSkip to conversation

DISCUSSION James Bottomley 2 participants 2 messages Oct 12, 2021 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20211011231530.GA22856@t

#1 lore raw
Quoted 9 lines · On Mon, 2021-10-11 at 19:15 -0400, docfate111 wrote:

[email protected], [email protected], [email protected]
Bcc:
Subject: [PATCH] scsi_lib fix the NULL pointer dereference Reply-To:

scsi_setup_scsi_cmnd should check for the pointer before scsi_command_size dereferences it.

Have you seen this? As in do you have a trace? This should be an impossible condition, so we need to see where it came from. The patch as proposed is not right, because if something is setting cmd_len without setting the cmnd pointer we need the cause fixed rather than applying a band aid in scsi_setup_scsi_cmnd().

James

#2 lore raw
Quoted 8 lines · James Bottomley
Quoted 7 lines · On Mon, 2021-10-11 at 19:15 -0400, docfate111 wrote:

[email protected], [email protected], [email protected]
Bcc:
Subject: [PATCH] scsi_lib fix the NULL pointer dereference Reply-To:

Quoted 8 lines
Quoted 2 lines

scsi_setup_scsi_cmnd should check for the pointer before scsi_command_size dereferences it.

Have you seen this? As in do you have a trace? This should be an impossible condition, so we need to see where it came from. The patch as proposed is not right, because if something is setting cmd_len without setting the cmnd pointer we need the cause fixed rather than applying a band aid in scsi_setup_scsi_cmnd().

Hi James and Thelford,

This patch looks like a duplicate of a patch posted one month ago? I think Christoph agrees to remove the cmd_len == 0 check. See also https://lore.kernel.org/linux-scsi/[email protected]/.

Thanks,

Bart.