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: <20230920-kunit-kasan-fixes-v1-0-1a0fc261832d@riseup.net>
Date:   Wed, 20 Sep 2023 03:11:35 -0300
From:   Arthur Grillo <arthurgrillo@...eup.net>
To:     David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
        Maxime Ripard <mripard@...nel.org>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Brendan Higgins <brendan.higgins@...ux.dev>,
        David Gow <davidgow@...gle.com>
Cc:     tales.aparecida@...il.com, andrealmeid@...eup.net,
        mairacanal@...eup.net, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, kunit-dev@...glegroups.com,
        Arthur Grillo <arthurgrillo@...eup.net>
Subject: [PATCH 0/3] Fix a couble of bugs in drm_kunit_helpers.c

This patchset started when I found a use-after-free error reported by
KASAN while running some tests that did some mocking. When trying to fix
the initial problem, I found another noon-related one.

The second bug is just a wrong argument passed to a kunit_release_action
call. Patch #1 solves that.

Patches #2 and #3 solve the use-after-free bug. This error was a bit
trickier to find. Basically, the usual order in which the kunit_actions
run is the culprit, so #2 creates a helper function to reorder actions,
and #3 uses that helper.

Signed-off-by: Arthur Grillo <arthurgrillo@...eup.net>
---
Arthur Grillo (3):
      drm/tests: Fix kunit_release_action ctx argument
      kunit: Add kunit_move_action_to_top_or_reset() to reorder actions
      drm/tests: Fix a use-after-free bug in __drm_kunit_helper_alloc_drm_device()

 drivers/gpu/drm/tests/drm_kunit_helpers.c | 18 +++++++++++++++++-
 include/kunit/resource.h                  | 17 +++++++++++++++++
 lib/kunit/resource.c                      | 19 +++++++++++++++++++
 3 files changed, 53 insertions(+), 1 deletion(-)
---
base-commit: 37454bcbb68601c326b58ac45f508067047d791f
change-id: 20230918-kunit-kasan-fixes-88ee78002078

Best regards,
-- 
Arthur Grillo <arthurgrillo@...eup.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ