diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-07-29 21:03:27 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-08-09 03:04:51 +0300 |
commit | b4443423278263d229dbeee12d09e657b78d64ab (patch) | |
tree | fa8950139d03c7764f0e513ff7de510e1df90b4c /net/Kconfig.debug | |
parent | ce78e557ff8819f2d10e8d6bae79404bfbbd6809 (diff) | |
download | linux-b4443423278263d229dbeee12d09e657b78d64ab.tar.xz |
Bluetooth: ISO: Fix memory corruption
The following memory corruption can happen since iso_pinfo.base size
did not account for its headers (4 bytes):
net/bluetooth/eir.c
76 memcpy(&eir[eir_len], data, data_len);
^^^^^^^ ^^^^^^^^
77 eir_len += data_len;
78
79 return eir_len;
80 }
The "eir" buffer has 252 bytes and data_len is 252 but we do a memcpy()
to &eir[4] so this can corrupt 4 bytes beyond the end of the buffer.
Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'net/Kconfig.debug')
0 files changed, 0 insertions, 0 deletions