DEBIAN-CVE-2022-48744

Source
https://security-tracker.debian.org/tracker/CVE-2022-48744
Import Source
https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48744.json
JSON Data
https://api.test.osv.dev/v1/vulns/DEBIAN-CVE-2022-48744
Upstream
Downstream
Published
2024-06-20T12:15:12.700Z
Modified
2026-03-11T07:34:36.062261Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Avoid field-overflowing memcpy() In preparation for FORTIFYSOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Use flexible arrays instead of zero-element arrays (which look like they are always overflowing) and split the cross-field memcpy() into two halves that can be appropriately bounds-checked by the compiler. We were doing: #define ETHHLEN 14 #define VLANHLEN 4 ... #define MLX5EXDPMININLINE (ETHHLEN + VLANHLEN) ... struct mlx5etxwqe *wqe = mlx5wqcycgetwqe(wq, pi); ... struct mlx5wqeethseg *eseg = &wqe->eth; struct mlx5wqedataseg dseg = wqe->data; ... memcpy(eseg->inlinehdr.start, xdptxd->data, MLX5EXDPMININLINE); target is wqe->eth.inlinehdr.start (which the compiler sees as being 2 bytes in size), but copying 18, intending to write across start (really vlantci, 2 bytes). The remaining 16 bytes get written into wqe->data[0], covering bytecount (4 bytes), lkey (4 bytes), and addr (8 bytes). struct mlx5etxwqe { struct mlx5wqectrlseg ctrl; / 0 16 */ struct mlx5wqeethseg eth; /* 16 16 */ struct mlx5wqedataseg data[]; /* 32 0 / / size: 32, cachelines: 1, members: 3 / / last cacheline: 32 bytes / }; struct mlx5wqeethseg { u8 swpouterl4offset; / 0 1 */ u8 swpouterl3offset; /* 1 1 */ u8 swpinnerl4offset; /* 2 1 */ u8 swpinnerl3offset; /* 3 1 */ u8 csflags; /* 4 1 / u8 swp_flags; / 5 1 / __be16 mss; / 6 2 / __be32 flowtablemetadata; / 8 4 / union { struct { __be16 sz; / 12 2 / u8 start[2]; / 14 2 / } inline_hdr; / 12 4 / struct { __be16 type; / 12 2 / _be16 vlantci; / 14 2 / } insert; / 12 4 / __be32 trailer; / 12 4 / }; / 12 4 / / size: 16, cachelines: 1, members: 9 / / last cacheline: 16 bytes */ }; struct mlx5wqedataseg { be32 bytecount; /* 0 4 / __be32 lkey; / 4 4 / __be64 addr; / 8 8 / / size: 16, cachelines: 1, members: 3 / / last cacheline: 16 bytes */ }; So, split the memcpy() so the compiler can reason about the buffer sizes. "pahole" shows no size nor member offset changes to struct mlx5etxwqe nor struct mlx5eumrwqe. "objdump -d" shows no meaningful object code changes (i.e. only source line number induced differences and optimizations).

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.249-1

Affected versions

5.*
5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1~bpo10+1
5.10.120-1
5.10.127-1
5.10.127-2~bpo10+1
5.10.127-2
5.10.136-1
5.10.140-1
5.10.148-1
5.10.149-1
5.10.149-2
5.10.158-1
5.10.158-2
5.10.162-1
5.10.178-1
5.10.178-2
5.10.178-3
5.10.179-1
5.10.179-2
5.10.179-3
5.10.179-4
5.10.179-5
5.10.191-1
5.10.197-1
5.10.205-1
5.10.205-2
5.10.209-1
5.10.209-2
5.10.216-1
5.10.218-1
5.10.221-1
5.10.223-1
5.10.226-1
5.10.234-1
5.10.237-1
5.10.244-1
5.10.247-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48744.json"

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48744.json"

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48744.json"

Debian:14 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48744.json"