A use-after-free vulnerability was found in the Linux kernel's SMB client, specifically in the `smb2 query info compound` function. This vulnerability was triggered when running fstests generic/072 with KASAN enabled against Windows Server 2022 and mount options 'multichannel,max channels=2,vers=3.1.1,mfsymlinks,noperm'. The issue is a race between `open cached dir` and `cached dir lease break` where the cache entry for the open directory handle receives a lease break while creating it. Before returning from `open cached dir`, the last reference of the new `@cfid` is put because of `!@cfid->has lease`. Besides the use-after-free, missed lease breaks have been noticed in tests that run several concurrent `statfs(2)` calls on those cached fids.