mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
AUDIT: Fix reported length of audit messages.
We were setting nlmsg_len to skb->len, but we should be subtracting the size of the header. From: Steve Grubb <sgrubb@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
ea9c102cb0
commit
8c5aa40c94
1 changed files with 1 additions and 1 deletions
|
|
@ -488,7 +488,7 @@ static inline int audit_log_drain(struct audit_buffer *ab)
|
||||||
|
|
||||||
if (audit_pid) {
|
if (audit_pid) {
|
||||||
struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
|
struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
|
||||||
nlh->nlmsg_len = skb->len;
|
nlh->nlmsg_len = skb->len - sizeof(*nlh);
|
||||||
skb_get(skb); /* because netlink_* frees */
|
skb_get(skb); /* because netlink_* frees */
|
||||||
retval = netlink_unicast(audit_sock, skb, audit_pid,
|
retval = netlink_unicast(audit_sock, skb, audit_pid,
|
||||||
MSG_DONTWAIT);
|
MSG_DONTWAIT);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue