CVE: CVE-2024-47684
Published: 2024-10-21
Description: In the Linux kernel, the following vulnerability has been resolved:

tcp: check skb is non-NULL in tcp_rto_delta_us()

We have some machines running stock Ubuntu 20.04.6 which is their 5.4.0-174-generic
kernel that are running ceph and recently hit a null ptr dereference in
tcp_rearm_rto(). Initially hitting it from the TLP path, but then later we also
saw it getting hit from the RACK case as well. Here are examples of the oops
messages we saw in each of those cases:

Jul 26 15:05:02 rx [1[PII_REDACTED]53] BUG: kernel NULL pointer dereference, address: [PII_REDACTED]
Jul 26 15:05:02 rx [1[PII_REDACTED]72] #PF: supervisor read access in kernel mode
Jul 26 15:05:02 rx [1[PII_REDACTED]71] #PF: error_code(0x0000) - not-present page
Jul 26 15:05:02 rx [1[PII_REDACTED]62] PGD 0 P4D 0
Jul 26 15:05:02 rx [1[PII_REDACTED]64] Oops: 0000 [#1] SMP NOPTI
Jul 26 15:05:02 rx [1[PII_REDACTED]91] CPU: 0 PID: 9180 Comm: msgr-worker-1 Tainted: G W 5.4.0-174-generic #193-Ubuntu
Jul 26 15:05:02 rx [1[PII_REDACTED]96] Hardware name: Supermicro SMC 2x26 os-gen8 64C NVME-Y 256G/H12SSW-NTR, BIOS 2.5.V1.2U.NVMe.UEFI 05/09/2023
Jul 26 15:05:02 rx [1[PII_REDACTED]52] RIP: 0010:tcp_rearm_rto+0xe4/0x160
Jul 26 15:05:02 rx [1[PII_REDACTED]56] Code: 87 ca 04 00 00 00 5b 41 5c 41 5d 5d c3 c3 49 8b bc 24 40 06 00 00 eb 8d 48 bb cf f7 53 e3 a5 9b c4 20 4c 89 ef e8 0c fe 0e 00 <48> 8b 78 20 48 c1 ef 03 48 89 f8 41 8b bc 24 80 04 00 00 48 f7 e3
Jul 26 15:05:02 rx [1[PII_REDACTED]65] RSP: 0018:ffffb75d40003e08 EFLAGS: 00010246
Jul 26 15:05:02 rx [1[PII_REDACTED]49] RAX: [PII_REDACTED] RBX: 20c49ba5e353f7cf RCX: [PII_REDACTED]
Jul 26 15:05:02 rx [1[PII_REDACTED]42] RDX:[PII_REDACTED]177c30 RSI:[PII_REDACTED]00231c RDI: ffff9874ad283a60
Jul 26 15:05:02 rx [1[PII_REDACTED]33] RBP: ffffb75d40003e20 R08: [PII_REDACTED] R09: ffff987605e20aa8
Jul 26 15:05:02 rx [1[PII_REDACTED]18] R10: ffffb75d40003f00 R11: ffffb75d4460f740 R12: ffff9874ad283900
Jul 26 15:05:02 rx [1[PII_REDACTED]10] R13: ffff9874ad283a60 R14: ffff9874ad283980 R15: ffff9874ad283d30
Jul 26 15:05:02 rx [1[PII_REDACTED]95] FS: 00007f1ef4a2e700(0000) GS:ffff987605e00000(0000) knlGS:[PII_REDACTED]
Jul 26 15:05:02 rx [1[PII_REDACTED]38] CS: 0010 DS: 0000 ES: 0000 CR0: [PII_REDACTED]
Jul 26 15:05:02 rx [1[PII_REDACTED]35] CR2: [PII_REDACTED] CR3: 0000003e450ba003 CR4:[PII_REDACTED]760ef0
Jul 26 15:05:02 rx [1[PII_REDACTED]22] PKRU: 55555554
Jul 26 15:05:02 rx [1[PII_REDACTED]86] Call Trace:
Jul 26 15:05:02 rx [1[PII_REDACTED]88]
Jul 26 15:05:02 rx [1[PII_REDACTED]65] ? show_regs.cold+0x1a/0x1f
Jul 26 15:05:02 rx [1[PII_REDACTED]59] ? __die+0x90/0xd9
Jul 26 15:05:02 rx [1[PII_REDACTED]69] ? no_context+0x196/0x380
Jul 26 15:05:02 rx [1[PII_REDACTED]88] ? ip6_protocol_deliver_rcu+0x4e0/0x4e0
Jul 26 15:05:02 rx [1[PII_REDACTED]16] ? ip6_sublist_rcv_finish+0x3d/0x50
Jul 26 15:05:02 rx [1[PII_REDACTED]00] ? __bad_area_nosemaphore+0x50/0x1a0
Jul 26 15:05:02 rx [1[PII_REDACTED]73] ? bad_area_nosemaphore+0x16/0x20
Jul 26 15:05:02 rx [1[PII_REDACTED]86] ? do_user_addr_fault+0x267/0x450
Jul 26 15:05:02 rx [1[PII_REDACTED]04] ? ipv6_list_rcv+0x112/0x140
Jul 26 15:05:02 rx [1[PII_REDACTED]79] ? __do_page_fault+0x58/0x90
Jul 26 15:05:02 rx [1[PII_REDACTED]58] ? do_page_fault+0x2c/0xe0
Jul 26 15:05:02 rx [1[PII_REDACTED]65] ? page_fault+0x34/0x40
Jul 26 15:05:02 rx [1[PII_REDACTED]17] ? tcp_rearm_rto+0xe4/0x160
Jul 26 15:05:02 rx [1[PII_REDACTED]13] ? tcp_rearm_rto+0xe4/0x160
Jul 26 15:05:02 rx [1[PII_REDACTED]08] tcp_send_loss_probe+0x10b/0x220
Jul 26 15:05:02 rx [1[PII_REDACTED]37] tcp_write_timer_handler+0x1b4/0x240
Jul 26 15:05:02 rx [1[PII_REDACTED]09] tcp_write_timer+0x9e/0xe0
Jul 26 15:05:02 rx [1[PII_REDACTED]14] ? tcp_write_timer_handler+0x240/0x240
Jul 26 15:05:02 rx [1[PII_REDACTED]66] call_timer_fn+0x32/0x130
Jul 26 15:05:02 rx [1[PII_REDACTED]82] __run_timers.part.0+0x180/0x280
Jul 26 15:05:02 rx [1[PII_REDACTED]09] ? recalibrate_cpu_khz+0x10/0x10
Jul 26 15:05:02 rx [1[PII_REDACTED]41] ? native_x2apic_icr_write+0x30/0x30
Jul 26 15:05:02 rx [1[PII_REDACTED]18] ? lapic_next_even
---truncated---
CVSS Score: 5.5 (MEDIUM)
CWE: CWE-476
References: https://git.kernel.org/stable/c/09aea49fbc7e755a915c405644f347137cdb62b0; https://git.kernel.org/stable/c/16e0387d87fc858e34449fdf2b14ed5837f761db; https://git.kernel.org/stable/c/570f7d8c9bf14f041152ba8353d4330ef7575915