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]
Message-ID: <CAMuHMdWwtHtLeKwxkc8RTSZDgPshpqkpZQmDRorHxF3HyYgRag@mail.gmail.com>
Date:   Thu, 9 Feb 2017 12:06:57 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 1/3] m68k: Return directly after a failed capable() in sys_cacheflush()

Hi Markus,

On Wed, Jan 18, 2017 at 5:47 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Wed, 18 Jan 2017 16:30:36 +0100
>
> Return directly after a call of the function "capable" failed
> at the beginning.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  arch/m68k/kernel/sys_m68k.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
> index 9aa01adb407f..62bfeb3716a7 100644
> --- a/arch/m68k/kernel/sys_m68k.c
> +++ b/arch/m68k/kernel/sys_m68k.c
> @@ -384,9 +384,8 @@ sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
>
>         if (scope == FLUSH_SCOPE_ALL) {
>                 /* Only the superuser may explicitly flush the whole cache. */
> -               ret = -EPERM;
>                 if (!capable(CAP_SYS_ADMIN))
> -                       goto out;
> +                       return -EPERM;

Given there is another "goto out" before this, I won't take this patch as-is.

>         } else {
>                 struct vm_area_struct *vma;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ