1. 03 4月, 2014 1 次提交
  2. 20 3月, 2014 3 次提交
  3. 09 3月, 2014 1 次提交
  4. 08 3月, 2014 1 次提交
  5. 01 3月, 2014 1 次提交
  6. 28 2月, 2014 1 次提交
  7. 14 1月, 2014 5 次提交
  8. 06 11月, 2013 2 次提交
    • E
      audit: do not reject all AUDIT_INODE filter types · 78122037
      Eric Paris 提交于
      commit ab61d38e tried to merge the
      invalid filter checking into a single function.  However AUDIT_INODE
      filters were not verified in the new generic checker.  Thus such rules
      were being denied even though they were perfectly valid.
      
      Ex:
      $ auditctl -a exit,always -F arch=b64 -S open -F key=/foo -F inode=6955 -F devmajor=9 -F devminor=1
      Error sending add rule data request (Invalid argument)
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      78122037
    • R
      audit: change decimal constant to macro for invalid uid · 42f74461
      Richard Guy Briggs 提交于
      SFR reported this 2013-05-15:
      
      > After merging the final tree, today's linux-next build (i386 defconfig)
      > produced this warning:
      >
      > kernel/auditfilter.c: In function 'audit_data_to_entry':
      > kernel/auditfilter.c:426:3: warning: this decimal constant is unsigned only
      > in ISO C90 [enabled by default]
      >
      > Introduced by commit 780a7654 ("audit: Make testing for a valid
      > loginuid explicit") from Linus' tree.
      
      Replace this decimal constant in the code with a macro to make it more readable
      (add to the unsigned cast to quiet the warning).
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      42f74461
  9. 10 7月, 2013 3 次提交
  10. 25 5月, 2013 1 次提交
  11. 08 5月, 2013 1 次提交
  12. 01 5月, 2013 4 次提交
  13. 30 4月, 2013 1 次提交
    • C
      kernel/auditfilter.c: tree and watch will memory leak when failure occurs · 373e0f34
      Chen Gang 提交于
      In audit_data_to_entry() when a failure occurs we must check and free
      the tree and watch to avoid a memory leak.
      
        test:
          plan:
            test command:
              "auditctl -a exit,always -w /etc -F auid=-1"
              (on fedora17, need modify auditctl to let "-w /etc" has effect)
            running:
              under fedora17 x86_64, 2 CPUs 3.20GHz, 2.5GB RAM.
              let 15 auditctl processes continue running at the same time.
            monitor command:
              watch -d -n 1 "cat /proc/meminfo | awk '{print \$2}' \
                | head -n 4 | xargs \
                | awk '{print \"used \",\$1 - \$2 - \$3 - \$4}'"
      
          result:
            for original version:
              will use up all memory, within 3 hours.
              kill all auditctl, the memory still does not free.
            for new version (apply this patch):
              after 14 hours later, not find issues.
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      373e0f34
  14. 17 4月, 2013 1 次提交
    • E
      audit: allow checking the type of audit message in the user filter · 62062cf8
      Eric Paris 提交于
      When userspace sends messages to the audit system it includes a type.
      We want to be able to filter messages based on that type without have to
      do the all or nothing option currently available on the
      AUDIT_FILTER_TYPE filter list.  Instead we should be able to use the
      AUDIT_FILTER_USER filter list and just use the message type as one part
      of the matching decision.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      62062cf8
  15. 11 1月, 2013 1 次提交
  16. 12 10月, 2012 4 次提交
  17. 18 9月, 2012 4 次提交
    • E
      userns: Convert the audit loginuid to be a kuid · e1760bd5
      Eric W. Biederman 提交于
      Always store audit loginuids in type kuid_t.
      
      Print loginuids by converting them into uids in the appropriate user
      namespace, and then printing the resulting uid.
      
      Modify audit_get_loginuid to return a kuid_t.
      
      Modify audit_set_loginuid to take a kuid_t.
      
      Modify /proc/<pid>/loginuid on read to convert the loginuid into the
      user namespace of the opener of the file.
      
      Modify /proc/<pid>/loginud on write to convert the loginuid
      rom the user namespace of the opener of the file.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Paul Moore <paul@paul-moore.com> ?
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      e1760bd5
    • E
      audit: Add typespecific uid and gid comparators · ca57ec0f
      Eric W. Biederman 提交于
      The audit filter code guarantees that uid are always compared with
      uids and gids are always compared with gids, as the comparason
      operations are type specific.  Take advantage of this proper to define
      audit_uid_comparator and audit_gid_comparator which use the type safe
      comparasons from uidgid.h.
      
      Build on audit_uid_comparator and audit_gid_comparator and replace
      audit_compare_id with audit_compare_uid and audit_compare_gid.  This
      is one of those odd cases where being type safe and duplicating code
      leads to simpler shorter and more concise code.
      
      Don't allow bitmask operations in uid and gid comparisons in
      audit_data_to_entry.  Bitmask operations are already denined in
      audit_rule_to_entry.
      
      Convert constants in audit_rule_to_entry and audit_data_to_entry into
      kuids and kgids when appropriate.
      
      Convert the uid and gid field in struct audit_names to be of type
      kuid_t and kgid_t respectively, so that the new uid and gid comparators
      can be applied in a type safe manner.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      ca57ec0f
    • E
      audit: Remove the unused uid parameter from audit_receive_filter · 017143fe
      Eric W. Biederman 提交于
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      017143fe
    • E
      audit: Use current instead of NETLINK_CREDS() in audit_filter · 02276bda
      Eric W. Biederman 提交于
      Get caller process uid and gid and pid values from the current task
      instead of the NETLINK_CB.  This is simpler than passing NETLINK_CREDS
      from from audit_receive_msg to audit_filter_user_rules and avoid the
      chance of being hit by the occassional bugs in netlink uid/gid
      credential passing.  This is a safe changes because all netlink
      requests are processed in the task of the sending process.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      02276bda
  18. 18 1月, 2012 5 次提交
    • E
      audit: allow interfield comparison in audit rules · 02d86a56
      Eric Paris 提交于
      We wish to be able to audit when a uid=500 task accesses a file which is
      uid=0.  Or vice versa.  This patch introduces a new audit filter type
      AUDIT_FIELD_COMPARE which takes as an 'enum' which indicates which fields
      should be compared.  At this point we only define the task->uid vs
      inode->uid, but other comparisons can be added.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      02d86a56
    • E
      audit: allow audit matching on inode gid · 54d3218b
      Eric Paris 提交于
      Much like the ability to filter audit on the uid of an inode collected, we
      should be able to filter on the gid of the inode.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      54d3218b
    • E
      audit: allow matching on obj_uid · efaffd6e
      Eric Paris 提交于
      Allow syscall exit filter matching based on the uid of the owner of an
      inode used in a syscall.  aka:
      
      auditctl -a always,exit -S open -F obj_uid=0 -F perm=wa
      Signed-off-by: NEric Paris <eparis@redhat.com>
      efaffd6e
    • E
      audit: reject entry,always rules · 7ff68e53
      Eric Paris 提交于
      We deprecated entry,always rules a long time ago.  Reject those rules as
      invalid.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      7ff68e53
    • E
      audit: make filetype matching consistent with other filters · 5ef30ee5
      Eric Paris 提交于
      Every other filter that matches part of the inodes list collected by audit
      will match against any of the inodes on that list.  The filetype matching
      however had a strange way of doing things.  It allowed userspace to
      indicated if it should match on the first of the second name collected by
      the kernel.  Name collection ordering seems like a kernel internal and
      making userspace rules get that right just seems like a bad idea.  As it
      turns out the userspace audit writers had no idea it was doing this and
      thus never overloaded the value field.  The kernel always checked the first
      name collected which for the tested rules was always correct.
      
      This patch just makes the filetype matching like the major, minor, inode,
      and LSM rules in that it will match against any of the names collected.  It
      also changes the rule validation to reject the old unused rule types.
      
      Noone knew it was there.  Noone used it.  Why keep around the extra code?
      Signed-off-by: NEric Paris <eparis@redhat.com>
      5ef30ee5