Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-16 Thread Michael Ellerman
Ivan Orlov writes: > On 8/15/24 00:26, Ivan Orlov wrote: >> >> As you can see, the device name is defined as a local variable, which >> means that it doesn't exist out of the 'overflow_allocation_test' >> function scope. This patch: >> >> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-14 Thread Ivan Orlov
On 8/15/24 00:26, Ivan Orlov wrote: As you can see, the device name is defined as a local variable, which means that it doesn't exist out of the 'overflow_allocation_test' function scope. This patch: diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.c index f314a0c15a6d..fa7ca8c94eee 10

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-14 Thread Ivan Orlov
sense_test # overflow_allocation_test: 11 allocation overflow tests finished ====== BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 Read of size 1 at addr c976be40 by task kunit_try_catch/1843 CPU: 0 UID: 0 PID: 1843 Comm: kunit

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-14 Thread Erhard Furtner
# overflow_allocation_test: 11 allocation overflow tests finished > > ====================== > > BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 > > Read of size 1 at addr c976be40 by task kunit_try_catch/1843 &g

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-12 Thread Kees Cook
erflow tests finished > ============== > BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 > Read of size 1 at addr c976be40 by task kunit_try_catch/1843 > > CPU: 0 UID: 0 PID: 1843 Comm: kunit_try_catch Tainted: G N > 6.11.0-rc2-PMacG4 #1 > Tain

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-09-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-09-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #18 from Erhard F. (erhar...@mailbox.org) --- Created attachment 292339 --> https://bugzilla.kernel.org/attachment.cgi?id=292339&action=edit kernel .config (5.9-rc3, PowerMac G4 DP) -- You are receiving this mail because: You are w

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-09-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #17 from Erhard F. (erhar...@mailbox.org) --- Created attachment 292337 --> https://bugzilla.kernel.org/attachment.cgi?id=292337&action=edit dmesg (5.9-rc3, INLINE KASAN, PowerMac G4 DP) Re-tried with 5.9-rc3 (inline KASAN). The ori

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #289937|0 |1 is obsolete|

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #15 from Christophe Leroy (christophe.le...@csgroup.eu) --- Ah yes, having init_text above the 24 bits limit might be a problem for function calls. I'm surprised that the linker doesn't complain. Anyway, it is not a problem in itself,

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #14 from Erhard F. (erhar...@mailbox.org) --- Ah, I've overlooked that... To set CONFIG_DATA_SHIFT=25 I needed to set ADVANCED_OPTIONS=y, DATA_SHIFT_BOOL=y first. But with CONFIG_DATA_SHIFT=25 this kernel won't boot at all. OpenFirmw

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #13 from Christophe Leroy (christophe.le...@csgroup.eu) --- Thanks for testing. Regarding the two BATs, I suggest you increase CONFIG_DATA_SHIFT as explained in a previous comment. -- You are receiving this mail because: You are wat

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #12 from Erhard F. (erhar...@mailbox.org) --- Successfully applied your 2 patches. The kernel still complains about these 2 BATs, but the KASAN hit at early boot is gone with the patches. Thanks! -- You are receiving this mail becaus

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #11 from Christophe Leroy (christophe.le...@csgroup.eu) --- The issue is that that commit moved more code than described into kasan_init(): Kasan Pages allocation have to be moved into kasan_init() but page tables allocation must rema

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-07-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #10 from Christophe Leroy (christophe.le...@csgroup.eu) --- I reproduced the problem and bisected it to commit https://github.com/torvalds/linux/commit/d2a91cef9bbdeb87b7449fdab1a6be6000930210 I'll investigate the issue Can you confi

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #9 from Erhard F. (erhar...@mailbox.org) --- Ok, thanks for the clarification! So if KASAN works properly something else must cause this hit. I will start a bisect the next few days and see how that turns out... -- You are receiving

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #8 from Christophe Leroy (christophe.le...@csgroup.eu) --- block_address_translation contains funny sizes. But the adresses seems ok. So it shows you have a 24 Mb text+rodata area. 8 BATs are used (16+8+8+32+64+128+256+256) By increasi

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #7 from Erhard F. (erhar...@mailbox.org) --- Created attachment 289947 --> https://bugzilla.kernel.org/attachment.cgi?id=289947&action=edit segment_registers -- You are receiving this mail because: You are watching the assignee of

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #6 from Erhard F. (erhar...@mailbox.org) --- Created attachment 289945 --> https://bugzilla.kernel.org/attachment.cgi?id=289945&action=edit block_address_translation Sure. -- You are receiving this mail because: You are watching t

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #5 from Christophe Leroy (christophe.le...@csgroup.eu) --- Can we get a dump of /sys/kernel/debug/powerpc/block_address_translation -- You are receiving this mail because: You are watching the assignee of the bug.

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #4 from Erhard F. (erhar...@mailbox.org) --- Erm wait... there is some change. In 5.8-rc1 stacktrace was: BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8 Read of size 1 at addr c11c1a80 by task swapper/0 CPU: 0 PID: 0 Comm

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #289661|0 |1 is obsolete|

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #289659|0 |1 is obsolete|

[Bug 208181] BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 289661 --> https://bugzilla.kernel.org/attachment.cgi?id=289661&action=edit kernel .config (5.8-rc1, PowerMac G4 DP) -- You are receiving this mail because: You are wa

[Bug 208181] New: BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8

2020-06-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208181 Bug ID: 208181 Summary: BUG: KASAN: stack-out-of-bounds in strcmp+0x58/0xd8 Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.8-rc1 Hardware: PPC-32 OS

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 --- Comment #6 from Nikolay Aleksandrov (niko...@cumulusnetworks.com) --- Note that the bug wasn't introduced by my commit, but instead has been there since: commit 4f520900522f Author: Richard Guy Briggs Date: Tue Apr 22 21:31:54 2014 -0400

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Component|PPC-32 |Other Hardwa

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 --- Comment #5 from Christophe Leroy (christophe.le...@c-s.fr) --- That's not a PPC32 bug but a Network bug affecting all 32 bits architectures. -- You are receiving this mail because: You are watching the assignee of the bug.

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 --- Comment #4 from Christophe Leroy (christophe.le...@c-s.fr) --- Feedback from Nikolay: I think we can just cap these at min(BITS_PER_TYPE(u32), nlk->ngroups) since "groups" is coming from sockaddr_nl's "nl_groups" which is a u32, for any group

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 --- Comment #3 from Christophe Leroy (christophe.le...@c-s.fr) --- Bug introduced by commit ("cf5bddb95cbe net: bridge: vlan: add rtnetlink group and notify support") RTNLGRP_MAX is now 33. 'unsigned long groups' is 32 bits long on PPC32 Follow

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 Christophe Leroy (christophe.le...@c-s.fr) changed: What|Removed |Added CC||christophe.le

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 287359 --> https://bugzilla.kernel.org/attachment.cgi?id=287359&action=edit kernel .config (5.6.0-rc1, PowerMac G4 DP) -- You are receiving this mail because: You are

[Bug 206525] New: BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 Bug ID: 206525 Summary: BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1) Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.6.0-rc1

Re: BUG: KASAN: stack-out-of-bounds

2019-02-28 Thread Christophe Leroy
ade a try with the strong STACK_PROTECTOR compiled in, but no difference and nothing detected by the stack protector. ====== BUG: KASAN: stack-out-of-bounds in memchr+0x24/0x74 Read of size 1 at addr c0ecdd40 by task swapper/0 CPU: 0 PID: 0

Re: BUG: KASAN: stack-out-of-bounds

2019-02-28 Thread Andrey Ryabinin
same report. >>>>> >>>>> Is that a real bug, in which case how could I spot it ? Or is it >>>>> something wrong in my implementation of KASAN ? >>>>> >>>>> I checked that after kasan_init(), the entire shadow memory is full o

Re: BUG: KASAN: stack-out-of-bounds

2019-02-28 Thread Dmitry Vyukov
it > >>> something wrong in my implementation of KASAN ? > >>> > >>> I checked that after kasan_init(), the entire shadow memory is full of 0 > >>> only. > >>> > >>> I also made a try with the strong STACK_PROTECTOR compil

Re: BUG: KASAN: stack-out-of-bounds

2019-02-28 Thread Andrey Ryabinin
y is full of 0 >>> only. >>> >>> I also made a try with the strong STACK_PROTECTOR compiled in, but no >>> difference and nothing detected by the stack protector. >>> >>> ==

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
KASAN ? I checked that after kasan_init(), the entire shadow memory is full of 0 only. I also made a try with the strong STACK_PROTECTOR compiled in, but no difference and nothing detected by the stack protector. ====== BUG: KASAN: stack-o

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Dmitry Vyukov
ss-sanitizer/tools/kasan_symbolize.py > > I get the following. It doesn't seem much interesting, does it ? Yes, it does not seem to work for powerpc32. Then please pass addresses through addr2line -fi. > == > BUG

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
tizer/tools/kasan_symbolize.py I get the following. It doesn't seem much interesting, does it ? ====== BUG: KASAN: stack-out-of-bounds in[<none>] memchr+0x24/0x74 lib/string.c:958 Read of size 1 at addr c0ecdd40

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
ector. ====== BUG: KASAN: stack-out-of-bounds in memchr+0x24/0x74 Read of size 1 at addr c0ecdd40 by task swapper/0 CPU: 0 PID: 0 Comm: swapper Not tainted 5.0.0-rc7+ #1133 Call Trace: [c0e9dca0] [c01c42a0] print_address_description+0x64/0x2bc (unreliable) [c0e9dcd0] [c01

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Andrey Ryabinin
f KASAN ? > > I checked that after kasan_init(), the entire shadow memory is full of 0 only. > > I also made a try with the strong STACK_PROTECTOR compiled in, but no > difference and nothing detected by the stack protector. > > ======================

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Dmitry Vyukov
^ > c0ecdd80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 > c0ecde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ====== > > == > BUG: KASAN: sta

BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
ade a try with the strong STACK_PROTECTOR compiled in, but no difference and nothing detected by the stack protector. ====== BUG: KASAN: stack-out-of-bounds in memchr+0x24/0x74 Read of size 1 at addr c0ecdd40 by task swapper/0 CPU: 0 P