android_kernel_oneplus_msm8998/drivers/base/regmap
Vidyakumar Athota fba97387be ASoC: soundwire: fix out of boundary access issues
In soundwire read/write commands, register value is defined
as 8 bit but it is accessed through 32 bit pointer which
may cause out of boundary memory access. Fix this issue by
typecast appropriately.

BUG: KASan: out of bounds access in swrm_read+0x1dc/0x30c at
addr ffffffc089871880
Write of size 4 by task kworker/u8:5/236
==addr ffffffc089871880
[<ffffffc00081d174>] swrm_read+0x1d8/0x30c
[<ffffffc000819808>] swr_read+0x5c/0x74
[<ffffffc000741e58>] regmap_swr_read+0xd8/0x11c
[<ffffffc00073a350>] _regmap_raw_read+0x210/0x314
[<ffffffc00073a4b0>] _regmap_bus_read+0x5c/0xb4
[<ffffffc000739548>] _regmap_read+0xe0/0x1ec
[<ffffffc0007396b8>] regmap_read+0x64/0xa8
[<ffffffc000dc9dd4>] snd_soc_component_read+0x34/0x70
[<ffffffc000dc9f44>] snd_soc_read+0x6c/0x94
Memory state around the buggy address:
 ffffffc089871780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc089871800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc

Change-Id: I3c56dffb4ca197e8fc23d54a44282a60254dd001
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-14 23:06:47 -07:00
..
internal.h regmap: improve debugfs interface to dump specific addresses 2016-05-11 17:44:12 -07:00
Kconfig regmap: Add soundwire bus support 2016-03-23 20:11:01 -07:00
Makefile regmap: Add soundwire bus support 2016-03-23 20:11:01 -07:00
regcache-flat.c regmap: cache: Sort include headers alphabetically 2014-10-20 12:25:06 +01:00
regcache-lzo.c debugfs: Pass bool pointer to debugfs_create_bool() 2015-10-04 11:36:07 +01:00
regcache-rbtree.c regmap: regcache-rbtree: Clean new present bits on present bitmap resize 2015-07-29 15:10:13 +01:00
regcache.c regmap: call regmap_raw_multi_reg_write from regcache sync 2016-03-23 21:23:59 -07:00
regmap-ac97.c regmap: Move documentation to regmap.h 2015-08-11 17:21:44 +01:00
regmap-debugfs.c regmap: initialize dump count to 1 2016-07-11 11:43:56 -07:00
regmap-i2c.c Merge remote-tracking branches 'regmap/topic/lockdep' and 'regmap/topic/seq-delay' into regmap-next 2015-09-04 17:22:10 +01:00
regmap-irq.c regmap: irq: add ack_invert flag for chips using cleared bits as ack 2015-09-17 11:46:10 +01:00
regmap-mmio.c regmap: Move documentation to regmap.h 2015-08-11 17:21:44 +01:00
regmap-spi.c regmap: Move documentation to regmap.h 2015-08-11 17:21:44 +01:00
regmap-spmi.c regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case 2016-04-18 17:30:06 -07:00
regmap-swr.c ASoC: soundwire: fix out of boundary access issues 2016-08-14 23:06:47 -07:00
regmap.c regmap: Provide access to regmap_raw_multi_reg_write API 2016-03-23 20:11:10 -07:00
trace.h regmap: Move tracing header into drivers/base/regmap 2015-03-19 22:22:45 +00:00