Commit graph

26 commits

Author SHA1 Message Date
TreeHugger Robot
84b3433dbd Merge "Fix for OOB write in filter block parsing in drc" into pi-dev 2018-10-03 00:31:00 +00:00
TreeHugger Robot
a97968adcd Merge "Fix for OOB write in parametric drc instruction parsing" into pi-dev 2018-10-02 23:17:33 +00:00
TreeHugger Robot
cbc35bf28a Merge "Fix of OOB write in drc downmix instruction count parsing" into pi-dev 2018-10-02 23:16:51 +00:00
Ramesh Katuri
69a69acbc9 Fix for OOB write in filter block parsing in drc
Bug: 116467350
Bug: 116469592
Test: vendor
Change-Id: I2f7bff1cec3d0d60e9d43217290392bf4e23d207
2018-10-02 15:51:13 -07:00
Ramesh Katuri
599ca4428a 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
2018-10-02 13:18:16 -07:00
Ramesh Katuri
df1030d8b9 Fix of OOB write in drc downmix instruction count parsing
Check bounds of parsed value.

Bug: 116619387
Test: vendor
Change-Id: Iada4937f7d99744594a1d457ae1bddefe961ba4f
2018-10-02 11:21:44 -07:00
Ramesh Katuri
d735e2e329 Fix for OOB write in parametric drc instruction parsing
Bug: 116715245
Test: vendor
Change-Id: I24c7ce7cd8c928d53a9914d116de4c6b408cfb09
2018-10-02 10:08:37 -07:00
Ramesh Katuri
90b76d9431 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
2018-09-30 19:54:50 -07:00
TreeHugger Robot
d68bf5d05d Merge "Fix for global buffer overflow in scale factor processing" into pi-dev 2018-09-06 22:38:10 +00:00
Ramesh Katuri
b0768b0564 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)
2018-09-06 18:32:13 +00:00
TreeHugger Robot
3320901848 Merge "Fix for NPD in case of single coupling channel element." into pi-dev 2018-09-06 18:14:27 +00:00
Ramesh Katuri
61a09f1063 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
2018-09-06 11:08:38 -07:00
Ramesh Katuri
b5597cea85 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
2018-09-06 09:53:01 -07:00
TreeHugger Robot
1ef552efbb Merge "Fix for heap buffer overflow in xaac decoder init" into pi-dev 2018-09-05 23:52:56 +00:00
Ray Essick
4a435ff6c0 Merge "DO NOT MERGE Fix for stack-buffer-overflow in mps module" into pi-dev 2018-09-05 23:27:00 +00:00
Ramesh Katuri
4878ef09c7 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
2018-09-05 14:50:05 -07:00
Ramesh Katuri
28a1411d72 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
2018-08-31 00:07:03 +00:00
Ramesh Katuri
2491a07484 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
2018-08-30 17:02:10 -07: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