fs: dlm: check on minimum msglen size
authorAlexander Aring <aahringo@redhat.com>
Mon, 1 Mar 2021 22:05:17 +0000 (17:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:12:52 +0000 (10:12 +0200)
commitff58d1c72edfc000b3a4ec9d5c963023ef869999
tree2570026d0289848332129326eca3e057c95c1513
parentca973d2aeaf70c15e6663be3f71ba1b17a127051
fs: dlm: check on minimum msglen size

[ Upstream commit 710176e8363f269c6ecd73d203973b31ace119d3 ]

This patch adds an additional check for minimum dlm header size which is
an invalid dlm message and signals a broken stream. A msglen field cannot
be less than the dlm header size because the field is inclusive header
lengths.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/midcomms.c