diff options
author | Dan Carpenter <[email protected]> | 2020-02-25 19:20:06 +0300 |
---|---|---|
committer | Dan Williams <[email protected]> | 2020-02-28 18:21:52 -0800 |
commit | 01091c496f920e634ea84b689f480c39016752a8 (patch) | |
tree | d099cc67c80a8977c3e8fbe729b51667effa4534 /scripts/gdb/linux/timerlist.py | |
parent | c0e71d602053e4e7637e4bc7d0bc9603ea77a33f (diff) |
acpi/nfit: improve bounds checking for 'func'
The 'func' variable can come from the user in the __nd_ioctl(). If it's
too high then the (1 << func) shift in acpi_nfit_clear_to_send() is
undefined. In acpi_nfit_ctl() we pass 'func' to test_bit(func, &dsm_mask)
which could result in an out of bounds access.
To fix these issues, I introduced the NVDIMM_CMD_MAX (31) define and
updated nfit_dsm_revid() to use that define as well instead of magic
numbers.
Fixes: 11189c1089da ("acpi/nfit: Fix command-supported detection")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions