audit: always check the netlink payload length in audit_receive_msg()
authorPaul Moore <paul@paul-moore.com>
Mon, 24 Feb 2020 21:38:57 +0000 (16:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2020 06:53:08 +0000 (07:53 +0100)
commiteef128dd4dcdb96b3ca0ae64ad9f752008066844
tree593abdfb01d15ba1caa79a003fa16408fbc7e84e
parentb259672e3ae1699b3b91423505afa19ebd98c59d
audit: always check the netlink payload length in audit_receive_msg()

[ Upstream commit 756125289285f6e55a03861bf4b6257aa3d19a93 ]

This patch ensures that we always check the netlink payload length
in audit_receive_msg() before we take any action on the payload
itself.

Cc: stable@vger.kernel.org
Reported-by: syzbot+399c44bf1f43b8747403@syzkaller.appspotmail.com
Reported-by: syzbot+e4b12d8d202701f08b6d@syzkaller.appspotmail.com
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/audit.c