]> git.baikalelectronics.ru Git - kernel.git/commit
audit: free module name
authorChristian Göttsche <cgzones@googlemail.com>
Wed, 15 Jun 2022 15:44:31 +0000 (17:44 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 15 Jun 2022 23:28:44 +0000 (19:28 -0400)
commit4ad79180fc701a8d75d03134aed2ca188686e8b5
tree87e0f273a16df374df6b5cd7d636c656d7f7a69e
parent71374b58ebc7666369d670c06d1176f81c437c59
audit: free module name

Reset the type of the record last as the helper `audit_free_module()`
depends on it.

    unreferenced object 0xffff888153b707f0 (size 16):
      comm "modprobe", pid 1319, jiffies 4295110033 (age 1083.016s)
      hex dump (first 16 bytes):
        62 69 6e 66 6d 74 5f 6d 69 73 63 00 6b 6b 6b a5  binfmt_misc.kkk.
      backtrace:
        [<ffffffffa07dbf9b>] kstrdup+0x2b/0x50
        [<ffffffffa04b0a9d>] __audit_log_kern_module+0x4d/0xf0
        [<ffffffffa03b6664>] load_module+0x9d4/0x2e10
        [<ffffffffa03b8f44>] __do_sys_finit_module+0x114/0x1b0
        [<ffffffffa1f47124>] do_syscall_64+0x34/0x80
        [<ffffffffa200007e>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

Cc: stable@vger.kernel.org
Fixes: 79ed1a2d5572 ("audit: prepare audit_context for use in calling contexts beyond syscalls")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditsc.c