Skip to content
Heist/ feed
Back to feed
HighFix available

scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: scsi: libsas: Fix use-after-free bug in smp_execute_task_sg() When executing SMP task failed, the smp_execute_task_sg() calls del_timer() to delete "slow_task->timer". However, if the timer handler sas_task_internal_timedout() is running, the del_timer() in smp_execute_task_sg() will not stop it and a UAF will happen. The process is shown below: (thread 1) | (thread 2) smp_execute_task_sg() | sas_task_internal_timedout() ... | del_timer() | ... | ... sas_free_task(task) | kfree(task->slow_task) //FREE| | task->slow_task->... //USE Fix by calling del_timer_sync() in smp_execute_task_sg(), which makes sure the timer handler have finished before the "task->slow_task" is deallocated.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.150, 5.15.75, 5.19.17, 5.4.220, 6.0.3
CVEs
CVE-2022-50422
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 16:14 UTC · Revision 1

Source evidence

scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()

core-osv · Original source

Published 1 Oct 2025, 11:41 UTC

In the Linux kernel, the following vulnerability has been resolved: scsi: libsas: Fix use-after-free bug in smp_execute_task_sg() When executing SMP task failed, the smp_execute_task_sg() calls del_timer() to delete "slow_task->timer". However, if the timer handler sas_task_internal_timedout() is running, the del_timer() in smp_execute_task_sg() will not stop it and a UAF will happen. The process is shown below: (thread 1) | (thread 2) smp_execute_task_sg() | sas_task_internal_timedout() ... | del_timer() | ... | ... sas_free_task(task) | kfree(task->slow_task) //FREE| | task->slow_task->... //USE Fix by calling del_timer_sync() in smp_execute_task_sg(), which makes sure the timer handler have finished before the "task->slow_task" is deallocated.

osv:CVE-2022-50422

Kernel

Fixed versions: 5.4.220, 5.10.150, 5.15.75, 5.19.17, 6.0.3

Complete source record
{
  "id": "8399fe58dd1de8627e72f6ef0badae36a1e611b31fa8e70d762a4a6fe31b9a3f",
  "url": "https://osv.dev/vulnerability/CVE-2022-50422",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: scsi: libsas: Fix use-after-free bug in smp_execute_task_sg() When executing SMP task failed, the smp_execute_task_sg() calls del_timer() to delete \"slow_task->timer\". However, if the timer handler sas_task_internal_timedout() is running, the del_timer() in smp_execute_task_sg() will not stop it and a UAF will happen. The process is shown below: (thread 1) | (thread 2) smp_execute_task_sg() | sas_task_internal_timedout() ... | del_timer() | ... | ... sas_free_task(task) | kfree(task->slow_task) //FREE| | task->slow_task->... //USE Fix by calling del_timer_sync() in smp_execute_task_sg(), which makes sure the timer handler have finished before the \"task->slow_task\" is deallocated.",
    "evidence": "osv:CVE-2022-50422",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.220",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.150",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.75",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.19.17",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-50422",
      "aliases": [
        "CVE-2022-50422"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2908d778ab3e244900c310974e1fc1c69066e450"
                },
                {
                  "fixed": "117331a2a5227fb4369c2a1f321d3e3e2e2ef8fe"
                },
                {
                  "fixed": "a9e5176ead6de64f572ad5c87a72825d9d3c82ae"
                },
                {
                  "fixed": "e45a1516d2933703a4823d9db71e17c3abeba24f"
                },
                {
                  "fixed": "f7a785177611ffc97d645fcbc196e6de6ad2421d"
                },
                {
                  "fixed": "2e12ce270f0d926085c1209cc90397e307deef97"
                },
                {
                  "fixed": "46ba53c30666717cb06c2b3c5d896301cd00d0c0"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50422.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.19"
                },
                {
                  "fixed": "5.4.220"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.150"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.75"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.19.17"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.20.0"
                },
                {
                  "fixed": "6.0.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50422.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:20.901257384Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/117331a2a5227fb4369c2a1f321d3e3e2e2ef8fe",
        "https://git.kernel.org/stable/c/2e12ce270f0d926085c1209cc90397e307deef97",
        "https://git.kernel.org/stable/c/46ba53c30666717cb06c2b3c5d896301cd00d0c0",
        "https://git.kernel.org/stable/c/a9e5176ead6de64f572ad5c87a72825d9d3c82ae",
        "https://git.kernel.org/stable/c/e45a1516d2933703a4823d9db71e17c3abeba24f",
        "https://git.kernel.org/stable/c/f7a785177611ffc97d645fcbc196e6de6ad2421d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50422.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50422",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50422.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50422",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 486986,
  "published_at": "2025-10-01T11:41:55.147+00:00"
}