CVE-2018-12232

kernel: NULL pointer dereference if close and fchownat system calls share a socket file descriptor

Published Jun 12, 2018 CVSS 3.0 · 5.9 Medium EPSS 6.3% KEV · Not listed
Description
In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2018-4210 In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash.
Ubuntu USN Ubuntu USN USN-3752-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-3752-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-3752-3 Linux kernel (Azure, GCP, OEM) vulnerabilities
History

No history.

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-476

    NULL Pointer Dereference

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 5, 2024, 8:30 AM
Reserved
Jun 12, 2018, 12:00 AM
Status
Modified
Published
Jun 12, 2018, 12:29 PM
Modified
Jun 17, 2026, 1:37 AM
Severity
Moderate
Public date
Jun 4, 2018, 12:00 AM