Commit Graph

22561 Commits

Author SHA1 Message Date
Adam Vartanian e2b5839d4c Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994 am: 789673b15c am: 1436927851 am: d70e582d67 am: 62d5a78df3 am: 5b37a8ce87
am: 16e2001f0b

Change-Id: I217092b993f50a6380cf76049ebb94a99505b4a0
2017-09-11 11:14:55 +00:00
Adam Vartanian 16e2001f0b Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994 am: 789673b15c am: 1436927851 am: d70e582d67 am: 62d5a78df3
am: 5b37a8ce87

Change-Id: I9957d042e4b309f8071fe08c03177401051ec926
2017-09-11 11:10:53 +00:00
Adam Vartanian 5b37a8ce87 Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994 am: 789673b15c am: 1436927851 am: d70e582d67
am: 62d5a78df3

Change-Id: If605b2b03790475250c3a5c9627b9f6177c01226
2017-09-11 11:06:21 +00:00
Adam Vartanian 62d5a78df3 Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994 am: 789673b15c am: 1436927851
am: d70e582d67

Change-Id: Ia12301ba4850284d81de3a4ed2fe3f519a6859fc
2017-09-11 11:02:51 +00:00
Adam Vartanian d70e582d67 Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994 am: 789673b15c
am: 1436927851

Change-Id: Ia81a894419957960682a221159449f3e92d06b03
2017-09-11 10:58:21 +00:00
Adam Vartanian 1436927851 Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9 am: 33abf90994
am: 789673b15c

Change-Id: I352f33cf5a9a402a17f7a0f2c8739b54256392c2
2017-09-11 10:54:22 +00:00
Adam Vartanian 789673b15c Fix integer overflow in utf{16,32}_to_utf8_length am: f0a43dede9
am: 33abf90994

Change-Id: I5509908232bd838a229c1c2f3a35e0960a741288
2017-09-11 10:50:21 +00:00
Adam Vartanian 33abf90994 Fix integer overflow in utf{16,32}_to_utf8_length
am: f0a43dede9

Change-Id: Ie8e67d97272102eee952c21d82cf06c6a50f1ea9
2017-09-11 10:46:20 +00:00
Adam Vartanian f0a43dede9 Fix integer overflow in utf{16,32}_to_utf8_length
Without an explicit check, the return value can wrap around and return
a value that is far too small to hold the data from the resulting
conversion.

No CTS test is provided because it would need to allocate at least
SSIZE_MAX / 2 bytes of UTF-16 data, which is unreasonable on 64-bit
devices.

Bug: 37723026
Test: run cts -p android.security
Change-Id: Ie2606b92b9eab1acfe8ce4663b43b81156a4cad7
Merged-In: I56ba5e31657633b7f33685dd8839d4b3b998e586
2017-09-11 10:46:06 +01:00
Christine Hallstrom 3c31204e68 DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth
am: 2e06a0ff6e  -s ours

Change-Id: Ib595080a5bd778e6f844657c785708a37277633f
2017-07-27 22:33:22 +00:00
Christine Hallstrom 2e06a0ff6e DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth
Bug: 62410937
Change-Id: Ic6ddba03ee6316dc54d5d41b35c90fe3d9057723
2017-07-27 20:55:12 +00:00
Tianjie Xu 745f034705 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706 am: ebcba388f5 am: 1bc2862ac5 -s ours am: c800d82044 am: 497461adc5 am: 02e7225f78
am: 587efe8ee9

Change-Id: Ief97c37295007df0da7ae36efeee8ac541f5e722
2017-04-11 20:20:01 +00:00
Tianjie Xu 587efe8ee9 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706 am: ebcba388f5 am: 1bc2862ac5 -s ours am: c800d82044 am: 497461adc5
am: 02e7225f78

Change-Id: I687fc898264c93bedb34076bfa6d981d5059f381
2017-04-11 20:15:01 +00:00
Tianjie Xu 223de992a4 Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece am: df5ee70490 am: cce7621064 -s ours am: 01574980eb am: 2d37855038 am: 3c3eed744e
am: 5fa554a46a

Change-Id: I80db3090f5ab0efd50051a5fec2c61a5e947ab50
2017-04-11 20:15:01 +00:00
Tianjie Xu 02e7225f78 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706 am: ebcba388f5 am: 1bc2862ac5 -s ours am: c800d82044
am: 497461adc5

Change-Id: I0b66858b609852df5a04aed279412fb2d03975a2
2017-04-11 20:11:00 +00:00
Tianjie Xu 5fa554a46a Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece am: df5ee70490 am: cce7621064 -s ours am: 01574980eb am: 2d37855038
am: 3c3eed744e

Change-Id: I065c6eb98fcd7af9e486a211fb6f8611bcc7a5d3
2017-04-11 20:10:30 +00:00
Tianjie Xu 497461adc5 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706 am: ebcba388f5 am: 1bc2862ac5 -s ours
am: c800d82044

Change-Id: I09b7718561380c974ce2977b4390e12f262c11d7
2017-04-11 20:05:01 +00:00
Tianjie Xu 2aea56db64 Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434 am: 25c0d68d29 am: ed33065bfc am: bc8c8e4b56 am: afddaba0cc am: 0b1ad23070
am: d4b4f0a1e1

Change-Id: Ib8d12d33296b0b5d618f4815e99eddebda342a5a
2017-04-11 20:05:01 +00:00
Tianjie Xu 3c3eed744e Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece am: df5ee70490 am: cce7621064 -s ours am: 01574980eb
am: 2d37855038

Change-Id: I7cd9d0c60ef387cac0454e2adbe6d437899212a6
2017-04-11 20:05:01 +00:00
Tianjie Xu d4b4f0a1e1 Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434 am: 25c0d68d29 am: ed33065bfc am: bc8c8e4b56 am: afddaba0cc
am: 0b1ad23070

Change-Id: I7aa4a7bb1e6b5619faadfb4cb3e047746a58b71a
2017-04-11 19:59:59 +00:00
Tianjie Xu 2d37855038 Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece am: df5ee70490 am: cce7621064 -s ours
am: 01574980eb

Change-Id: I3a929ddc6eb1833b0653511d810662dcbaab8153
2017-04-11 19:59:59 +00:00
Tianjie Xu c800d82044 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706 am: ebcba388f5
am: 1bc2862ac5  -s ours

Change-Id: Id0399ee88604a6128e6ce3f7ee934c033d083861
2017-04-11 19:59:58 +00:00
Tianjie Xu 1bc2862ac5 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc am: 89054eb706
am: ebcba388f5

Change-Id: Ief12b93faaa3517e750b1702db487bb6e276d14b
2017-04-11 19:55:28 +00:00
Tianjie Xu 0b1ad23070 Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434 am: 25c0d68d29 am: ed33065bfc am: bc8c8e4b56
am: afddaba0cc

Change-Id: Ie8f3874506403c092719f595fa7fb2402c6ecf36
2017-04-11 19:55:28 +00:00
Tianjie Xu 01574980eb Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece am: df5ee70490
am: cce7621064  -s ours

Change-Id: I38c3c45a1043f56a1283d1ed5ad24016ab216bce
2017-04-11 19:55:28 +00:00
Tianjie Xu afddaba0cc Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434 am: 25c0d68d29 am: ed33065bfc
am: bc8c8e4b56

Change-Id: I08e7c9e5c287c920e9c04a4e83f1862646a72e27
2017-04-11 19:51:00 +00:00
Tianjie Xu cce7621064 Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374 am: 18ccbc2ece
am: df5ee70490

Change-Id: I456228354620c7f5bdf5ccfee6ce9dbbea2e2e8d
2017-04-11 19:50:58 +00:00
Tianjie Xu ebcba388f5 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours am: de0f0b8ecc
am: 89054eb706

Change-Id: I817162cb2f4e01ac88b1d81f3e7761a3110d116f
2017-04-11 19:50:57 +00:00
Tianjie Xu bc8c8e4b56 Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434 am: 25c0d68d29
am: ed33065bfc

Change-Id: Ia2b0e05ae0e248d692d9ad4ad62e53613203f08e
2017-04-11 19:45:58 +00:00
Tianjie Xu df5ee70490 Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours am: f7903d4374
am: 18ccbc2ece

Change-Id: Ib81a39d60f1d4e7551d759c6da5707c752eaf657
2017-04-11 19:45:58 +00:00
Tianjie Xu 89054eb706 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426 am: 556afe82f2 -s ours
am: de0f0b8ecc

Change-Id: I71fa5fa39cc2ffc1dde4a68102399f349ee24d72
2017-04-11 19:45:57 +00:00
Tianjie Xu 18ccbc2ece Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5 am: 368f3d273d -s ours
am: f7903d4374

Change-Id: Ic2cb35bbe317ef86c7eb177d53402d82a1cbe508
2017-04-11 19:39:58 +00:00
Tianjie Xu ed33065bfc Fix out of bound read in libziparchive am: d9fd1863f4 am: 6908996434
am: 25c0d68d29

Change-Id: I81cde93d4a07077ef54a46d589db868019ac1520
2017-04-11 19:39:57 +00:00
Tianjie Xu de0f0b8ecc Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours am: 2b4a6de426
am: 556afe82f2  -s ours

Change-Id: I90fc8d44976b063e450580b5bcb1a079ac09604b
2017-04-11 19:39:56 +00:00
Tianjie Xu 25c0d68d29 Fix out of bound read in libziparchive am: d9fd1863f4
am: 6908996434

Change-Id: Ie3b3e2f6c37ae9495e599f1add092bff39976b3f
2017-04-11 19:34:28 +00:00
Tianjie Xu 556afe82f2 Do Not Merge: Fix out of bound read in libziparchive am: 6fdfd58fe1 -s ours
am: 2b4a6de426

Change-Id: I20e184d8333c0aff48c326fad67909fcf7dc527e
2017-04-11 19:34:28 +00:00
Tianjie Xu f7903d4374 Do Not Merge: Fix out of bound read in libziparchive am: a8d932f2a5
am: 368f3d273d  -s ours

Change-Id: I5cc4d5761c5d7f2b8bcee551a693c1858a7bebd1
2017-04-11 19:34:26 +00:00
Tianjie Xu 6908996434 Fix out of bound read in libziparchive
am: d9fd1863f4

Change-Id: I5fd0004842ab44ee1c5d38386d7073003eb94a98
2017-04-11 19:29:57 +00:00
Tianjie Xu 368f3d273d Do Not Merge: Fix out of bound read in libziparchive
am: a8d932f2a5

Change-Id: I8f373dc3d2e4ecb3aecd5a43f32e3ef01474e712
2017-04-11 19:29:57 +00:00
Tianjie Xu 2b4a6de426 Do Not Merge: Fix out of bound read in libziparchive
am: 6fdfd58fe1  -s ours

Change-Id: I04571849d6e4140ac505e33338f9ecaa321ff3dd
2017-04-11 19:29:56 +00:00
Tianjie Xu a8d932f2a5 Do Not Merge: Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.

Bug: 36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit 74464a1361)
2017-04-06 18:46:06 +00:00
Tianjie Xu 6fdfd58fe1 Do Not Merge: Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.

Bug: 36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit 74464a1361)
2017-04-06 11:42:13 -07:00
Tianjie Xu d9fd1863f4 Fix out of bound read in libziparchive
We should check the boundary of central directory before checking its
signature. Swap the order of these two checks.

Bug: 36392138
Test: libziparchive doesn't read the signature after boundary check fails.
Change-Id: Ie89f709bb2d1ccb647116fb7ccb1e23c943e5ab8
(cherry picked from commit 74464a1361)
2017-04-06 18:07:02 +00:00
Wei Wang bcb6419fc9 libcutils: remove schedgroup fds [DO NOT MERGE]
After removing bg_non_interactive cgroup, there is only a ROOT cgroup.
This CL removes the no-op trying to set cgroup.
It also removes the attempt to open non-exist bg_non_interactive cgroup.

Bug: 36649832
Test: marlin boosts and cgroup ROOT task looks normal
Change-Id: Idef1dfdaa71fde63c98c73a3d37f65416aa6f2e2
2017-03-29 14:34:46 -07:00
Wei Wang e46aae2236 libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]
This is to avoid failues on setting non-exist cgroup

Bug: 34193533
Test: on marlin
Change-Id: I619dcba332fda9ec421df811745cf10311beddd3
2017-03-23 16:22:08 +00:00
Wei Wang 0638626e0e init.rc: remove bg_non_interactive cgroup [ DO NOT MERGE ]
We have seen cases when threads in this cgroup not scheduled for more than
a few seconds in heavy workload situation and causing device freeze.
In Linux, multiple threads placed in ROOT cgroup cause the CPU resource to
be split per thread, rather than per group.
Currently we have many threads in ROOT cgroup, which makes threads in
bg_non_interactive cgroup to have "tiny" CPU resource other than 5%
quota defined.

Bug: 34193533
Test: on marlin
Change-Id: I7721f6196560fbedf6265e8b6db130cec9edefd7
2017-03-21 23:38:14 +00:00
Nick Desaulniers 4e3e5fd9d4 fingerprint: bump hw api version to 2.1 [DO NOT MERGE]
Bug: 34129808
Test: adb logcat | grep -i 'wrong fp'
  should be empty

Change-Id: I2ddd3e31e221ceb829ba0e577c44dac20d26b85f
2017-01-27 11:34:59 -08:00
James Hawkins b7893e6fa4 bootstat: Fix false metrics due to soft reboots.
Use a flag to enable/disable logging metrics, set to false during soft
reboots.

Bug: 32807863
Change-Id: Ib1359327af4e18d40400c29961c454f7be1b8d0c
Test: None
(cherry picked from commit 800ceb45b1)
2017-01-19 10:15:51 -08:00
Jesse Hall 00d5dad56f dlext_namespace.h: Declare android_get_LD_LIBRARY_PATH
This allows clients creating their own namespace do so by modifying
the default library path, rather than hardcoding it multiple places in
the system.

Bug: 33531483
Change-Id: Id93059eed9f426b05178ecd65861f820300f0382
Merged-In: I321e219392b38c235b220986e1520b49a4669863
2017-01-17 09:33:04 -08:00
Jesse Hall 243bbd29d6 Make dlext_namespaces.h available to users of libnativeloader
Bug: 33531483
Change-Id: Ie53309a08179770fa2b53b937580fe9e7acf748d
Merged-In: I1da92e2b1437b6775a9d81fc6c1a2d4bacecbc04
2017-01-17 09:32:25 -08:00