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] [day] [month] [year] [list]
Message-ID: <CAK7LNAT3nv2aJFvro4NmCyRNEBH_Kv=1cZaqt3PrQYGGatjnLg@mail.gmail.com>
Date:   Wed, 15 Aug 2018 12:40:36 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     linux-kbuild <linux-kbuild@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Yuexing Wang <wangyxlandq@...il.com>
Subject: Re: [PATCH] modpost: check strdup() return value

2018-08-15 5:50 GMT+09:00 Randy Dunlap <rdunlap@...radead.org>:
> From: Randy Dunlap <rdunlap@...radead.org>
>
> Fix missing error check for function strdup() in scripts/mod/modpost.c.
>
> Fixes kernel bugzilla #200319:
> https://bugzilla.kernel.org/show_bug.cgi?id=200319
>
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Yuexing Wang <wangyxlandq@...il.com>
> Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
>  scripts/mod/modpost.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20180814.orig/scripts/mod/modpost.c
> +++ linux-next-20180814/scripts/mod/modpost.c
> @@ -672,7 +672,7 @@ static void handle_modversions(struct mo
>                         if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
>                                 break;
>                         if (symname[0] == '.') {
> -                               char *munged = strdup(symname);
> +                               char *munged = NOFAIL(strdup(symname));
>                                 munged[0] = '_';
>                                 munged[1] = toupper(munged[1]);
>                                 symname = munged;
>
>


While you are here,
will you fix a little more?


line 1321:
            char *p = malloc(20);

line 1341:
            return strdup("");

line 2039:
            buf->p = realloc(buf->p, buf->size);



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ