summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBubble Fang <bubblefang@google.com>2023-09-04 07:09:25 +0000
committerBubble Fang <bubblefang@google.com>2023-09-26 06:40:08 +0000
commita37ceaedf6fa842c011130b3558e86dbafa2893e (patch)
tree5a0245d86c675ee1f033e580df4283f486c67fc7
parentdf1e0e6426824a5f87e31c1cd71254e492cc3644 (diff)
downloadmsm-extra-a37ceaedf6fa842c011130b3558e86dbafa2893e.tar.gz
dsp: q6core: Avoid OOB access in q6core
"num_services", a signed integer when compared with constant results in conversion of signed integer to max possible unsigned int value when "num_services" is a negative value. This can lead to OOB read. Fix is to handle this case. Bug: 295052084 Change-Id: I6b3a2939451bea905bdbf02015be294af1867b96 Signed-off-by: Bubble Fang <bubblefang@google.com>
-rw-r--r--dsp/q6core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dsp/q6core.c b/dsp/q6core.c
index dae0a03c..a58a03b3 100644
--- a/dsp/q6core.c
+++ b/dsp/q6core.c
@@ -205,7 +205,7 @@ EXPORT_SYMBOL(q6core_send_uevent);
static int parse_fwk_version_info(uint32_t *payload, uint16_t payload_size)
{
size_t ver_size;
- int num_services;
+ uint16_t num_services;
pr_debug("%s: Payload info num services %d\n",
__func__, payload[4]);