Commit 2f46e90c authored by Tyler Hicks's avatar Tyler Hicks Committed by Greg Kroah-Hartman
Browse files

eCryptfs: Sanitize write counts of /dev/ecryptfs



commit db10e556 upstream.

A malicious count value specified when writing to /dev/ecryptfs may
result in a a very large kernel memory allocation.

This patch peeks at the specified packet payload size, adds that to the
size of the packet headers and compares the result with the write count
value. The resulting maximum memory allocation size is approximately 532
bytes.

Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
Reported-by: default avatarSasha Levin <levinsasha928@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8643c8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment