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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 3 Aug 2021 16:23:26 +0100
From:   Colin Ian King <>
To:     Angelo Dureghello <>
Cc:     Wolfgang Grandegger <>,
        Marc Kleine-Budde <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,,
        "" <>,
        "" <>
Subject: re: can: flexcan: add mcf5441x support


Static analysis of linux-next with Coverity has detected a potential
issue with the following commit:

commit d9cead75b1c66b4660b4f87ff339234042d7c6a5
Author: Angelo Dureghello <>
Date:   Fri Jul 2 11:48:41 2021 +0200

    can: flexcan: add mcf5441x support

The analysis is as follows:

650 static int flexcan_clks_enable(const struct flexcan_priv *priv)
651 {

   1. var_decl: Declaring variable err without initializer.

652        int err;

   2. Condition priv->clk_ipg, taking false branch.

654        if (priv->clk_ipg) {
655                err = clk_prepare_enable(priv->clk_ipg);
656                if (err)
657                        return err;
658        }

   3. Condition priv->clk_per, taking false branch.

660        if (priv->clk_per) {
661                err = clk_prepare_enable(priv->clk_per);
662                if (err)
663                        clk_disable_unprepare(priv->clk_ipg);
664        }

   Uninitialized scalar variable (UNINIT)
   4. uninit_use: Using uninitialized value err.

666        return err;
667 }

I'm not sure if it's possible for priv->clk_ipg and priv_clk_per to both
be null, so I'm not sure if err can end up being not set. However, it
does seem that either err should be zero or some err value, but I was
unsure how err should be initialized in this corner case. As it stands,
err probably needs to be set just to be safe.


Powered by blists - more mailing lists