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-next>] [day] [month] [year] [list]
Date:   Wed, 28 Oct 2020 12:00:53 +0000
From:   Colin Ian King <colin.king@...onical.com>
To:     Nishanth Menon <nm@...com>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        linux-samsung-soc@...r.kernel.org
Subject: re: PM / devfreq: map devfreq drivers to governor using name

Hi,

Static analysis of linux-next with Coverity has found a potential null
pointer dereference issue with the following commit:

commit 1b5c1be2c88e8445a20fa1929e26c37e7ca8c926
Author: Nishanth Menon <nm@...com>
Date:   Mon Oct 29 15:01:45 2012 -0500

    PM / devfreq: map devfreq drivers to governor using name


The analysis is as follows for devfreq_remove_governor in
drivers/devfreq/devfreq.c

1312

deref_ptr_in_call: Dereferencing pointer devfreq->governor.

1313                if (!strncmp(devfreq->governor->name, governor->name,
1314                             DEVFREQ_NAME_LEN)) {
1315                        /* we should have a devfreq governor! */

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking devfreq->governor suggests that it may
be null, but it has already been dereferenced on all paths leading to
the check.

1316                        if (!devfreq->governor) {
1317                                dev_warn(dev, "%s: Governor %s NOT
present\n",
1318                                         __func__, governor->name);
1319                                continue;
1320                                /* Fall through */

So devfreq->governor->name is dereferencing devfreq->governor before a
null check on devfreq->governor

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ