Global-buffer-overflow in libdwarf: _dwarf_pathjoinl

libdwarf Updated 02 Oct 2025

Summary

01/05/2022
N/A
Yes i
Unrated
Not published

OSV-2022-389: Global-buffer-overflow in _dwarf_pathjoinl. Affects libdwarf versions >= 6af6e566ae71b585659484e7be7cbab83dd770fb, < 24dff940cc4c71a9c3cb5475aee231b19163a12c. Fixed in 24dff940cc4c71a9c3cb5475aee231b19163a12c. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

libdwarf is an open-source library that provides access to DWARF debugging information in executable files. It is commonly used by developers and debuggers to extract and analyze debugging information. This vulnerability affects the libdwarf library and can lead to a global-buffer-overflow when processing certain inputs.

Vulnerability Detail

The vulnerability originates from a global-buffer-overflow in the _dwarf_pathjoinl function of libdwarf. This can be triggered when constructing a linked path in the dwarf_gnu_debuglink function. An attacker could exploit this vulnerability by providing a specially crafted input, leading to a buffer overflow and potential code execution. The impact of this vulnerability can range from crashing the application to remote code execution, depending on how the library is used.

How To Fix

Minimum fixed version

24dff940cc4c71a9c3cb5475aee231b19163a12c

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can implement input validation and bounds checking when using the affected functions in libdwarf. By ensuring that inputs are properly validated and do not exceed the expected bounds, the risk of triggering the buffer overflow can be mitigated.

Conclusion

In conclusion, the libdwarf library is affected by a global-buffer-overflow vulnerability in the _dwarf_pathjoinl function. This vulnerability can be exploited to execute arbitrary code or crash the application. It is recommended to update to a fixed version of libdwarf and implement input validation as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libdwarf →

Share this vulnerability

FAQ

libdwarf is an open-source library that provides access to DWARF debugging information in executable files. It is commonly used by developers and debuggers to extract and analyze debugging information.

A global-buffer-overflow is a type of buffer overflow vulnerability where data is written beyond the bounds of a buffer, potentially overwriting adjacent memory. This can lead to crashes, code execution, or other unintended behavior.

This vulnerability can be exploited by providing a specially crafted input to the affected functions in libdwarf. By triggering a buffer overflow, an attacker could potentially execute arbitrary code or crash the application.

Yes, this vulnerability has been fixed in the libdwarf library. Developers should update their dependencies to include the fixed version of libdwarf.

As a temporary workaround, developers can implement input validation and bounds checking when using the affected functions in libdwarf. By ensuring that inputs are properly validated and do not exceed the expected bounds, the risk of triggering the buffer overflow can be mitigated.

Related vulnerabilities

Recent vulnerabilities recorded for libdwarf.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

24dff940cc4c71a9c3cb5475aee231b19163a12c

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback