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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87k0yzoge8.fsf@nanos.tec.linutronix.de>
Date:   Sun, 19 Jul 2020 14:09:35 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Muchun Song <songmuchun@...edance.com>, peterz@...radead.org,
        mingo@...nel.org, bigeasy@...utronix.de, namit@...are.com
Cc:     linux-kernel@...r.kernel.org,
        Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH v2] smp: Fix a potential usage of stale nr_cpus

Muchun Song <songmuchun@...edance.com> writes:

> When the cmdline of "nr_cpus" is not valid, the @nr_cpu_ids is assigned
> a stale value. The nr_cpus is only valid when get_option() return 1. So
> check the return value to prevent this.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
> changelog in v2:
>  1) Rework the commit log.
>  2) Rework the return value check.

I asked:

>> So why fixing it just half and why returning '0' aka success if the
>> parameter is bogus?

And this still returns 0 if the parameter is bogus or malformatted....

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ