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]
Message-ID: <fb600754-30c9-2ff7-dc95-7f7fc4c7aefb@cybernetics.com>
Date:   Wed, 1 Dec 2021 14:40:47 -0500
From:   Tony Battersby <tonyb@...ernetics.com>
To:     Tal Gilboa <talgi@...dia.com>, netdev@...r.kernel.org
Subject: dim_calc_stats() may cause uninitialized values to be used

I am reporting the following possible logic bug:

lib/dim/dim.c::dim_calc_stats() doesn't set curr_stats if delta_us == 0,
which would result in using uninitialized values in net_dim_decision()
and rdma_dim_decision().

I don't know anything about this code.  I encountered this only as a
compiler warning compiling an out-of-tree module that had a copy of
dim_calc_stats() inlined for compatibility with old kernels, and I
decided to investigate and report.  There is no compiler warning in
mainline since dim_calc_stats() and net_dim() are in separate C files so
the compiler can't fully analyze it, but it looks like mainline has the
problem also, if the delta_us == 0 condition is possible.

Tony Battersby
Cybernetics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ