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: <20240425-cbl-bcm-assign-counted-by-val-before-access-v1-0-e2db3b82d5ef@kernel.org>
Date: Thu, 25 Apr 2024 09:55:50 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Michael Turquette <mturquette@...libre.com>, 
 Stephen Boyd <sboyd@...nel.org>, 
 Florian Fainelli <florian.fainelli@...adcom.com>
Cc: Kees Cook <keescook@...omium.org>, 
 "Gustavo A. R. Silva" <gustavoars@...nel.org>, 
 bcm-kernel-feedback-list@...adcom.com, linux-clk@...r.kernel.org, 
 linux-rpi-kernel@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org, 
 linux-hardening@...r.kernel.org, patches@...ts.linux.dev, 
 llvm@...ts.linux.dev, stable@...r.kernel.org, 
 Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH 0/2] clk: bcm: Move a couple of __counted_by
 initializations

Hi all,

This series addresses two UBSAN warnings I see on my Raspberry Pi 4 with
recent releases of clang that support __counted_by by moving the
initializations of the element count member before any accesses of the
flexible array member.

I marked these for stable because more distributions are enabling the
bounds sanitizer [1][2], so the warnings will show up when the kernel is
built with a compiler that supports __counted_by, so it seems worth
fixing this for future users.

[1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1914685
[2]: https://src.fedoraproject.org/rpms/kernel/c/79a2207963b8fea452acfc5dea13ed54bd36c7e1

---
Nathan Chancellor (2):
      clk: bcm: dvp: Assign ->num before accessing ->hws
      clk: bcm: rpi: Assign ->num before accessing ->hws

 drivers/clk/bcm/clk-bcm2711-dvp.c | 3 ++-
 drivers/clk/bcm/clk-raspberrypi.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
base-commit: ed30a4a51bb196781c8058073ea720133a65596f
change-id: 20240424-cbl-bcm-assign-counted-by-val-before-access-cf19d630f2b4

Best regards,
-- 
Nathan Chancellor <nathan@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ