CVE-2023-4389: Kernel: btrfs: double free in btrfs_get_root_ref()

Published Jul 3, 2023
·
Updated

A flaw was found in btrfsgetrootref in fs/btrfs/disk-io.c in the btrfs filesystem in the Linux Kernel due to a double decrement of the reference count. This issue may allow a local attacker with user privilege to crash the system or may lead to leaked internal kernel information.

Other sources

An error due to a double decrement of reference count was found in btrfsgetrootref in fs/btrfs/disk-io.c in btrfs filesystem in the Linux Kernel. In this flaw a local attacker with user privilege may lead to a system crash or may leak internal kernel information.

In btrfsgetrootref(), when btrfsinsertfsroot() fails, btrfsputroot() will be called to possibly free the memory area of the variable root. However, this variable is then used again in error handling code after "goto fail", when ret is not -EEXIST.

References: https://patchwork.kernel.org/project/linux-btrfs/patch/20220324134454.15192-1-baijiaju1990@gmail.com/

Red Hat

Affected Software

7 affected componentsFixes available
redhat/Kernel<5.18
5.18
Linux Linux kernel>=5.7<5.10.112
Linux Linux kernel>=5.11<5.15.35
Linux Linux kernel>=5.16<5.17.4
Linux Linux kernel<=5.18
Linux Linux kernel=5.18-rc1
Linux Linux kernel=5.18-rc2

Event History

Aug 16, 2023
CVE Published
via MITRE·06:49 PM
Data Sourced
via MITRE·06:49 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-4389?

The severity of CVE-2023-4389 is rated high with a CVSS score of 7.1.

2

What does CVE-2023-4389 affect?

CVE-2023-4389 affects the btrfs filesystem in the Linux Kernel.

3

How do I fix CVE-2023-4389?

To fix CVE-2023-4389, apply the available patch for the Linux Kernel provided by your Linux distribution.

4

What type of vulnerability is CVE-2023-4389?

CVE-2023-4389 is a double free vulnerability that can potentially allow a local attacker to crash the system or leak kernel information.

5

Who can exploit CVE-2023-4389?

A local attacker with user privileges can exploit CVE-2023-4389.

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