-
Notifications
You must be signed in to change notification settings - Fork 14
KASAN: null-ptr-deref in range [x-y] RIP: try_module_get #102
Comments
Likely related one: WARNING: CPU: 0 PID: 1 at arch/x86/mm/ioremap.c:223 __ioremap_caller (arch/x86/mm/ioremap.c:223 (discriminator 3)) 0: 4c 8b 85 20 ff ff ff mov -0xe0(%rbp),%r8 Code starting with the faulting instruction 0: 0f 0b ud2 All code 0: 1a 48 c7 sbb -0x39(%rax),%cl Code starting with the faulting instruction 0: 01 00 add %eax,(%rax) |
Likely another related one, which was found on the same kernel but with BPH_P9_VIRTIO_PROBE harness: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT DEBUG_PAGEALLOC KASAN 0: ff (bad) Code starting with the faulting instruction 0: 00 00 add %al,(%rax) 0: ca 7c d3 lret $0xd37c Code starting with the faulting instruction 0: 66 ed in (%dx),%ax |
Found in 6.0-rc2 via BOOT_VIRTIO_BLK_PROBE harness.
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT DEBUG_PAGEALLOC KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 1 Comm: swapper Not tainted 6.0.0-rc2-g1d588de205f8 #1
RIP: 0010:try_module_get (kernel/module/main.c:829)
Code: 1a 48 c7 83 b8 00 00 00 00 00 01 00 00 00 5c 5d c3 4c 89 e7 e8 7d 37 35 00 eb 01 00 00 00 e8 13 38 35 00 eb dc 90 55 48 89 e5 <01> 00 00 00 01 00 00 00 41 54 53 48 83 ec 08 48 01 00 00 00 b5 00
All code
0: 1a 48 c7 sbb -0x39(%rax),%cl
3: 83 b8 00 00 00 00 00 cmpl $0x0,0x0(%rax)
a: 01 00 add %eax,(%rax)
c: 00 00 add %al,(%rax)
e: 5c pop %rsp
f: 5d pop %rbp
10: c3 retq
11: 4c 89 e7 mov %r12,%rdi
14: e8 7d 37 35 00 callq 0x353796
19: eb 01 jmp 0x1c
1b: 00 00 add %al,(%rax)
1d: 00 e8 add %ch,%al
1f: 13 38 adc (%rax),%edi
21: 35 00 eb dc 90 xor $0x90dceb00,%eax
26: 55 push %rbp
27: 48 89 e5 mov %rsp,%rbp
2a:* 01 00 add %eax,(%rax) <-- trapping instruction
2c: 00 00 add %al,(%rax)
2e: 01 00 add %eax,(%rax)
30: 00 00 add %al,(%rax)
32: 41 54 push %r12
34: 53 push %rbx
35: 48 83 ec 08 sub $0x8,%rsp
39: 48 01 00 add %rax,(%rax)
3c: 00 00 add %al,(%rax)
3e: b5 00 mov $0x0,%ch
Code starting with the faulting instruction
0: 01 00 add %eax,(%rax)
2: 00 00 add %al,(%rax)
4: 01 00 add %eax,(%rax)
6: 00 00 add %al,(%rax)
8: 41 54 push %r12
a: 53 push %rbx
b: 48 83 ec 08 sub $0x8,%rsp
f: 48 01 00 add %rax,(%rax)
12: 00 00 add %al,(%rax)
14: b5 00 mov $0x0,%ch
RSP: 0000:ffffc9000001f6c8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888009f61400 RCX: 0000000000000000
RDX: 1ffff110013ec2a8 RSI: ffff888009f61400 RDI: 0000000000000000
RBP: ffffc9000001f6c8 R08: ffffffff8157f1f6 R09: ffff888021869db0
R10: ffffffff8157bcbd R11: ffffffff8157f2a7 R12: 000000000000000a
R13: ffff888009f61400 R14: ffff888009f61418 R15: ffff8880096e6418
FS: 0000000000000000(0000) GS:ffffffff83cab000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff88802dffb000 CR3: 0000000003c32001 CR4: 00000000001706f0
Call Trace:
__setup_irq (kernel/irq/manage.c:1508)
? __kasan_kmalloc (mm/kasan/common.c:45 mm/kasan/common.c:437 mm/kasan/common.c:516 mm/kasan/common.c:525)
? kmem_cache_alloc_trace (mm/slub.c:3286)
request_threaded_irq (kernel/irq/manage.c:2198)
vp_find_vqs_msix (include/linux/interrupt.h:168 drivers/virtio/virtio_pci_common.c:144 drivers/virtio/virtio_pci_common.c:310)
vp_find_vqs (drivers/virtio/virtio_pci_common.c:411)
? vsprintf (lib/vsprintf.c:2912)
vp_modern_find_vqs (drivers/virtio/virtio_pci_modern.c:357)
init_vq.cold (include/linux/virtio_config.h:227 drivers/block/virtio_blk.c:664)
? kafl_fuzz_buffer (arch/x86/coco/tdx/kafl-agent.c:438 arch/x86/coco/tdx/kafl-agent.c:495)
? virtblk_add_req (drivers/block/virtio_blk.c:602)
? kmem_cache_alloc_trace (mm/slub.c:3286)
__virtblk_probe (drivers/block/virtio_blk.c:934)
? memset (mm/kasan/shadow.c:48)
? kafl_agent_init (arch/x86/coco/tdx/kafl-agent.c:290)
? virtblk_getgeo (drivers/block/virtio_blk.c:888)
virtblk_probe (drivers/block/virtio_blk.c:1114)
virtio_dev_probe (drivers/virtio/virtio.c:307)
? sysfs_create_link (fs/sysfs/symlink.c:93)
really_probe (drivers/base/dd.c:530 drivers/base/dd.c:614)
__driver_probe_device (drivers/base/dd.c:753)
driver_probe_device (drivers/base/dd.c:783)
__driver_attach (drivers/base/dd.c:1156)
? __device_attach_driver (drivers/base/base.h:147 drivers/base/dd.c:1120)
bus_for_each_dev (drivers/base/bus.c:300)
? subsys_dev_iter_exit (drivers/base/bus.c:290)
? __kasan_check_write (mm/kasan/shadow.c:38)
? klist_node_init (arch/x86/include/asm/atomic.h:41 include/linux/atomic/atomic-instrumented.h:42 include/linux/refcount.h:136 include/linux/kref.h:31 lib/klist.c:111)
driver_attach (drivers/base/dd.c:1173)
bus_add_driver (drivers/base/bus.c:618)
driver_register (drivers/base/driver.c:240)
register_virtio_driver (drivers/virtio/virtio.c:360)
virtio_blk_init (drivers/block/virtio_blk.c:1230)
? loop_init (drivers/block/virtio_blk.c:1217)
do_one_initcall (init/main.c:1421)
? initcall_blacklisted (init/main.c:1394)
? parameq (kernel/params.c:98)
? __kasan_kmalloc (mm/kasan/common.c:45 mm/kasan/common.c:437 mm/kasan/common.c:516 mm/kasan/common.c:525)
? __kmalloc (include/linux/kasan.h:234 mm/slub.c:4424)
kernel_init_freeable (init/main.c:1509 init/main.c:1531 init/main.c:1553 init/main.c:1768)
? rest_init (init/main.c:1644)
kernel_init (init/main.c:1654)
ret_from_fork (arch/x86/entry/entry_64.S:312)
Modules linked in:
---[ end trace 0000000000000000 ]---
The text was updated successfully, but these errors were encountered: