audit: use copied skb length in kauditd_send_multicast_skb()
PATCH 1/1 audit: use copied skb length in kauditd_send_multicast_skb()
The netlink header's nlmsg_len was being set using the original skb instead of the local copy passed to nlmsg_multicast().
While skb->len and copy->len are identical at this point following skb_copy(), it is conceptually cleaner and safer to use the length of the skb being actively modified and sent. Thus, this is a minor cleanup only, no functional change expected.
--- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/audit.c +1 -1
@@ -871,7 +871,7 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb)if (!copy)return ; nlh =nlmsg_hdr (copy); - nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;nlmsg_multicast (sock, copy,0 ,AUDIT_NLGRP_READLOG ,GFP_KERNEL ); }
Signature · 1 line
2.55.0
Hi Ricardo,
kernel/audit.c static void kauditd_send_multicast_skb(struct sk_buff *skb) · line 874
Quoted 2 lines
kernel/audit.c +1
-1- nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;
Fine. skb_copy() does skb_put(n, skb->len) and nothing touches copy->len in between, so the two are always identical. Which is also why "safer" is a bit of a stretch, it prevents nothing. Feel free to bikeshed the changelog wording on that.
If you ever want a more interesting cleanup here, the real quirk is the line above: the unicast path sets nlmsg_len to skb->len minus NLMSG_HDRLEN, this one uses the full length.
Well, why not, please add:
Thanks!
Quoted 11 lines · Bradley Morgan
Hi Ricardo,
kernel/audit.c static void kauditd_send_multicast_skb(struct sk_buff *skb) · line 874
Quoted 2 lines
kernel/audit.c +1
-1- nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;Fine.
skb_copy()doesskb_put(n, skb->len)and nothing touchescopy->lenin between, so the two are always identical. Which is also why "safer" is a bit of a stretch, it prevents nothing. Feel free to bikeshed the changelog wording on that.
Thanks for reviewing this patch, Bradley. I agree with you on the wording.
Quoted 3 lines
If you ever want a more interesting cleanup here, the real quirk is the line above: the unicast path sets
nlmsg_lentoskb->lenminusNLMSG_HDRLEN, this one uses the full length.
That's interesting, maybe moving the nlmsg_len fixup out of __audit_log_end() would be better. I'll look into it.
Quoted 6 lines
Well, why not, please add:
Reviewed-by Bradley Morgan <[email protected]>Thanks!
-Ricardo
Quoted 7 lines · Ricardo Robaina
Quoted 6 lines · Bradley Morgan
Hi Ricardo,
Quoted 2 lines
(quoted diff) +1
-1- nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;
Quoted 8 lines
Quoted 5 lines
Fine.
skb_copy()doesskb_put(n, skb->len)and nothing touchescopy->lenin between, so the two are always identical. Which is also why "safer" is a bit of a stretch, it prevents nothing. Feel free to bikeshed the changelog wording on that.Thanks for reviewing this patch, Bradley. I agree with you on the wording.
np.
Quoted 7 lines
Quoted 3 lines
If you ever want a more interesting cleanup here, the real quirk is the line above: the unicast path sets
nlmsg_lentoskb->lenminusNLMSG_HDRLEN, this one uses the full length.That's interesting, maybe moving the
nlmsg_lenfixup out of__audit_log_end()would be better. I'll look into it.
Hmmm.. perhaps it will. I will suggest a fix:
From 776375d625cd9cb138f7a6f876861bf428ae1e6c Mon Sep 17 00:00:00 2001
From: Bradley Morgan <[email protected]>
Date: Mon, 10 Aug 2026 16:26:06 +0000
Subject: [PATCH] audit: move the nlmsg_len fixup from __audit_log_end() to
send time
The auditd breakage (nlmsg_len set to the payload length instead of the full message length) is applied in __audit_log_end() when the record is queued. That forces kauditd_send_multicast_skb() to deep copy every record and undo the length on the copy, so the multicast group still sees a standard netlink message.
Instead, finalize the header with the standard full length at queue time and apply the auditd length right before the unicast send in kauditd_send_queue(). Records stay standard netlink messages while they sit in the queues, and the multicast copy no longer needs its own fixup. The deep copy itself stays, since the auditd length rewrite lands in the shared data region after the copy is already handed to the listeners.
auditd sees the same bytes as before. The fixup is computed from skb->len, which does not change between queueing and sending, so records that come back through the retry and hold queues get the same value again. Reply and rule list skbs are built with nlmsg_put() and sent on other paths, none of those are touched.
This came out of the "use copied skb length" thread, where moving the fixup was suggested as the more interesting cleanup.
--- kernel/audit.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)
kernel/audit.c +22 -16
@@ -802,6 +802,15 @@ static int kauditd_send_queue(struct sock *sk, u32 portid,if (skb_hook) (*skb_hook)(skb); +/* +* auditd expects nlmsg_len to be the payload length rather +* than the full message length. Apply the breakage here at +* send time so the record stays a standard netlink message +* while queued and while it is copied for the multicast +* group above. +*/ +nlmsg_hdr (skb)->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* can we send to anyone via unicast? */ if (!sk) {if (err_hook)
@@ -849,7 +858,6 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb) {struct sk_buff *copy;struct sock *sock =audit_get_sk (&init_net); -struct nlmsghdr *nlh;/* NOTE: we are not taking an additional reference for init_net since * we don't have to worry about it going away */
@@ -859,19 +867,15 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb)/* * The seemingly wasteful skb_copy() rather than bumping the refcount -* using skb_get() is necessary because non-standard mods are made to -* the skb by the original kaudit unicast socket send routine. The -* existing auditd daemon assumes this breakage. Fixing this would -* require co-ordinating a change in the established protocol between -* the kaudit kernel subsystem and the auditd userspace code. There is -* no reason for new multicast clients to continue with this -* non-compliance. +* using skb_get() is necessary because the unicast send in +* kauditd_send_queue() rewrites nlmsg_len to the payload only length +* that auditd expects. The copy shields the multicast listeners from +* that historical breakage, there is no reason for them to continue +* with this non compliance. */ copy =skb_copy (skb,GFP_KERNEL );if (!copy)return ; - nlh =nlmsg_hdr (copy); - nlh->nlmsg_len = skb->len;nlmsg_multicast (sock, copy,0 ,AUDIT_NLGRP_READLOG ,GFP_KERNEL ); }
@@ -2785,13 +2789,15 @@ int audit_signal_info(int sig, struct task_struct *t)*/ static void __audit_log_end (struct sk_buff *skb) { -struct nlmsghdr *nlh; -if (audit_rate_check ()) { -/* setup the netlink header, see the comments in -* kauditd_send_multicast_skb() for length quirks */ - nlh =nlmsg_hdr (skb); - nlh->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* +* The record was built by appending data after nlmsg_put() +* without keeping nlmsg_len up to date, so finalize the +* header here with the standard full message length. The +* payload only length that auditd expects is applied at +* send time in kauditd_send_queue(). +*/ +nlmsg_end (skb,nlmsg_hdr (skb));/* queue the netlink packet */ skb_queue_tail (&audit_queue, skb);
Signature · 1 line
2.47.3
Quoted 10 lines
Quoted 6 lines
Well, why not, please add:
Reviewed-by Bradley Morgan <[email protected]>Thanks!
-Ricardo
Thanks!
Quoted 153 lines · Bradley Morgan
Quoted 7 lines · Ricardo Robaina
Quoted 6 lines · Bradley Morgan
Hi Ricardo,
Quoted 2 lines
(quoted diff) +1
-1- nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;Quoted 8 lines
Quoted 5 lines
Fine.
skb_copy()doesskb_put(n, skb->len)and nothing touchescopy->lenin between, so the two are always identical. Which is also why "safer" is a bit of a stretch, it prevents nothing. Feel free to bikeshed the changelog wording on that.Thanks for reviewing this patch, Bradley. I agree with you on the wording.
np.
Quoted 7 lines
Quoted 3 lines
If you ever want a more interesting cleanup here, the real quirk is the line above: the unicast path sets
nlmsg_lentoskb->lenminusNLMSG_HDRLEN, this one uses the full length.That's interesting, maybe moving the
nlmsg_lenfixup out of__audit_log_end()would be better. I'll look into it.Hmmm.. perhaps it will. I will suggest a fix:
From
776375d625cd9cb138f7a6f876861bf428ae1e6cMon Sep 17 00:00:00 2001
From: Bradley Morgan <[email protected]>
Date: Mon, 10 Aug 2026 16:26:06 +0000
Subject: [PATCH] audit: move thenlmsg_lenfixup from__audit_log_end()to
send timeThe auditd breakage (
nlmsg_lenset to the payload length instead of the full message length) is applied in__audit_log_end()when the record is queued. That forceskauditd_send_multicast_skb()to deep copy every record and undo the length on the copy, so the multicast group still sees a standard netlink message.Instead, finalize the header with the standard full length at queue time and apply the auditd length right before the unicast send in
kauditd_send_queue(). Records stay standard netlink messages while they sit in the queues, and the multicast copy no longer needs its own fixup. The deep copy itself stays, since the auditd length rewrite lands in the shared data region after the copy is already handed to the listeners.auditd sees the same bytes as before. The fixup is computed from
skb->len, which does not change between queueing and sending, so records that come back through the retry and hold queues get the same value again. Reply and rule list skbs are built withnlmsg_put()and sent on other paths, none of those are touched.This came out of the "use copied skb length" thread, where moving the fixup was suggested as the more interesting cleanup.
Signed-off-by Bradley Morgan <[email protected]>--- kernel/audit.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)kernel/audit.c +22
-17@@ -802,6 +802,15 @@ static int kauditd_send_queue(struct sock *sk, u32 portid,if (skb_hook) (*skb_hook)(skb); +/* +* auditd expects nlmsg_len to be the payload length rather +* than the full message length. Apply the breakage here at +* send time so the record stays a standard netlink message +* while queued and while it is copied for the multicast +* group above. +*/ +nlmsg_hdr (skb)->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* can we send to anyone via unicast? */ if (!sk) {if (err_hook)@@ -849,7 +858,6 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb) {struct sk_buff *copy;struct sock *sock =audit_get_sk (&init_net); -struct nlmsghdr *nlh;/* NOTE: we are not taking an additional reference for init_net since * we don't have to worry about it going away */ @@ -859,19 +867,15 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb)/* * The seemingly wasteful skb_copy() rather than bumping the refcount -* using skb_get() is necessary because non-standard mods are made to -* the skb by the original kaudit unicast socket send routine. The -* existing auditd daemon assumes this breakage. Fixing this would -* require co-ordinating a change in the established protocol between -* the kaudit kernel subsystem and the auditd userspace code. There is -* no reason for new multicast clients to continue with this -* non-compliance. +* using skb_get() is necessary because the unicast send in +* kauditd_send_queue() rewrites nlmsg_len to the payload only length +* that auditd expects. The copy shields the multicast listeners from +* that historical breakage, there is no reason for them to continue +* with this non compliance. */ copy =skb_copy (skb,GFP_KERNEL );if (!copy)return ; - nlh =nlmsg_hdr (copy); - nlh->nlmsg_len = skb->len;nlmsg_multicast (sock, copy,0 ,AUDIT_NLGRP_READLOG ,GFP_KERNEL ); }@@ -2785,13 +2789,15 @@ int audit_signal_info(int sig, struct task_struct *t)*/ static void __audit_log_end (struct sk_buff *skb) { -struct nlmsghdr *nlh; -if (audit_rate_check ()) { -/* setup the netlink header, see the comments in -* kauditd_send_multicast_skb() for length quirks */ - nlh =nlmsg_hdr (skb); - nlh->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* +* The record was built by appending data after nlmsg_put() +* without keeping nlmsg_len up to date, so finalize the +* header here with the standard full message length. The +* payload only length that auditd expects is applied at +* send time in kauditd_send_queue(). +*/ +nlmsg_end (skb,nlmsg_hdr (skb));/* queue the netlink packet */ skb_queue_tail (&audit_queue, skb); --2.47.3
Quoted 7 lines
Quoted 6 lines
Well, why not, please add:
Reviewed-by Bradley Morgan <[email protected]>Thanks!
Quoted 6 lines
Quoted 3 lines
-Ricardo
Thanks!
It looks good to me. I've built a kernel to test it and verified that it passes the audit testsuite.
# uname -r 7.2.0-rc6+
# make test
make -C tests test
chmod +x */test
Running as user root
with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
on system Fedoraamcast_joinpart/test ................. ok backlog_wait_time_actual_reset/test .. ok
bpf/test ............................. ok
coredump/test ........................ ok exec_execve/test ..................... ok
exec_name/test ....................... ok
fanotify/test ........................ ok field_compare/test ................... ok file_create/test ..................... ok file_delete/test ..................... ok file_permission/test ................. ok file_rename/test ..................... ok filter_device/test ................... ok filter_exclude/test .................. ok filter_exit/test ..................... ok filter_inode/test .................... ok filter_saddr_fam/test ................ ok filter_sessionid/test ................ okio_uring/test ........................ ok
login_tty/test ....................... ok lost_reset/test ...................... ok netfilter_pkt/test ................... ok
signal/test .......................... ok syscalls_file/test ................... ok syscall_module/test .................. ok syscall_socketcall/test .............. ok time_change/test ..................... ok
user_msg/test ........................ ok
All tests successful.
Files=28, Tests=303, 46 wallclock secs ( 0.08 usr 0.03 sys + 14.50 cusr 1.56 csys = 16.17 CPU)
Result: PASS
-Ricardo
Quoted 229 lines · Ricardo Robaina
Quoted 4 lines · Bradley Morgan
Quoted 1 line · Ricardo Robaina
On Mon, Aug 10, 2026 at 10:32 AM Bradley Morgan <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Hi Ricardo,
Quoted 2 lines
(quoted diff) +1
-1- nlh->nlmsg_len = skb->len; + nlh->nlmsg_len = copy->len;Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Fine.
skb_copy()doesskb_put(n, skb->len)and nothing touchescopy->lenin between, so the two are always identical. Which is also why "safer" is a bit of a stretch, it prevents nothing. Feel free to bikeshed the changelog wording on that.Thanks for reviewing this patch, Bradley. I agree with you on the
wording.
Quoted 12 lines
Quoted 1 line
np.
Quoted 7 lines
Quoted 3 lines
If you ever want a more interesting cleanup here, the real quirk is the line above: the unicast path sets
nlmsg_lentoskb->lenminusNLMSG_HDRLEN, this one uses the full length.That's interesting, maybe moving the
nlmsg_lenfixup out of__audit_log_end()would be better. I'll look into it.Quoted 6 lines
Hmmm.. perhaps it will. I will suggest a fix:
From
776375d625cd9cb138f7a6f876861bf428ae1e6cMon Sep 17 00:00:00 2001
From: Bradley Morgan <[email protected]>
Date: Mon, 10 Aug 2026 16:26:06 +0000
Subject: [PATCH] audit: move thenlmsg_lenfixup from__audit_log_end()to
kernel/audit.c static int kauditd_send_queue(struct sock *sk, u32
Quoted 35 lines
send time
The auditd breakage (
nlmsg_lenset to the payload length instead of the full message length) is applied in__audit_log_end()when the record is queued. That forceskauditd_send_multicast_skb()to deep copy every record and undo the length on the copy, so the multicast group still sees a standard netlink message.Instead, finalize the header with the standard full length at queue time and apply the auditd length right before the unicast send in
kauditd_send_queue(). Records stay standard netlink messages while they sit in the queues, and the multicast copy no longer needs its own fixup. The deep copy itself stays, since the auditd length rewrite lands in the shared data region after the copy is already handed to the listeners.auditd sees the same bytes as before. The fixup is computed from
skb->len, which does not change between queueing and sending, so records that come back through the retry and hold queues get the same value again. Reply and rule list skbs are built withnlmsg_put()and sent on other paths, none of those are touched.This came out of the "use copied skb length" thread, where moving the fixup was suggested as the more interesting cleanup.
Signed-off-by Bradley Morgan <[email protected]>--- kernel/audit.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)kernel/audit.c +0
-0@@ -802,6 +802,15 @@ static int kauditd_send_queue(struct sock *sk, u32portid,
kernel/audit.c static int kauditd_send_queue(struct sock *sk, u32 portid,
Quoted 5 lines
kernel/audit.c +2
-0if (skb_hook) (*skb_hook)(skb); +/* +* auditd expects nlmsg_len to be the payload length rather
kernel/audit.c static int kauditd_send_queue(struct sock *sk, u32 · line 807
Quoted 1 line
kernel/audit.c +1
-0+* than the full message length. Apply the breakage here at
kernel/audit.c static int kauditd_send_queue(struct sock *sk, u32 · line 808
Quoted 1 line
kernel/audit.c +1
-0+* send time so the record stays a standard netlink message
kernel/audit.c static void kauditd_send_multicast_skb(struct
Quoted 9 lines
kernel/audit.c +5
-0+* while queued and while it is copied for the multicast +* group above. +*/ +nlmsg_hdr (skb)->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* can we send to anyone via unicast? */ if (!sk) {if (err_hook)@@ -849,7 +858,6 @@ static void kauditd_send_multicast_skb(struct
sk_buff*skb)kernel/audit.c static void kauditd_send_multicast_skb(struct sk_buff *skb)
Quoted 6 lines
kernel/audit.c +0
-1{struct sk_buff *copy;struct sock *sock =audit_get_sk (&init_net); -struct nlmsghdr *nlh;/* NOTE: we are not taking an additional reference for init_net since
kernel/audit.c static void kauditd_send_multicast_skb(struct
Quoted 2 lines
kernel/audit.c +0
-0* we don't have to worry about it going away */ @@ -859,19 +867,15 @@ static void kauditd_send_multicast_skb(struct
sk_buff*skb)kernel/audit.c static void kauditd_send_multicast_skb(struct · line 868
Quoted 3 lines
kernel/audit.c +0
-0/* * The seemingly wasteful skb_copy() rather than bumping the refcount
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 861
Quoted 1 line
kernel/audit.c +0
-1-* using skb_get() is necessary because non-standard mods are made to
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 862
Quoted 1 line
kernel/audit.c +0
-1-* the skb by the original kaudit unicast socket send routine. The
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 863
Quoted 1 line
kernel/audit.c +0
-1-* existing auditd daemon assumes this breakage. Fixing this would
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 864
Quoted 1 line
kernel/audit.c +0
-1-* require co-ordinating a change in the established protocol between
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 865
Quoted 1 line
kernel/audit.c +0
-1-* the kaudit kernel subsystem and the auditd userspace code. There is
kernel/audit.c static void kauditd_send_multicast_skb(struct sk_buff *skb)
Quoted 4 lines
kernel/audit.c +2
-2-* no reason for new multicast clients to continue with this -* non-compliance. +* using skb_get() is necessary because the unicast send in +* kauditd_send_queue() rewrites nlmsg_len to the payload only length
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 871
Quoted 1 line
kernel/audit.c +1
-0+* that auditd expects. The copy shields the multicast listeners from
kernel/audit.c static void kauditd_send_multicast_skb(struct · line 872
Quoted 1 line
kernel/audit.c +1
-0+* that historical breakage, there is no reason for them to continue
kernel/audit.c int audit_signal_info(int sig, struct
Quoted 11 lines
kernel/audit.c +1
-2+* with this non compliance. */ copy =skb_copy (skb,GFP_KERNEL );if (!copy)return ; - nlh =nlmsg_hdr (copy); - nlh->nlmsg_len = skb->len;nlmsg_multicast (sock, copy,0 ,AUDIT_NLGRP_READLOG ,GFP_KERNEL ); }@@ -2785,13 +2789,15 @@ int audit_signal_info(int sig, struct
task_struct*t)kernel/audit.c int audit_signal_info(int sig, struct task_struct *t)
Quoted 12 lines
kernel/audit.c +2
-6*/ static void __audit_log_end (struct sk_buff *skb) { -struct nlmsghdr *nlh; -if (audit_rate_check ()) { -/* setup the netlink header, see the comments in -* kauditd_send_multicast_skb() for length quirks */ - nlh =nlmsg_hdr (skb); - nlh->nlmsg_len = skb->len -NLMSG_HDRLEN ; +/* +* The record was built by appending data after
nlmsg_put()kernel/audit.c int audit_signal_info(int sig, struct · line 2796
Quoted 2 lines
kernel/audit.c +2
-0+* without keeping nlmsg_len up to date, so finalize the +* header here with the standard full message length. The
Quoted 20 lines
kernel/audit.c +4
-1+* payload only length that auditd expects is applied at +* send time in kauditd_send_queue(). +*/ +nlmsg_end (skb,nlmsg_hdr (skb));/* queue the netlink packet */ skb_queue_tail (&audit_queue, skb); --2.47.3
Quoted 7 lines
Quoted 6 lines
Well, why not, please add:
Reviewed-by Bradley Morgan <[email protected]>Thanks!
Quoted 6 lines
Quoted 3 lines
-Ricardo
Thanks!
It looks good to me. I've built a kernel to test it and verified that it passes the audit testsuite.
# uname -r 7.2.0-rc6+# make test make -C tests test chmod +x */test Running as user root with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 on system Fedoraamcast_joinpart/test ................. ok backlog_wait_time_actual_reset/test .. ok
bpf/test ............................. ok
coredump/test ........................ ok exec_execve/test ..................... ok
exec_name/test ....................... ok
fanotify/test ........................ ok field_compare/test ................... ok file_create/test ..................... ok file_delete/test ..................... ok file_permission/test ................. ok file_rename/test ..................... ok filter_device/test ................... ok filter_exclude/test .................. ok filter_exit/test ..................... ok filter_inode/test .................... ok filter_saddr_fam/test ................ ok filter_sessionid/test ................ okio_uring/test........................ ok
login_tty/test ....................... ok lost_reset/test ...................... ok netfilter_pkt/test ................... ok
signal/test .......................... ok syscalls_file/test ................... ok syscall_module/test .................. ok syscall_socketcall/test .............. ok time_change/test ..................... ok
user_msg/test ........................ ok
All tests successful.
Files=28, Tests=303, 46 wallclock secs ( 0.08 usr 0.03 sys + 14.50 cusr 1.56 csys = 16.17 CPU)
Result: PASS
Quoted 6 lines
Reviewed-by Ricardo Robaina <[email protected]>Tested-by Ricardo Robaina <[email protected]>-Ricardo
woah, thanks for the review too. so do I like post or will Paul take it
Thanks!
Paul Moore
maintainerQuoted 9 lines · On Aug 10, 2026 Ricardo Robaina <[email protected]> wrote:
The netlink header's
nlmsg_lenwas being set using the original skb instead of the local copy passed tonlmsg_multicast().While
skb->lenandcopy->lenare identical at this point followingskb_copy(), it is conceptually cleaner and safer to use the length of the skb being actively modified and sent. Thus, this is a minor cleanup only, no functional change expected.
Quoted 5 lines
Signed-off-by Ricardo Robaina <[email protected]>Reviewed-by Bradley Morgan <[email protected]>--- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Looks reasonable. Merged into audit/dev-staging, will be moved to audit/dev next week.
--
paul-moore.com
Thanks, Paul!
Quoted 23 lines · Paul Moore
Quoted 9 lines · On Aug 10, 2026 Ricardo Robaina <[email protected]> wrote:
The netlink header's
nlmsg_lenwas being set using the original skb instead of the local copy passed tonlmsg_multicast().While
skb->lenandcopy->lenare identical at this point followingskb_copy(), it is conceptually cleaner and safer to use the length of the skb being actively modified and sent. Thus, this is a minor cleanup only, no functional change expected.Quoted 5 lines
Signed-off-by Ricardo Robaina <[email protected]>Reviewed-by Bradley Morgan <[email protected]>--- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Looks reasonable. Merged into audit/dev-staging, will be moved to audit/dev next week.
--
paul-moore.com
Paul Moore
maintainerQuoted 10 lines · Paul Moore
Quoted 9 lines · On Aug 10, 2026 Ricardo Robaina <[email protected]> wrote:
The netlink header's
nlmsg_lenwas being set using the original skb instead of the local copy passed tonlmsg_multicast().While
skb->lenandcopy->lenare identical at this point followingskb_copy(), it is conceptually cleaner and safer to use the length of the skb being actively modified and sent. Thus, this is a minor cleanup only, no functional change expected.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Ricardo Robaina <[email protected]>Reviewed-by Bradley Morgan <[email protected]>--- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Looks reasonable. Merged into audit/dev-staging, will be moved to audit/dev next week.
... now in audit/dev, thanks!
Signature · 1 line
paul-moore.com