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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAA2QpBcc9-J=67-pz84-7bMkj37V1-pJYOB2QpUmaCHFfJUiNA@mail.gmail.com>
Date:   Fri, 24 Feb 2023 09:41:32 +0900
From:   Homin Rhee <hominlab@...il.com>
To:     netdev@...r.kernel.org
Subject: [Net][Taprio?][report] KASAN: Null-Ptr-Deref read in __fl_put:cls_flower.c

Hello,
I'm iCAROS7 & my syzkaller hit Null-Ptr-Deref at last night.

Attached C reproducer and syzkaller report.
In my opinion, On __must_check bool refcount_inc_not_zreo() in
refcount.h:243, caller hasn't guaranteed the object memory.

Thank you for your deication.

>From iCAORS7.

< Information of my syzkaller system >
Host
CPU: Intel i7-12700K
OS: Kubuntu 22.04.1 LTS
Kernel: 5.18.19-051819-generic

Syzkaller
Build: bcdf85f8
Target: linux-next a5c95ca1 & 6.2

Syzkaller hit 'KASAN: null-ptr-deref Read in __fl_put' bug.

==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read
include/linux/instrumented.h:72 [inline]
BUG: KASAN: null-ptr-deref in atomic_read
include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: null-ptr-deref in refcount_read
include/linux/refcount.h:147 [inline]
BUG: KASAN: null-ptr-deref in __refcount_add_not_zero
include/linux/refcount.h:152 [inline]
BUG: KASAN: null-ptr-deref in __refcount_inc_not_zero
include/linux/refcount.h:227 [inline]
BUG: KASAN: null-ptr-deref in refcount_inc_not_zero
include/linux/refcount.h:245 [inline]
BUG: KASAN: null-ptr-deref in maybe_get_net
include/net/net_namespace.h:269 [inline]
BUG: KASAN: null-ptr-deref in tcf_exts_get_net
include/net/pkt_cls.h:260 [inline]
BUG: KASAN: null-ptr-deref in __fl_put+0x13e/0x3a0 net/sched/cls_flower.c:513
Read of size 4 at addr 000000000000014c by task syz-executor109/8049

CPU: 0 PID: 8049 Comm: syz-executor109 Not tainted 6.2.0-09654-ga5c95ca18a98 #14
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
 kasan_report+0xc0/0xf0 mm/kasan/report.c:517
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x144/0x190 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
 refcount_read include/linux/refcount.h:147 [inline]
 __refcount_add_not_zero include/linux/refcount.h:152 [inline]
 __refcount_inc_not_zero include/linux/refcount.h:227 [inline]
 refcount_inc_not_zero include/linux/refcount.h:245 [inline]
 maybe_get_net include/net/net_namespace.h:269 [inline]
 tcf_exts_get_net include/net/pkt_cls.h:260 [inline]
 __fl_put+0x13e/0x3a0 net/sched/cls_flower.c:513
 fl_change+0x12b3/0x4b30 net/sched/cls_flower.c:2341
 tc_new_tfilter+0x947/0x2220 net/sched/cls_api.c:2310
 rtnetlink_rcv_msg+0x98d/0xd40 net/core/rtnetlink.c:6165
 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x92f/0xe50 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:722 [inline]
 sock_sendmsg+0xde/0x190 net/socket.c:745
 ____sys_sendmsg+0x331/0x900 net/socket.c:2504
 ___sys_sendmsg+0x11d/0x1b0 net/socket.c:2558
 __sys_sendmmsg+0x18c/0x450 net/socket.c:2644
 __do_sys_sendmmsg net/socket.c:2673 [inline]
 __se_sys_sendmmsg net/socket.c:2670 [inline]
 __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2670
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7ad02aa31d
Code: 28 c3 e8 76 1f 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeef4d0cb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f7ad03274f0 RCX: 00007f7ad02aa31d
RDX: 040000000000009f RSI: 00000000200002c0 RDI: 0000000000000004
RBP: 00007f7ad02fb02d R08: 0000000120080522 R09: 0000000120080522
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffeef4d0cd0
R13: 00007ffeef4d0ee8 R14: 00007f7ad0327470 R15: 0000000000000001
 </TASK>

-- 
Homin Rhee (이호민,李昊珉)

OpenPGP fingerprint: 1D94 A708 6346 FBF1 1DD1  6E1F 4957 8AFE D221 9C6A
You can see the more information about my OpenPGP at https://minnote.net/gpg


-- 
Homin Rhee (이호민,李昊珉)

OpenPGP fingerprint: 1D94 A708 6346 FBF1 1DD1  6E1F 4957 8AFE D221 9C6A
You can see the more information about my OpenPGP at https://minnote.net/gpg

Download attachment "repro.cprog" of type "application/octet-stream" (6728 bytes)

Download attachment "report3" of type "application/octet-stream" (9237 bytes)

Download attachment "log3" of type "application/octet-stream" (1066899 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ