RDMA/cm: Fix leaking the multicast GID table reference
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fe454dc31e84f8c14cb8942fcb61666c9f40745b · < 3ba6d01c4b3c584264dc733c6a2ecc5bbc8e0bb5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/cm: Fix leaking the multicast GID table reference
If the CM ID is destroyed while the CM event for multicast creating is still queued the cancel_work_sync() will prevent the work from running which also prevents destroying the ah_attr. This leaks a refcount and triggers a WARN:
GID entry ref leak for dev syz1 index 2 ref=573 WARNING: CPU: 1 PID: 655 at drivers/infiniband/core/cache.c:809 release_gid_table drivers/infiniband/core/cache.c:806 [inline] WARNING: CPU: 1 PID: 655 at drivers/infiniband/core/cache.c:809 gid_table_release_one+0x284/0x3cc drivers/infiniband/core/cache.c:886
Destroy the ah_attr after canceling the work, it is safe to call this twice.
From the CVE record · Linux
The Linux kernel's RDMA/cm code can leak a multicast GID table reference if a CM ID is destroyed while a multicast-creation event is queued. This can trigger a kernel warning; the input does not specify how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running Linux kernels with RDMA/cm should check their exposure; affected versions are not specified.