Commit graph

1206 commits

Author SHA1 Message Date
Akshay Ragir
86eb72d8eb Fix for the Global-buffer-overflow READ 4 in iaace_estimate_scfs_chan
These changes handle the 960 frame length
support for SBR and PS profiles.

Bug: ossFuzz: 64532
Test: poc in bug
2023-11-27 20:00:46 +05:30
Shashank Pathmudi
cc7ce80ec3 Fix for write access violation and divide by zero in MPS module 2023-11-27 13:56:59 +05:30
Akshay Ragir
9b18e51b8a Updated Fuzzer application to improve code coverage 2023-11-16 09:24:49 +05:30
Akshay Ragir
695799b8b6 Fix for the Null-dereference READ in ixheaace_write_bits
This change handles the error reported while processing
individual bitstream element in case of multi-channel streams.

Bug: ossFuzz: 64022
Test: poc in bug
2023-11-16 09:24:49 +05:30
Harish Mahendrakar
10a262f43c Android.bp: Fix riscv64 build for decoder
- Add appropriate entries in Android.bp for riscv64 for decoder
- Add missing function in function_selector_generic.c
2023-10-25 21:48:43 -07:00
Shashank Pathmudi
60b6534581 Fix for index-out-of-bounds in ixheaacd_smooth_m1m2
These changes handle the index-out-of-bounds runtime error reported
when the value of arbitrary downmix residual bands is greater than or equal
to the number of parameter bands.

Bug: ossFuzz:63564
Test: poc in bug
2023-10-26 10:17:24 +05:30
Shashank Pathmudi
947ad9f32b Fix for divide-by-zero in impd_parse_dwnmix_instructions
These changes handle the divide-by-zero runtime error reported
while calculating the downmix coefficients because
base channel count was coming zero.

Bug: ossFuzz:63420
Test: poc in bug
2023-10-26 10:17:24 +05:30
Shashank Pathmudi
b1a200212e Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error
reported while calculating energy tone.

Bug: ossFuzz:63248
Test: poc in bug
2023-10-20 11:21:05 +05:30
Shashank Pathmudi
2fb847d5e3 Fix for Nested bug in the same thread, aborting
These changes handle the nested bug in the same thread, aborting issue
reported by disabling some code checks which are related to EC.

Bug: ossFuzz:62003
Test: poc in bug
2023-10-20 11:21:05 +05:30
akshayragir833
fbe3ab5037
Android build file update (#62) 2023-10-18 13:29:06 +05:30
Akshay Ragir
f29c4480db Code refactoring and minor bug fixes 2023-10-12 19:24:54 +05:30
Akshay Ragir
fcf3e9af7d Fix for the Divide-by-zero in iaace_adapt_thr_to_pe
These changes handle the divide-by-zero runtime error
reported when the active lines become zero in
quantization. The issue is reported with AAC and the
same changes are extended to USAC.

Bug: ossFuzz: 62977
Test: poc in bug
2023-10-12 19:24:54 +05:30
Akshay Ragir
e8d026548e Fix for the Index-out-of-bounds in iusace_quantize_lines
These changes handle the index-out-of-bounds runtime error
reported when the bit consumption exceeds the bit reservoir
and global gain reaches the maximum value. The issue is
reported with USAC and the same changes are extended to AAC.

Bug: ossFuzz: 63019
Test: poc in bug
2023-10-12 19:24:54 +05:30
ShashankPathmudi
87abf1f1b0
Decoder bug fixes (#60)
* Fix for divide-by-zero in ixheaacd_sbr_env_calc

These changes handle the divide-by-zero runtime error reported
while calculating the energy because the consecutive frequency bands
were coming same.

Bug: ossFuzz:63038
Test: poc in bug

* Fix for divide-by-zero in ixheaacd_calc_stop_band

These changes handle the divide-by-zero runtime error reported
because sampling frequency comes out to be zero.

Bug: ossFuzz:63138
Test: poc in bug
2023-10-11 21:03:42 +05:30
Shashank Pathmudi
2d79f3ac59 Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error reported
while calculating energy gain.

Bug: ossFuzz:62903
Test: poc in bug
2023-10-05 16:01:11 +05:30
Shashank Pathmudi
0c86a5d8fa Fix for divide-by-zero in ixheaacd_lsf_weight_2st_flt
These changes handle the divide-by-zero runtime error reported
while calculating LSF weights.

Bug: ossFuzz:62778
Test: poc in bug
2023-10-05 16:01:11 +05:30
Akshay Ragir
aeaaaf4945 Minor bug fixes 2023-10-03 19:14:29 +05:30
Akshay Ragir
d8e8f980ae Fix for the Divide-by-zero in iaace_adjust_threshold
These changes handle the divide-by-zero runtime
error reported when the average bits become zero
in bit reservoir factor calculation.

Bug: ossFuzz: 62291
Test: poc in bug
2023-10-03 19:14:29 +05:30
Akshay Ragir
f247fa376e Fix for the Divide-by-zero in impd_drc_td_drc_gain_calc_init
These changes handle the divide-by-zero runtime error
reported when the successive drc gain coordinates
have same x coordinates.

Bug: ossFuzz:62237
Test: poc in bug
2023-10-03 19:14:29 +05:30
Akshay Ragir
56716426e2 Fix for the Global-buffer-overflow READ 4 in iusace_quantize_lines
These changes handle the global-buffer-overflow runtime error
reported when the tonal difference in the SBR module becomes
zero.

Bug: ossFuzz: 62261
Test: poc in bug
2023-10-03 19:14:29 +05:30
Shashank Pathmudi
f48c9bea64 Fix for divide-by-zero in ixheaacd_pre_processing
These changes handle the divide-by-zero runtime error reported
while calculating the energy because the start sample and end sample
were coming same.

Bug: ossFuzz:62766
Test: poc in bug
2023-09-29 18:08:43 +05:30
Shashank Pathmudi
3c8329953c Fix for index-out-of-bounds in ixheaacd_res_ctns_apply
These changes handle the index-out-of-bounds runtime error
reported when the value of residual sampling frequency index
is greater than max residual sampling frequency index.

Bug: ossFuzz:62707
Test: poc in bug
2023-09-29 18:08:43 +05:30
Shashank Pathmudi
11669841e3 Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error
reported while calculating the border vector value because
the value read from bitstream was coming greater the expected value.

Bug: ossFuzz:62633
Test: poc in bug
2023-09-29 18:08:43 +05:30
sandeshvenkatesh
0bb46ed5c9 Update ossfuzz.sh
Suppressing shift sanitizer in ossfuzz.h
2023-09-27 09:42:16 +05:30
Yash Patil
29692f1804 Fix for Divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the Divide-by-zero runtime error reported
while calculating the energy estimation because the
consecutive border vectors were coming same.

Bug: ossFuzz:62282
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
f5edac2d5b Fix for Undefined-shift in ixheaacd_intensity_stereo_process
These changes handle the Undefined-shift runtime error reported
because the value of shift was coming greater than maximum expected value.

Bug: ossFuzz:62328
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
624669dfe1 Fix for Undefined-shift in ixheaacd_conv_ergtoamplitude_dec
These changes handle the Undefined-shift runtime error reported
because the value of shift was coming greater than maximum expected value.

Bug: ossFuzz:62339
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
5b0bee231b Fix for Use-of-uninitialized-value in impd_drc_set_preselection
These changes handles the runtime error reported when
one of the buffer was not initialized correctly.

Bug: ossFuzz:62388
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
d5356896ef Fix for Undefined-shift in ixheaacd_fd_frm_dec
These changes handle the Undefined-shift runtime error reported
when value of shift becomes negative.

Bug: ossFuzz:62332
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
b1d8b98c0b Fix for Timeout in xaac_dec_fuzzer
These changes handle the Timeout runtime-error reported when
number of bytes consumed are lower as compared to size of
input stream.

Bug: ossFuzz:62360
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
9ecc713da9 Fix for Undefined-shift in ixheaacd_hcr_decoder
These changes handle the Undefined shift runtime error reported
when bit position in huffman codeword reordering operation becomes
negative.

Bug: ossFuzz:62408
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
8da251033e Fix for Index-out-of_bound in ixheaacd_parse_extension_frame
These changes handle Index-out-of_bound runtime error
reported when the value of param bands is greater
than max param bands. This is resolved by adding
condition check to see if the value is greater than supported value.

Bug: ossFuzz:62274
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
5d9ed17328 Fix for Undefined-shift in ixheaacd_fix_mant_exp_add
These changes handle the Undefined-shift runtime error
reported because the value of shift was coming greater than
maximum expected value.

Bug: ossFuzz:61705
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
d460d6f9fd Fix for Undefined-shift in ixheaacd_res_c_block_decode_huff_word2_2
These changes handle the runtime error reported because
the value of bit position was greater than maximum
expected value.

Bug: ossFuzz:62133
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
596d791059 Fix for Divide-by-zero in ixheaacd_lpc_to_td
This changes handle the Divide-by-zero runtime error
reported while calculating the gain because
imaginary and real data were zero.

Bug: ossFuzz:61788
Test: poc in bug
2023-09-15 19:17:37 +05:30
Akshay Ragir
c07f14410b Fix for build warnings on armv7 2023-09-14 18:12:59 +05:30
Akshay Ragir
1cc5b82096 Fix for the Floating-point-exception in ia_enhaacplus_enc_aac_core_encode
These changes handle the Floating-point-exception and
Null-dereference runtime errors reported when the
channel mask is zero. This is resolved by
initializing the channel mask with default value.

Bug: ossFuzz: 62238, 62235
Test: poc in bug
2023-09-14 18:12:59 +05:30
Nikhil Bhavikatti
12867ea9be
Merge pull request #52 from ittiam-systems/decoder_bug_fixes
Decoder bug fixes
2023-09-11 19:09:32 +05:30
Yash Patil
632e575ee6 Fix for undefined shift in ixheaacd_gen_rand_vec
These changes handle the Undefined-shift runtime error
reported because the value of scale exponent was coming
less than -31.

Bug: ossFuzz:61684
Test: poc in bug
2023-09-11 18:49:39 +05:30
Yash Patil
bbb4630478 Fix for Undefined-shift in ixheaacd_windowing_short2
These changes handle the Undefined-shift runtime error
reported because the value of shift was coming
greater than 31.

Bug: ossFuzz:61678
Test: poc in bug
2023-09-11 18:49:02 +05:30
Yash Patil
b32c803df9 Fix for undefined shift in ixheaacd_read_scale_factor_data
These changes handle the Undefined-shift runtime error
reported because the value of read word was being shifted
by a value greater than 31.

Bug: ossFuzz:61676, 61679
Test: poc in bug
2023-09-11 18:48:11 +05:30
Yash Patil
6cd0c1410e Fix for undefined shift in ducker_apply_71
These changes handle the Undefined-shift
runtime error reported because value of Q factor
calculated was negative when denominator is zero in division operation.

Bug: ossFuzz:61986
Test: poc in bug
2023-09-11 18:47:36 +05:30
Yash Patil
e0a0eabeae Fix for divide by zero in ixheaacd_sbr_env_calc
These changes handle the Divide-by-zero runtime error
reported while calculating the energy with two consecutive
border values equal.

Bug: ossFuzz:61696
Test: poc in bug
2023-09-11 18:47:02 +05:30
Akshay Ragir
ccdced7d6a Fix for Divide-by-zero in impd_drc_stft_drc_gain_calc_init
These changes handle the Divide-by-zero runtime error reported
when the drc gain coordinates are identical or slope is
perpendicular to the gain value.

Bug: ossFuzz:61683
Test: poc in bug
2023-09-09 20:32:12 +05:30
Akshay Ragir
f39922ae99 Fix for the Global-buffer-overflow READ 4 in iaace_quantize_lines
These changes handle the runtime error reported when the gain
value exceeds the maximum supported value because of zero
spectrum. This is resolved by exiting the rate distortion loop
when zero spectrum is detected. The issue is reported with AAC
and the same changes are extended to USAC.

Bug: ossFuzz:61699
Test: poc in bug
2023-09-09 20:32:12 +05:30
Akshay Ragir
62c8372f6b Fix for the Global-buffer-overflow READ 4 in iusace_estimate_scfs_chan
These changes handle the runtime error reported when the
value of scalefactor band form factor becomes zero. This
is resolved by adding bound checks for the gain value.
The issue is reported with USAC and the changes are
extended to AAC.

Bug: ossFuzz:61998
Test: poc in bug
2023-09-09 20:32:12 +05:30
Akshay Ragir
58acdb87a1 Fix for the Divide-by-zero in ixheaace_spectral_change
These changes handle the Divide-by-zero runtime error
reported when the energy value calculated is zero.
This is resolved by adding a non zero value to the
energy if it becomes zero.

Bug: ossFuzz: 61974
Test: poc in bug
2023-09-09 20:32:12 +05:30
Akshay Ragir
3428869827 Fix for the Null-dereference in ixheaace_extract_sbr_envelope
These changes handle the Null-dereference runtime error
reported for mono streams because of the inappropriate
access of uninitialized members from a structure.

Bug: ossFuzz: 61967
Test: poc in bug
2023-09-09 20:32:12 +05:30
Akshay Ragir
5ee1f8c848 Fix for the Divide-by-zero in ixheaace_sbr_missing_harmonics_detector_qmf
These chages handle the Divide-by-zero runtime error reported
when the value in tonal difference buffer becomes zero. This
is resolved by making it closer to zero instead of absolute
zero.

Bug: ossFuzz:61917
Test: poc in bug
2023-09-01 21:42:20 +05:30
Akshay Ragir
112fe0d0db Fix for the Global-buffer-overflow READ 4 in iusace_estimate_scfs_chan
These changes handle the Global-buffer-overflow runtime error
reported when the value of scalefactor band form factor
becomes zero. This is resolved by making it closer to zero
instead of absolute zero.

Bug: ossFuzz:61902
Test: poc in bug
2023-09-01 21:42:20 +05:30