CVE-2026-97584 PUBLISHED

afs: Fix incorrect free in candidate cleanup in afs_lookup_server()

Assigner: Linux
Reserved: 24.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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

afs: Fix incorrect free in candidate cleanup in afs_lookup_server()

Fix afs_lookup_server() to not free an existing server's endpoint state when cleaning up a candidate server. The candidate record doesn't have an endpoint state yet at this point, so the free for that can just be removed.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8

AV:L - afs_lookup_server() is reached through afs_create_volume()/afs_update_volume_state() -> afs_alloc_server_list() when a local process walks a kAFS path (for example /afs/<cell>/<vol> automount) or uses a volume. Nothing malformed comes off the wire. The defect is local cleanup logic that frees the wrong object, so the attacker needs a local account on the AFS client. AC:L - The candidate is left non-NULL when afs_install_server() returns an existing record. That happens when the attacker runs parallel lookups of volumes on the same fileserver UUID, or accesses the path again after a creation attempt failed and left the record marked UNCREATED. Both states come from the attacker's own path accesses; neither depends on outside conditions. PR:L - Mounting kAFS needs CAP_SYS_ADMIN (no FS_USERNS_MOUNT). On a client that already has the /afs dynroot mounted, any unprivileged user can start the volume and server lookups that reach afs_lookup_server() just by accessing /afs/<cell>/... paths. UI:N - No victim action is needed; the attacker triggers the lookups and the faulty cleanup with their own filesystem accesses. S:U - The memory corruption stays inside the kernel's own security authority; no VM, IOMMU or sandbox boundary is crossed. C:H - The cleanup at the out: label kfree()s the existing server's live, refcounted afs_endpoint_state. server->endpoint_state and in-flight probe/rotate operations still reference it, giving a use-after-free of a sprayable kmalloc object that can be reclaimed to leak kernel data. I:H - After the bad kfree(), afs_put_endpoint_state() and the probe code keep writing refcounts, flags and the addresses pointer into the freed estate. When the refcount later drops to zero it is freed a second time via call_rcu, so a reclaimed object gets corrupted. A:H - The freed estate is later used and double-freed, and on the create_failed and wait_for_creation failure paths server is NULL when server->endpoint_state is read. Either way the kernel oopses or panics.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from d6aa05cd995830f6dcee7b139335edb266de38a6 to 981d72663dee2fa6efaf202293e68d2b10a0d1d4 (excl.)
  • affected from 4882ba78574e2d8c579658f65f6784b0d139d173 to e5bc0fa9959dc8f7eb1afab7c039594a16a1a65c (excl.)
  • affected from 4882ba78574e2d8c579658f65f6784b0d139d173 to 349e713039a1fd6659c27e7a66238bfa49ce37e9 (excl.)
  • affected from 4882ba78574e2d8c579658f65f6784b0d139d173 to 044d596094af4b769fb8e1173dff0d08bd68db6c (excl.)
  • affected from 6.12.101 to 6.12.111 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.15 is affected
  • unaffected from 0 to 6.15 (excl.)
  • unaffected from 6.12.111 to 6.12.* (incl.)
  • unaffected from 6.18.53 to 6.18.* (incl.)
  • unaffected from 7.2.7 to 7.2.* (incl.)
  • unaffected from 7.3-rc3 to * (incl.)

References