netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4)
@ 2024-05-24 12:51 syzbot
  2024-11-06 17:58 ` syzbot
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2024-05-24 12:51 UTC (permalink / raw)
  To: davem, edumazet, kuba, linux-kernel, netdev, pabeni,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    101b7a97143a Merge tag 'acpi-6.10-rc1' of git://git.kernel..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15633df4980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7ac2f8c387a23814
dashboard link: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: i386

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4f673334a91c/disk-101b7a97.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8e6db59f4091/vmlinux-101b7a97.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7e5782387c9d/bzImage-101b7a97.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com

=====================================================
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:29 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:271 [inline]
BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x366/0x24b0 lib/iov_iter.c:185
 instrument_copy_to_user include/linux/instrumented.h:114 [inline]
 copy_to_user_iter lib/iov_iter.c:24 [inline]
 iterate_ubuf include/linux/iov_iter.h:29 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
 iterate_and_advance include/linux/iov_iter.h:271 [inline]
 _copy_to_iter+0x366/0x24b0 lib/iov_iter.c:185
 copy_to_iter include/linux/uio.h:196 [inline]
 simple_copy_to_iter net/core/datagram.c:532 [inline]
 __skb_datagram_iter+0x185/0x1000 net/core/datagram.c:420
 skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:546
 skb_copy_datagram_msg include/linux/skbuff.h:4070 [inline]
 netlink_recvmsg+0x432/0x1610 net/netlink/af_netlink.c:1962
 sock_recvmsg_nosec net/socket.c:1046 [inline]
 sock_recvmsg+0x2c4/0x340 net/socket.c:1068
 ____sys_recvmsg+0x18a/0x620 net/socket.c:2803
 ___sys_recvmsg+0x223/0x840 net/socket.c:2845
 __sys_recvmsg net/socket.c:2875 [inline]
 __do_sys_recvmsg net/socket.c:2885 [inline]
 __se_sys_recvmsg net/socket.c:2882 [inline]
 __x64_sys_recvmsg+0x304/0x4a0 net/socket.c:2882
 x64_sys_call+0x38ff/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:48
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
 pskb_expand_head+0x30f/0x19d0 net/core/skbuff.c:2271
 netlink_trim+0x2c2/0x330 net/netlink/af_netlink.c:1317
 netlink_broadcast_filtered+0x82/0x23b0 net/netlink/af_netlink.c:1523
 nlmsg_multicast_filtered include/net/netlink.h:1111 [inline]
 nlmsg_multicast include/net/netlink.h:1130 [inline]
 nlmsg_notify+0x15f/0x2f0 net/netlink/af_netlink.c:2602
 rtnl_notify+0xc3/0xf0 net/core/rtnetlink.c:757
 wireless_nlevent_flush net/wireless/wext-core.c:354 [inline]
 wireless_nlevent_process+0xfe/0x250 net/wireless/wext-core.c:414
 process_one_work kernel/workqueue.c:3267 [inline]
 process_scheduled_works+0xa81/0x1bd0 kernel/workqueue.c:3348
 worker_thread+0xea5/0x1560 kernel/workqueue.c:3429
 kthread+0x3e2/0x540 kernel/kthread.c:389
 ret_from_fork+0x6d/0x90 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Uninit was stored to memory at:
 wireless_send_event+0x566/0x1020 net/wireless/wext-core.c:580
 ioctl_standard_iw_point+0x12e5/0x13c0
 compat_standard_call+0x179/0x310 net/wireless/wext-core.c:1110
 wext_ioctl_dispatch+0x234/0xa30 net/wireless/wext-core.c:1016
 compat_wext_handle_ioctl+0x1ae/0x2f0 net/wireless/wext-core.c:1139
 compat_sock_ioctl+0x26b/0x1370 net/socket.c:3525
 __do_compat_sys_ioctl fs/ioctl.c:1004 [inline]
 __se_compat_sys_ioctl+0x791/0x1090 fs/ioctl.c:947
 __ia32_compat_sys_ioctl+0x93/0xe0 fs/ioctl.c:947
 ia32_sys_call+0x1481/0x40a0 arch/x86/include/generated/asm/syscalls_32.h:55
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0xb4/0x120 arch/x86/entry/common.c:386
 do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:411
 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:449
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Local variable iwp created at:
 compat_standard_call+0x48/0x310 net/wireless/wext-core.c:1097
 wext_ioctl_dispatch+0x234/0xa30 net/wireless/wext-core.c:1016

Bytes 60-63 of 64 are uninitialized
Memory access of size 64 starts at ffff88804af03180
Data copied to user address 00007fff5690c968

CPU: 0 PID: 4697 Comm: dhcpcd Tainted: G        W          6.9.0-syzkaller-02339-g101b7a97143a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4)
  2024-05-24 12:51 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4) syzbot
@ 2024-11-06 17:58 ` syzbot
  2024-11-06 18:09   ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2024-11-06 17:58 UTC (permalink / raw)
  To: davem, edumazet, horms, kuba, linux-kernel, netdev, pabeni,
	syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    2e1b3cc9d7f7 Merge tag 'arm-fixes-6.12-2' of git://git.ker..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1485dd5f980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=6fdf74cce377223b
dashboard link: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1685dd5f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10bfb6a7980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/08456e37db58/disk-2e1b3cc9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cc957f7ba80b/vmlinux-2e1b3cc9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7579fe72ed89/bzImage-2e1b3cc9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com

=====================================================
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:30 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:328 [inline]
BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x2f3/0x2b30 lib/iov_iter.c:185
 instrument_copy_to_user include/linux/instrumented.h:114 [inline]
 copy_to_user_iter lib/iov_iter.c:24 [inline]
 iterate_ubuf include/linux/iov_iter.h:30 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
 iterate_and_advance include/linux/iov_iter.h:328 [inline]
 _copy_to_iter+0x2f3/0x2b30 lib/iov_iter.c:185
 copy_to_iter include/linux/uio.h:211 [inline]
 simple_copy_to_iter net/core/datagram.c:524 [inline]
 __skb_datagram_iter+0x18d/0x1190 net/core/datagram.c:401
 skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:538
 skb_copy_datagram_msg include/linux/skbuff.h:4076 [inline]
 netlink_recvmsg+0x432/0x1610 net/netlink/af_netlink.c:1958
 sock_recvmsg_nosec net/socket.c:1051 [inline]
 sock_recvmsg+0x2c4/0x340 net/socket.c:1073
 sock_read_iter+0x32d/0x3c0 net/socket.c:1143
 io_iter_do_read io_uring/rw.c:771 [inline]
 __io_read+0x8d2/0x20f0 io_uring/rw.c:865
 io_read+0x3e/0xf0 io_uring/rw.c:943
 io_issue_sqe+0x429/0x22c0 io_uring/io_uring.c:1739
 io_queue_sqe io_uring/io_uring.c:1953 [inline]
 io_req_task_submit+0x104/0x1e0 io_uring/io_uring.c:1373
 io_poll_task_func+0x12e5/0x1620
 io_handle_tw_list+0x23a/0x5c0 io_uring/io_uring.c:1063
 tctx_task_work_run+0xf8/0x3d0 io_uring/io_uring.c:1135
 tctx_task_work+0x6d/0xc0 io_uring/io_uring.c:1153
 task_work_run+0x268/0x310 kernel/task_work.c:239
 ptrace_notify+0x304/0x320 kernel/signal.c:2403
 ptrace_report_syscall include/linux/ptrace.h:415 [inline]
 ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline]
 syscall_exit_work+0x14e/0x3e0 kernel/entry/common.c:173
 syscall_exit_to_user_mode_prepare kernel/entry/common.c:200 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline]
 syscall_exit_to_user_mode+0x13b/0x170 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1e0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
 pskb_expand_head+0x305/0x1a60 net/core/skbuff.c:2283
 netlink_trim+0x2c2/0x330 net/netlink/af_netlink.c:1313
 netlink_unicast+0x9f/0x1260 net/netlink/af_netlink.c:1347
 nlmsg_unicast include/net/netlink.h:1158 [inline]
 nlmsg_notify+0x21d/0x2f0 net/netlink/af_netlink.c:2602
 rtnetlink_send+0x73/0x90 net/core/rtnetlink.c:770
 rtnetlink_maybe_send include/linux/rtnetlink.h:18 [inline]
 tcf_add_notify net/sched/act_api.c:2068 [inline]
 tcf_action_add net/sched/act_api.c:2091 [inline]
 tc_ctl_action+0x146e/0x19d0 net/sched/act_api.c:2139
 rtnetlink_rcv_msg+0x12fc/0x1410 net/core/rtnetlink.c:6675
 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2551
 rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6693
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:744
 ____sys_sendmsg+0x877/0xb60 net/socket.c:2607
 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2661
 __sys_sendmsg net/socket.c:2690 [inline]
 __do_sys_sendmsg net/socket.c:2699 [inline]
 __se_sys_sendmsg net/socket.c:2697 [inline]
 __x64_sys_sendmsg+0x300/0x4a0 net/socket.c:2697
 x64_sys_call+0x2da0/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
 __nla_put lib/nlattr.c:1041 [inline]
 nla_put+0x1c6/0x230 lib/nlattr.c:1099
 tcf_ife_dump+0x250/0x10b0 net/sched/act_ife.c:660
 tcf_action_dump_old net/sched/act_api.c:1190 [inline]
 tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1226
 tcf_action_dump+0x1fd/0x460 net/sched/act_api.c:1250
 tca_get_fill+0x519/0x7a0 net/sched/act_api.c:1648
 tcf_add_notify_msg net/sched/act_api.c:2043 [inline]
 tcf_add_notify net/sched/act_api.c:2062 [inline]
 tcf_action_add net/sched/act_api.c:2091 [inline]
 tc_ctl_action+0x1365/0x19d0 net/sched/act_api.c:2139
 rtnetlink_rcv_msg+0x12fc/0x1410 net/core/rtnetlink.c:6675
 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2551
 rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6693
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:744
 ____sys_sendmsg+0x877/0xb60 net/socket.c:2607
 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2661
 __sys_sendmsg net/socket.c:2690 [inline]
 __do_sys_sendmsg net/socket.c:2699 [inline]
 __se_sys_sendmsg net/socket.c:2697 [inline]
 __x64_sys_sendmsg+0x300/0x4a0 net/socket.c:2697
 x64_sys_call+0x2da0/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable opt created at:
 tcf_ife_dump+0xab/0x10b0 net/sched/act_ife.c:647
 tcf_action_dump_old net/sched/act_api.c:1190 [inline]
 tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1226

Bytes 158-159 of 216 are uninitialized
Memory access of size 216 starts at ffff88811980e280

CPU: 1 UID: 0 PID: 5791 Comm: syz-executor190 Not tainted 6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
=====================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4)
  2024-11-06 17:58 ` syzbot
@ 2024-11-06 18:09   ` Eric Dumazet
  2024-11-06 22:19     ` syzbot
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2024-11-06 18:09 UTC (permalink / raw)
  To: syzbot; +Cc: davem, horms, kuba, linux-kernel, netdev, pabeni, syzkaller-bugs

On Wed, Nov 6, 2024 at 6:58 PM syzbot
<syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com> wrote:
>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:    2e1b3cc9d7f7 Merge tag 'arm-fixes-6.12-2' of git://git.ker..
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1485dd5f980000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=6fdf74cce377223b
> dashboard link: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1685dd5f980000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10bfb6a7980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/08456e37db58/disk-2e1b3cc9.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/cc957f7ba80b/vmlinux-2e1b3cc9.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/7579fe72ed89/bzImage-2e1b3cc9.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com
>
> =====================================================
> BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
> BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
> BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:30 [inline]
> BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
> BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:328 [inline]
> BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x2f3/0x2b30 lib/iov_iter.c:185
>  instrument_copy_to_user include/linux/instrumented.h:114 [inline]
>  copy_to_user_iter lib/iov_iter.c:24 [inline]
>  iterate_ubuf include/linux/iov_iter.h:30 [inline]
>  iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
>  iterate_and_advance include/linux/iov_iter.h:328 [inline]
>  _copy_to_iter+0x2f3/0x2b30 lib/iov_iter.c:185
>  copy_to_iter include/linux/uio.h:211 [inline]
>  simple_copy_to_iter net/core/datagram.c:524 [inline]
>  __skb_datagram_iter+0x18d/0x1190 net/core/datagram.c:401
>  skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:538
>  skb_copy_datagram_msg include/linux/skbuff.h:4076 [inline]
>  netlink_recvmsg+0x432/0x1610 net/netlink/af_netlink.c:1958
>  sock_recvmsg_nosec net/socket.c:1051 [inline]
>  sock_recvmsg+0x2c4/0x340 net/socket.c:1073
>  sock_read_iter+0x32d/0x3c0 net/socket.c:1143
>  io_iter_do_read io_uring/rw.c:771 [inline]
>  __io_read+0x8d2/0x20f0 io_uring/rw.c:865
>  io_read+0x3e/0xf0 io_uring/rw.c:943
>  io_issue_sqe+0x429/0x22c0 io_uring/io_uring.c:1739
>  io_queue_sqe io_uring/io_uring.c:1953 [inline]
>  io_req_task_submit+0x104/0x1e0 io_uring/io_uring.c:1373
>  io_poll_task_func+0x12e5/0x1620
>  io_handle_tw_list+0x23a/0x5c0 io_uring/io_uring.c:1063
>  tctx_task_work_run+0xf8/0x3d0 io_uring/io_uring.c:1135
>  tctx_task_work+0x6d/0xc0 io_uring/io_uring.c:1153
>  task_work_run+0x268/0x310 kernel/task_work.c:239
>  ptrace_notify+0x304/0x320 kernel/signal.c:2403
>  ptrace_report_syscall include/linux/ptrace.h:415 [inline]
>  ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline]
>  syscall_exit_work+0x14e/0x3e0 kernel/entry/common.c:173
>  syscall_exit_to_user_mode_prepare kernel/entry/common.c:200 [inline]
>  __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline]
>  syscall_exit_to_user_mode+0x13b/0x170 kernel/entry/common.c:218
>  do_syscall_64+0xda/0x1e0 arch/x86/entry/common.c:89
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Uninit was stored to memory at:
>  pskb_expand_head+0x305/0x1a60 net/core/skbuff.c:2283
>  netlink_trim+0x2c2/0x330 net/netlink/af_netlink.c:1313
>  netlink_unicast+0x9f/0x1260 net/netlink/af_netlink.c:1347
>  nlmsg_unicast include/net/netlink.h:1158 [inline]
>  nlmsg_notify+0x21d/0x2f0 net/netlink/af_netlink.c:2602
>  rtnetlink_send+0x73/0x90 net/core/rtnetlink.c:770
>  rtnetlink_maybe_send include/linux/rtnetlink.h:18 [inline]
>  tcf_add_notify net/sched/act_api.c:2068 [inline]
>  tcf_action_add net/sched/act_api.c:2091 [inline]
>  tc_ctl_action+0x146e/0x19d0 net/sched/act_api.c:2139
>  rtnetlink_rcv_msg+0x12fc/0x1410 net/core/rtnetlink.c:6675
>  netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2551
>  rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6693
>  netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
>  netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
>  netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
>  sock_sendmsg_nosec net/socket.c:729 [inline]
>  __sock_sendmsg+0x30f/0x380 net/socket.c:744
>  ____sys_sendmsg+0x877/0xb60 net/socket.c:2607
>  ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2661
>  __sys_sendmsg net/socket.c:2690 [inline]
>  __do_sys_sendmsg net/socket.c:2699 [inline]
>  __se_sys_sendmsg net/socket.c:2697 [inline]
>  __x64_sys_sendmsg+0x300/0x4a0 net/socket.c:2697
>  x64_sys_call+0x2da0/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:47
>  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
>  do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Uninit was stored to memory at:
>  __nla_put lib/nlattr.c:1041 [inline]
>  nla_put+0x1c6/0x230 lib/nlattr.c:1099
>  tcf_ife_dump+0x250/0x10b0 net/sched/act_ife.c:660
>  tcf_action_dump_old net/sched/act_api.c:1190 [inline]
>  tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1226
>  tcf_action_dump+0x1fd/0x460 net/sched/act_api.c:1250
>  tca_get_fill+0x519/0x7a0 net/sched/act_api.c:1648
>  tcf_add_notify_msg net/sched/act_api.c:2043 [inline]
>  tcf_add_notify net/sched/act_api.c:2062 [inline]
>  tcf_action_add net/sched/act_api.c:2091 [inline]
>  tc_ctl_action+0x1365/0x19d0 net/sched/act_api.c:2139
>  rtnetlink_rcv_msg+0x12fc/0x1410 net/core/rtnetlink.c:6675
>  netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2551
>  rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6693
>  netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
>  netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357
>  netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901
>  sock_sendmsg_nosec net/socket.c:729 [inline]
>  __sock_sendmsg+0x30f/0x380 net/socket.c:744
>  ____sys_sendmsg+0x877/0xb60 net/socket.c:2607
>  ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2661
>  __sys_sendmsg net/socket.c:2690 [inline]
>  __do_sys_sendmsg net/socket.c:2699 [inline]
>  __se_sys_sendmsg net/socket.c:2697 [inline]
>  __x64_sys_sendmsg+0x300/0x4a0 net/socket.c:2697
>  x64_sys_call+0x2da0/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:47
>  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
>  do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Local variable opt created at:
>  tcf_ife_dump+0xab/0x10b0 net/sched/act_ife.c:647
>  tcf_action_dump_old net/sched/act_api.c:1190 [inline]
>  tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1226
>
> Bytes 158-159 of 216 are uninitialized
> Memory access of size 216 starts at ffff88811980e280
>
> CPU: 1 UID: 0 PID: 5791 Comm: syz-executor190 Not tainted 6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
> =====================================================
>
>
> ---
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.

#syz test

diff --git a/include/uapi/linux/tc_act/tc_connmark.h
b/include/uapi/linux/tc_act/tc_connmark.h
index 9f8f6f709feb5cb67decc5fc80c422d9373df930..7089b9466065df074f98b47ffe179baf386600a9
100644
--- a/include/uapi/linux/tc_act/tc_connmark.h
+++ b/include/uapi/linux/tc_act/tc_connmark.h
@@ -8,6 +8,7 @@
 struct tc_connmark {
        tc_gen;
        __u16 zone;
+       __u16 pad;
 };

 enum {
diff --git a/include/uapi/linux/tc_act/tc_ife.h
b/include/uapi/linux/tc_act/tc_ife.h
index 8c401f185675582febc262a8d11bf9598cb8a1f4..6f7f7af20fe9466631cc571f9c00665489cfe91d
100644
--- a/include/uapi/linux/tc_act/tc_ife.h
+++ b/include/uapi/linux/tc_act/tc_ife.h
@@ -13,6 +13,7 @@
 struct tc_ife {
        tc_gen;
        __u16 flags;
+       __u16 pad;
 };

 /*XXX: We need to encode the total number of bytes consumed */
diff --git a/include/uapi/linux/tc_act/tc_pedit.h
b/include/uapi/linux/tc_act/tc_pedit.h
index f5cab7fc96ab1ea1516beeedff20b279c3cfa4d7..28e026dbc1400899a072fdbac6872654bea3ab8d
100644
--- a/include/uapi/linux/tc_act/tc_pedit.h
+++ b/include/uapi/linux/tc_act/tc_pedit.h
@@ -62,6 +62,7 @@ struct tc_pedit_sel {
        tc_gen;
        unsigned char           nkeys;
        unsigned char           flags;
+       __u16                                   pad;
        struct tc_pedit_key     keys[] __counted_by(nkeys);
 };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4)
  2024-11-06 18:09   ` Eric Dumazet
@ 2024-11-06 22:19     ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-11-06 22:19 UTC (permalink / raw)
  To: davem, edumazet, horms, kuba, linux-kernel, netdev, pabeni,
	syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file include/uapi/linux/tc_act/tc_connmark.h
patch: **** malformed patch at line 11: diff --git a/include/uapi/linux/tc_act/tc_ife.h




Tested on:

commit:         f43b1569 Merge tag 'keys-next-6.12-rc7' of git://git.k..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=6fdf74cce377223b
dashboard link: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14119f40580000


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-06 22:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 12:51 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (4) syzbot
2024-11-06 17:58 ` syzbot
2024-11-06 18:09   ` Eric Dumazet
2024-11-06 22:19     ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).