Skip to contentSkip to conversation

New: UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23

Bug 215169 [email protected] 2 participants 3 messages Nov 29, 2021 – Feb 4, 2022

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=215169

            Bug ID: 215169
           Summary: UBSAN: shift-out-of-bounds in
                    arch/powerpc/mm/kasan/book3s_32.c:22:23
           Product: Platform Specific/Hardware
           Version: 2.5
    Kernel Version: 5.15.5
          Hardware: PPC-32
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: PPC-32
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 299777
--> https://bugzilla.kernel.org/attachment.cgi?id=299777&action=edit
dmesg (5.15.5, INLINE KASAN, PowerMac G4 DP)

Noticed another small glitch during 5.15.x testing. Happens when inline KASAN is selected:

Total memory = 2048MB; using 4096kB for hash table
Activating Kernel Userspace Access Protection
Linux version 5.15.5-gentoo-PowerMacG4 (root@T1000) (gcc (Gentoo 11.2.0 p1) 11.2.0, GNU ld (Gentoo 2.37_p1 p0) 2.37) #9 SMP Mon Nov 29 20:46:44 CET 2021
================================================================================

UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23
shift exponent -1 is negative
CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.5-gentoo-PowerMacG4 #9
Call Trace:
[c214be60] [c0ba0048] dump_stack_lvl+0x80/0xb0 (unreliable)
[c214be80] [c0b99288] ubsan_epilogue+0x10/0x5c
[c214be90] [c0b98fe0] __ubsan_handle_shift_out_of_bounds+0x94/0x138
[c214bf00] [c1c0f010] kasan_init_region+0xd8/0x26c
[c214bf30] [c1c0ed84] kasan_init+0xc0/0x198
[c214bf70] [c1c08024] setup_arch+0x18/0x54c
[c214bfc0] [c1c037f0] start_kernel+0x90/0x33c

[c214bff0] [00003610] 0x3610
================================================================================
setbat: no BAT available for mapping 0x1c000000
KASAN init done
[...]

The other UBSAN complaint in the netconsole.log is bug #214867.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 215169] UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23

https://bugzilla.kernel.org/show_bug.cgi?id=215169

--- Comment #1 from Erhard F. ([email protected]) --- Created attachment 299779
--> https://bugzilla.kernel.org/attachment.cgi?id=299779&action=edit
kernel .config (5.15.5, PowerMac G4 DP)

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 215169] UBSAN: shift-out-of-bounds in arch/powerpc/mm/kasan/book3s_32.c:22:23

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215169

Erhard F. ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #2 from Erhard F. ([email protected]) --- Fix landed in 5.16.3 and LTS-kernels. Thanks!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.