---
id: CVE-2022-49795
title: 'rethook: fix a potential memleak in rethook_alloc()'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  rethook: fix a potential memleak in rethook_alloc()

  In rethook_alloc(), the variable rh is not freed or passed out
  if handler is NULL, which could lead to a memleak, f…
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 54ecbe6f1ed5138c895bdff55608cf502755b20e <
    cbc5d1f9a8cc40ba2bc6779b36d2ea1f65bc027c
  - >-
    Linux >= 54ecbe6f1ed5138c895bdff55608cf502755b20e <
    0a1ebe35cb3b7aa1f4b26b37e2a0b9ae68dc4ffb
  - Linux 5.18
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-11-05T19:48:10.411995Z'
published: '2025-05-01'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T19:49:49.148Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2022-49795'
references:
  - url: 'https://git.kernel.org/stable/c/cbc5d1f9a8cc40ba2bc6779b36d2ea1f65bc027c'
  - url: 'https://git.kernel.org/stable/c/0a1ebe35cb3b7aa1f4b26b37e2a0b9ae68dc4ffb'
tags:
  - cve.org
epss: 0.0017
epssPercentile: 0.06462
ingestedAt: '2026-11-05T22:38:31.595Z'
---

## Overview

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

rethook: fix a potential memleak in rethook_alloc()

In rethook_alloc(), the variable rh is not freed or passed out
if handler is NULL, which could lead to a memleak, fix it.

[Masami: Add "rethook:" tag to the title.]

Acke-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

## Affected

- `Linux >= 54ecbe6f1ed5138c895bdff55608cf502755b20e < cbc5d1f9a8cc40ba2bc6779b36d2ea1f65bc027c`
- `Linux >= 54ecbe6f1ed5138c895bdff55608cf502755b20e < 0a1ebe35cb3b7aa1f4b26b37e2a0b9ae68dc4ffb`
- `Linux 5.18`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
