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>
Thu, 5 Mar 2020 15:42:23 +0000 (16:42 +0100)
commit9d2fdc4c7efd90860378bdc18bd5f7c199c8d645
tree38743f5ee0b645052cce368902fe37afb824f1ee
parent469020eb5bee70cf6d0aa8125faafe5da744df31
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