HexBrain

Browse / CVEs / CVE-2023-6246

CVE-2023-6246· gnu / glibc· CWE-787, CWE-122

glibc's syslog - Local Privilege Escalation

highseverity
7.8CVSS score
4.8%likelihood of exploitation, next 30 days
92%of all CVEs are less likely
Readycheck to confirm it

A heap-based buffer overflow was found in the __vsyslog_internal function of the glibc library. This function is called by the syslog and vsyslog functions. This issue occurs when the openlog function was not called, or called with the ident argument set to NULL, and the program name (the basename of argv[0]) is bigger than 1024 bytes, resulting in an application crash or local privilege escalation. This issue affects glibc 2.36 and newer.

Impact

Local attackers can cause application crashes or escalate privileges through buffer overflow exploitation.

Fix

Upgrade glibc to version 2.37 or later that properly handles program name buffer sizes in __vsyslog_internal.

How to confirm it

Positive when: contains "127"

Run it with nuclei: nuclei -id CVE-2023-6246 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2023-6246

info:
  name: glibc's syslog - Local Privilege Escalation
  author: gy741
  severity: high
  description: |
    A heap-based buffer overflow was found in the __vsyslog_internal function of the glibc library. This function is called by the syslog and vsyslog functions. This issue occurs when the openlog function was not called, or called with the ident argument set to NULL, and the program name (the basename of argv[0]) is bigger than 1024 bytes, resulting in an application crash or local privilege escalation. This issue affects glibc 2.36 and newer.
  remediation: |
    Upgrade glibc to version 2.37 or later that properly handles program name buffer sizes in __vsyslog_internal.
  impact: |
    Local attackers can cause application crashes or escalate privileges through buffer overflow exploitation.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-6246
    - https://www.qualys.com/2024/01/30/cve-2023-6246/syslog.txt
    - https://access.redhat.com/security/cve/CVE-2023-6246
    - https://bugzilla.redhat.com/show_bug.cgi?id=2249053
    - https://lists.fedoraproject.org/archives/list/[email protected]/message/D2FIH77VHY3KCRROCXOT6L27WMZXSJ2G/
  classification:
    cvss-metrics: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 7.8
    cve-id: CVE-2023-6246
    cwe-id: CWE-787,CWE-122
    epss-score: 0.04794
    epss-percentile: 0.92013
    cpe: cpe:2.3:a:gnu:glibc:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: gnu
    product: glibc
  tags: cve,cve2023,code,glibc,linux,privesc,local,gnu,vuln

self-contained: true
code:
  - engine:
      - sh
      - bash
    source: |
      (exec -a "`printf '%0128000x' 1`" /usr/bin/su < /dev/null)
      echo $?

    matchers:
      - type: word
        words:
          - "127"     # Segmentation Fault Exit Code

References

Use this check only on systems you are authorised to test. Where the data comes from