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:	Mon, 22 Sep 2014 08:17:25 -0600
From:	Jens Axboe <axboe@...nel.dk>
To:	Christian Borntraeger <borntraeger@...ibm.com>,
	tom.leiming@...il.com
CC:	David Hildenbrand <dahi@...ux.vnet.ibm.com>, kvm@...r.kernel.org,
	stable@...r.kernel.org, rusty@...tcorp.com.au,
	virtualization@...ts.linux-foundation.org, mst@...hat.com,
	linux-kernel@...r.kernel.org, ppinatti@...ux.vnet.ibm.com
Subject: Re: [PATCH] blk-mq: Avoid race condition with uninitialized requests

On 2014-09-22 08:15, Christian Borntraeger wrote:
> On 09/18/2014 11:04 AM, David Hildenbrand wrote:
>> This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249.
>>
>> We have to initialize at least the atomic_flags and the cmd_flags when
>> allocating storage for the requests.
>>
>> Otherwise blk_mq_timeout_check() might dereference uninitialized pointers when
>> racing with the creation of a request.
>>
>> Also move the reset of cmd_flags for the initializing code to the point where a
>> request is freed. So we will never end up with pending flush request indicators
>> that might trigger dereferences of invalid pointers in blk_mq_timeout_check().
>>
>> Cc: stable@...r.kernel.org
>> Signed-off-by: David Hildenbrand <dahi@...ux.vnet.ibm.com>
>
> Acked-by: Christian Borntraeger <borntraeger@...ibm.com>
>
> Can you please add
> Reported-by: Paulo De Rezende Pinatti <ppinatti@...ux.vnet.ibm.com>
> Tested-by: Paulo De Rezende Pinatti <ppinatti@...ux.vnet.ibm.com>
>
> as Paulo did the testing work?
>
> We thing this patch is fine and should go upstream.

I might have to pick'n rebase the series, in which case I'll add it. But 
I already queued it up last week, so if I don't, then I can't easily add 
it. I wish the git notes wasn't such a horrible and unusable hack, so we 
had a chance to annotate commits without having to rewrite history...

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ