diff options
| author | Baokun Li <libaokun@linux.alibaba.com> | 2026-08-11 12:53:50 +0800 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-08-18 10:58:56 +0200 |
| commit | ed976994939f05ffbb6e9e5482adc788e679c0ea (patch) | |
| tree | bf73ff49522681fe626ae554eef92ccf6fb0af03 /include | |
| parent | 4deb3edead0c0e172cc7349e8855d741d3c5e162 (diff) | |
fuse: reject a duplicate fd= mount option
fuse_opt_fd() stored the fuse device in ctx->fud and bumped its refcount
unconditionally:
ctx->fud = fuse_dev_grab(file);
If fd= is given twice (two fsconfig FSCONFIG_SET_FD calls), the second
call overwrites ctx->fud and grabs the new device, while the reference
taken on the first device is never released - a permanent refcount leak
that pins the first fuse_dev until reboot.
Reject a second fd= outright. ctx is zeroed on allocation, so a non-NULL
ctx->fud reliably means the option was already processed.
Fixes: d42eb23b2ef9 ("fuse: don't require /dev/fuse fd to be kept open during mount")
Signed-off-by: Baokun Li <libaokun@linux.alibaba.com>
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
