linux-stable/tools
Yasunori Goto a117699c6c tools/testing/nvdimm: fix nfit_test buffer overflow
The root cause of panic is the num_pm of nfit_test1 is wrong.
Though 1 is specified for num_pm at nfit_test_init(), it must be 2,
because nfit_test1->spa_set[] array has 2 elements.

Since the array is smaller than expected, the driver breaks other area.
(it is often the link list of devres).

As a result, panic occurs like the following example.

    CPU: 4 PID: 2233 Comm: lt-libndctl Tainted: G           O    4.12.0-rc1+ #12
    RIP: 0010:__list_del_entry_valid+0x6c/0xa0
    Call Trace:
     release_nodes+0x76/0x260
     devres_release_all+0x3c/0x50
     device_release_driver_internal+0x159/0x200
     device_release_driver+0x12/0x20
     bus_remove_device+0xfd/0x170
     device_del+0x1e8/0x330
     platform_device_del+0x28/0x90
     platform_device_unregister+0x12/0x30
     nfit_test_exit+0x2a/0x93b [nfit_test]

Cc: <stable@vger.kernel.org>
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2017-06-15 14:31:41 -07:00
..
accounting
arch tools/include: Sync kernel ABI headers with tooling headers 2017-05-24 09:00:21 +02:00
build Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-15 15:50:49 -07:00
cgroup
firewire
gpio gpio-hammer: fix make consumer_label suitable to work on gpio-nails 2017-01-26 16:29:09 +01:00
hv tools: hv: Add clean up function for Ubuntu config 2017-03-06 17:10:40 -08:00
iio iio: Add channel for Gravity 2017-01-05 13:02:25 +00:00
include Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-27 09:02:41 -07:00
kvm/kvm_stat tools/kvm_stat: add '%Total' column 2017-03-29 12:01:33 +02:00
laptop
leds tools/leds: Add led_hw_brightness_mon program 2017-02-14 22:20:23 +01:00
lguest Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-15 15:50:49 -07:00
net tools: bpf_jit_disasm: Add option to dump JIT image to a file. 2017-04-13 13:04:03 -04:00
nfsd
objtool objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now 2017-04-19 13:01:44 -03:00
pci tools: PCI: Add sample test script to invoke pcitest 2017-04-28 10:23:20 -05:00
pcmcia
perf perf tools: Put caller above callee in --children mode 2017-05-24 08:41:49 +02:00
power Merge branches 'acpi-button' and 'acpi-tools' 2017-05-22 20:29:06 +02:00
scripts tools arch x86: Include asm/cmpxchg.h 2017-03-03 19:07:13 -03:00
spi spi: spidev_test: add option to continuously transfer data 2017-03-21 18:44:40 +00:00
testing tools/testing/nvdimm: fix nfit_test buffer overflow 2017-06-15 14:31:41 -07:00
thermal/tmon
time
usb usb: fix some references for /proc/bus/usb 2017-04-18 16:54:19 +02:00
virtio tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" 2017-05-09 16:43:24 +03:00
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile tools/kvm: fix top level makefile 2017-05-03 16:30:25 +02:00