Add check for minimum length before typecasting to build mask
structure to prevent out of bound access while processing
get msg mask command.
CRs-Fixed: 2431047
Change-Id: I5b8341f278b0b46359800e43c604c5671261c728
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
There is a possibility of use-after-free and
double free because of not marking buffer as
NULL after freeing. The patch marks buffer
as NULL after freeing in error case.
Change-Id: Iacf8f8a4a4e644f48c87d5445ccd594766f2e156
Signed-off-by: Hardik Arya <harya@codeaurora.org>
Move the mask_info mutex initialization outside mask structure
to facilitate prevention of out of bound access while initializing
msg mask during md session creation. Use separate msg_mask_tbl_count
for ODL session msg mask and regular msg mask to prevent out of
bound access in a possible race condition of accessing mask ranges.
Change-Id: I87497c67daff8cc1797a1266d50456bdbd3a9c23
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
The chances of accessing uninitialized mask is prevented
by adding null pointer checks for the mask structure and its
member pointer.
Change-Id: Ibf0467228794b773fc2537d34f1da6719bbb975a
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Currently, mutex protection is missing while accessing md session's
info via macro. The patch adds proper protection before accessing
the same.
Change-Id: I17b18183407279447229783fd0165337bd173423
Signed-off-by: Hardik Arya <harya@codeaurora.org>
Currently, reallocated mask update buffers are not
updated if the received mask range is more than the
mask update buffer length. Update the reallocated buffer
address before writing the mask to peripherals.
CRs-Fixed: 2266693
Change-Id: I6b506ce68e17b7da61926b0f9543157812a8c555
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Currently, mask pointers are not updated in
case peripherals are supporting more mask
tables. The patch updates the mask pointers
properly.
Change-Id: I1360c722076fca0215e0ccd28247c4741a1ebd88
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Currently there is a possibility of accessing freed mdlog
session info and it's attributes after closing the session.
The patch adds protection while accessing mdlog session info
for preventing use-after-free issue.
CRs-Fixed: 2133028
Change-Id: Iba603bc2d75f84a604df2627e8fcb2a18acf4637
Signed-off-by: Hardik Arya <harya@codeaurora.org>
Currently there is a possibility of NULL pointer
dereference issue due to NULL pointers checks are
missing for mask info. The patch fixes the issue by
adding NULL pointer checks.
CRs-Fixed: 2108911
Change-Id: I097aeacc90c8d88034bf799ee4e398ddda5e23f1
Signed-off-by: Hardik Arya <harya@codeaurora.org>
The patch synchronizes msg mask read and write on a peripheral
by proper protection of mask_info and msg_mask_table_count.
CRs-Fixed: 2042362, 2055291
Change-Id: If136012855834b0b8cba91eb66bf711750e8f372
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Currently, there is a possibility of using already freed
memory device session members during mask updates. The
patch fixes the issue by adding proper protection.
CRs-Fixed: 2074264
Change-Id: Iff2009a498506ffe574655badfe0a0f9f0dece9a
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Update the diag headers and msg mask tables to account
for a new ssid group.
CRs-Fixed: 2055789
Change-Id: I3abd816d5e99bff263b753fb1070a2672ecea46c
Signed-off-by: Chris Lew <clew@codeaurora.org>
Currently, masks are not getting enabled on peripherals
when launching user pd memory device session. The patch
takes care to enable the masks properly.
CRs-Fixed: 2051486
Change-Id: I8aa38310f5ec20a41aa0a0e123033d6c8cb38d48
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
This fix removes dependency between real time message mask
table and build time message mask table. Also this fix
synchronizes retrieval and modification of real time message
mask table.
CRs-Fixed: 2015227
Change-Id: Id0a0964337ec4645d7061fc35120dfa061a990ff
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
This patch segregates different PD data onto separate buffers
and then onto its own data stream.
CRs-Fixed: 2019189
Change-Id: I09c4e1a7da0ccd3ba3e025e9f13da0fbcb95f103
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This patch adds a way to publish APPS support
of untagging header only to selected peripherals.
CRs-Fixed: 2030651
Change-Id: I2a2a03d0a6d441d23ec093ff5de9bef5e9799d24
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This patch provides the support for segregate different PD data onto
separate buffers and then onto its own data stream based on received
diag private id header from the peripheral data packets.
This patch adds a new feature mask supporting the feature and
a new IOCTL querying the support of the feature.
CRs-Fixed: 1112307
Change-Id: Id76e718f83e09defc221f9ee169d4676d8e57d8a
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Currently, NULL pointer checks are missing in mask
update functions which might lead to NULL pointer
dereference issues. This patch fixes the issue by
adding appropriate checks.
CRs-Fixed: 2015104
Change-Id: I9df99208e283c8d90921c6e20a6a80f88c18a327
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
This patch clears the peripheral masks upon the mdlog exit
and USB disconnection. This enables to keep the data and
cmd channel open for read.
CRs-Fixed: 1057143
Change-Id: Ie6f19319b75f3bf389ddd5a8168fd3bcd3efbc8b
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This patch addresses kernel addresses leak by changing
the format specifier to adhere to the kptr_restrict system setting.
CRs-Fixed: 987013
Change-Id: I32649a26f54d96c56d80aa2a1bd5f5d9dd0dd9d3
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Add handling for extended header packets going
to the DCI stream. Set new bit in feature mask
to signal support for extended headers over DCI.
CRs-Fixed: 998973
Change-Id: I8badb0aa9e6ff604d8d0b2a932df0ea5ef6a70f9
Signed-off-by: Chris Lew <clew@codeaurora.org>
This patch updates the stale pointer corrupted at
specific ssid ranges.
This patch also addresses wrong range tools value
updation.
CRs-Fixed: 980487
Change-Id: I2b8afcef25dceb76118b803c67f4c5656feae82b
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Setting message masks with tools outside of the initial range
causes a reallocation of the structure with the wrong size.
This change updates the sizes to the correct values.
Change-Id: I8bb0d0b77cd4d2417b10345b6e4b09ff29ba5f8c
Signed-off-by: Christopher Lew <clew@codeaurora.org>