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]
[
{
"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"
]
}
}
]