OSDN Git Service

diag: Validate msg source length to prevent out of bound access
authorManoj Prabhu B <bmanoj@codeaurora.org>
Tue, 24 Sep 2019 09:24:33 +0000 (14:54 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 9 Oct 2019 08:57:01 +0000 (01:57 -0700)
commite935115d05f7169b6e63df5dac501c71674d231e
treec0ab505aa74dcff2fee588d386d5ee7f1f229e92
parenta8e92fae3a9de72877cfbd2f8b84a0d539413eb1
diag: Validate msg source length to prevent out of bound access

Place check for mask size and validate source length against
sum of header length and mask size to prevent out of bound access.

Change-Id: I8ac089202b6e3007773b92be8cfdc52fcb30ec3c
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
drivers/char/diag/diag_masks.c