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] [day] [month] [year] [list]
Date:   Tue, 2 Apr 2019 09:56:58 +0000
From:   Hugues FRUCHET <hugues.fruchet@...com>
To:     Andi Kleen <andi@...stfloor.org>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        "mchehab@...pensource.com" <mchehab@...pensource.com>
Subject: Re: [PATCH 10/17] delta: Fix buffer overrun in delta_ipc_open

Hi Andi,

So do both, memset then strscpy:

+	memset(msg.name, 0, sizeof(msg.name));
+	if (strscpy(msg.name, name, sizeof(msg.name)) <= 0)
+         goto err;

BR,
Hugues.

On 4/1/19 6:54 PM, Andi Kleen wrote:
> On Mon, Apr 01, 2019 at 01:37:56PM +0000, Hugues FRUCHET wrote:
>> Hi Andi,
>>
>> We have already discussed about that here:
>> https://lore.kernel.org/patchwork/patch/866406/
>>
>> Now that strscpy is largely deployed within kernel, could you retest
>> with the change I suggested ?
> 
> strscpy is not the correct fix because it leaks uninitialized memory
> to the receiver.  You need the memset.
> 
> -Andi
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ