# CVE-2022-48687: ipv6: sr: fix out-of-bounds read when setting HMAC data.

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2024-05-03T14:59:32.099Z
- **Modified:** 2026-06-17T05:15:55.323Z

## Who should check

- Anyone running Linux \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< dc9dbd65c803af1607484fed5da50d41dc8dd864; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< f684c16971ed5e77dfa25a9ad25b5297e1f58eab; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 3df71e11a4773d775c3633c44319f7acdb89011c; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 076f2479fc5a15c4a970ca3b5e57d42ba09a31fa; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 55195563ec29f80f984237b743de0e2b6ba4d093; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 56ad3f475482bca55b0ae544031333018eb145b3; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 84a53580c5d2138c7361c7c3eea5b31827e63b35
- Anyone running Linux 4.10

## Description

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

ipv6: sr: fix out-of-bounds read when setting HMAC data.

The SRv6 layer allows defining HMAC data that can later be used to sign IPv6
Segment Routing Headers. This configuration is realised via netlink through
four attributes: SEG6\_ATTR\_HMACKEYID, SEG6\_ATTR\_SECRET, SEG6\_ATTR\_SECRETLEN and
SEG6\_ATTR\_ALGID. Because the SECRETLEN attribute is decoupled from the actual
length of the SECRET attribute, it is possible to provide invalid combinations
(e.g., secret = "", secretlen = 64). This case is not checked in the code and
with an appropriately crafted netlink message, an out-of-bounds read of up
to 64 bytes (max secret length) can occur past the skb end pointer and into
skb\_shared\_info:

Breakpoint 1, seg6\_genl\_sethmac (skb=\<optimized out\>, info=\<optimized out\>) at net/ipv6/seg6.c:208
208		memcpy(hinfo-\>secret, secret, slen);
(gdb) bt
 \#0  seg6\_genl\_sethmac (skb=\<optimized out\>, info=\<optimized out\>) at net/ipv6/seg6.c:208
 \#1  0xffffffff81e012e9 in genl\_family\_rcv\_msg\_doit (skb=skb@entry=0xffff88800b1f9f00, nlh=nlh@entry=0xffff88800b1b7600,
    extack=extack@entry=0xffffc90000ba7af0, ops=ops@entry=0xffffc90000ba7a80, hdrlen=4, net=0xffffffff84237580 \<init\_net\>, family=\<optimized out\>,
    family=\<optimized out\>) at net/netlink/genetlink.c:731
 \#2  0xffffffff81e01435 in genl\_family\_rcv\_msg (extack=0xffffc90000ba7af0, nlh=0xffff88800b1b7600, skb=0xffff88800b1f9f00,
    family=0xffffffff82fef6c0 \<seg6\_genl\_family\>) at net/netlink/genetlink.c:775
 \#3  genl\_rcv\_msg (skb=0xffff88800b1f9f00, nlh=0xffff88800b1b7600, extack=0xffffc90000ba7af0) at net/netlink/genetlink.c:792
 \#4  0xffffffff81dfffc3 in netlink\_rcv\_skb (skb=skb@entry=0xffff88800b1f9f00, cb=cb@entry=0xffffffff81e01350 \<genl\_rcv\_msg\>)
    at net/netlink/af\_netlink.c:2501
 \#5  0xffffffff81e00919 in genl\_rcv (skb=0xffff88800b1f9f00) at net/netlink/genetlink.c:803
 \#6  0xffffffff81dff6ae in netlink\_unicast\_kernel (ssk=0xffff888010eec800, skb=0xffff88800b1f9f00, sk=0xffff888004aed000)
    at net/netlink/af\_netlink.c:1319
 \#7  netlink\_unicast (ssk=ssk@entry=0xffff888010eec800, skb=skb@entry=0xffff88800b1f9f00, portid=portid@entry=0, nonblock=\<optimized out\>)
    at net/netlink/af\_netlink.c:1345
 \#8  0xffffffff81dff9a4 in netlink\_sendmsg (sock=\<optimized out\>, msg=0xffffc90000ba7e48, len=\<optimized out\>) at net/netlink/af\_netlink.c:1921
...
(gdb) p/x ((struct sk\_buff \*)0xffff88800b1f9f00)-\>head + ((struct sk\_buff \*)0xffff88800b1f9f00)-\>end
$1 = 0xffff88800b1b76c0
(gdb) p/x secret
$2 = 0xffff88800b1b76c0
(gdb) p slen
$3 = 64 '@'

The OOB data can then be read back from userspace by dumping HMAC state. This
commit fixes this by ensuring SECRETLEN cannot exceed the actual length of
SECRET.

## Affected and fixed versions

- Linux: \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< dc9dbd65c803af1607484fed5da50d41dc8dd864; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< f684c16971ed5e77dfa25a9ad25b5297e1f58eab; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 3df71e11a4773d775c3633c44319f7acdb89011c; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 076f2479fc5a15c4a970ca3b5e57d42ba09a31fa; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 55195563ec29f80f984237b743de0e2b6ba4d093; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 56ad3f475482bca55b0ae544031333018eb145b3; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 84a53580c5d2138c7361c7c3eea5b31827e63b35 (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- Upgrade Linux to 84a53580c5d2138c7361c7c3eea5b31827e63b35 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48687. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48687.md
Affected: Linux >= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, < dc9dbd65c803af1607484fed5da50d41dc8dd864; >= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, < f684c16971ed5e77dfa25a9ad25b5297e1f58eab; >= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, < 3df71e11a4773d775c3633c44319f7acdb89011c; >= 4f4853dc1c9c1994f6f756e…
Fixed in: Linux 3df71e11a4773d775c3633c44319f7acdb89011c, Linux 076f2479fc5a15c4a970ca3b5e57d42ba09a31fa, Linux 55195563ec29f80f984237b743de0e2b6ba4d093, Linux 56ad3f475482bca55b0ae544031333018eb145b3, Linux 84a53580c5d2138c7361c7c3eea5b31827e63b35

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48687 being exploited?

There is no confirmed exploitation: CVE-2022-48687 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48687?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48687?

Linux \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< dc9dbd65c803af1607484fed5da50d41dc8dd864; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< f684c16971ed5e77dfa25a9ad25b5297e1f58eab; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 3df71e11a4773d775c3633c44319f7acdb89011c; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 076f2479fc5a15c4a970ca3b5e57d42ba09a31fa; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 55195563ec29f80f984237b743de0e2b6ba4d093; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 56ad3f475482bca55b0ae544031333018eb145b3; \>= 4f4853dc1c9c1994f6f756eabdcc25374ff271d9, \< 84a53580c5d2138c7361c7c3eea5b31827e63b35; Linux 4.10.

### Is there a fix for CVE-2022-48687?

Yes. Fixed in Linux 3df71e11a4773d775c3633c44319f7acdb89011c, Linux 076f2479fc5a15c4a970ca3b5e57d42ba09a31fa, Linux 55195563ec29f80f984237b743de0e2b6ba4d093, Linux 56ad3f475482bca55b0ae544031333018eb145b3, Linux 84a53580c5d2138c7361c7c3eea5b31827e63b35. Upgrade Linux to 84a53580c5d2138c7361c7c3eea5b31827e63b35 or later.

### How do I check if I'm affected by CVE-2022-48687?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/dc9dbd65c803af1607484fed5da50d41dc8dd864>
- patch: <https://git.kernel.org/stable/c/f684c16971ed5e77dfa25a9ad25b5297e1f58eab>
- patch: <https://git.kernel.org/stable/c/3df71e11a4773d775c3633c44319f7acdb89011c>
- patch: <https://git.kernel.org/stable/c/076f2479fc5a15c4a970ca3b5e57d42ba09a31fa>
- patch: <https://git.kernel.org/stable/c/55195563ec29f80f984237b743de0e2b6ba4d093>
- patch: <https://git.kernel.org/stable/c/56ad3f475482bca55b0ae544031333018eb145b3>
- patch: <https://git.kernel.org/stable/c/84a53580c5d2138c7361c7c3eea5b31827e63b35>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48687>

HTML: <https://flawdb.com/CVE-2022-48687> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48687>
