diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-17 16:31:54 +0000 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-11 23:13:05 -0400 |
| commit | 8ca3b74c0c447af17d0e27e76658a3d4cae3c5ba (patch) | |
| tree | 48b0d1fa9a6d82f56078f795edad0c16c8457203 /tools/lib/python | |
| parent | f08cfa10c4c26daa1fb60dcdf9812a59c3f5f0e5 (diff) | |
| download | linux-next-8ca3b74c0c447af17d0e27e76658a3d4cae3c5ba.tar.gz linux-next-8ca3b74c0c447af17d0e27e76658a3d4cae3c5ba.zip | |
nfsd: Fix id-to-name cache entry leak in idtoname_parse()
idtoname_lookup() returns the id-to-name cache entry with a new
reference. The name is parsed between the lookup and the update call,
and when the parsed name is malformed (negative length or longer than
IDMAP_NAMESZ), idtoname_parse() jumps to the error label without
dropping the reference returned by idtoname_lookup(), leaking the cache
entry.
Release the reference with cache_put() before taking the error exit.
Fixes: f9ecc921b5b5 ("[PATCH] knfsd: Use new cache code for name/id lookup caches")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260917163154.2162438-1-vulab@iscas.ac.cn
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
