]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: Sanity check namelen before copying it
authorPatrick Caulfeld <pcaulfie@redhat.com>
Thu, 17 Jan 2008 10:25:28 +0000 (10:25 +0000)
committerDavid Teigland <teigland@redhat.com>
Wed, 30 Jan 2008 17:04:43 +0000 (11:04 -0600)
commit5da48c72bf7da31551d1dceb0cdf61925ec24970
tree3b099a7b7306ee99fcb272e260b7344d34fdc666
parent98ccd9a10bf0910f4f13e8f35f8fb0f34251b544
dlm: Sanity check namelen before copying it

The 32/64 compatibility code in the DLM does not check the validity of
the lock name length passed into it, so it can easily overwrite memory
if the value is rubbish (as early versions of libdlm can cause with
unlock calls, it doesn't zero the field).

This patch restricts the length of the name to the amount of data
actually passed into the call.

Signed-off-by: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/user.c