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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 4 Oct 2022 12:52:38 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Tomislav Po┼żega <pozega.tomislav@...il.com>,
        Daniel Golle <daniel@...rotopia.org>,
        Kalle Valo <kvalo@...nel.org>
Cc:     usama.anjum@...labora.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
        Collabora Kernel ML <kernel@...labora.com>,
        kernel-janitors <kernel-janitors@...r.kernel.org>
Subject: [Bug report] Probably variable is being overwritten

Hi,

A bit in rfb0r1 is being cleared and result is stored in rfval. Then the
first bit is being set without reusing the rfval. It is probably bug or
dead code? The same pattern can be seen repeated below as well.


diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index cbbb1a4849cf..4857e3818418 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8844,7 +8844,7 @@ static void rt2800_rxiq_calibration(struct
rt2x00_dev *rt2x00dev)
        for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) {
                if (ch_idx == 0) {
                        rfval = rfb0r1 & (~0x3);
-                       rfval = rfb0r1 | 0x1;
+                       rfval = rfval | 0x1;
                        rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
                        rfval = rfb0r2 & (~0x33);
                        rfval = rfb0r2 | 0x11;


-- 
Muhammad Usama Anjum

Powered by blists - more mailing lists