Commit graph

22 commits

Author SHA1 Message Date
Ramesh Katuri
dbf5e31aac Fix for OOB write in filter block parsing in drc
Bug: 116467350
Bug: 116469592
Test: vendor
Change-Id: I2f7bff1cec3d0d60e9d43217290392bf4e23d207
(cherry picked from commit 69a69acbc9)
2018-10-20 00:17:18 +00:00
Ramesh Katuri
6741db7ec8 Fix for OOB write in parametric drc instruction parsing
Bug: 116715245
Test: vendor
Change-Id: I24c7ce7cd8c928d53a9914d116de4c6b408cfb09
(cherry picked from commit d735e2e329)
2018-10-20 00:17:16 +00:00
Ramesh Katuri
e2f71f3e86 Fix of OOB write in drc downmix instruction count parsing
Check bounds of parsed value.

Bug: 116619387
Test: vendor
Change-Id: Iada4937f7d99744594a1d457ae1bddefe961ba4f
(cherry picked from commit df1030d8b9)
2018-10-20 00:17:14 +00:00
Ramesh Katuri
7f0108e464 Fix for OOB write in split drc characteristic parsing
added bounds check on values parsed from input stream.

Bug: 116619337
Test: vendor
Change-Id: Ia938ce45cb0503c1ddcbeaa5d036c0f57521a38f
(cherry picked from commit 599ca4428a)
2018-10-20 00:17:12 +00:00
Ramesh Katuri
d004184d5a Fix for OOB write in gain set param's parsing
Check extracted size against array sizing before proceeding.

Bug: 116715937
Test: poc
Change-Id: Ic26b85683342fa5f508b66f4ad71badb06540f17
(cherry picked from commit 90b76d9431)
2018-10-20 00:17:10 +00:00
android-build-team Robot
e9d32292cf Merge cherrypicks of [4986743, 4986744, 4987539, 4987168, 4986376, 4986377, 4986378, 4986889, 4986745, 4986746, 4986747, 4986748, 4986749, 4986750, 4986773, 4987169, 4987170, 4987611, 4987631, 4987632, 4987633, 4987634, 4986890, 4987612, 4987651, 4987598, 4987613, 4987614, 4987615, 4987599, 4986379, 4986380, 4987652, 4987653, 4987691, 4986774] into pi-qpr1-release
Change-Id: Ie4722c086f50f36ee256109cef8d5cd6432de322
2018-09-10 23:21:35 +00:00
Ramesh Katuri
aed3058dd7 Fix for global buffer overflow in scale factor processing
Number of envelopes is equal to 2^n, where n obtained by
reading 2 bits from bit stream,so maximum value for number
of envelopes is 8. Time slot array table is accessed using
number of envelopes. The Minimum and Maximum values are 0
and 6,based on these values the table is modified.

Bug:112765917
Test: re-run poc
Change-Id: I42a44fc2376536d5119a8290a14726c9c5badd19
(cherry picked from commit 61a09f1063)
2018-09-10 23:19:35 +00:00
Ramesh Katuri
c01adbdf8e Fix for crc related issues
Maximum crc registers allowed is 7. Crc registers are accessed
and updated inside the function ixheaacd_adts_crc_start_reg().
Check has been added before the function call so that if the
register value is less than 7 then only the function gets called.

Bug:112551726
Bug:112551874
Bug:112609715
Bug:112713720
Bug:112715795
Bug:113261928
Test: poc
Change-Id: I3935546b8fb3dc5c82bee16639df771349e6d2b6
(cherry picked from commit 55c1da8c37)
(cherry picked from commit b0768b0564)
2018-09-10 23:19:33 +00:00
Ramesh Katuri
4b4d251b4a Fix for NPD in case of single coupling channel element.
Reason for crash:
    For the below reported issues input stream has only one
coupling channel element. As per the specification coupling
channel element should be associated with at least one main
channel element.

We have different output buffers for main channel
and coupling channel. In this error case the coupling
channel output buffer is not getting updated because
there is no main channel, so main decode is called with
output buffer pointing to NULL.
This is the reason for all the issues listed below.

Bug:112551721
Bug:112704700
Bug:112706520
Bug:112710190
Bug:112712274
Bug:112717301
Test: re-run poc
Change-Id: Ife593ca4ae21f05555b6a89092ff76b974e28a67
(cherry picked from commit b5597cea85)
2018-09-10 23:19:31 +00:00
Ramesh Katuri
171b2f9d33 Fix for heap buffer overflow in xaac decoder init
Number of elements allowed in usac profile are 16. Erroneous input
stream in this use case has 63336 elements.We have an error
check for this max number of elements while parsing the decoder
configuration.This returned error code was not handled properly.

Maximum 16 config elements can be used while codec creation,because
of number of elements values is coming as 63336, during
creation time OOB read is happening.

Bug:112766520
Bug:112857468
Bug:112913145
Bug:112918261
Test: re-ran poc
Change-Id: If9413546371f72a6896f5c7e7d22a314e484cf76
(cherry picked from commit 4878ef09c7)
2018-09-10 23:19:28 +00:00
Ramesh Katuri
3195d044e9 DO NOT MERGE Fix for stack-buffer-overflow in mps module
While parsing the input stream in mps_pre_matrix function,
there was an error.This error was not handled properly,
because of which further values which are read from bit stream
are getting wrong values.

We use these value in iteration in ixheaacd_mps_getstridemap()
which is causing stack-buffer-overflow

Bug:112857941
Test: poc+ASAN
Change-Id: I9549b06e0e4e362f517869aef75d579e3e4140a6
(cherry picked from commit 28a1411d72)
2018-09-10 23:19:26 +00:00
Ramesh Katuri
ed646d54a5 Fix for out of bound write memory access in xheaac
The maximum number of channels supported for usac profile in
libxaac decoder is two only.Input streams of the below reported
issues contain multi channel,because of multi channel the write
offset is incremented by greater 2, which causes out of bound
memory access while writing.

Bug:112858010
Bug:112859113
Test: re-run POC
Change-Id: Ide57cb8ee39d77d0f386298e899683d460a3c18b
(cherry picked from commit 2491a07484)
2018-09-10 23:19:24 +00:00
android-build-team Robot
419260b936 Snap for 4945494 from 76b7c186f2 to pi-qpr1-release
Change-Id: I19a8ddf512cb229b9df064d1923dcd0cc0a48a55
2018-08-10 03:20:13 +00:00
TreeHugger Robot
76b7c186f2 Merge "Fix for stack corruption in esbr" into pi-dev 2018-08-09 19:20:45 +00:00
Ramesh Katuri
e43b180758 Fix for ubsan add-overflow
Bug: 110468609
Test: poc before/after
Change-Id: Ic8698c6b4eb20a1204488fc1bdd14def7fa1d171
(cherry picked from commit 9ccb84f227)
2018-07-27 22:23:11 +00:00
Ramesh Katuri
5464927f0c Fix for stack corruption in esbr
Bug: 110769924
Test: poc from bug before/after
Change-Id: I99c6e89902064849ea1310c271064bdeccf7f20e
(cherry picked from commit 7e90d745c2)
2018-07-12 23:36:28 +00:00
Ramesh Katuri
b3226ce6f8 Formatting changes
Formatting .c and .h files using clang-format
Formatting .s files

Bug: 80493357
Test: compare object sizes
Change-Id: I38296083c9d2d566a6a2564db2e391e4b2bd43a9
2018-06-07 16:52:19 -07:00
Harish Mahendrakar
8eb646f89b Collected Cleanups from Ittiam
Test: CTS android.media.cts.DecoderTest{AacDrc,XheAac}

Added __ARM_NEON__ check to generic function selector

Bug: 80432407
Change-Id: I66c7879fda1369da88ccaea5f8792ea54657cdaf

Added support to build for mips

Bug: 80432286
Change-Id: I908029bbaddd3c1fbc39be1192926b56d981576e

Add optimized versions for qmf_dec for armv7 and armv8

Separating common functions and platform specific functions
in ixheaacd_qmf_dec.c. Platform specific functions are moved
to qmf_dec in armv7, armv8 and generic folder.

Bug: 80431870
Change-Id: I860cb79a1870e228d2108b7915418e1c003cefc5

Fixes for crashes reported by Fuzzer tool

Bug: 109697676
Change-Id: I862fc054b99ee9d427d20596bc8d2e85522a7188
2018-06-05 13:04:22 -07:00
Ramesh Katuri
36ef96da45 Fix to resolve CTS test case testDecodeUsacDrcEffectTypeM4a
Bug: 80133175
Test: CTS android.metia.cts.DecoderTestXheAac
Change-Id: Ic1962238eabe4ad98e4fa0ea85acc5494e762d30
2018-06-01 09:56:14 -07:00
Ray Essick
4908247643 Sanitization fixes from new CTS tests
Updates from vendor to remedy issues exposed by new CTS tests

Bug: 77287124
Test: CTS DecoderTest, DecoderTest{AacDrc,XheAac}

@ Sanitizer fixes in libxaac

Fixes few integer overflow sanitizer errors
Progagate few errors
ENABLE_DRC macro is removed
AMMENDMENT1 macro is removed

Change-Id: Ic61163dfd6318bd4a00ed45e1295c819cb0f637b

@ Add support for audio pre-roll and DRC effect type

Also includes the following
MPEG-D DRC parameters related changes
USAC config switch changes
SBR config switch changes

Bug: 80133175
Change-Id: I0ab25641768cf523b66f7b0fcb4137429c1c4a77

@ Fixed trailing spaces

Change-Id: I32de0c9d3f7237e1fbf8dfef1cac485ef8458173

@ Replaced tabs

Change-Id: Ic741ee13d7b978b37edc27d087903caaa40b8d90
2018-05-25 11:35:52 -07:00
Ray Essick
51aa06e124 Bring xHE-AAC into pi-dev branch
bring the multi-commit integration from master to pi-dev

libxaac multi-arch cleanup

Change-Id: Ibcefa14f439e75f48a54955c9abf1a06c418e41e
Change-Id: Ia7a9b1e4de0add847c136f6f545b81dc8087521d
Change-Id: I12c3f8414dc9971017de223e88f292f8982a5c9b

Fix dependency error in Android.bp
Change-Id: Ic54f688736b3f2a70172676e4cee22aea4cbd705

Localized Android.bp
Change-Id: I68c4fc24fca279104c8ce2129fd4a3ed8d116b9b

Import xHE-AAC decoder from Ittiam
Change-Id: I3c8d124033f967b29d6e384cce5c843ee17a7bb1

Bug: 77287124
Test: build, cts DecoderTest
2018-05-17 14:36:48 -07:00
(raulenrique)
61cd144fc5 Initial empty repository 2018-04-30 17:36:28 -07:00