<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hid/hid-apple.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-02T11:25:20+00:00</updated>
<entry>
<title>HID: apple: avoid memory leak in apple_report_fixup()</title>
<updated>2026-04-02T11:25:20+00:00</updated>
<author>
<name>Günther Noack</name>
<email>gnoack@google.com</email>
</author>
<published>2026-02-19T15:43:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e652ebd29928181c3e6820e303da25873e9917d4'/>
<id>urn:sha1:e652ebd29928181c3e6820e303da25873e9917d4</id>
<content type='text'>
[ Upstream commit 239c15116d80f67d32f00acc34575f1a6b699613 ]

The apple_report_fixup() function was returning a
newly kmemdup()-allocated buffer, but never freeing it.

The caller of report_fixup() does not take ownership of the returned
pointer, but it *is* permitted to return a sub-portion of the input
rdesc, whose lifetime is managed by the caller.

Assisted-by: Gemini-CLI:Google Gemini 3
Signed-off-by: Günther Noack &lt;gnoack@google.com&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: apple: Add EPOMAKER TH87 to the non-apple keyboards list</title>
<updated>2026-04-02T11:25:17+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2026-02-24T09:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e14511eab84873e111842a0c3ad4806e1e22407c'/>
<id>urn:sha1:e14511eab84873e111842a0c3ad4806e1e22407c</id>
<content type='text'>
[ Upstream commit 7c698de0dc5daa1e1a5fd1f0c6aa1b6bb2f5d867 ]

EPOMAKER TH87 has the very same ID as Apple Aluminum keyboard
(05ac:024f) although it doesn't work as expected in compatible way.

Put three entries to the non-apple keyboards list to exclude this
device: one for BT ("TH87"), one for USB ("HFD Epomaker TH87") and one
for dongle ("2.4G Wireless Receiver").

Link: https://bugzilla.suse.com/show_bug.cgi?id=1258455
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: apple: Add "SONiX KN85 Keyboard" to the list of non-apple keyboards</title>
<updated>2026-03-04T12:19:58+00:00</updated>
<author>
<name>Joey Bednar</name>
<email>linux@joeybednar.com</email>
</author>
<published>2025-11-12T06:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e5fa2228a4fa7288e091f603cf9e5dd9abf44da'/>
<id>urn:sha1:7e5fa2228a4fa7288e091f603cf9e5dd9abf44da</id>
<content type='text'>
[ Upstream commit 7273acfd0aef106093a8ffa3b4973eb70e5a3799 ]

The SoNiX KN85 keyboard identifies as the "Apple, Inc. Aluminium
Keyboard" and is not recognized as a non-apple keyboard. Adding "SoNiX
KN85 Keyboard" to the list of non-apple keyboards fixes the function
keys.

Signed-off-by: Joey Bednar &lt;linux@joeybednar.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: apple: Add SONiX AK870 PRO to non_apple_keyboards quirk list</title>
<updated>2025-10-30T10:54:00+00:00</updated>
<author>
<name>April Grimoire</name>
<email>april@aprilg.moe</email>
</author>
<published>2025-10-22T16:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=743c81cdc98fd4fef62a89eb70efff994112c2d9'/>
<id>urn:sha1:743c81cdc98fd4fef62a89eb70efff994112c2d9</id>
<content type='text'>
SONiX AK870 PRO keyboard pretends to be an apple keyboard by VID:PID,
rendering function keys not treated properly. Despite being a
SONiX USB DEVICE, it uses a different name, so adding it to the list.

Signed-off-by: April Grimoire &lt;april@aprilg.moe&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-6.17/battery-timer-fixes' into for-linus</title>
<updated>2025-07-31T20:42:08+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.com</email>
</author>
<published>2025-07-31T20:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=069e79a08103c684d31b638cbed82fcc3ac0fad3'/>
<id>urn:sha1:069e79a08103c684d31b638cbed82fcc3ac0fad3</id>
<content type='text'>
- avoid setting up battery timer for Apple and Magicmouse devices without
  battery (Aditya Garg)
</content>
</entry>
<entry>
<title>Merge branch 'for-6.17/apple' into for-linus</title>
<updated>2025-07-31T20:37:59+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.com</email>
</author>
<published>2025-07-31T20:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96ba894dc209cf833abc2ccdca2dc0ad5f01eefe'/>
<id>urn:sha1:96ba894dc209cf833abc2ccdca2dc0ad5f01eefe</id>
<content type='text'>
- fix for potential NULL pointer dereference in hid-apple that could be caused
  by malicious device with APPLE_MAGIC_BACKLIGHT quirk present triggering
  overflow in data field (Qasim Ijaz)

- third party trackpart support for MacBookPro15,1 (Aditya Garg)

- Apple Magic Keyboard A311[89] USB-C support (Aditya Garg, Grigorii Sokolik)
</content>
</entry>
<entry>
<title>HID: apple: validate feature-report field count to prevent NULL pointer dereference</title>
<updated>2025-07-18T16:10:57+00:00</updated>
<author>
<name>Qasim Ijaz</name>
<email>qasdev00@gmail.com</email>
</author>
<published>2025-07-13T23:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bb3363da862e0464ec050eea2fb5472a36ad86b'/>
<id>urn:sha1:1bb3363da862e0464ec050eea2fb5472a36ad86b</id>
<content type='text'>
A malicious HID device with quirk APPLE_MAGIC_BACKLIGHT can trigger a NULL
pointer dereference whilst the power feature-report is toggled and sent to
the device in apple_magic_backlight_report_set(). The power feature-report
is expected to have two data fields, but if the descriptor declares one
field then accessing field[1] and dereferencing it in
apple_magic_backlight_report_set() becomes invalid
since field[1] will be NULL.

An example of a minimal descriptor which can cause the crash is something
like the following where the report with ID 3 (power report) only
references a single 1-byte field. When hid core parses the descriptor it
will encounter the final feature tag, allocate a hid_report (all members
of field[] will be zeroed out), create field structure and populate it,
increasing the maxfield to 1. The subsequent field[1] access and
dereference causes the crash.

  Usage Page (Vendor Defined 0xFF00)
  Usage (0x0F)
  Collection (Application)
    Report ID (1)
    Usage (0x01)
    Logical Minimum (0)
    Logical Maximum (255)
    Report Size (8)
    Report Count (1)
    Feature (Data,Var,Abs)

    Usage (0x02)
    Logical Maximum (32767)
    Report Size (16)
    Report Count (1)
    Feature (Data,Var,Abs)

    Report ID (3)
    Usage (0x03)
    Logical Minimum (0)
    Logical Maximum (1)
    Report Size (8)
    Report Count (1)
    Feature (Data,Var,Abs)
  End Collection

Here we see the KASAN splat when the kernel dereferences the
NULL pointer and crashes:

  [   15.164723] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] SMP KASAN NOPTI
  [   15.165691] KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037]
  [   15.165691] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.15.0 #31 PREEMPT(voluntary)
  [   15.165691] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
  [   15.165691] RIP: 0010:apple_magic_backlight_report_set+0xbf/0x210
  [   15.165691] Call Trace:
  [   15.165691]  &lt;TASK&gt;
  [   15.165691]  apple_probe+0x571/0xa20
  [   15.165691]  hid_device_probe+0x2e2/0x6f0
  [   15.165691]  really_probe+0x1ca/0x5c0
  [   15.165691]  __driver_probe_device+0x24f/0x310
  [   15.165691]  driver_probe_device+0x4a/0xd0
  [   15.165691]  __device_attach_driver+0x169/0x220
  [   15.165691]  bus_for_each_drv+0x118/0x1b0
  [   15.165691]  __device_attach+0x1d5/0x380
  [   15.165691]  device_initial_probe+0x12/0x20
  [   15.165691]  bus_probe_device+0x13d/0x180
  [   15.165691]  device_add+0xd87/0x1510
  [...]

To fix this issue we should validate the number of fields that the
backlight and power reports have and if they do not have the required
number of fields then bail.

Fixes: 394ba612f941 ("HID: apple: Add support for magic keyboard backlight on T2 Macs")
Cc: stable@vger.kernel.org
Signed-off-by: Qasim Ijaz &lt;qasdev00@gmail.com&gt;
Reviewed-by: Orlando Chamberlain &lt;orlandoch.dev@gmail.com&gt;
Tested-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Link: https://patch.msgid.link/20250713233008.15131-1-qasdev00@gmail.com
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: apple: use secs_to_jiffies() for battery timeout</title>
<updated>2025-07-03T07:41:56+00:00</updated>
<author>
<name>Aditya Garg</name>
<email>gargaditya08@live.com</email>
</author>
<published>2025-06-30T12:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6907c976fff38710406fa148cd82e892e7292d56'/>
<id>urn:sha1:6907c976fff38710406fa148cd82e892e7292d56</id>
<content type='text'>
The kernel now has a secs_to_jiffies() function which expands to a simpler
code than msecs_to_jiffies(). Use the same for battery timeout which was
using 60000 milliseconds (60 seconds).

Signed-off-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: apple: avoid setting up battery timer for devices without battery</title>
<updated>2025-07-03T07:41:40+00:00</updated>
<author>
<name>Aditya Garg</name>
<email>gargaditya08@live.com</email>
</author>
<published>2025-06-30T12:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c061046fe9ce3ff31fb9a807144a2630ad349c17'/>
<id>urn:sha1:c061046fe9ce3ff31fb9a807144a2630ad349c17</id>
<content type='text'>
Currently, the battery timer is set up for all devices using hid-apple,
irrespective of whether they actually have a battery or not.

APPLE_RDESC_BATTERY is a quirk that indicates the device has a battery
and needs the battery timer. This patch checks for this quirk before
setting up the timer, ensuring that only devices with a battery will
have the timer set up.

Fixes: 6e143293e17a ("HID: apple: Report Magic Keyboard battery over USB")
Cc: stable@vger.kernel.org
Signed-off-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: apple: Add necessary IDs and support for replacement trackpad on MacBookPro15,1</title>
<updated>2025-06-10T19:22:30+00:00</updated>
<author>
<name>Aditya Garg</name>
<email>gargaditya08@live.com</email>
</author>
<published>2025-05-19T12:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a71338bb8bb1bbaa43e682137d8dc484a1391ea6'/>
<id>urn:sha1:a71338bb8bb1bbaa43e682137d8dc484a1391ea6</id>
<content type='text'>
Some third party trackpad replacements like that of HAWSON may have a
different PID than the stock trackpad. This commit adds one such trackpad
to hid-apple, available for MacBookPro15,1

Signed-off-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
</feed>
