aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/can/isotp.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-05-11 14:42:04 -0500
committerDavid S. Miller <davem@davemloft.net>2021-05-11 16:22:37 -0700
commit440c3247cba3d9433ac435d371dd7927d68772a7 (patch)
treea4ce398aca85ac745d5cd6ede7e319accb981de3 /net/can/isotp.c
parentionic: fix ptp support config breakage (diff)
downloadwireguard-linux-440c3247cba3d9433ac435d371dd7927d68772a7.tar.xz
wireguard-linux-440c3247cba3d9433ac435d371dd7927d68772a7.zip
net: ipa: memory region array is variable size
IPA configuration data includes an array of memory region descriptors. That was a fixed-size array at one time, but at some point we started defining it such that it was only as big as required for a given platform. The actual number of entries in the array is recorded in the configuration data along with the array. A loop in ipa_mem_config() still assumes the array has entries for all defined memory region IDs. As a result, this loop can go past the end of the actual array and attempt to write "canary" values based on nonsensical data. Fix this, by stashing the number of entries in the array, and using that rather than IPA_MEM_COUNT in the initialization loop found in ipa_mem_config(). The only remaining use of IPA_MEM_COUNT is in a validation check to ensure configuration data doesn't have too many entries. That's fine for now. Fixes: 3128aae8c439a ("net: ipa: redefine struct ipa_mem_data") Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can/isotp.c')
0 files changed, 0 insertions, 0 deletions