Bug 367 - debug kernel启动后报错:UBSAN: object-size-mismatch in kernel/kprobes.c:1652:17, BUG: KASAN: stack-out-of-bounds in module_patched+0x1b4/0x1d0
Summary: debug kernel启动后报错:UBSAN: object-size-mismatch in kernel/kprobes.c:1652:17, BU...
Status: CONFIRMED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: ARM (show other bugs) ARM
Version: unspecified
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: wuyihao
QA Contact: shuming
URL:
Whiteboard:
Keywords: Bugfix
Depends on:
Blocks:
 
Reported: 2022-01-18 17:27 UTC by wuyihao
Modified: 2022-05-13 14:34 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wuyihao 2022-01-18 17:27:20 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
必现

Steps to Reproduce:
1.安装kernel-debug
2.perf probe 任意一个函数
3.dmesg

Actual results:
[Thu Dec 16 11:12:04 2021] ================================================================================
[Thu Dec 16 11:12:04 2021] UBSAN: object-size-mismatch in kernel/kprobes.c:1652:17
[Thu Dec 16 11:12:04 2021] load of address 000000006b14f93a with insufficient space
[Thu Dec 16 11:12:04 2021] for an object of type 'unsigned char'
[Thu Dec 16 11:12:04 2021] ================================================================================
[Thu Dec 16 11:12:04 2021] ==================================================================
[Thu Dec 16 11:12:04 2021] BUG: KASAN: stack-out-of-bounds in module_patched+0x1b4/0x1d0
[Thu Dec 16 11:12:04 2021] Read of size 4 at addr ffff0000de7ef751 by task bash/2414


[Thu Dec 16 11:12:04 2021] The buggy address belongs to the page:

[Thu Dec 16 11:12:04 2021] addr ffff0000de7ef751 is located in stack of task bash/2414 at offset 33 in frame:
[Thu Dec 16 11:12:04 2021]  module_patched+0x8/0x1d0

[Thu Dec 16 11:12:04 2021] this frame has 1 object:
[Thu Dec 16 11:12:04 2021]  [32, 36) 'replaced'

[Thu Dec 16 11:12:04 2021] Memory state around the buggy address:
[Thu Dec 16 11:12:04 2021]  ffff0000de7ef600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[Thu Dec 16 11:12:04 2021]  ffff0000de7ef680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[Thu Dec 16 11:12:04 2021] >ffff0000de7ef700: 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 00 00
[Thu Dec 16 11:12:04 2021]                                                  ^
[Thu Dec 16 11:12:04 2021]  ffff0000de7ef780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[Thu Dec 16 11:12:04 2021]  ffff0000de7ef800: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
[Thu Dec 16 11:12:04 2021] ==================================================================

Expected results:
无错误

Additional info: