CVE-2024-50210

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-50210
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50210.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-50210
Downstream
Related
Published
2024-11-08T06:08:00Z
Modified
2025-10-22T05:27:13.830779Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
Details

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

posix-clock: posix-clock: Fix unbalanced locking in pcclocksettime()

If getclockdesc() succeeds, it calls fget() for the clockid's fd, and get the clk->rwsem read lock, so the error path should release the lock to make the lock balance and fput the clockid's fd to make the refcount balance and release the fd related resource.

However the below commit left the error path locked behind resulting in unbalanced locking. Check timespec64validstrict() before getclockdesc() to fix it, because the "ts" is not changed after that.

[pabeni@redhat.com: fixed commit message typo]

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
29f085345cde24566efb751f39e5d367c381c584
Fixed
d005400262ddaf1ca1666bbcd1acf42fe81d57ce
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e0c966bd3e31911b57ef76cec4c5796ebd88e512
Fixed
a8219446b95a859488feaade674d13f9efacfa32
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
673a1c5a2998acbd429d6286e6cad10f17f4f073
Fixed
c7fcfdba35abc9f39b83080c2bce398dad13a943
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c8789fbe2bbf75845e45302cba6ffa44e1884d01
Fixed
e56e0ec1b79f5a6272c6e78b36e9d593aa0449af
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
27abbde44b6e71ee3891de13e1a228aa7ce95bfe
Fixed
5f063bbf1ee6b01611c016b54e050a41506eb794
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a3f169e398215e71361774d13bf91a0101283ac2
Fixed
1ba33b327c3f88a7baee598979d73ab5b44d41cc
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1ff7247101af723731ea42ed565d54fb8f341264
Fixed
b27330128eca25179637c1816d5a72d6cc408c66
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d8794ac20a299b647ba9958f6d657051fc51a540
Fixed
6e62807c7fbb3c758d233018caf94dfea9c65dbd

Affected versions

v5.*

v5.10.228
v5.15.169

v6.*

v6.1.114
v6.11.5
v6.12-rc3
v6.6.58

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b27330128eca25179637c1816d5a72d6cc408c66",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-30905f03",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e62807c7fbb3c758d233018caf94dfea9c65dbd",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-458675da",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f063bbf1ee6b01611c016b54e050a41506eb794",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-7473e159",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c7fcfdba35abc9f39b83080c2bce398dad13a943",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-76e8fa17",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d005400262ddaf1ca1666bbcd1acf42fe81d57ce",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-8196db70",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8219446b95a859488feaade674d13f9efacfa32",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-8b7cd756",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d005400262ddaf1ca1666bbcd1acf42fe81d57ce",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-8f3ee9b7",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e62807c7fbb3c758d233018caf94dfea9c65dbd",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-9c564ca8",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1ba33b327c3f88a7baee598979d73ab5b44d41cc",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-b98e68a8",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f063bbf1ee6b01611c016b54e050a41506eb794",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-c15f371a",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b27330128eca25179637c1816d5a72d6cc408c66",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-cef76d6d",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e56e0ec1b79f5a6272c6e78b36e9d593aa0449af",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-dcc0d48d",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e56e0ec1b79f5a6272c6e78b36e9d593aa0449af",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-e50dfad7",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1ba33b327c3f88a7baee598979d73ab5b44d41cc",
        "target": {
            "function": "pc_clock_settime",
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-e81cd01e",
        "signature_type": "Function",
        "digest": {
            "length": 442.0,
            "function_hash": "228945172607564345457502232433869449469"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8219446b95a859488feaade674d13f9efacfa32",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-f4d66bf4",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c7fcfdba35abc9f39b83080c2bce398dad13a943",
        "target": {
            "file": "kernel/time/posix-clock.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2024-50210-ffd5a1dc",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "64473921075366443944435443221153910260",
                "221348199013516827704235042975998524668",
                "38155317539931515337420115714864793708",
                "161721255340628889067397440961516817502",
                "136459665346771881682243850359477495860",
                "323597313922365304759431084666347286897",
                "295926784742520536065781192384561318463",
                "163784023109607923788184384286022422296"
            ]
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.10.228
Fixed
5.10.229
Type
ECOSYSTEM
Events
Introduced
5.15.169
Fixed
5.15.170
Type
ECOSYSTEM
Events
Introduced
6.1.114
Fixed
6.1.115
Type
ECOSYSTEM
Events
Introduced
6.6.58
Fixed
6.6.59
Type
ECOSYSTEM
Events
Introduced
6.11.5
Fixed
6.11.6