CVE-2023-52629: sh: push-switch: Reorder cleanup operations to avoid use-after-free bug

Published Mar 29, 2024
·
Updated

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

sh: push-switch: Reorder cleanup operations to avoid use-after-free bug

The original code puts flushwork() before timershutdownsync() in switchdrvremove(). Although we use flushwork() to stop the worker, it could be rescheduled in switchtimer(). As a result, a use-after-free bug can occur. The details are shown below:

(cpu 0) | (cpu 1) switchdrvremove() | flushwork() | ... | switchtimer // timer | schedulework(&psw->work) timershutdownsync() | ... | switchworkhandler // worker kfree(psw) // free | | psw->state = 0 // use

This patch puts timershutdownsync() before flushwork() to mitigate the bugs. As a result, the worker and timer will be stopped safely before the deallocate operations.

Affected Software

2 affected componentsFixes available
Linux Linux kernel>=2.6.20<6.5.4
debian/linux<=5.10.223-1, <=5.10.234-1, <=6.1.129-1, <=6.1.135-1
6.12.25-16.12.27-1

Event History

Mar 29, 2024
CVE Published
via MITRE·09:13 AM
Data Sourced
via MITRE·09:13 AM
Description
Aug 21, 2024
Data Sourced
via Launchpad·08:23 PM
Description
Apr 26, 2025
Data Sourced
via Ubuntu·11:50 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-52629?

CVE-2023-52629 is a moderate severity vulnerability that can lead to a use-after-free condition in the Linux kernel.

2

What versions of Linux are affected by CVE-2023-52629?

CVE-2023-52629 affects Linux versions up to and including 5.10.234-1 and 6.1.128-1.

3

How do I fix CVE-2023-52629?

To fix CVE-2023-52629, upgrade to the Linux kernel versions 6.12.12-1 or 6.12.17-1.

4

What component of the Linux kernel does CVE-2023-52629 impact?

CVE-2023-52629 impacts the switch driver within the Linux kernel.

5

What is the nature of the vulnerability described in CVE-2023-52629?

CVE-2023-52629 is a use-after-free vulnerability caused by improper cleanup operations in the kernel.

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