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]
Message-ID: <b4ajhopcv477r3ot6rz4lvhjpunuggoysdksn3aqbl5x4ivjjw@6opkd6jmr2ch>
Date: Mon, 23 Sep 2024 17:44:04 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Piotr Zalewski <pZ010001011111@...ton.me>
Cc: linux-bcachefs@...r.kernel.org, linux-kernel@...r.kernel.org, 
	skhan@...uxfoundation.org, syzbot+6f655a60d3244d0c6718@...kaller.appspotmail.com
Subject: Re: [PATCH v2] bcachefs: memset bounce buffer portion to 0 after
 key_sort_fix_overlapping

On Sun, Sep 22, 2024 at 03:18:01PM GMT, Piotr Zalewski wrote:
> Zero-initialize part of allocated bounce buffer which wasn't touched by
> subsequent bch2_key_sort_fix_overlapping to mitigate later uinit-value
> use KMSAN bug[1].
> 
> After applying the patch reproducer still triggers stack overflow[2] but
> it seems unrelated to the uninit-value use warning. After further
> investigation it was found that stack overflow occurs because KMSAN adds
> too many function calls[3]. Backtrace of where the stack magic number gets
> smashed was added as a reply to syzkaller thread[3].
> 
> It was confirmed that task's stack magic number gets smashed after the code
> path where KSMAN detects uninit-value use is executed, so it can be assumed
> that it doesn't contribute in any way to uninit-value use detection.
> 
> [1] https://syzkaller.appspot.com/bug?extid=6f655a60d3244d0c6718
> [2] https://lore.kernel.org/lkml/66e57e46.050a0220.115905.0002.GAE@google.com
> [3] https://lore.kernel.org/all/rVaWgPULej8K7HqMPNIu8kVNyXNjjCiTB-QBtItLFBmk0alH6fV2tk4joVPk97Evnuv4ZRDd8HB5uDCkiFG6u81xKdzDj-KrtIMJSlF6Kt8=@proton.me
> 
> Reported-by: syzbot+6f655a60d3244d0c6718@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=6f655a60d3244d0c6718
> Fixes: ec4edd7b9d20 ("bcachefs: Prep work for variable size btree node buffers")
> Suggested-by: Kent Overstreet <kent.overstreet@...ux.dev>
> Signed-off-by: Piotr Zalewski <pZ010001011111@...ton.me>

Thanks! Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ