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: <20231121-jag-fix_out_of_bounds_insert-v1-0-571e76d51316@samsung.com>
Date:   Tue, 21 Nov 2023 12:02:17 +0100
From:   Joel Granados via B4 Relay 
        <devnull+j.granados.samsung.com@...nel.org>
To:     Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Shuah Khan <shuah@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kselftest@...r.kernel.org,
        Joel Granados <j.granados@...sung.com>,
        kernel test robot <oliver.sang@...el.com>
Subject: [PATCH 0/3] sysctl: Fix out of bounds access for empty syscl
 ctl_tables

Fix an out of bounds access reported in
https://lore.kernel.org/oe-lkp/202311201431.57aae8f3-oliver.sang@intel.com
Make sure that the ctl_table header size is greater than 0 before
evaluating if a ctl_table is permanently empty; this evaluation accesses
the first element regardless of the size. Adjusted the ctl_table_size of
Permanently empty ctl_table registers to 1 as they the check now
requires them to have size greater than 0. Added tests for empty
directory handling; in response to the path followed by empty ctl_tables
changing slightly. Clarified the results of sysctl self tests to more
easily identify which ones are OK, Skipped and Failed.

Comments are greatly appreciated

Best

Signed-off-by: Joel Granados <j.granados@...sung.com>
---
Joel Granados (3):
      sysctl: Fix out of bounds access for empty sysctl registers
      sysctl: Add a selftest for handling empty dirs
      sysclt: Clarify the results of selftest run

 fs/proc/proc_sysctl.c                    |   9 +-
 lib/test_sysctl.c                        |  29 ++++++
 tools/testing/selftests/sysctl/sysctl.sh | 146 ++++++++++++++++++-------------
 3 files changed, 121 insertions(+), 63 deletions(-)
---
base-commit: 8b793bcda61f6c3ed4f5b2ded7530ef6749580cb
change-id: 20231121-jag-fix_out_of_bounds_insert-86380d1bc95e

Best regards,
-- 
Joel Granados <j.granados@...sung.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ