---
id: CVE-2022-49766
title: 'netlink: Bounds-check struct nlmsgerr creation'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  netlink: Bounds-check struct nlmsgerr creation

  In preparation for FORTIFY_SOURCE doing bounds-check on memcpy(),
  switch from __nlmsg_put to nlmsg_put(), and explain th…
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <
    aff4eb16f589c3af322a2582044bca365381fcd6
  - >-
    Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <
    710d21fdff9a98d621cd4e64167f3ef8af4e2fd1
  - Linux 2.6.12
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-11-05T19:46:59.810796Z'
published: '2025-05-01'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T19:49:42.508Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2022-49766'
references:
  - url: 'https://git.kernel.org/stable/c/aff4eb16f589c3af322a2582044bca365381fcd6'
  - url: 'https://git.kernel.org/stable/c/710d21fdff9a98d621cd4e64167f3ef8af4e2fd1'
tags:
  - cve.org
epss: 0.0017
epssPercentile: 0.06463
ingestedAt: '2026-11-05T22:38:31.588Z'
---

## Overview

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

netlink: Bounds-check struct nlmsgerr creation

In preparation for FORTIFY_SOURCE doing bounds-check on memcpy(),
switch from __nlmsg_put to nlmsg_put(), and explain the bounds check
for dealing with the memcpy() across a composite flexible array struct.
Avoids this future run-time warning:

  memcpy: detected field-spanning write (size 32) of single field "&errmsg->msg" at net/netlink/af_netlink.c:2447 (size 16)

## Affected

- `Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < aff4eb16f589c3af322a2582044bca365381fcd6`
- `Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 710d21fdff9a98d621cd4e64167f3ef8af4e2fd1`
- `Linux 2.6.12`

## Remediation

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