Skip to contentSkip to conversation

afs: Fix leak of ungot volume

PATCH New Alexander Martyniuk 1 participant 1 message Sep 8 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 afs: Fix leak of ungot volume

From: David Howells <[email protected]>

commit d672c276f685a540ed2b2a8bafaed4650a89022c upstream.

Fix afs_lookup_volume_rcu() so that it doesn't leak a dying volume if afs_try_get_volume() fails.

---
Backport fix for CVE-2026-80878

 fs/afs/callback.c | 1 +
 1 file changed, 1 insertion(+)
fs/afs/callback.c +1 -0
index 0a09a9ca3c6b..652c4301d56e 100644
@@ -138,6 +138,7 @@ static struct afs_volume *afs_lookup_volume_rcu(struct afs_cell *cell,
 
 		if (volume && afs_try_get_volume(volume, afs_volume_trace_get_callback))
 			break;
+		volume = NULL;
 		if (!need_seqretry(&cell->volume_lock, seq))
 			break;
 	}
Signature · 1 line
2.43.0