7.8
HIGH CVSS 3.1
CVE-2021-47103
inet: fully convert sk->sk_rx_dst to RCU rules
Description

In the Linux kernel, the following vulnerability has been resolved: inet: fully convert sk->sk_rx_dst to RCU rules syzbot reported various issues around early demux, one being included in this changelog [1] sk->sk_rx_dst is using RCU protection without clearly documenting it. And following sequences in tcp_v4_do_rcv()/tcp_v6_do_rcv() are not following standard RCU rules. [a] dst_release(dst); [b] sk->sk_rx_dst = NULL; They look wrong because a delete operation of RCU protected pointer is supposed to clear the pointer before the call_rcu()/synchronize_rcu() guarding actual memory freeing. In some cases indeed, dst could be freed before [b] is done. We could cheat by clearing sk_rx_dst before calling dst_release(), but this seems the right time to stick to standard RCU annotations and debugging facilities. [1] BUG: KASAN: use-after-free in dst_check include/net/dst.h:470 [inline] BUG: KASAN: use-after-free in tcp_v4_early_demux+0x95b/0x960 net/ipv4/tcp_ipv4.c:1792 Read of size 2 at addr ffff88807f1cb73a by task syz-executor.5/9204 CPU: 0 PID: 9204 Comm: syz-executor.5 Not tainted 5.16.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 dst_check include/net/dst.h:470 [inline] tcp_v4_early_demux+0x95b/0x960 net/ipv4/tcp_ipv4.c:1792 ip_rcv_finish_core.constprop.0+0x15de/0x1e80 net/ipv4/ip_input.c:340 ip_list_rcv_finish.constprop.0+0x1b2/0x6e0 net/ipv4/ip_input.c:583 ip_sublist_rcv net/ipv4/ip_input.c:609 [inline] ip_list_rcv+0x34e/0x490 net/ipv4/ip_input.c:644 __netif_receive_skb_list_ptype net/core/dev.c:5508 [inline] __netif_receive_skb_list_core+0x549/0x8e0 net/core/dev.c:5556 __netif_receive_skb_list net/core/dev.c:5608 [inline] netif_receive_skb_list_internal+0x75e/0xd80 net/core/dev.c:5699 gro_normal_list net/core/dev.c:5853 [inline] gro_normal_list net/core/dev.c:5849 [inline] napi_complete_done+0x1f1/0x880 net/core/dev.c:6590 virtqueue_napi_complete drivers/net/virtio_net.c:339 [inline] virtnet_poll+0xca2/0x11b0 drivers/net/virtio_net.c:1557 __napi_poll+0xaf/0x440 net/core/dev.c:7023 napi_poll net/core/dev.c:7090 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7177 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 common_interrupt+0x52/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0033:0x7f5e972bfd57 Code: 39 d1 73 14 0f 1f 80 00 00 00 00 48 8b 50 f8 48 83 e8 08 48 39 ca 77 f3 48 39 c3 73 3e 48 89 13 48 8b 50 f8 48 89 38 49 8b 0e <48> 8b 3e 48 83 c3 08 48 83 c6 08 eb bc 48 39 d1 72 9e 48 39 d0 73 RSP: 002b:00007fff8a413210 EFLAGS: 00000283 RAX: 00007f5e97108990 RBX: 00007f5e97108338 RCX: ffffffff81d3aa45 RDX: ffffffff81d3aa45 RSI: 00007f5e97108340 RDI: ffffffff81d3aa45 RBP: 00007f5e97107eb8 R08: 00007f5e97108d88 R09: 0000000093c2e8d9 R10: 0000000000000000 R11: 0000000000000000 R12: 00007f5e97107eb0 R13: 00007f5e97108338 R14: 00007f5e97107ea8 R15: 0000000000000019 </TASK> Allocated by task 13: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3247 dst_alloc+0x146/0x1f0 net/core/dst.c:92 rt_dst_alloc+0x73/0x430 net/ipv4/route.c:1613 ip_route_input_slow+0x1817/0x3a20 net/ipv4/route.c:234 ---truncated---

INFO

Published Date :

March 4, 2024, 6:15 p.m.

Last Modified :

Feb. 14, 2025, 3:03 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2021-47103 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH [email protected]
Solution
This vulnerability can be remediated by updating the Linux kernel packages.
  • Update the affected Linux kernel packages.
  • Reboot the system after the update.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-47103.

URL Resource
https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 Exploit Mailing List Patch
https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 Exploit Mailing List Patch
https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 Exploit Mailing List Patch
https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 Exploit Mailing List Patch
https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 Exploit Mailing List Patch
https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e Exploit Mailing List Patch
https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 Exploit Mailing List Patch
https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 Exploit Mailing List Patch
https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 Exploit Mailing List Patch
https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 Exploit Mailing List Patch
https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 Exploit Mailing List Patch
https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 Exploit Mailing List Patch
https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e Exploit Mailing List Patch
https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 Exploit Mailing List Patch
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-47103 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-47103 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-47103 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-47103 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Feb. 14, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CWE NIST CWE-416
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 3.6 up to (excluding) 4.9.331 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.10 up to (excluding) 4.14.296 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15 up to (excluding) 4.19.262 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.220 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.150 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.12 *cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.16:rc6:*:*:*:*:*:*
    Changed Reference Type https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 No Types Assigned https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 No Types Assigned https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 No Types Assigned https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 No Types Assigned https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 No Types Assigned https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 No Types Assigned https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 No Types Assigned https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 No Types Assigned https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 No Types Assigned https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 No Types Assigned https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e No Types Assigned https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e No Types Assigned https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 No Types Assigned https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 Exploit, Mailing List, Patch
    Changed Reference Type https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 No Types Assigned https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 Exploit, Mailing List, Patch
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4
    Added Reference https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100
    Added Reference https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412
    Added Reference https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105
    Added Reference https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449
    Added Reference https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e
    Added Reference https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 28, 2024

    Action Type Old Value New Value
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Mar. 04, 2024

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: inet: fully convert sk->sk_rx_dst to RCU rules syzbot reported various issues around early demux, one being included in this changelog [1] sk->sk_rx_dst is using RCU protection without clearly documenting it. And following sequences in tcp_v4_do_rcv()/tcp_v6_do_rcv() are not following standard RCU rules. [a] dst_release(dst); [b] sk->sk_rx_dst = NULL; They look wrong because a delete operation of RCU protected pointer is supposed to clear the pointer before the call_rcu()/synchronize_rcu() guarding actual memory freeing. In some cases indeed, dst could be freed before [b] is done. We could cheat by clearing sk_rx_dst before calling dst_release(), but this seems the right time to stick to standard RCU annotations and debugging facilities. [1] BUG: KASAN: use-after-free in dst_check include/net/dst.h:470 [inline] BUG: KASAN: use-after-free in tcp_v4_early_demux+0x95b/0x960 net/ipv4/tcp_ipv4.c:1792 Read of size 2 at addr ffff88807f1cb73a by task syz-executor.5/9204 CPU: 0 PID: 9204 Comm: syz-executor.5 Not tainted 5.16.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 dst_check include/net/dst.h:470 [inline] tcp_v4_early_demux+0x95b/0x960 net/ipv4/tcp_ipv4.c:1792 ip_rcv_finish_core.constprop.0+0x15de/0x1e80 net/ipv4/ip_input.c:340 ip_list_rcv_finish.constprop.0+0x1b2/0x6e0 net/ipv4/ip_input.c:583 ip_sublist_rcv net/ipv4/ip_input.c:609 [inline] ip_list_rcv+0x34e/0x490 net/ipv4/ip_input.c:644 __netif_receive_skb_list_ptype net/core/dev.c:5508 [inline] __netif_receive_skb_list_core+0x549/0x8e0 net/core/dev.c:5556 __netif_receive_skb_list net/core/dev.c:5608 [inline] netif_receive_skb_list_internal+0x75e/0xd80 net/core/dev.c:5699 gro_normal_list net/core/dev.c:5853 [inline] gro_normal_list net/core/dev.c:5849 [inline] napi_complete_done+0x1f1/0x880 net/core/dev.c:6590 virtqueue_napi_complete drivers/net/virtio_net.c:339 [inline] virtnet_poll+0xca2/0x11b0 drivers/net/virtio_net.c:1557 __napi_poll+0xaf/0x440 net/core/dev.c:7023 napi_poll net/core/dev.c:7090 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7177 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 common_interrupt+0x52/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0033:0x7f5e972bfd57 Code: 39 d1 73 14 0f 1f 80 00 00 00 00 48 8b 50 f8 48 83 e8 08 48 39 ca 77 f3 48 39 c3 73 3e 48 89 13 48 8b 50 f8 48 89 38 49 8b 0e <48> 8b 3e 48 83 c3 08 48 83 c6 08 eb bc 48 39 d1 72 9e 48 39 d0 73 RSP: 002b:00007fff8a413210 EFLAGS: 00000283 RAX: 00007f5e97108990 RBX: 00007f5e97108338 RCX: ffffffff81d3aa45 RDX: ffffffff81d3aa45 RSI: 00007f5e97108340 RDI: ffffffff81d3aa45 RBP: 00007f5e97107eb8 R08: 00007f5e97108d88 R09: 0000000093c2e8d9 R10: 0000000000000000 R11: 0000000000000000 R12: 00007f5e97107eb0 R13: 00007f5e97108338 R14: 00007f5e97107ea8 R15: 0000000000000019 </TASK> Allocated by task 13: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3247 dst_alloc+0x146/0x1f0 net/core/dst.c:92 rt_dst_alloc+0x73/0x430 net/ipv4/route.c:1613 ip_route_input_slow+0x1817/0x3a20 net/ipv4/route.c:234 ---truncated---
    Added Reference Linux https://git.kernel.org/stable/c/68c34ce11ef23328692aa35fa6aaafdd75913100 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/92e6e36ecd16808866ac6172b9491b5097cde449 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/75a578000ae5e511e5d0e8433c94a14d9c99c412 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/c3bb4a7e8cbc984e1cdac0fe6af60e880214ed6e [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/f039b43cbaea5e0700980c2f0052da05a70782e0 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/0249a4b8a554f2eb6a27b62516fa50168584faa4 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/8f905c0e7354ef261360fb7535ea079b1082c105 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 7.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact