linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 0/2] bcache: two emergent fixes for Linux v5.2-rc5 (use-after-scope)
@ 2019-06-16 10:23 Dmitry Vyukov
  2019-06-16 11:52 ` Coly Li
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Vyukov @ 2019-06-16 10:23 UTC (permalink / raw)
  To: kasan-dev, linux-block, Coly Li, Rolf Fokkens, Pierre JUHEN,
	Shenghui Wang, Kent Overstreet, Nix, Andrey Ryabinin,
	Will Deacon

Hi,

This is regarding the subj patch:
https://bugzilla.kernel.org/show_bug.cgi?id=203573
https://www.spinics.net/lists/linux-bcache/msg07474.html
(don't see a way to reply to the patch)

This looks like a serious bug that would have been caught by
use-after-scope mode in KASAN given any coverage of the involved code
(i.e. any tests that executes the function once) if I am reading this
correctly.
But use-after-scope detection was removed in:
7771bdbbfd3d kasan: remove use after scope bugs detection.
because it does not catch enough bugs.
Hard to say if this bug is enough rationale to bring use-after-scope
back, but it is a data point. FWIW this bug would have been detected
during patch testing with no debugging required.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/2] bcache: two emergent fixes for Linux v5.2-rc5 (use-after-scope)
  2019-06-16 10:23 [PATCH 0/2] bcache: two emergent fixes for Linux v5.2-rc5 (use-after-scope) Dmitry Vyukov
@ 2019-06-16 11:52 ` Coly Li
  0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2019-06-16 11:52 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: kasan-dev, linux-block, Rolf Fokkens, Pierre JUHEN,
	Shenghui Wang, Kent Overstreet, Nix, Andrey Ryabinin,
	Will Deacon

On 2019/6/16 6:23 下午, Dmitry Vyukov wrote:
> Hi,
> 
> This is regarding the subj patch:
> https://bugzilla.kernel.org/show_bug.cgi?id=203573
> https://www.spinics.net/lists/linux-bcache/msg07474.html
> (don't see a way to reply to the patch)
> 
> This looks like a serious bug that would have been caught by
> use-after-scope mode in KASAN given any coverage of the involved code
> (i.e. any tests that executes the function once) if I am reading this
> correctly.
> But use-after-scope detection was removed in:
> 7771bdbbfd3d kasan: remove use after scope bugs detection.
> because it does not catch enough bugs.
> Hard to say if this bug is enough rationale to bring use-after-scope
> back, but it is a data point. FWIW this bug would have been detected
> during patch testing with no debugging required.
> 

Hi Dmitry,

I although thought it should be reported by compiler, but no idea why
compiler didn't complain.

Anyway, since now I start to enable KASAN in my testing.

Thanks.

-- 

Coly Li

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-16 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 10:23 [PATCH 0/2] bcache: two emergent fixes for Linux v5.2-rc5 (use-after-scope) Dmitry Vyukov
2019-06-16 11:52 ` Coly Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).