Skip to content
Commit 2b75bc91 authored by Sasha Levin's avatar Sasha Levin Committed by David Teigland
Browse files

dlm: check the maximum size of a request from user



device_write only checks whether the request size is big enough, but it doesn't
check if the size is too big.

At that point, it also tries to allocate as much memory as the user has requested
even if it's too much. This can lead to OOM killer kicking in, or memory corruption
if (count + 1) overflows.

Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 9c5bef58
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment