diff options
| author | Ben Widawsky <[email protected]> | 2021-02-21 03:58:46 +0000 |
|---|---|---|
| committer | Dan Williams <[email protected]> | 2021-02-22 22:44:39 +0000 |
| commit | 88ff5d466c0250259818f3153dbdc4af1f8615dd (patch) | |
| tree | 4ba72658fc8d8862b8b28188dc7d8ccf51e4c6d2 /scripts/mod/file2alias.c | |
| parent | cxl/mem: Return -EFAULT if copy_to_user() fails (diff) | |
| download | kernel-88ff5d466c0250259818f3153dbdc4af1f8615dd.tar.gz kernel-88ff5d466c0250259818f3153dbdc4af1f8615dd.zip | |
cxl/mem: Fix potential memory leak
When submitting a command for userspace, input and output payload bounce
buffers are allocated. For a given command, both input and output
buffers may exist and so when allocation of the input buffer fails, the
output buffer must be freed too.
As far as I can tell, userspace can't easily exploit the leak to OOM a
machine unless the machine was already near OOM state.
Fixes: 583fa5e71cae ("cxl/mem: Add basic IOCTL interface")
Reported-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Ben Widawsky <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'scripts/mod/file2alias.c')
0 files changed, 0 insertions, 0 deletions
