mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
msm: ipa: Null terminated interface name string argument
received from ioctl WAN MTU IOCTL received NULL terminated the interface name string to prevent out of bound memory access while printing interface name. Change-Id: I4ca8021e91689f2b1bf0bef7917a5fc7c2168aef Signed-off-by: Avinash Kumar <quic_avku@quicinc.com> (cherry picked from commit b639c459e4f7eedc361cee795489de3d379e7e0c)
This commit is contained in:
parent
c099b88b49
commit
75044ebe4b
1 changed files with 4 additions and 0 deletions
|
|
@ -4950,6 +4950,10 @@ int rmnet_ipa3_get_wan_mtu(
|
|||
int rmnet_index;
|
||||
|
||||
mux_channel = rmnet_ipa3_ctx->mux_channel;
|
||||
|
||||
/* prevent string buffer overflows */
|
||||
data->if_name[IPA_RESOURCE_NAME_MAX-1] = '\0';
|
||||
|
||||
rmnet_index =
|
||||
find_vchannel_name_index(data->if_name);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue