Re: [PATCH] scsi_dh: avoid allowing dh_state to pass format specs when requesting a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sasha Levin <sasha.levin@xxxxxxxxxx> writes:

> A malicious string passed from userspace might contain format specifiers which
> request_module() might try to handle, which is bad.
>
> Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
> ---
>  drivers/scsi/scsi_dh.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
> index edb044a..24be260 100644
> --- a/drivers/scsi/scsi_dh.c
> +++ b/drivers/scsi/scsi_dh.c
> @@ -111,7 +111,7 @@ static struct scsi_device_handler *scsi_dh_lookup(const char *name)
>  
>  	dh = __scsi_dh_lookup(name);
>  	if (!dh) {
> -		request_module(name);
> +		request_module("%s", name);
>  		dh = __scsi_dh_lookup(name);
>  	}

Good catch.

Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

-- 
Johannes Thumshirn                                           Storage
jthumshirn@xxxxxxx                                 +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600  D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux