lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 Aug 2016 22:23:57 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     David Carroll <david.carroll@...rosemi.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        dl-esc-Aacraid Linux Driver <aacraid@...rosemi.com>,
        "James E. J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 1/7] aacraid: Use memdup_user() rather than duplicating
 its implementation

>> @@ -526,15 +526,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void
>> __user * arg)
>>                 goto cleanup;
>>         }
>>
>> -       user_srbcmd = kmalloc(fibsize, GFP_KERNEL);
>> -       if (!user_srbcmd) {
>> -               dprintk((KERN_DEBUG"aacraid: Could not make a copy of the srb\n"));
>> -               rcode = -ENOMEM;
>> -               goto cleanup;
>> -       }
>> -       if(copy_from_user(user_srbcmd, user_srb,fibsize)){
>> -               dprintk((KERN_DEBUG"aacraid: Could not copy srb from user\n"));
>> -               rcode = -EFAULT;
>> +       user_srbcmd = memdup_user(user_srb, fibsize);
>> +       if (IS_ERR(user_srbcmd)) {
>> +               rcode = PTR_ERR(user_srbcmd);
>>                 goto cleanup;
>>         }
>>
>> --
> 
> Hi Markus,
> 
> Patch 2/7 should precede Patch 1/7, as falling into kfree() would not look pretty.

Do you eventually prefer that this source code adjustment should be combined with
the update suggestion "[2/7] aacraid: One function call less in aac_send_raw_srb()
after error detection" in a single update step?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ