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: <20240730-hid-const-fixup-v1-0-f667f9a653ba@weissschuh.net>
Date: Tue, 30 Jul 2024 23:35:56 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <bentiss@...nel.org>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH RFC 0/4] HID: constify static fixed up report descriptors

By allowing the drivers to return a "const *" they can constify their
static report arrays.
This makes it clear to driver authors that the HID core will not modify
those reports and they can be reused for multiple devices.
Furthermore security is slightly improved as those reports are protected
against accidental or malicious modifications.

This is an RFC, only the cmedia driver is updated.
compilation of any other HID driver making use of report_fixup() will fail.

Currently the series would require one big cut-over commit changing the
signatures of all report_fixup() callbacks at once, of which there are
around 50, so it wouldn't be that bad.
All other preparations and actual constifications can be done one a
per-driver basis.

Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
Thomas Weißschuh (4):
      HID: treat fixed up report as const
      HID: cmedia: directly return fixed up rdesc
      HID: change return type of report_fixup() to const
      HID: cmedia: constify fixed up report descriptor

 drivers/hid/hid-cmedia.c     | 6 +++---
 drivers/hid/hid-core.c       | 7 ++++---
 drivers/hid/hid-sensor-hub.c | 2 +-
 include/linux/hid.h          | 2 +-
 4 files changed, 9 insertions(+), 8 deletions(-)
---
base-commit: c91a7dee0555f6f9d3702d86312382e4c4729d0a
change-id: 20240730-hid-const-fixup-8b01cbda1b49

Best regards,
-- 
Thomas Weißschuh <linux@...ssschuh.net>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ