mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
scst_user: Avoid leaking kernel data to user space
There is a hole in struct scst_user_opt so that structure must be zero-initialized to avoid leaking kernel data to user space. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3777,6 +3777,7 @@ static int dev_user_get_opt(struct file *file, void __user *arg)
|
||||
if (unlikely(res != 0))
|
||||
goto out;
|
||||
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
opt.parse_type = dev->parse_type;
|
||||
opt.on_free_cmd_type = dev->on_free_cmd_type;
|
||||
opt.memory_reuse_type = dev->memory_reuse_type;
|
||||
|
||||
Reference in New Issue
Block a user