mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
cuse: prevent clone
[ Upstream commit 8217673d07
]
For cloned connections cuse_channel_release() will be called more than
once, resulting in use after free.
Prevent device cloning for CUSE, which does not make sense at this point,
and highly unlikely to be used in real life.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7dac356a65
commit
d61f2d9381
1 changed files with 2 additions and 0 deletions
|
@ -624,6 +624,8 @@ static int __init cuse_init(void)
|
|||
cuse_channel_fops.owner = THIS_MODULE;
|
||||
cuse_channel_fops.open = cuse_channel_open;
|
||||
cuse_channel_fops.release = cuse_channel_release;
|
||||
/* CUSE is not prepared for FUSE_DEV_IOC_CLONE */
|
||||
cuse_channel_fops.unlocked_ioctl = NULL;
|
||||
|
||||
cuse_class = class_create(THIS_MODULE, "cuse");
|
||||
if (IS_ERR(cuse_class))
|
||||
|
|
Loading…
Reference in a new issue