linux-stable/tools
Chen Yu 0bc23d8b22 ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range
The user provides arbitrary non-numeic value to level and type,
which could bring unexpected behavior. In this case the expected
behavior would be to throw an error.

 pfrut -h
usage: pfrut [OPTIONS]
code injection:
-l, --load
-s, --stage
-a, --activate
-u, --update [stage and activate]
-q, --query
-d, --revid
update telemetry:
-G, --getloginfo
-T, --type(0:execution, 1:history)
-L, --level(0, 1, 2, 4)
-R, --read
-D, --revid log

 pfrut -T A
 pfrut -G
log_level:0
log_type:0
log_revid:2
max_data_size:65536
chunk1_size:0
chunk2_size:1530
rollover_cnt:0
reset_cnt:17

Fix this by restricting the input to be in the expected range.

Reported-by: Hariganesh Govindarajulu <hariganesh.govindarajulu@intel.com>
Suggested-by: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-03-14 20:38:13 +01:00
..
accounting
arch perf tools fixes for v6.3: 2023-03-10 08:18:46 -08:00
bootconfig tools/bootconfig: fix single & used for logical condition 2023-02-22 08:27:35 +09:00
bpf bpftool: Use bpf_{btf,link,map,prog}_get_info_by_fd() 2023-02-16 15:32:45 -08:00
build tools build: Add test echo-cmd 2023-02-03 13:54:22 -03:00
certs
cgroup tools:cgroup:memcg_shrinker remove redundant import 2023-01-18 17:12:59 -08:00
counter
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-01-27 14:05:46 +01:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-01-21 17:52:26 +00:00
include perf tools fixes for v6.3: 2023-03-10 08:18:46 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib tracing updates for 6.3: 2023-02-23 10:20:49 -08:00
memory-model
mm tools/mm: allow users to provide additional cflags/ldflags 2023-02-02 22:33:24 -08:00
net/ynl tools: ynl: fix enum-as-flags in the generic CLI 2023-03-08 23:28:21 -08:00
objtool Changes in this cycle were: 2023-03-02 09:45:34 -08:00
pci
pcmcia
perf perf tools fixes for v6.3: 2023-03-10 08:18:46 -08:00
power ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range 2023-03-14 20:38:13 +01:00
rcu
scripts tools: Add LoongArch build infrastructure 2023-02-25 22:12:18 +08:00
spi
testing kernel.fork.v6.3-rc2 2023-03-12 09:04:28 -07:00
thermal
time
tracing tracing updates for 6.3: 2023-02-23 10:20:49 -08:00
usb
verification tools/rv: Remove unneeded semicolon 2023-01-31 19:21:12 -05:00
virtio tools/virtio: enable to build with retpoline 2023-02-20 19:26:59 -05:00
wmi
Makefile