bisecting fixing commit since dc4ba5be1babd3b3ec905751a30df89a5899a7a9 building syzkaller on 3334d684ce742ce58ad66b7dcb7a6d4da5185796 testing commit dc4ba5be1babd3b3ec905751a30df89a5899a7a9 with gcc (GCC) 8.1.0 kernel signature: 4e6a654b9fd038b69a9a76fde245c629a7aacfd41b8f5fe2b1f9700ec8e83bbc all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock testing current HEAD 4fccc2503536a564a4ba31a1d50439854201659f testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.1.0 kernel signature: a21636f631501ba11ac029818ebe249ee4f2abbda9db1c04f0e5f7521b07c908 all runs: OK # git bisect start 4fccc2503536a564a4ba31a1d50439854201659f dc4ba5be1babd3b3ec905751a30df89a5899a7a9 Bisecting: 624 revisions left to test after this (roughly 9 steps) [792668145b56165fd113f318f531e499a23e9a52] rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2] testing commit 792668145b56165fd113f318f531e499a23e9a52 with gcc (GCC) 8.1.0 kernel signature: ed9957127ba2043d09ecc966c41013d87bb4a58ee0ca3cfdcd756e8f42067668 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 792668145b56165fd113f318f531e499a23e9a52 Bisecting: 312 revisions left to test after this (roughly 8 steps) [313abce0a1498db52ce825916a1847ba24618106] riscv: delete temporary files testing commit 313abce0a1498db52ce825916a1847ba24618106 with gcc (GCC) 8.1.0 kernel signature: 6984ff7a8d317225cdc7fd9ad88db79c25d976e53a0ce5f52f66398eeda1e398 all runs: OK # git bisect bad 313abce0a1498db52ce825916a1847ba24618106 Bisecting: 155 revisions left to test after this (roughly 7 steps) [05f010d2ff4ba3969337cf0495b4849f184e3cd4] tracing: xen: Ordered comparison of function pointers testing commit 05f010d2ff4ba3969337cf0495b4849f184e3cd4 with gcc (GCC) 8.1.0 kernel signature: d22e04feffd9c87af4cc95878bbc95fcd3e921be1d4b844ab75e39a719afd8ca all runs: OK # git bisect bad 05f010d2ff4ba3969337cf0495b4849f184e3cd4 Bisecting: 77 revisions left to test after this (roughly 6 steps) [2e7d73cb2291f9cc7ea99fc55ae2ddc68c7f7b77] drm/msm/dsi: Implement reset correctly testing commit 2e7d73cb2291f9cc7ea99fc55ae2ddc68c7f7b77 with gcc (GCC) 8.1.0 kernel signature: 704d2fc6d6e1a551fd2af9f8d207d72a5d6d0cae6e642524065657ce4b2c99e1 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 2e7d73cb2291f9cc7ea99fc55ae2ddc68c7f7b77 Bisecting: 38 revisions left to test after this (roughly 5 steps) [d3b5ecceea7dc3ce36c5306b3e45bd75cd192291] gtp: make sure only SOCK_DGRAM UDP sockets are accepted testing commit d3b5ecceea7dc3ce36c5306b3e45bd75cd192291 with gcc (GCC) 8.1.0 kernel signature: 0dd9acb200e7d78a382ea0a9942aae53d119c468589b418d8daeed2e97958355 all runs: OK # git bisect bad d3b5ecceea7dc3ce36c5306b3e45bd75cd192291 Bisecting: 19 revisions left to test after this (roughly 4 steps) [ced84017c91461d480a1cc35367e07bcaf803256] hv_netvsc: flag software created hash value testing commit ced84017c91461d480a1cc35367e07bcaf803256 with gcc (GCC) 8.1.0 kernel signature: 62d549b2df21d5db93800f61f8d28c9697ac9003ba599611b6a426e82c0996b0 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good ced84017c91461d480a1cc35367e07bcaf803256 Bisecting: 9 revisions left to test after this (roughly 3 steps) [7734f040753a08fe0d008afe582e28feb5e07928] arm64: dts: juno: Fix UART frequency testing commit 7734f040753a08fe0d008afe582e28feb5e07928 with gcc (GCC) 8.1.0 kernel signature: 1b54115e622c8cb3e350e5cb7d7bd41a7e1e9c81b0916f1bfc19a1aedf6bb7f8 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 7734f040753a08fe0d008afe582e28feb5e07928 Bisecting: 4 revisions left to test after this (roughly 2 steps) [283163a39a7923da0509270139f6bd48fc82cca9] arm64: dts: meson-gxm-khadas-vim2: fix uart_A bluetooth node testing commit 283163a39a7923da0509270139f6bd48fc82cca9 with gcc (GCC) 8.1.0 kernel signature: d5df87b630911c3c6f871458ddeb485ecaa8aabe02dccb74c3c5fdb2ddb842b2 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 283163a39a7923da0509270139f6bd48fc82cca9 Bisecting: 2 revisions left to test after this (roughly 1 step) [88d6de67e390b6093f2c11189ad022988a9e2961] Linux 4.19.99 testing commit 88d6de67e390b6093f2c11189ad022988a9e2961 with gcc (GCC) 8.1.0 kernel signature: d781deb79d855baf4168cf3ee6e977244b36b339cf6c7d447e9addf8925ccf41 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 88d6de67e390b6093f2c11189ad022988a9e2961 Bisecting: 0 revisions left to test after this (roughly 1 step) [8e360d7c42788acf1e3e0196f702e8f51c60b1c7] firestream: fix memory leaks testing commit 8e360d7c42788acf1e3e0196f702e8f51c60b1c7 with gcc (GCC) 8.1.0 kernel signature: 354b5c0d2d9459b71ba436e511ed95f9c3c0fb3349487b3d9e2c655c8143f840 all runs: crashed: KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock # git bisect good 8e360d7c42788acf1e3e0196f702e8f51c60b1c7 d3b5ecceea7dc3ce36c5306b3e45bd75cd192291 is the first bad commit commit d3b5ecceea7dc3ce36c5306b3e45bd75cd192291 Author: Eric Dumazet Date: Tue Jan 21 23:17:14 2020 -0800 gtp: make sure only SOCK_DGRAM UDP sockets are accepted [ Upstream commit 940ba14986657a50c15f694efca1beba31fa568f ] A malicious user could use RAW sockets and fool GTP using them as standard SOCK_DGRAM UDP sockets. BUG: KMSAN: uninit-value in udp_tunnel_encap_enable include/net/udp_tunnel.h:174 [inline] BUG: KMSAN: uninit-value in setup_udp_tunnel_sock+0x45e/0x6f0 net/ipv4/udp_tunnel.c:85 CPU: 0 PID: 11262 Comm: syz-executor613 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 udp_tunnel_encap_enable include/net/udp_tunnel.h:174 [inline] setup_udp_tunnel_sock+0x45e/0x6f0 net/ipv4/udp_tunnel.c:85 gtp_encap_enable_socket+0x37f/0x5a0 drivers/net/gtp.c:827 gtp_encap_enable drivers/net/gtp.c:844 [inline] gtp_newlink+0xfb/0x1e50 drivers/net/gtp.c:666 __rtnl_newlink net/core/rtnetlink.c:3305 [inline] rtnl_newlink+0x2973/0x3920 net/core/rtnetlink.c:3363 rtnetlink_rcv_msg+0x1153/0x1570 net/core/rtnetlink.c:5424 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x441359 Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff1cd0ac28 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441359 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000246 R12: 00000000004020d0 R13: 0000000000402160 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:307 [inline] kmsan_alloc_page+0x12a/0x310 mm/kmsan/kmsan_shadow.c:336 __alloc_pages_nodemask+0x57f2/0x5f60 mm/page_alloc.c:4800 alloc_pages_current+0x67d/0x990 mm/mempolicy.c:2207 alloc_pages include/linux/gfp.h:534 [inline] alloc_slab_page+0x111/0x12f0 mm/slub.c:1511 allocate_slab mm/slub.c:1656 [inline] new_slab+0x2bc/0x1130 mm/slub.c:1722 new_slab_objects mm/slub.c:2473 [inline] ___slab_alloc+0x1533/0x1f30 mm/slub.c:2624 __slab_alloc mm/slub.c:2664 [inline] slab_alloc_node mm/slub.c:2738 [inline] slab_alloc mm/slub.c:2783 [inline] kmem_cache_alloc+0xb23/0xd70 mm/slub.c:2788 sk_prot_alloc+0xf2/0x620 net/core/sock.c:1597 sk_alloc+0xf0/0xbe0 net/core/sock.c:1657 inet_create+0x7c7/0x1370 net/ipv4/af_inet.c:321 __sock_create+0x8eb/0xf00 net/socket.c:1420 sock_create net/socket.c:1471 [inline] __sys_socket+0x1a1/0x600 net/socket.c:1513 __do_sys_socket net/socket.c:1522 [inline] __se_sys_socket+0x8d/0xb0 net/socket.c:1520 __x64_sys_socket+0x4a/0x70 net/socket.c:1520 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Eric Dumazet Cc: Pablo Neira Reported-by: syzbot Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman drivers/net/gtp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) culprit signature: 0dd9acb200e7d78a382ea0a9942aae53d119c468589b418d8daeed2e97958355 parent signature: 354b5c0d2d9459b71ba436e511ed95f9c3c0fb3349487b3d9e2c655c8143f840 revisions tested: 12, total time: 3h0m15.166288171s (build: 1h48m38.713458268s, test: 1h9m49.405195867s) first good commit: d3b5ecceea7dc3ce36c5306b3e45bd75cd192291 gtp: make sure only SOCK_DGRAM UDP sockets are accepted cc: ["davem@davemloft.net" "edumazet@google.com" "gregkh@linuxfoundation.org"]