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: <CAK7LNARxGhRHRAQuw7bkY79Z8tAuRdZ=Ayr1_JyS5Cwo=2ERmQ@mail.gmail.com>
Date:   Mon, 24 Oct 2022 13:53:01 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Bagas Sanjaya <bagasdotme@...il.com>
Cc:     linux-kbuild@...r.kernel.org,
        Johannes Zink <j.zink@...gutronix.de>,
        Ariel Marcovitch <arielmarcovitch@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: fix segmentation fault in menuconfig search

On Mon, Oct 24, 2022 at 12:04 PM Bagas Sanjaya <bagasdotme@...il.com> wrote:
>
> On Mon, Oct 24, 2022 at 04:10:55AM +0900, Masahiro Yamada wrote:
> > Since commit d05377e184fc ("kconfig: Create links to main menu items
> > in search"), menuconfig shows a jump key next to "Main menu" if the
> > nearest visible parent is the rootmenu. If you press that jump key,
> > menuconfig crashes with a segmentation fault.
> >
> > For example, do this:
> >
> >   $ make ARCH=arm64 allnoconfig menuconfig
> >
> > Press '/' to search for the string "ACPI". Press '1' to choose
> > "(1) Main menu". Then, menuconfig crashed with a segmentation fault.
>
> You missed the prerequisites: search EFI and press 1 to jump to
> CONFIG_EFI.


Try the command in my commit description.

"allnoconfig" disables EFI.





> >
> > The following code in search_conf()
> >
> >     conf(targets[i]->parent, targets[i]);
> >
> > results in NULL pointer dereference because targets[i] is the rootmenu,
> > which does not have a parent.
> >
> > Commit d05377e184fc tried to fix the issue of top-level items not having
> > a jump key, but adding the "Main menu" was not the right fix.
> >
> > The correct fix is to show the searched item itself. This fixes another
> > weird behavior described in the comment block.
> >
> > Fixes: d05377e184fc ("kconfig: Create links to main menu items in search")
> > Reported-by: Johannes Zink <j.zink@...gutronix.de>
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > Link: https://lore.kernel.org/r/20221023191055.85098-1-masahiroy@kernel.org
>
> Missing Cc: stable? The segfault (IMO) appears after v5.15, so all
> supported stable branches are affected.



In my understanding, Fixes: is enough to automatically find which stable kernels
to which the patch should be back-ported.



>
> Anyway, the segfault gone away with this patch applied. Thanks.
>
> Tested-by: Bagas Sanjaya <bagasdotme@...il.com>
>
> --
> An old man doll... just what I always wanted! - Clara



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ