-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipv6: ensure sane device mtu in tunnels
Another syzbot report [1] with no reproducer hints at a bug in ip6_gre tunnel (dev:ip6gretap0) Since ipv6 mcast code makes sure to read dev->mtu once and applies a sanity check on it (see commit b9b312a "ipv6: mcast: better catch silly mtu values"), a remaining possibility is that a layer is able to set dev->mtu to an underflowed value (high order bit set). This could happen indeed in ip6gre_tnl_link_config_route(), ip6_tnl_link_config() and ipip6_tunnel_bind_dev() Make sure to sanitize mtu value in a local variable before it is written once on dev->mtu, as lockless readers could catch wrong temporary value. [1] skbuff: skb_over_panic: text:ffff80000b7a2f38 len:40 put:40 head:ffff000149dcf200 data:ffff000149dcf2b0 tail:0xd8 end:0xc0 dev:ip6gretap0 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:120 Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 10241 Comm: kworker/1:1 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 Workqueue: mld mld_ifc_work pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : skb_panic+0x4c/0x50 net/core/skbuff.c:116 lr : skb_panic+0x4c/0x50 net/core/skbuff.c:116 sp : ffff800020dd3b60 x29: ffff800020dd3b70 x28: 0000000000000000 x27: ffff00010df2a800 x26: 00000000000000c0 x25: 00000000000000b0 x24: ffff000149dcf200 x23: 00000000000000c0 x22: 00000000000000d8 x21: ffff80000b7a2f38 x20: ffff00014c2f7800 x19: 0000000000000028 x18: 00000000000001a9 x17: 0000000000000000 x16: ffff80000db49158 x15: ffff000113bf1a80 x14: 0000000000000000 x13: 00000000ffffffff x12: ffff000113bf1a80 x11: ff808000081c0d5c x10: 0000000000000000 x9 : 73f125dc5c63ba00 x8 : 73f125dc5c63ba00 x7 : ffff800008161d1c x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff0001fefddcd0 x1 : 0000000100000000 x0 : 0000000000000089 Call trace: skb_panic+0x4c/0x50 net/core/skbuff.c:116 skb_over_panic net/core/skbuff.c:125 [inline] skb_put+0xd4/0xdc net/core/skbuff.c:2049 ip6_mc_hdr net/ipv6/mcast.c:1714 [inline] mld_newpack+0x14c/0x270 net/ipv6/mcast.c:1765 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0xa20/0xae0 net/ipv6/mcast.c:1989 mld_send_cr+0x438/0x5a8 net/ipv6/mcast.c:2115 mld_ifc_work+0x38/0x290 net/ipv6/mcast.c:2653 process_one_work+0x2d8/0x504 kernel/workqueue.c:2289 worker_thread+0x340/0x610 kernel/workqueue.c:2436 kthread+0x12c/0x158 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: 91011400 aa0803e1 a90027ea 94373093 (d4210000) Fixes: c12b395 ("gre: Support GRE over IPv6") Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20221024020124.3756833-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
- x86_vdso_for_v6.3_rc1
- x86_urgent_for_6.4-rc4
- x86_urgent_for_v6.4_rc6
- x86_urgent_for_v6.4_rc2
- x86_urgent_for_v6.3
- x86_urgent_for_v6.3_rc7
- x86_urgent_for_v6.3_rc6
- x86_urgent_for_v6.3_rc4
- x86_urgent_for_v6.3_rc3
- x86_urgent_for_v6.3_rc2
- x86_urgent_for_v6.2_rc7
- x86_urgent_for_v6.2_rc6
- x86_urgent_for_v6.2_rc4
- x86_urgent_for_v6.2_rc2
- x86_urgent_for_v6.1_rc7
- x86_urgent_for_v6.1_rc6
- x86_tdx_for_6.4
- x86_tdx_for_6.3
- x86_tdx_for_6.2
- x86_splitlock_for_6.2
- x86_shstk_for_6.4
- x86_sgx_for_6.2
- x86_sev_for_v6.4_rc1
- x86_paravirt_for_v6.4_rc1
- x86_mm_for_6.4
- x86_mm_for_6.2_v2
- x86_misc_for_v6.4_rc1
- x86_microcode_for_v6.3_rc1
- x86_fpu_for_6.4
- x86_fpu_for_6.2
- x86_cpu_for_v6.4_rc1
- x86_cpu_for_v6.3_rc1
- x86_core_for_v6.2
- x86_cleanups_for_v6.4_rc1
- x86_cache_for_6.4
- x86_cache_for_v6.3_rc1
- x86_boot_for_v6.2
- x86_asm_for_v6.2
- x86_alternatives_for_v6.3_rc1
- x86_alternatives_for_v6.2
- x86_acpi_for_v6.4_rc1
- x86-urgent-2023-05-28
- x86-urgent-2023-03-05
- x86-urgent-2023-02-19
- x86-urgent-2023-02-11
- x86-urgent-2023-01-04
- x86-urgent-2022-12-12
- x86-platform-2023-02-20
- x86-mm-2023-02-20
- x86-fpu-2023-02-20
- x86-core-2023-02-20
- x86-cleanups-2023-02-20
- x86-build-2023-02-20
- x86-boot-2023-02-20
- x86-asm-2023-02-20
- x86-apic-2023-04-24
- x86-apic-2022-12-10
- v6.9-rc4
- v6.9-rc3
- v6.9-rc2
- v6.9-rc1
- v6.8.6
- v6.8.5
- v6.8.4
- v6.8.3
- v6.8.2
- v6.8.1
- v6.8
- v6.8-rc7
- v6.8-rc6
- v6.8-rc5
- v6.8-rc4
- v6.8-rc3
- v6.8-rc2
- v6.8-rc1
- v6.7.12
- v6.7.11
- v6.7.10
- v6.7.9
- v6.7.8
- v6.7.7
- v6.7.6
- v6.7.5
- v6.7.4
- v6.7.3
- v6.7.2
- v6.7.1
- v6.7
- v6.7-rc8
- v6.7-rc7
- v6.7-rc6
- v6.7-rc5
- v6.7-rc4
- v6.7-rc3
- v6.7-rc2
- v6.7-rc1
- v6.6.27
- v6.6.26
- v6.6.25
- v6.6.24
- v6.6.23
- v6.6.22
- v6.6.21
- v6.6.20
- v6.6.19
- v6.6.18
- v6.6.17
- v6.6.16
- v6.6.15
- v6.6.14
- v6.6.13
- v6.6.12
- v6.6.11
- v6.6.10
- v6.6.9
- v6.6.8
- v6.6.7
- v6.6.6
- v6.6.5
- v6.6.4
- v6.6.3
- v6.6.2
- v6.6.1
- v6.6
- v6.6-rc7
- v6.6-rc6
- v6.6-rc5
- v6.6-rc4
- v6.6-rc3
- v6.6-rc2
- v6.6-rc1
- v6.5.13
- v6.5.12
- v6.5.11
- v6.5.10
- v6.5.9
- v6.5.8
- v6.5.7
- v6.5.6
- v6.5.5
- v6.5.4
- v6.5.3
- v6.5.2
- v6.5.1
- v6.5
- v6.5-rc7
- v6.5-rc6
- v6.5-rc5
- v6.5-rc4
- v6.5-rc3
- v6.5-rc2
- v6.5-rc1
- v6.4.16
- v6.4.15
- v6.4.14
- v6.4.13
- v6.4.12
- v6.4.11
- v6.4.10
- v6.4.9
- v6.4.8
- v6.4.7
- v6.4.6
- v6.4.5
- v6.4.4
- v6.4.3
- v6.4.2
- v6.4.1
- v6.4
- v6.4-rc7
- v6.4-rc6
- v6.4-rc5
- v6.4-rc4
- v6.4-rc3
- v6.4-rc2
- v6.4-rc1
- v6.3.13
- v6.3.12
- v6.3.11
- v6.3.10
- v6.3.9
- v6.3.8
- v6.3.7
- v6.3.6
- v6.3.5
- v6.3.4
- v6.3.3
- v6.3.2
- v6.3.1
- v6.3
- v6.3-rc7
- v6.3-rc6
- v6.3-rc5
- v6.3-rc4
- v6.3-rc3
- v6.3-rc2
- v6.3-rc1
- v6.2.16
- v6.2.15
- v6.2.14
- v6.2.13
- v6.2.12
- v6.2.11
- v6.2.10
- v6.2.9
- v6.2.8
- v6.2.7
- v6.2.6
- v6.2.5
- v6.2.4
- v6.2.3
- v6.2.2
- v6.2.1
- v6.2
- v6.2-rc8
- v6.2-rc7
- v6.2-rc6
- v6.2-rc5
- v6.2-rc4
- v6.2-rc3
- v6.2-rc2
- v6.2-rc1
- v6.1.86
- v6.1.85
- v6.1.84
- v6.1.83
- v6.1.82
- v6.1.81
- v6.1.80
- v6.1.79
- v6.1.78
- v6.1.77
- v6.1.76
- v6.1.75
- v6.1.74
- v6.1.73
- v6.1.72
- v6.1.71
- v6.1.70
- v6.1.69
- v6.1.68
- v6.1.67
- v6.1.66
- v6.1.65
- v6.1.64
- v6.1.63
- v6.1.62
- v6.1.61
- v6.1.60
- v6.1.59
- v6.1.58
- v6.1.57
- v6.1.56
- v6.1.55
- v6.1.54
- v6.1.53
- v6.1.52
- v6.1.51
- v6.1.50
- v6.1.49
- v6.1.48
- v6.1.47
- v6.1.46
- v6.1.45
- v6.1.44
- v6.1.43
- v6.1.42
- v6.1.41
- v6.1.40
- v6.1.39
- v6.1.38
- v6.1.37
- v6.1.36
- v6.1.35
- v6.1.34
- v6.1.33
- v6.1.32
- v6.1.31
- v6.1.30
- v6.1.29
- v6.1.28
- v6.1.27
- v6.1.26
- v6.1.25
- v6.1.24
- v6.1.23
- v6.1.22
- v6.1.21
- v6.1.20
- v6.1.19
- v6.1.18
- v6.1.17
- v6.1.16
- v6.1.15
- v6.1.14
- v6.1.13
- v6.1.12
- v6.1.11
- v6.1.10
- v6.1.9
- v6.1.8
- v6.1.7
- v6.1.6
- v6.1.5
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1
- v6.1-rc8
- v6.1-rc7
- v6.1-rc6
- v6.1-rc5
- v6.1-rc4
- v6.1-rc3
- unmap-fix-20230629
- timers-urgent-2023-02-19
- timers-urgent-2023-01-12
- timers-core-2023-04-28
- timers-core-2023-04-24
- timers-core-2023-02-20
- timers_urgent_for_v6.4_rc2
- timers_urgent_for_v6.1_rc8
- timers_urgent_for_v6.1_rc7
- thermal-6.6-rc1
- thermal-6.6-rc1-3
- thermal-6.6-rc1-2
- thermal-6.5-rc4
- thermal-6.5-rc1
- thermal-6.4-rc8
- thermal-6.4-rc4
- thermal-6.4-rc1
- thermal-6.4-rc1-3
- thermal-6.4-rc1-2
- thermal-6.3-rc7
- thermal-6.3-rc5
- thermal-6.3-rc4
- thermal-6.3-rc2
- thermal-6.3-rc1
- thermal-6.3-rc1-2
- thermal-6.2-rc6
- thermal-6.2-rc5
- thermal-6.2-rc3
- tags/kvm-6.2-2
- tags/kvm-6.2-1
- smp-core-2023-04-27
- smp-core-2022-12-10
- sched-urgent-2023-02-17
- sched-urgent-2023-01-12
- sched-core-2023-04-27
- sched-core-2023-02-20
- sched_urgent_for_v6.4_rc2
- sched_urgent_for_v6.3_rc7
- sched_urgent_for_v6.3_rc4
- sched_urgent_for_v6.2_rc6
- sched_urgent_for_v6.1_rc6
- ras_urgent_for_v6.3_rc3
- ras_core_for_v6.4_rc1
- ras_core_for_v6.3_rc1
- pm-6.6-rc1
- pm-6.6-rc1-3
- pm-6.6-rc1-2
- pm-6.5-rc6
- pm-6.5-rc5
- pm-6.5-rc4
- pm-6.5-rc3
- pm-6.5-rc2
- pm-6.5-rc1
- pm-6.5-rc1-2
- pm-6.4-rc4
- pm-6.4-rc3
- pm-6.4-rc1
- pm-6.4-rc1-2
- pm-6.3-rc7
- pm-6.3-rc3
- pm-6.3-rc1
- pm-6.3-rc1-2
- pm-6.2-rc9
- pm-6.2-rc8
- pm-6.2-rc4
- pm-6.2-rc1
- pm-6.1-rc7
- perf-urgent-2023-05-28
- perf-urgent-2023-01-12
- perf-urgent-2023-01-06
- perf-core-2023-04-27
- perf-core-2023-02-20
- perf_urgent_for_v6.4_rc2
- perf_urgent_for_v6.3_rc6
- perf_urgent_for_v6.3_rc4
- perf_urgent_for_v6.3_rc3
- perf_urgent_for_v6.2_rc7
- perf_urgent_for_v6.2_rc6
- perf_urgent_for_v6.2_rc4
- perf_urgent_for_v6.2_rc2
- perf_urgent_for_v6.1_rc8
- perf_urgent_for_v6.1_rc7
- perf_urgent_for_v6.1_rc6
- perf_urgent_for_v6.1_rc4
- objtool-urgent-2023-05-28
- objtool-core-2023-04-27
- objtool-core-2023-03-02
- objtool_urgent_for_v6.1_rc7
- next-20230912
- next-20230809
- next-20230803
- next-20230801
- next-20230724
- next-20230721
- next-20230718
- next-20230717
- next-20230714
- next-20230706
- next-20230620
- next-20230608
- next-20230512
- next-20230511
- next-20230508
- next-20230504
- next-20230426
- next-20230419
- next-20230411
- next-20230405
- next-20230324
- next-20230320
- next-20230302
- next-20230228
- next-20230217
- next-20230208
- next-20230206
- next-20230203
- next-20230123
- next-20230105
- next-20221226
- next-20221220
- next-20221202
- next-20221129
- md-next-20230825
- md-next-20230817
- md-next-20230814-resend
- md-next-20230729
- md-next-20230623
- md-next-20230613
- md-next-2023-04-28
- md-fixes-20230630
- md-fixes-2023-05-24
- md-fixes-2023-03-29
- mariux-6.12.40-484
- mariux-6.12.29-483
- mariux-6.12.27-482
- mariux-6.12.23-481
- mariux-6.12.23-480
- mariux-6.12.11-479
- mariux-6.6.35-477
- mariux-6.6.27-472
- mariux-6.6.26-471
- mariux-6.6.25-470
- mariux-6.6.24-469
- mariux-6.6.23-468
- mariux-6.6.22-467
- mariux-6.6.22-466
- mariux-6.6.22-465
- mariux-6.6.21-464
- mariux-6.6.20-463
- mariux-6.6.19-462
- mariux-6.6.12-461
- mariux-6.6.11-460
- mariux-6.5.2-455
- mariux-6.5.2-452
- mariux-6.5.2-451
- mariux-6.1.53-458
- mariux-6.1.52-456
- mariux-6.1.39-450
- mariux-6.1.7-446
- locking-urgent-2023-02-11
- locking-core-2023-05-05
- locking-core-2023-02-20
- locking_urgent_for_v6.4_rc2
- locking_urgent_for_v6.2_rc2
- locking_urgent_for_v6.1_rc6
- irq-urgent-2023-05-28
- irq-urgent-2023-03-05
- irq-urgent-2023-02-19
- irq-core-2023-04-24
- irq-core-2023-02-20
- irq-core-2022-12-10
- irq_urgent_for_v6.4_rc5
- irq_urgent_for_v6.3
- irq_urgent_for_v6.2_rc6
- hwmon-for-v6.3
- hwmon-for-v6.3-rc4
- hwmon-for-v6.3-rc3
- hwmon-for-v6.2
- hwmon-for-v6.2-rc1
- hwmon-for-v6.1-rc8
- hwmon-for-v6.1-rc4
- core-urgent-2023-01-12
- core-entry-2023-04-24
- core-debugobjects-2023-05-28
- core-debugobjects-2023-05-06
- core-debugobjects-2023-04-24
- core-debugobjects-2022-12-10
- core_urgent_for_v6.3_rc4
- core_urgent_for_v6.2_rc4
- ata-6.6-rc1
- ata-6.5-rc5
- ata-6.5-rc4
- ata-6.5-rc3
- ata-6.5-rc1
- ata-6.4-rc7
- ata-6.4-rc5
- ata-6.4-rc3
- ata-6.4-rc1
- ata-6.3-rc7
- ata-6.3-rc3
- ata-6.3-rc1
- ata-6.3-fix
- ata-6.2-rc8
- ata-6.2-rc7
- ata-6.2-rc4
- ata-6.2-rc2
- amd-drm-next-6.4-2023-03-31
- amd-drm-next-6.4-2023-03-17
- amd-drm-next-6.3-2023-02-17
- amd-drm-next-6.3-2023-02-03
- amd-drm-next-6.3-2023-01-27
- amd-drm-next-6.3-2023-01-20
- amd-drm-next-6.3-2023-01-13
- amd-drm-next-6.3-2023-01-06
- amd-drm-fixes-6.3-2023-03-30
- amd-drm-fixes-6.3-2023-03-29
- amd-drm-fixes-6.3-2023-03-23
- amd-drm-fixes-6.3-2023-03-15
- amd-drm-fixes-6.3-2023-03-09
- amd-drm-fixes-6.3-2023-03-02
- amd-drm-fixes-6.2-2023-02-15
- amd-drm-fixes-6.2-2023-02-09
- amd-drm-fixes-6.2-2023-02-08
- amd-drm-fixes-6.2-2023-02-01
- amd-drm-fixes-6.2-2023-01-25
- amd-drm-fixes-6.2-2023-01-19
- amd-drm-fixes-6.2-2023-01-11
- amd-drm-fixes-6.2-2023-01-04
- amd-drm-fixes-6.2-2022-12-21
- amd-drm-fixes-6.2-2022-12-15
- amd-drm-fixes-6.1-2022-12-07
- amd-drm-fixes-6.1-2022-12-01
- amd-drm-fixes-6.1-2022-11-23
- amd-drm-fixes-6.1-2022-11-16
- amd-drm-fixes-6.1-2022-11-09
- amd-drm-fixes-6.1-2022-11-02
- acpi-6.6-rc1
- acpi-6.5-rc8
- acpi-6.5-rc6
- acpi-6.5-rc1
- acpi-6.5-rc1-3
- acpi-6.5-rc1-2
- acpi-6.4-rc8
- acpi-6.4-rc3
- acpi-6.4-rc1
- acpi-6.4-rc1-3
- acpi-6.4-rc1-2
- acpi-6.3-rc7
- acpi-6.3-rc6
- acpi-6.3-rc5
- acpi-6.3-rc4
- acpi-6.3-rc3
- acpi-6.3-rc1
- acpi-6.3-rc1-2
- acpi-6.2-rc6
- acpi-6.2-rc5
- acpi-6.2-rc4
- acpi-6.2-rc2
- acpi-6.2-rc1
- acpi-6.2-rc1-2
- Ubuntu-unstable-6.5.0-4.4
- Ubuntu-unstable-6.5.0-2.2
- Ubuntu-unstable-6.5.0-1.1
- Ubuntu-unstable-6.4.0-8.8
- Ubuntu-unstable-6.4.0-5.5
- Ubuntu-unstable-6.3.0-2.2
- Ubuntu-unstable-6.3.0-1.1
- Ubuntu-unstable-6.1.0-9.9
- Ubuntu-lowlatency-6.2.0-1014.14
- Ubuntu-lowlatency-6.2.0-1010.10
- Ubuntu-lowlatency-6.2.0-1009.9
- Ubuntu-lowlatency-6.2.0-1008.8
- Ubuntu-lowlatency-6.2.0-1005.5
- Ubuntu-lowlatency-6.2.0-1004.4
- Ubuntu-lowlatency-6.2.0-1003.3
- Ubuntu-lowlatency-6.2.0-1002.2
- Ubuntu-lowlatency-6.2.0-1001.1
- Ubuntu-lowlatency-6.1.0-1001.1
- Ubuntu-6.2.0-34.34
- Ubuntu-6.2.0-32.32
- Ubuntu-6.2.0-30.30
- Ubuntu-6.2.0-27.28
- Ubuntu-6.2.0-26.26
- Ubuntu-6.2.0-25.25
- Ubuntu-6.2.0-23.23
- Ubuntu-6.2.0-21.21
- Ubuntu-6.2.0-20.20
- Ubuntu-6.2.0-19.19
- Ubuntu-6.2.0-18.18
- Ubuntu-6.2.0-17.17
- Ubuntu-6.1.0-16.16
- Ubuntu-6.1.0-15.15
- Ubuntu-6.1.0-14.14
- Ubuntu-6.1.0-13.13
- Ubuntu-6.1.0-12.12
Eric Dumazet
authored and
Jakub Kicinski
committed
Oct 25, 2022
1 parent
88619e7
commit d89d7ff
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters