<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear Richard,</div><div class=""><br class=""></div><div class="">Thanks a lot for your help. I agree that the inconsistency seems a bit strange but </div><div class="">I also doubt that different distributions make different changes to kernel/audit.c. This </div><div class="">may be just a timing issue with regard to  startup orderings. </div><div class=""><br class=""></div><div class="">I’d like to append Burn’s message that solved my issue for future reference.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">Kangkook,<br class=""><br class="">Perhaps you can re-test, but modify the kernel boot parameters to<br class="">include audit=1 as an additional argument.<br class=""><br class="">Reading the auditd(8) manual, one sees<br class=""><br class="">      A boot param of audit=1 should be added to ensure that all<br class="">      processes that run before the audit daemon starts is marked as<br class="">      auditable by the kernel. Not doing that will make a few<br class="">      processes impossible to properly audit.</blockquote></blockquote></blockquote></div><div class=""><br class=""></div><div class="">Thanks again for your help!</div><div class=""><br class=""></div><div class="">Regards, Kangkook</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 13, 2015, at 11:58 AM, Richard Guy Briggs <<a href="mailto:rgb@redhat.com" class="">rgb@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On 15/09/11, Kangkook Jee wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Hi Richard,<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hi Kangkook,</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I also did the same experiment for the latest distributions of Fedora<br class="">core and Debian and here’s the results.<br class=""><br class="">Fedora-22 (64-bit, 4.0.4-301.fc22.x86_64): Problem reproduced.<br class="">Debian-8 (64-bit, 3.16.0-4-amd64): Problem reproduced<br class=""><br class="">Btw, Burn Alting (<a href="mailto:burn@swtf.dyndns.org" class="">burn@swtf.dyndns.org</a>) suggested me to append audit=1<br class="">to kernel flag. I added the option to boot-loader (grub) and problem<br class="">went away.<span class="Apple-converted-space"> </span><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On all systems?  This is expected behaviour.  Sorry I was not more</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">explicit in asking you to test that.  I guess it was implied by asking</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">what the settings for the kernel command line were.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Now the surprising bit is that CentOS does not demonstrate the problem</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">without audit=1 in the command line, which leads me to wonder if they</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">have set "u32             audit_enabled = 1;" around line 83 of</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">kernel/audit.c in their kernel source.  It would surprise me if they</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">did, but it would not be completely unreasonable.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Regards, Kangkook<br class=""><br class=""><blockquote type="cite" class="">On Sep 11, 2015, at 12:24 PM, Richard Guy Briggs <<a href="mailto:rgb@redhat.com" class="">rgb@redhat.com</a>> wrote:<br class="">On 15/09/11, Kangkook Jee wrote:<br class=""><blockquote type="cite" class="">From the previous reply, I think I misunderstood your question regarding kernel command line.<span class="Apple-converted-space"> </span><br class="">Here’s "cat /proc/cmdline” results for distributions that I’ve experimented.<span class="Apple-converted-space"> </span><br class=""><br class="">Ubuntu 14.04 (64-bit):<span class="Apple-converted-space"> </span><br class="">  BOOT_IMAGE=/boot/vmlinuz-3.13.0-58-generic root=UUID=7505f862-ce46-49e5-9d1c-e4e307844889 ro text quiet splash vt.handoff=7<br class=""><br class="">Ubuntu 12.04 (64-bit):<span class="Apple-converted-space"> </span><br class="">  BOOT_IMAGE=/boot/vmlinuz-3.13.0-32-generic root=UUID=5be789be-9b0c-463e-bd18-42bfa79fb24c ro quiet splash<br class=""><br class="">CentOS 7 (64-bit):<span class="Apple-converted-space"> </span><br class="">  BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8<br class=""><br class="">CentOS 6 (64-bit):<span class="Apple-converted-space"> </span><br class="">  ro root=UUID=a7d44560-adcc-4000-9584-8b9fcf2afd74 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet<br class=""><br class="">I don’t see any audit=<value> entries from all examples above.<span class="Apple-converted-space"> </span><br class=""></blockquote><br class="">Yes, this is what I was seeking from you.  And you are correct, none of<br class="">them have audit=1 as I was hoping from at least CentOS.  There is a<br class="">chance that the CentOS kernel was compiled with audit=1 hardcoded, but I<br class="">think that is a pretty small chance...<br class=""><br class="">I'll have to look at this closer...  But any Debian and Fedora data<br class="">points that you can provide would certainly be useful.<br class=""><br class=""><blockquote type="cite" class="">/Kangkook<br class=""><br class=""><blockquote type="cite" class="">On Sep 11, 2015, at 5:50 AM, Richard Guy Briggs <<a href="mailto:rgb@redhat.com" class="">rgb@redhat.com</a>> wrote:<br class=""><br class="">On 15/09/10, Kangkook Jee wrote:<br class=""><blockquote type="cite" class="">Hi all,<br class=""><br class="">I debugged a bit further to identify distributions that are affected by the issue.<br class="">I repeated the same experiment with sshd from 3 more distributions.<br class=""><br class="">CentOS Linux release 7.1.1503 (64-bit, 3.10.0-229.el7.x86_64): Problem NOT reproduced<br class="">CentOS release 6.6 (64-bit, 2.6.32-504.el6.x86_64): Problem NOT reproduced<br class="">Ubuntu 12.04.5 LTS (64-bit, 3.13.0-32-generic): Problem reproduced<br class=""></blockquote><br class="">For each of these examples, what is the value of the kernel command line<br class="">"audit=<value>" if it is even present?  It is possible that the CentOS<br class="">examples include "audit=1" while Ubuntu omits the line.  "cat<br class="">/proc/cmdline" should tell you the answer.<br class=""><br class=""><blockquote type="cite" class="">After all, Ubuntu family are affected by the issue and I could confirm<br class="">that results are inconsistent across two different distribution<br class="">families.<span class="Apple-converted-space"> </span><br class=""></blockquote><br class="">I would be curious what your results are with a recent Debian and with a<br class="">recent Fedora.<br class=""><br class=""><blockquote type="cite" class="">If you can let us know how can we workaround the issue, it will be a great help.<br class=""><br class="">Regards, Kangkook<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Sep 9, 2015, at 11:50 PM, Kangkook Jee <<a href="mailto:aixer77@gmail.com" class="">aixer77@gmail.com</a>> wrote:<br class=""><br class="">Dear all,<br class=""><br class="">We are developing custom user space audit agent to gather system wide system<br class="">call trace. While experimenting with various programs, we found out that<br class="">processes (daemons) that started early (along with the system bootstrapping) do<br class="">not report any audit events at all. These processes typically fall into PID<br class="">range of less than 2000. Here’s how I reproduced the symptom with sshd daemon.<br class=""><br class="">1. Reboot the system<br class=""><br class="">2. Add and enable audit events<br class=""># /sbin/auditctl -a exit,always -F arch=b64 -S clone -S close -S creat -S dup<br class="">       -S dup2 -S dup3 -S execve -S exit -S exit_group -S fork -S open -S openat<span class="Apple-converted-space"> </span><br class="">       -S unlink -S unlinkat -S vfork -S 288 -S accept -S bind -S connect<span class="Apple-converted-space"> </span><br class="">       -S listen -S socket -S socketpair<br class=""># /sbin/auditctl -e1 -b 102400<br class=""><br class="">3. Connect to the system via ssh<br class=""> Audit messages generated only from child processes and none are seen from<br class=""> the original daemon.<br class=""><br class="">4. Restart sshd<span class="Apple-converted-space"> </span><br class=""> # restart ssh<br class=""><br class="">5. Connect again to the system via ssh<br class="">Now, we see audit messages from both parent and child processes.<br class=""><br class="">I did the experiment from Ubuntu 14.04.2 LTS distribution (64-bit, kernel<br class="">version 3.13.0-58-generic).<br class=""><br class="">I first wonder whether this is intended behavior of audit framework or<br class="">not. If it is intended, I also want to know how can we configure auditd<br class="">differently to capture system calls from all processes.<span class="Apple-converted-space"> </span><br class=""><br class="">Thanks a lot for your help in advance!<br class=""><br class="">Regards, Kangkook<br class=""></blockquote></blockquote><br class="">- RGB<br class=""></blockquote></blockquote><br class="">- RGB<br class=""></blockquote></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">- RGB</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">--</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Richard Guy Briggs <</span><a href="mailto:rbriggs@redhat.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">rbriggs@redhat.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Remote, Ottawa, Canada</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545</span></div></blockquote></div><br class=""></body></html>