CVE-2025-22075: rtnetlink: Allocate vfinfo size for VF GUIDs when supported

Description

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

rtnetlink: Allocate vfinfo size for VF GUIDs when supported

Commit 30aad41721e0 ("net/core: Add support for getting VF GUIDs")
added support for getting VF port and node GUIDs in netlink ifinfo
messages, but their size was not taken into consideration in the
function that allocates the netlink message, causing the following
warning when a netlink message is filled with many VF port and node
GUIDs:
# echo 64 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_numvfs
# ip link show dev ib0
RTNETLINK answers: Message too long
Cannot send link get request: Message too long

Kernel warning:

------------[ cut here ]------------
WARNING: CPU: 2 PID: 1930 at net/core/rtnetlink.c:4151 rtnl_getlink+0x586/0x5a0
Modules linked in: xt_conntrack xt_MASQUERADE nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter overlay mlx5_ib macsec mlx5_core tls rpcrdma rdma_ucm ib_uverbs ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm iw_cm ib_ipoib fuse ib_cm ib_core
CPU: 2 UID: 0 PID: 1930 Comm: ip Not tainted 6.14.0-rc2+ #1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
RIP: 0010:rtnl_getlink+0x586/0x5a0
Code: cb 82 e8 3d af 0a 00 4d 85 ff 0f 84 08 ff ff ff 4c 89 ff 41 be ea ff ff ff e8 66 63 5b ff 49 c7 07 80 4f cb 82 e9 36 fc ff ff <0f> 0b e9 16 fe ff ff e8 de a0 56 00 66 66 2e 0f 1f 84 00 00 00 00
RSP: 0018:ffff888113557348 EFLAGS: 00010246
RAX: 00...

Classification

CVE ID: CVE-2025-22075

Affected Products

Vendor: Linux

Product: Linux, Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.02% (probability of being exploited)

EPSS Percentile: 5.04% (scored less or equal to compared to others)

EPSS Date: 2025-04-20 (when was this score calculated)

References

https://nvd.nist.gov/vuln/detail/CVE-2025-22075
https://git.kernel.org/stable/c/0f5489707cf528f9df2f39a3045c1ee713ec90e7
https://git.kernel.org/stable/c/bb7bdf636cef74cdd7a7d548bdc7457ae161f617
https://git.kernel.org/stable/c/5fed5f6de3cf734b231a11775748a6871ee3020f
https://git.kernel.org/stable/c/15f150771e0ec97f8ab1657e7d2568e593c7fa04
https://git.kernel.org/stable/c/28b21ee8e8fb326ba961a4bbce04ec04c65e705a
https://git.kernel.org/stable/c/365c1ae819455561d4746aafabad673e4bcb0163
https://git.kernel.org/stable/c/5f39454468329bb7fc7fc4895a6ba6ae3b95027e
https://git.kernel.org/stable/c/23f00807619d15063d676218f36c5dfeda1eb420

Timeline