mptcp BUG 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| linux (Ubuntu) |
Invalid
|
Undecided
|
Canonical Kernel Team | ||
| Noble |
Fix Released
|
Undecided
|
Unassigned | ||
| Oracular |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
[Impact]
If mptcp endpoints are configured on a host using an address that is external to the host, then the kernel will create an implicit endpoint with the host's local address when mptcp receives its first flow. If multiple packets for these local interfaces arrive in parallel, more than one caller may end up in mptcp_pm_
This can lead to a BUG / panic because synchronize_rcu is called in softint context.
An example stack:
BUG: scheduling while atomic: swapper/
Call Trace:
<IRQ>
dump_stack_lvl (lib/dump_
dump_stack (lib/dump_
__schedule_bug (kernel/
schedule_
__schedule (arch/x86/
schedule (arch/x86/
schedule_timeout (kernel/
wait_
__wait_rcu_gp (include/
synchronize_rcu (kernel/
mptcp_
mptcp_
mptcp_
subflow_
subflow_
tcp_conn_request (net/ipv4/
subflow_
tcp_
tcp_v4_do_rcv (net/ipv4/
tcp_v4_rcv (net/ipv4/
ip_protocol_
ip_local_deliver (include/
ip_sublist_
ip_sublist_rcv (net/ipv4/
ip_list_rcv (net/ipv4/
__netif_
netif_
napi_
igb_poll (drivers/
__napi_poll (net/core/
net_rx_action (net/core/
handle_softirqs (kernel/
__irq_exit_rcu (kernel/
irq_exit_rcu (kernel/
common_interrupt (arch/x86/
</IRQ>
[Backport]
Cherry-pick the following patch from upstream:
022bfe24aad8 ("mptcp: fix 'scheduling while atomic' in mptcp_pm_
This patch fixes the problem by deleting the duplicate prior to its insertion in local_addr_list by skipping the replacement operation in mptcp_pm_
[Test]
This patch has passed the upstream mptcp test suites and has also been tested against the reproducer that triggered the panic. (Add and remove mptcp endpoints with an external address that differs from the internal address). Prior to this patch the problem would trigger in less than a minute. With this patch applied, the test has run for hours without incident.
[Potential Regression]
The regression potential is low since the behavior change is small. Implicit endpoints still get created and deleted, but they are only replaced when a user adds an endpoint with the same local address as an existing implicit address. No replacements via mptcp_pm_
CVE References
- 2024-36476
- 2024-39282
- 2024-41013
- 2024-47408
- 2024-47736
- 2024-49568
- 2024-49571
- 2024-53125
- 2024-53179
- 2024-53685
- 2024-53687
- 2024-53690
- 2024-54193
- 2024-54455
- 2024-54460
- 2024-54683
- 2024-55639
- 2024-55881
- 2024-55916
- 2024-56369
- 2024-56372
- 2024-56652
- 2024-56653
- 2024-56654
- 2024-56656
- 2024-56657
- 2024-56659
- 2024-56660
- 2024-56662
- 2024-56664
- 2024-56667
- 2024-56670
- 2024-56675
- 2024-56709
- 2024-56710
- 2024-56715
- 2024-56716
- 2024-56717
- 2024-56718
- 2024-56758
- 2024-56759
- 2024-56760
- 2024-56761
- 2024-56763
- 2024-56764
- 2024-56767
- 2024-56769
- 2024-56770
- 2024-57791
- 2024-57792
- 2024-57793
- 2024-57801
- 2024-57802
- 2024-57804
- 2024-57806
- 2024-57807
- 2024-57841
- 2024-57879
- 2024-57882
- 2024-57883
- 2024-57884
- 2024-57885
- 2024-57887
- 2024-57888
- 2024-57889
- 2024-57890
- 2024-57892
- 2024-57893
- 2024-57895
- 2024-57896
- 2024-57897
- 2024-57898
- 2024-57899
- 2024-57900
- 2024-57901
- 2024-57902
- 2024-57903
- 2024-57904
- 2024-57906
- 2024-57907
- 2024-57908
- 2024-57910
- 2024-57911
- 2024-57912
- 2024-57913
- 2024-57916
- 2024-57917
- 2024-57925
- 2024-57926
- 2024-57929
- 2024-57931
- 2024-57932
- 2024-57933
- 2024-57938
- 2024-57939
- 2024-57940
- 2024-57945
- 2024-57946
- 2025-21631
- 2025-21632
- 2025-21634
- 2025-21635
- 2025-21636
- 2025-21637
- 2025-21638
- 2025-21639
- 2025-21640
- 2025-21642
- 2025-21643
- 2025-21645
- 2025-21646
- 2025-21647
- 2025-21648
- 2025-21649
- 2025-21650
- 2025-21651
- 2025-21652
- 2025-21653
- 2025-21654
- 2025-21655
- 2025-21656
- 2025-21658
- 2025-21659
- 2025-21660
- 2025-21662
- 2025-21663
- 2025-21664
- 2025-21971
| Changed in linux (Ubuntu): | |
| assignee: | nobody → Canonical Kernel Team (canonical-kernel-team) |
| Changed in linux (Ubuntu Oracular): | |
| status: | New → Fix Committed |
| Changed in linux (Ubuntu Noble): | |
| status: | New → Fix Committed |
| tags: | added: kernel-daily-bug |
| Changed in linux (Ubuntu): | |
| status: | Confirmed → Invalid |

I have a patch for this accepted upstream that I'll send to the Ubuntu kernel team in short order. This has been merged to Linus's tree but has yet to be picked up by Stable. It's tagged to go there, it just hasn't been picked up by the robots yet. It affects all releases from 5.17 onward, which should put it in scope for Noble, Oracular, and Plucky.