Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] USB: Buffer overflow patch for Yealink driver

Just a small patch that fixes a small parameter validation bug.

drivers/usb/input/map_to_7segment.h:
This patch fixes the broken parameter validation in the char to seg7
conversion. This could cause out-of-bounds memory references.

MAINTAINERS:
Yealink maintainer info now in sorted order.

Documentation/input/yealink.txt:
Added a Q&A section that answers some common questions.

Signed-off-by: Henk <Henk.Vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

006491df1a13f85ad245d1039dfdf20e49c394fd

authored by

Henk and committed by
Greg Kroah-Hartman
af64a5eb b81d3436

+23 -10
+16 -3
Documentation/input/yealink.txt
··· 2 2 3 3 0. Status 4 4 ~~~~~~~~~ 5 - 6 5 The p1k is a relatively cheap usb 1.1 phone with: 7 6 - keyboard full support, yealink.ko / input event API 8 7 - LCD full support, yealink.ko / sysfs API ··· 16 17 17 18 1. Compilation (stand alone version) 18 19 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 - 20 20 Currently only kernel 2.6.x.y versions are supported. 21 - In order to build the yealink.ko module do: 21 + In order to build the yealink.ko module do 22 22 23 23 make 24 24 ··· 25 27 the Makefile is pointing to the location where your kernel sources 26 28 are located, default /usr/src/linux. 27 29 30 + 31 + 1.1 Troubleshooting 32 + ~~~~~~~~~~~~~~~~~~~ 33 + Q: Module yealink compiled and installed without any problem but phone 34 + is not initialized and does not react to any actions. 35 + A: If you see something like: 36 + hiddev0: USB HID v1.00 Device [Yealink Network Technology Ltd. VOIP USB Phone 37 + in dmesg, it means that the hid driver has grabbed the device first. Try to 38 + load module yealink before any other usb hid driver. Please see the 39 + instructions provided by your distribution on module configuration. 40 + 41 + Q: Phone is working now (displays version and accepts keypad input) but I can't 42 + find the sysfs files. 43 + A: The sysfs files are located on the particular usb endpoint. On most 44 + distributions you can do: "find /sys/ -name get_icons" for a hint. 28 45 29 46 30 47 2. keyboard features
+6 -6
MAINTAINERS
··· 116 116 L: linux-hams@vger.kernel.org 117 117 S: Maintained 118 118 119 - YEALINK PHONE DRIVER 120 - P: Henk Vergonet 121 - M: Henk.Vergonet@gmail.com 122 - L: usbb2k-api-dev@nongnu.org 123 - S: Maintained 124 - 125 119 8139CP 10/100 FAST ETHERNET DRIVER 126 120 P: Jeff Garzik 127 121 M: jgarzik@pobox.com ··· 2855 2861 P: Jean-Paul Roubelat 2856 2862 M: jpr@f6fbb.org 2857 2863 L: linux-hams@vger.kernel.org 2864 + S: Maintained 2865 + 2866 + YEALINK PHONE DRIVER 2867 + P: Henk Vergonet 2868 + M: Henk.Vergonet@gmail.com 2869 + L: usbb2k-api-dev@nongnu.org 2858 2870 S: Maintained 2859 2871 2860 2872 YMFPCI YAMAHA PCI SOUND (Use ALSA instead)
+1 -1
drivers/usb/input/map_to_7segment.h
··· 79 79 80 80 static inline int map_to_seg7(struct seg7_conversion_map *map, int c) 81 81 { 82 - return c & 0x7f ? map->table[c] : -EINVAL; 82 + return c >= 0 && c < sizeof(map->table) ? map->table[c] : -EINVAL; 83 83 } 84 84 85 85 #define SEG7_CONVERSION_MAP(_name, _map) \