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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID:
	<TYSPR06MB71581E78109EE6E692B74EF1F68D2@TYSPR06MB7158.apcprd06.prod.outlook.com>
Date: Fri, 2 May 2025 03:16:24 +0000
From: "huk23@...udan.edu.cn" <huk23@...udan.edu.cn>
To: Dave Kleikamp <shaggy@...nel.org>
CC: "jjtan24@...udan.edu.cn" <jjtan24@...udan.edu.cn>,
	白烁冉 <baishuoran@...eu.edu.cn>, jfs-discussion
	<jfs-discussion@...ts.sourceforge.net>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "syzkaller@...glegroups.com"
	<syzkaller@...glegroups.com>
Subject: KASAN: null-ptr-deref Read in txBeginAnon

Dear Maintainers,


When using our customized Syzkaller to fuzz the latest Linux kernel, the following crash (47th)was triggered.




HEAD commit: 6537cfb395f352782918d8ee7b7f10ba2cc3cbf2
git tree: upstream
Output:https://github.com/pghk13/Kernel-Bug/blob/main/0115rc7/47-general%20protection%20fault%20in%20txBeginAnon/report0
Kernel config:https://github.com/pghk13/Kernel-Bug/blob/main/0115rc7/config.txt
C reproducer:https://github.com/pghk13/Kernel-Bug/blob/main/0115rc7/47-general%20protection%20fault%20in%20txBeginAnon/2repro.c
Syzlang reproducer:https://github.com/pghk13/Kernel-Bug/blob/main/0115rc7/47-general%20protection%20fault%20in%20txBeginAnon/2_repro.txt




This is a NULL pointer dereference error in the JFS file system. The problem is with the txBeginAnon function on line jfs_txnmgr.c465. When the code tries to execute the test_bit (log_SYNCBARRIER, &log->flag) on line 465, it tries to access log->flag, but since log is NULL, this results in a NULL pointer dereference.
We have reproduced this issue several times on 6.13-rc7 again.








If you fix this issue, please add the following tag to the commit:
Reported-by: Kun Hu <huk23@...udan.edu.cn>, Jiaji Qin <jjtan24@...udan.edu.cn>, Shuoran Bai <baishuoran@...eu.edu.cn>




==================================================================
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
CPU: 0 UID: 0 PID: 2840 Comm: syz.7.257 Tainted: G    B              6.13.0-rc7 #1
Tainted: [B]=BAD_PAGE
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:206 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:txBeginAnon+0x119/0x400 fs/jfs/jfs_txnmgr.c:465
Code: 24 24 48 89 44 24 08 e8 a5 30 c4 fe be 08 00 00 00 48 89 df e8 68 73 00 ff 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 77 02 00 00 48 8b 45 40 31 ff 48 c1 e8 02 41 89
RSP: 0018:ffa0000013d6f508 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000040 RCX: ffffffff9ee56b68
RDX: 0000000000000008 RSI: 0000000000000008 RDI: 0000000000000040
RBP: 0000000000000000 R08: fff3fc00027ade01 R09: fff3fc00027ade94
R10: fff3fc00027ade93 R11: 0000000000000003 R12: ff11000011b44680
R13: ff11000025194000 R14: ff110000290d2800 R15: 1ff40000027adea6
FS:  00007f01b2a08700(0000) GS:ff1100006a200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc6749826f4 CR3: 0000000023a8a004 CR4: 0000000000771ef0
PKRU: 80000000
Call Trace:
 <TASK>
 extAlloc+0xd7/0xf20 fs/jfs/jfs_extent.c:78
 jfs_get_block+0x66a/0xab0 fs/jfs/inode.c:248
 __block_write_begin_int+0x4b2/0x18c0 fs/buffer.c:2116
 block_write_begin+0xa3/0x1e0 fs/buffer.c:2226
 jfs_write_begin+0x35/0xa0 fs/jfs/inode.c:299
 generic_perform_write+0x290/0x850 mm/filemap.c:4046
 __generic_file_write_iter+0x160/0x1a0 mm/filemap.c:4147
 generic_file_write_iter+0xe1/0x340 mm/filemap.c:4173
 do_iter_readv_writev+0x51f/0x7e0 fs/read_write.c:820
 vfs_writev+0x30e/0xd70 fs/read_write.c:1050
 do_pwritev+0x1b1/0x270 fs/read_write.c:1146
 __do_sys_pwritev2 fs/read_write.c:1204 [inline]
 __se_sys_pwritev2 fs/read_write.c:1195 [inline]
 __x64_sys_pwritev2+0xef/0x160 fs/read_write.c:1195
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc3/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f01b3db471d
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f01b2a07ba8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007f01b3f76f80 RCX: 00007f01b3db471d
RDX: 0000000000000001 RSI: 0000000020000300 RDI: 0000000000000006
RBP: 00007f01b3e29425 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f01b3f76f8c R14: 00007f01b3f77018 R15: 00007f01b2a07d40
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:206 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:txBeginAnon+0x119/0x400 fs/jfs/jfs_txnmgr.c:465
Code: 24 24 48 89 44 24 08 e8 a5 30 c4 fe be 08 00 00 00 48 89 df e8 68 73 00 ff 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 77 02 00 00 48 8b 45 40 31 ff 48 c1 e8 02 41 89
RSP: 0018:ffa0000013d6f508 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000040 RCX: ffffffff9ee56b68
RDX: 0000000000000008 RSI: 0000000000000008 RDI: 0000000000000040
RBP: 0000000000000000 R08: fff3fc00027ade01 R09: fff3fc00027ade94
R10: fff3fc00027ade93 R11: 0000000000000003 R12: ff11000011b44680
R13: ff11000025194000 R14: ff110000290d2800 R15: 1ff40000027adea6
FS:  00007f01b2a08700(0000) GS:ff1100006a200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc6749826f4 CR3: 0000000023a8a004 CR4: 0000000000771ef0
PKRU: 80000000
----------------
Code disassembly (best guess):
   0: 24 24                and    $0x24,%al
   2: 48 89 44 24 08       mov    %rax,0x8(%rsp)
   7: e8 a5 30 c4 fe       callq  0xfec430b1
   c: be 08 00 00 00       mov    $0x8,%esi
  11: 48 89 df             mov    %rbx,%rdi
  14: e8 68 73 00 ff       callq  0xff007381
  19: 48 89 da             mov    %rbx,%rdx
  1c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
  23: fc ff df
  26: 48 c1 ea 03          shr    $0x3,%rdx
* 2a: 80 3c 02 00          cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e: 0f 85 77 02 00 00    jne    0x2ab
  34: 48 8b 45 40          mov    0x40(%rbp),%rax
  38: 31 ff                xor    %edi,%edi
  3a: 48 c1 e8 02          shr    $0x2,%rax
  3e: 41                   rex.B
  3f: 89                   .byte 0x89




thanks,
Kun Hu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ