CVE-2024-56661: tipc: fix NULL deref in cleanup_bearer()

Published Dec 27, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

tipc: fix NULL deref in cleanupbearer()

syzbot found [1] that after blamed commit, ub->ubsock->sk was NULL when attempting the atomicdec() :

atomicdec(&tipcnet(socknet(ub->ubsock->sk))->wqcount);

Fix this by caching the tipcnet pointer.

[1]

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] CPU: 0 UID: 0 PID: 5896 Comm: kworker/0:3 Not tainted 6.13.0-rc1-next-20241203-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events cleanupbearer RIP: 0010:readpnet include/net/netnamespace.h:387 [inline] RIP: 0010:socknet include/net/sock.h:655 [inline] RIP: 0010:cleanupbearer+0x1f7/0x280 net/tipc/udpmedia.c:820 Code: 18 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 3c f7 99 f6 48 8b 1b 48 83 c3 30 e8 f0 e4 60 00 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 1a f7 99 f6 49 83 c7 e8 48 8b 1b RSP: 0018:ffffc9000410fb70 EFLAGS: 00010206 RAX: 0000000000000006 RBX: 0000000000000030 RCX: ffff88802fe45a00 RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc9000410f900 RBP: ffff88807e1f0908 R08: ffffc9000410f907 R09: 1ffff92000821f20 R10: dffffc0000000000 R11: fffff52000821f21 R12: ffff888031d19980 R13: dffffc0000000000 R14: dffffc0000000000 R15: ffff88807e1f0918 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556ca050b000 CR3: 0000000031c0c000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Affected Software

11 affected componentsFixes available
Linux Linux kernel=5.4.287
Linux Linux kernel=5.10.231
Linux Linux kernel=5.15.174
Linux Linux kernel=6.1.120
Linux Linux kernel=6.6.66
Linux Linux kernel=6.12.5
Linux Linux kernel=6.13-rc2
debian/linux<6.1.123-1
6.1.123-1
debian/linux<6.12.6-1
6.12.6-1
debian/linux<6.12.6-1
6.12.6-1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.123-1
  2. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.6-1
  3. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1
  4. Compensating control

    In the TIPC cleanup_bearer() code path, cache the tipc_net pointer before ub->ubsock->sk can become NULL, and use the cached pointer for the atomic_dec() of wq_count instead of dereferencing ub->ubsock->sk.

Event History

Dec 27, 2024
CVE Published
via MITRE·03:06 PM
Data Sourced
via MITRE·03:06 PM
Description
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-56661?

CVE-2024-56661 has been identified as a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-56661?

To fix CVE-2024-56661, update the Linux kernel to a version that includes the patch addressing this vulnerability.

3

Which versions of Linux kernel are affected by CVE-2024-56661?

CVE-2024-56661 affects Linux kernel versions 5.4.287, 5.10.231, 5.15.174, 6.1.120, 6.6.66, 6.12.5, and 6.13-rc2.

4

What component is affected by CVE-2024-56661?

CVE-2024-56661 specifically affects the TIPC (Transparent Inter-Process Communication) component of the Linux kernel.

5

Is there any exploitation risk associated with CVE-2024-56661?

Yes, CVE-2024-56661 presents a risk of denial-of-service attacks due to a potential null pointer dereference.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203