Skip to content
Fencer Vulns
medium 5.5

CVE-2022-48687 json

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

published 2024-05-03 2 y ago modified 2026-06-17 4 mo ago also EUVD-2022-53566

cvss
5.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 15%
public exploits
0
none known

Summary

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.

Patch / fix

  • Linux Linux 4.14.293, 4.19.258, 5.4.213, 5.10.143, 5.15.68, 5.19.9, 6.0
  • linux Debian 14, Debian 13, Debian 12 5.19.11-1

debian advisories DEBIAN-CVE-2022-48687

  • linux Ubuntu 18.04 LTS 4.15.0-201.212
  • linux Ubuntu 20.04 LTS 5.4.0-136.153
  • linux Ubuntu 22.04 LTS 5.15.0-57.63
  • linux-aws Ubuntu 18.04 LTS 4.15.0-1147.159
  • linux-aws Ubuntu 20.04 LTS 5.4.0-1093.101
  • linux-aws Ubuntu 22.04 LTS 5.15.0-1027.31
  • linux-gcp Ubuntu 20.04 LTS 5.4.0-1097.106
  • linux-gcp Ubuntu 22.04 LTS 5.15.0-1026.33

ubuntu advisories UBUNTU-CVE-2022-48687

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • perf RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • bpftool RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • kernel-core RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • kernel-tools RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • python3-perf RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • kernel-modules RHEL 8.6 TUS, RHEL 8.6 E4S, RHEL 8.6 AUS 4.18.0-372.123.1.el8_6
  • kernel-zfcpdump RHEL 8.6 E4S 4.18.0-372.123.1.el8_6

red hat advisories RHSA-2024:6753

  • kernel-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.106.1
  • kernel-source-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.106.1
  • kernel-64kb SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS, SLE High Performance Computing 15 SP4-ESPOS 5.14.21-150400.24.122.2
  • kernel-syms SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +3 more 5.14.21-150400.24.122.1
  • kernel-source SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +3 more 5.14.21-150400.24.122.1
  • kernel-default SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Micro 5.4 +9 more 5.14.21-150400.24.122.2
  • kernel-zfcpdump SLES 15 SP4-LTSS, Manager Server 4.3 5.14.21-150400.24.122.2
  • kernel-obs-build SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.122.2

suse advisories SUSE-SU-2025:0231-1SUSE-SU-2024:2216-1SUSE-SU-2024:2189-1SUSE-SU-2024:2091-1SUSE-SU-2024:2011-1SUSE-SU-2024:1870-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-48687 updated cvss 5.5

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

  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: no fix available
  • Red Hat Enterprise Linux BaseOS AUS (v.8.6) perf 4.18.0-372.123.1.el8_6, kernel 4.18.0-372.123.1.el8_6, bpftool 4.18.0-372.123.1.el8_6, kernel-core 4.18.0-372.123.1.el8_6, kernel-tools 4.18.0-372.123.1.el8_6, python3-perf 4.18.0-372.123.1.el8_6, +8 more Red Hat Enterprise Linux BaseOS E4S (v.8.6) perf 4.18.0-372.123.1.el8_6, kernel 4.18.0-372.123.1.el8_6, bpftool 4.18.0-372.123.1.el8_6, kernel-core 4.18.0-372.123.1.el8_6, kernel-tools 4.18.0-372.123.1.el8_6, python3-perf 4.18.0-372.123.1.el8_6, +15 more Red Hat Enterprise Linux BaseOS TUS (v.8.6) perf 4.18.0-372.123.1.el8_6, kernel 4.18.0-372.123.1.el8_6, bpftool 4.18.0-372.123.1.el8_6, kernel-core 4.18.0-372.123.1.el8_6, kernel-tools 4.18.0-372.123.1.el8_6, python3-perf 4.18.0-372.123.1.el8_6, +8 more
    fixed: vendor fix RHSA-2024:6753
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.24% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.