<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>58577</bug_id>
          
          <creation_ts>2026-04-07 12:50:04 +0300</creation_ts>
          <short_desc>Не работает правило Аудита изменения модулей ядра</short_desc>
          <delta_ts>2026-04-08 13:28:05 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>altcenter</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Божченко Павел Александрович">bozhchenkopa</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>cas</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>285267</commentid>
    <comment_count>0</comment_count>
    <who name="Божченко Павел Александрович">bozhchenkopa</who>
    <bug_when>2026-04-07 12:50:04 +0300</bug_when>
    <thetext>Версия пакета: altcenter-1.0-alt0.27
Версия ядра: 6.12.80-6.12-alt1

Шаги воспроизведения:
1) В Альт Центре перейти в режим эксперта, открыть раздел Настройки журналов аудита
2) Поставить чекбокс для Аудит изменений модулей ядра, применить
2.5) Просмотреть правила auditctl:
# auditctl -l | grep kernel
Вывод:
-w /sbin/insmod -p x -k kernel_module
-w /sbin/rmmod -p x -k kernel_module
-w /sbin/modprobe -p x -k kernel_module
-w /etc/sysctl.conf -p wa -k kernel_module

3) Загрузить любой модуль ядра:
# modprobe xpad
4) Проверить что запись аудита появилась:
# ausearch -k kernel_module

Ожидаемый результат: появилась запись о загрузке нового модуля ядра
Фактический результат: триггер не сработал, запись не появляется

Вероятно, проблема в том что modprobe - символическая ссылка на kmod:
# file /sbin/modprobe
/sbin/modprobe: symbolic link to ../bin/kmod


Запись при загрузке модуля появляется, если использовать следующее правило:
# auditctl -w /usr/bin/kmod -p x -k kernel_module

Запись при использовании указанного правила:
time-&gt;Tue Apr  7 12:40:42 2026
type=PROCTITLE msg=audit(1775554842.393:327): proctitle=6D6F6470726F62650078706164
type=PATH msg=audit(1775554842.393:327): item=1 name=&quot;/lib64/ld-linux-x86-64.so.2&quot; inode=593224 dev=08:02 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=unlabeled nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1775554842.393:327): item=0 name=&quot;/usr/sbin/modprobe&quot; inode=617454 dev=08:02 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=unlabeled nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(1775554842.393:327): cwd=&quot;/root&quot;
type=EXECVE msg=audit(1775554842.393:327): argc=2 a0=&quot;modprobe&quot; a1=&quot;xpad&quot;
type=SYSCALL msg=audit(1775554842.393:327): arch=c000003e syscall=59 success=yes exit=0 a0=55cfb5b9c2b0 a1=55cfb5a0c300 a2=55cfb5c2ed20 a3=7 items=2 ppid=2633 pid=3369 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=5 comm=&quot;modprobe&quot; exe=&quot;/usr/bin/kmod&quot; subj=kernel key=&quot;kernel_module_test&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>285346</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-04-08 13:28:05 +0300</bug_when>
    <thetext>altcenter-1:1.0-alt0.28 -&gt; sisyphus:

Wed Apr 08 2026 Andrey Cherepanov &lt;cas@altlinux&gt; 1:1.0-alt0.28
- Fixed bugs (ALT #58106, #58308, #58558, #58579, #58577).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>