lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Feb 2010 15:21:36 -0500
From:	Eric Paris <eparis@...isplace.org>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andy Shevchenko <ext-andriy.shevchenko@...ia.com>,
	aviro@...hat.com, Eric Paris <eparis@...hat.com>,
	Steve Grubb <sgrubb@...hat.com>, dwalsh@...hat.com
Subject: Re: [PATCH 02/12] audit: use kernel's method to get byte in hex form

On Thu, Feb 18, 2010 at 1:55 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> From: Andy Shevchenko <ext-andriy.shevchenko@...ia.com>
>
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@...ia.com>


It changes the case from ABCDEF to abcdef but there are a number of
userspace tools which might not be able to handle it, have you tested
any or all of these?  The two that come to mind are ausearch and
setroubleshoot, which I believe both may try to recreate pathnames
when they contain a space....

-Eric


> ---
>  kernel/audit.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 5feed23..160abad 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,6 +58,7 @@
>  #include <linux/inotify.h>
>  #include <linux/freezer.h>
>  #include <linux/tty.h>
> +#include <linux/kernel.h>
>
>  #include "audit.h"
>
> @@ -1308,7 +1309,6 @@ void audit_log_n_hex(struct audit_buffer *ab, const unsigned char *buf,
>        int i, avail, new_len;
>        unsigned char *ptr;
>        struct sk_buff *skb;
> -       static const unsigned char *hex = "0123456789ABCDEF";
>
>        if (!ab)
>                return;
> @@ -1326,10 +1326,8 @@ void audit_log_n_hex(struct audit_buffer *ab, const unsigned char *buf,
>        }
>
>        ptr = skb_tail_pointer(skb);
> -       for (i=0; i<len; i++) {
> -               *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */
> -               *ptr++ = hex[buf[i] & 0x0F];      /* Lower nibble */
> -       }
> +       for (i=0; i<len; i++)
> +               ptr = pack_hex_byte(ptr, buf[i]);
>        *ptr = 0;
>        skb_put(skb, len << 1); /* new string is twice the old string */
>  }
> --
> 1.5.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists