commit_msg
stringlengths
1
24.2k
commit_hash
stringlengths
2
84
project
stringlengths
2
40
source
stringclasses
4 values
labels
int64
0
1
repo_url
stringlengths
26
70
commit_url
stringlengths
74
118
commit_date
stringlengths
25
25
Moved EOF check.
21eae25a8db5fdcd112dbcfcd9e5c37e32d32e2f
imagemagick
bigvul
1
null
null
null
pids: init_struct_pid.tasks should never see the swapper process "statically initialize struct pid for swapper" commit 820e45db says: Statically initialize a struct pid for the swapper process (pid_t == 0) and attach it to init_task. This is needed so task_pid(), task_pgrp() and task_session() interfaces work on the swapper process also. OK, but: - it doesn't make sense to add init_task.pids[].node into init_struct_pid.tasks[], and in fact this just wrong. idle threads are special, they shouldn't be visible on any global list. In particular do_each_pid_task(init_struct_pid) shouldn't see swapper. This is the actual reason why kill(0, SIGKILL) from /sbin/init (which starts with 0,0 special pids) crashes the kernel. The signal sent to pgid/sid == 0 must never see idle threads, even if the previous patch fixed the crash itself. - we have other idle threads running on the non-boot CPUs, see the next patch. Change INIT_STRUCT_PID/INIT_PID_LINK to create the empty/unhashed hlist_head/hlist_node. Like any other idle thread swapper can never exit, so detach_pid()->__hlist_del() is not possible, but we could change INIT_PID_LINK() to set pprev = &next if needed. All we need is the valid swapper->pids[].pid == &init_struct_pid. Reported-by: Mathias Krause <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Cc: Cedric Le Goater <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Eric Biederman <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: Mathias Krause <[email protected]> Acked-by: Roland McGrath <[email protected]> Acked-by: Serge Hallyn <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
f20011457f41c11edb5ea5038ad0c8ea9f392023
linux
bigvul
1
null
null
null
pids: fix fork_idle() to setup ->pids correctly copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc. It shouldn't, but this means that the idle threads run with the wrong pids copied from the caller's task_struct. In x86 case the caller is either kernel_init() thread or keventd. In particular, this means that after the series of cpu_up/cpu_down an idle thread (which never exits) can run with .pid pointing to nowhere. Change fork_idle() to initialize idle->pids[] correctly. We only set .pid = &init_struct_pid but do not add .node to list, INIT_TASK() does the same for the boot-cpu idle thread (swapper). Signed-off-by: Oleg Nesterov <[email protected]> Cc: Cedric Le Goater <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Eric Biederman <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: Mathias Krause <[email protected]> Acked-by: Roland McGrath <[email protected]> Acked-by: Serge Hallyn <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
linux
bigvul
1
null
null
null
Fixed possible credentials leaking reported by Alex Birsan.
f9d69eadd2b16b00d1a1f9f286122123f8e547dd
librsvg
bigvul
1
null
null
null
Fix compile warning introduced in commit c6247a9 Commit c6247a9 - "Add command line and configuration option to set umask" introduced a compile warning, although the code would have worked OK. Signed-off-by: Quentin Armitage <[email protected]>
5241e4d7b177d0b6f073cfc9ed5444bf51ec89d6
keepalived
bigvul
1
null
null
null
arm64: KVM: Sanitize PSTATE.M when being set from userspace Not all execution modes are valid for a guest, and some of them depend on what the HW actually supports. Let's verify that what userspace provides is compatible with both the VM settings and the HW capabilities. Cc: <[email protected]> Fixes: 0d854a60b1d7 ("arm64: KVM: enable initialization of a 32bit vcpu") Reviewed-by: Christoffer Dall <[email protected]> Reviewed-by: Mark Rutland <[email protected]> Reviewed-by: Dave Martin <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2a3f93459d689d990b3ecfbe782fec89b97d3279
linux
bigvul
1
null
null
null
fsck: detect submodule paths starting with dash As with urls, submodule paths with dashes are ignored by git, but may end up confusing older versions. Detecting them via fsck lets us prevent modern versions of git from being a vector to spread broken .gitmodules to older versions. Compared to blocking leading-dash urls, though, this detection may be less of a good idea: 1. While such paths provide confusing and broken results, they don't seem to actually work as option injections against anything except "cd". In particular, the submodule code seems to canonicalize to an absolute path before running "git clone" (so it passes /your/clone/-sub). 2. It's more likely that we may one day make such names actually work correctly. Even after we revert this fsck check, it will continue to be a hassle until hosting servers are all updated. On the other hand, it's not entirely clear that the behavior in older versions is safe. And if we do want to eventually allow this, we may end up doing so with a special syntax anyway (e.g., writing "./-sub" in the .gitmodules file, and teaching the submodule code to canonicalize it when comparing). So on balance, this is probably a good protection. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1a7fd1fb2998002da6e9ff2ee46e1bdd25ee8404
git
bigvul
1
null
null
null
Update VERSION to 2.6.50.1
0b460be9e287fd335c8ce58129c67bf06065ef51
openswan
bigvul
1
null
null
null
Don't let attackers inject rogue values into znc.conf Because of this vulnerability, existing ZNC users could get Admin permissions. Thanks for Jeriko One <[email protected]> for finding and reporting this.
a7bfbd93812950b7444841431e8e297e62cb524e
znc
bigvul
1
null
null
null
Fix oobread in avr
b35530fa0681b27eba084de5527037ebfb397422
radare2
bigvul
1
null
null
null
Security: update Lua struct package for security. During an auditing Apple found that the "struct" Lua package we ship with Redis (http://www.inf.puc-rio.br/~roberto/struct/) contains a security problem. A bound-checking statement fails because of integer overflow. The bug exists since we initially integrated this package with Lua, when scripting was introduced, so every version of Redis with EVAL/EVALSHA capabilities exposed is affected. Instead of just fixing the bug, the library was updated to the latest version shipped by the author.
1eb08bcd4634ae42ec45e8284923ac048beaa4c3
redis
bigvul
1
null
null
null
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua MsgPack library (that originally I authored myself). The Pull Request entered Redis in commit 90b6337c1, in 2014. Unfortunately one of the changes included a variadic Lua function that lacked the check for the available Lua C stack. As a result, calling the "pack" MsgPack library function with a large number of arguments, results into pushing into the Lua C stack a number of new values proportional to the number of arguments the function was called with. The pushed values, moreover, are controlled by untrusted user input. This in turn causes stack smashing which we believe to be exploitable, while not very deterministic, but it is likely that an exploit could be created targeting specific versions of Redis executables. However at its minimum the issue results in a DoS, crashing the Redis server. -- Versions affected Versions greater or equal to Redis 2.8.18 are affected. -- Reproducing Reproduce with this (based on the original reproduction script by Apple security team): https://gist.github.com/antirez/82445fcbea6d9b19f97014cc6cc79f8a -- Verification of the fix The fix was tested in the following way: 1) I checked that the problem is no longer observable running the trigger. 2) The Lua code was analyzed to understand the stack semantics, and that actually enough stack is allocated in all the cases of mp_pack() calls. 3) The mp_pack() function was modified in order to show exactly what items in the stack were being set, to make sure that there is no silent overflow even after the fix. -- Credits Thank you to the Apple team and to the other persons that helped me checking the patch and coordinating this communication.
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
redis
bigvul
1
null
null
null
delta: fix sign-extension of big left-shift Our delta code was originally adapted from JGit, which itself adapted it from git itself. Due to this heritage, we inherited a bug from git.git in how we compute the delta offset, which was fixed upstream in 48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As explained by Linus: Shifting 'unsigned char' or 'unsigned short' left can result in sign extension errors, since the C integer promotion rules means that the unsigned char/short will get implicitly promoted to a signed 'int' due to the shift (or due to other operations). This normally doesn't matter, but if you shift things up sufficiently, it will now set the sign bit in 'int', and a subsequent cast to a bigger type (eg 'long' or 'unsigned long') will now sign-extend the value despite the original expression being unsigned. One example of this would be something like unsigned long size; unsigned char c; size += c << 24; where despite all the variables being unsigned, 'c << 24' ends up being a signed entity, and will get sign-extended when then doing the addition in an 'unsigned long' type. Since git uses 'unsigned char' pointers extensively, we actually have this bug in a couple of places. In our delta code, we inherited such a bogus shift when computing the offset at which the delta base is to be found. Due to the sign extension we can end up with an offset where all the bits are set. This can allow an arbitrary memory read, as the addition in `base_len < off + len` can now overflow if `off` has all its bits set. Fix the issue by casting the result of `*delta++ << 24UL` to an unsigned integer again. Add a test with a crafted delta that would actually succeed with an out-of-bounds read in case where the cast wouldn't exist. Reported-by: Riccardo Schirone <[email protected]> Test-provided-by: Riccardo Schirone <[email protected]>
3f461902dc1072acb8b7607ee65d0a0458ffac2a
libgit2
bigvul
1
null
null
null
Prevent arithmetic overflow on bounds check
5224a7544c95552553e2e6be0b4a789956a6464e
mbedtls
bigvul
1
null
null
null
index: error out on unreasonable prefix-compressed path lengths When computing the complete path length from the encoded prefix-compressed path, we end up just allocating the complete path without ever checking what the encoded path length actually is. This can easily lead to a denial of service by just encoding an unreasonable long path name inside of the index. Git already enforces a maximum path length of 4096 bytes. As we also have that enforcement ready in some places, just make sure that the resulting path is smaller than GIT_PATH_MAX. Reported-by: Krishna Ram Prakash R <[email protected]> Reported-by: Vivek Parikh <[email protected]>
3db1af1f370295ad5355b8f64b865a2a357bcac0
libgit2
bigvul
1
null
null
null
[security][CVE-2018-6337] Flush folly::secureRandom buffer on fork D8109884 D8110240 CVE-2018-6337
e2d10a1e32d01f71aaadd81169bcb9ae86c5d6b8
folly
bigvul
1
null
null
null
pinctrl: amd: Use devm_pinctrl_register() for pinctrl registration Use devm_pinctrl_register() for pin control registration and clean error path. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
251e22abde21833b3d29577e4d8c7aaccd650eee
linux
bigvul
1
null
null
null
Add test cert with no extensions Add commands to make-certs.sh to generate a test client certificate with no certificate extensions. Re-run make-certs.sh. ticket: 8562
1de6ca2f2eb1fdbab51f1549a25a6903aefcc196
krb5
bigvul
1
null
null
null
Fix certauth built-in module returns The PKINIT certauth eku module should never authoritatively authorize a certificate, because an extended key usage does not establish a relationship between the certificate and any specific user; it only establishes that the certificate was created for PKINIT client authentication. Therefore, pkinit_eku_authorize() should return KRB5_PLUGIN_NO_HANDLE on success, not 0. The certauth san module should pass if it does not find any SANs of the types it can match against; the presence of other types of SANs should not cause it to explicitly deny a certificate. Check for an empty result from crypto_retrieve_cert_sans() in verify_client_san(), instead of returning ENOENT from crypto_retrieve_cert_sans() when there are no SANs at all. ticket: 8561
50fe4074f188c2d4da0c421e96553acea8378db2
krb5
bigvul
1
null
null
null
Restrict following symlinks to directories by ownership (CVE-2017-7500) Only follow directory symlinks owned by target directory owner or root. This prevents privilege escalation from user-writable directories via directory symlinks to privileged directories on package upgrade, while still allowing admin to arrange disk usage with symlinks. The rationale is that if you can create symlinks owned by user X you *are* user X (or root), and if you also own directory Y you can do whatever with it already, including change permissions. So when you create a symlink to that directory, the link ownership acts as a simple stamp of authority that you indeed want rpm to treat this symlink as it were the directory that you own. Such a permission can only be given by you or root, which is just the way we want it. Plus it's almost ridiculously simple as far as rules go, compared to trying to calculate something from the source vs destination directory permissions etc. In the normal case, the user arranging diskspace with symlinks is indeed root so nothing changes, the only real change here is to links created by non-privileged users which should be few and far between in practise. Unfortunately our test-suite runs as a regular user via fakechroot and thus the testcase for this fails under the new rules. Adjust the testcase to get the ownership straight and add a second case for the illegal behavior, basically the same as the old one but with different expectations.
f2d3be2a8741234faaa96f5fd05fdfdc75779a79
rpm
bigvul
1
null
null
null
Fixed a bug in the packet iterator code. Added a new regression test case.
f25486c3d4aa472fec79150f2c41ed4333395d3d
jasper
bigvul
1
null
null
null
proto/detect: workaround dns misdetected as dcerpc The DCERPC UDP detection would misfire on DNS with transaction ID 0x0400. This would happen as the protocol detection engine gives preference to pattern based detection over probing parsers for performance reasons. This hack/workaround fixes this specific case by still running the probing parser if DCERPC has been detected on UDP. The probing parser result will take precedence. Bug #2736.
8357ef3f8ffc7d99ef6571350724160de356158b
suricata
bigvul
1
null
null
null
Merge remote-tracking branch 'upstream-restricted/pr/549' into mbedtls-2.7-restricted
298a43a77ec0ed2c19a8c924ddd8571ef3e65dfd
mbedtls
bigvul
1
null
null
null
More fixes for the CVE-2019-14745
5411543a310a470b1257fb93273cdd6e8dfcb3af
radare2
bigvul
1
null
null
null
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the HeaderMap to sum the size of each key and value in the HeaderMap. Signed-off-by: Asra Ali <[email protected]>
afc39bea36fd436e54262f150c009e8d72db5014
envoy
bigvul
1
null
null
null
do sanity checks on PHB header length before allocating memory. There was no fault; but doing the check results in a more consistent error
87d6bef033062f969e70fa40c43dfd945d5a20ab
libpcap
bigvul
1
null
null
null
USB: gadget: f_hid: fix deadlock in f_hidg_write() In f_hidg_write() the write_spinlock is acquired before calling usb_ep_queue() which causes a deadlock when dummy_hcd is being used. This is because dummy_queue() callbacks into f_hidg_req_complete() which tries to acquire the same spinlock. This is (part of) the backtrace when the deadlock occurs: 0xffffffffc06b1410 in f_hidg_req_complete 0xffffffffc06a590a in usb_gadget_giveback_request 0xffffffffc06cfff2 in dummy_queue 0xffffffffc06a4b96 in usb_ep_queue 0xffffffffc06b1eb6 in f_hidg_write 0xffffffff8127730b in __vfs_write 0xffffffff812774d1 in vfs_write 0xffffffff81277725 in SYSC_write Fix this by releasing the write_spinlock before calling usb_ep_queue() Reviewed-by: James Bottomley <[email protected]> Tested-by: James Bottomley <[email protected]> Cc: [email protected] # 4.11+ Fixes: 749494b6bdbb ("usb: gadget: f_hid: fix: Move IN request allocation to set_alt()") Signed-off-by: Radoslav Gerganov <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
072684e8c58d17e853f8e8b9f6d9ce2e58d2b036
linux
bigvul
1
null
null
null
harden plugin unzipping to zip-slip attacks
0979ba8d10c96ebca330715bfd4494ea0e019a8f
sigil
bigvul
1
null
null
null
further harden against malicious epubs and produce error message
04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4
sigil
bigvul
1
null
null
null
Check the max size to read before actually reading The size check waas also missing from the length parsing
05beb69ba60acce09f73ed491bb76f332849c3a0
libebml
bigvul
1
null
null
null
convertbmp: detect invalid file dimensions early width/length dimensions read from bmp headers are not necessarily valid. For instance they may have been maliciously set to very large values with the intention to cause DoS (large memory allocation, stack overflow). In these cases we want to detect the invalid size as early as possible. This commit introduces a counter which verifies that the number of written bytes corresponds to the advertized width/length. See commit 8ee335227bbc for details. Signed-off-by: Young Xiao <[email protected]>
cbe7384016083eac16078b359acd7a842253d503
openjpeg
bigvul
1
null
null
null
AES: move look-up tables to .data section and unshare between processes * cipher/rijndael-internal.h (ATTR_ALIGNED_64): New. * cipher/rijndael-tables.h (encT): Move to 'enc_tables' structure. (enc_tables): New structure for encryption table with counters before and after. (encT): New macro. (dec_tables): Add counters before and after encryption table; Move from .rodata to .data section. (do_encrypt): Change 'encT' to 'enc_tables.T'. (do_decrypt): Change '&dec_tables' to 'dec_tables.T'. * cipher/cipher-gcm.c (prefetch_table): Make inline; Handle input with length not multiple of 256. (prefetch_enc, prefetch_dec): Modify pre- and post-table counters to unshare look-up table pages between processes. -- GnuPG-bug-id: 4541 Signed-off-by: Jussi Kivilinna <[email protected]>
daedbbb5541cd8ecda1459d3b843ea4d92788762
libgcrypt
bigvul
1
null
null
null
fix error from commit 13585f15c7f7dc28bbbba1661efb280d530d114c
86030db849260dd8fb2ed975b9890aef1b62b692
miniupnp
bigvul
1
null
null
null
Coalesce handshake buffers Summary: It is possible that a peer might send us records in a manner such that there is a 16KB record and only 1 byte of handshake message in each record. Since we normally just trim the IOBuf, we would end up holding 16K of data per actual byte of data. To prevent this we allocate a contiguous buffer to copy over these bytes for handshake messages for now. This is a partial fix for CVE-2019-11924 Reviewed By: ngoyal Differential Revision: D16478044 fbshipit-source-id: 464bc68eaefda065d9a327818100427377293fbd
3eaddb33619eaaf74a760872850c550ad8f5c52f
fizz
bigvul
1
null
null
null
Merge branch 'page-refs' (page ref overflow) Merge page ref overflow branch. Jann Horn reported that he can overflow the page ref count with sufficient memory (and a filesystem that is intentionally extremely slow). Admittedly it's not exactly easy. To have more than four billion references to a page requires a minimum of 32GB of kernel memory just for the pointers to the pages, much less any metadata to keep track of those pointers. Jann needed a total of 140GB of memory and a specially crafted filesystem that leaves all reads pending (in order to not ever free the page references and just keep adding more). Still, we have a fairly straightforward way to limit the two obvious user-controllable sources of page references: direct-IO like page references gotten through get_user_pages(), and the splice pipe page duplication. So let's just do that. * branch page-refs: fs: prevent page refcount overflow in pipe_buf_get mm: prevent get_user_pages() from overflowing page refcount mm: add 'try_get_page()' helper function mm: make page ref count overflow check tighter and more explicit
6b3a707736301c2128ca85ce85fb13f60b5e350a
linux
bigvul
1
null
null
null
mm: add 'try_get_page()' helper function This is the same as the traditional 'get_page()' function, but instead of unconditionally incrementing the reference count of the page, it only does so if the count was "safe". It returns whether the reference count was incremented (and is marked __must_check, since the caller obviously has to be aware of it). Also like 'get_page()', you can't use this function unless you already had a reference to the page. The intent is that you can use this exactly like get_page(), but in situations where you want to limit the maximum reference count. The code currently does an unconditional WARN_ON_ONCE() if we ever hit the reference count issues (either zero or negative), as a notification that the conditional non-increment actually happened. NOTE! The count access for the "safety" check is inherently racy, but that doesn't matter since the buffer we use is basically half the range of the reference count (ie we look at the sign of the count). Acked-by: Matthew Wilcox <[email protected]> Cc: Jann Horn <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
88b1a17dfc3ed7728316478fae0f5ad508f50397
linux
bigvul
1
null
null
null
mm: prevent get_user_pages() from overflowing page refcount If the page refcount wraps around past zero, it will be freed while there are still four billion references to it. One of the possible avenues for an attacker to try to make this happen is by doing direct IO on a page multiple times. This patch makes get_user_pages() refuse to take a new page reference if there are already more than two billion references to the page. Reported-by: Jann Horn <[email protected]> Acked-by: Matthew Wilcox <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
8fde12ca79aff9b5ba951fce1a2641901b8d8e64
linux
bigvul
1
null
null
null
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by: Jann Horn <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
linux
bigvul
1
null
null
null
avcodec/mpeg4videodec: Clear interlaced_dct for studio profile Fixes: Out of array access Fixes: 13090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5408668986638336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Kieran Kunhya <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
1f686d023b95219db933394a7704ad9aa5f01cbb
ffmpeg
bigvul
1
null
null
null
inet: update the IP ID generation algorithm to higher standards. Commit 355b98553789 ("netns: provide pure entropy for net_hash_mix()") makes net_hash_mix() return a true 32 bits of entropy. When used in the IP ID generation algorithm, this has the effect of extending the IP ID generation key from 32 bits to 64 bits. However, net_hash_mix() is only used for IP ID generation starting with kernel version 4.1. Therefore, earlier kernels remain with 32-bit key no matter what the net_hash_mix() return value is. This change addresses the issue by explicitly extending the key to 64 bits for kernels older than 4.1. Signed-off-by: Amit Klein <[email protected]> Cc: Ben Hutchings <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
55f0fc7a02de8f12757f4937143d8d5091b2e40b
linux
bigvul
1
null
null
null
Fix install script
aaece6921d7368577511f06c94c99dd4e9653563
node-opencv
bigvul
1
null
null
null
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged users for tail calls and data access such that the user provided index gets sanitized from BPF program and syscall side, there is still a more generic form affected from BPF programs that applies to most maps that hold user data in relation to dynamic map access when dealing with unknown scalars or "slow" known scalars as access offset, for example: - Load a map value pointer into R6 - Load an index into R7 - Do a slow computation (e.g. with a memory dependency) that loads a limit into R8 (e.g. load the limit from a map for high latency, then mask it to make the verifier happy) - Exit if R7 >= R8 (mispredicted branch) - Load R0 = R6[R7] - Load R0 = R6[R0] For unknown scalars there are two options in the BPF verifier where we could derive knowledge from in order to guarantee safe access to the memory: i) While </>/<=/>= variants won't allow to derive any lower or upper bounds from the unknown scalar where it would be safe to add it to the map value pointer, it is possible through ==/!= test however. ii) another option is to transform the unknown scalar into a known scalar, for example, through ALU ops combination such as R &= <imm> followed by R |= <imm> or any similar combination where the original information from the unknown scalar would be destroyed entirely leaving R with a constant. The initial slow load still precedes the latter ALU ops on that register, so the CPU executes speculatively from that point. Once we have the known scalar, any compare operation would work then. A third option only involving registers with known scalars could be crafted as described in [0] where a CPU port (e.g. Slow Int unit) would be filled with many dependent computations such that the subsequent condition depending on its outcome has to wait for evaluation on its execution port and thereby executing speculatively if the speculated code can be scheduled on a different execution port, or any other form of mistraining as described in [1], for example. Given this is not limited to only unknown scalars, not only map but also stack access is affected since both is accessible for unprivileged users and could potentially be used for out of bounds access under speculation. In order to prevent any of these cases, the verifier is now sanitizing pointer arithmetic on the offset such that any out of bounds speculation would be masked in a way where the pointer arithmetic result in the destination register will stay unchanged, meaning offset masked into zero similar as in array_index_nospec() case. With regards to implementation, there are three options that were considered: i) new insn for sanitation, ii) push/pop insn and sanitation as inlined BPF, iii) reuse of ax register and sanitation as inlined BPF. Option i) has the downside that we end up using from reserved bits in the opcode space, but also that we would require each JIT to emit masking as native arch opcodes meaning mitigation would have slow adoption till everyone implements it eventually which is counter-productive. Option ii) and iii) have both in common that a temporary register is needed in order to implement the sanitation as inlined BPF since we are not allowed to modify the source register. While a push / pop insn in ii) would be useful to have in any case, it requires once again that every JIT needs to implement it first. While possible, amount of changes needed would also be unsuitable for a -stable patch. Therefore, the path which has fewer changes, less BPF instructions for the mitigation and does not require anything to be changed in the JITs is option iii) which this work is pursuing. The ax register is already mapped to a register in all JITs (modulo arm32 where it's mapped to stack as various other BPF registers there) and used in constant blinding for JITs-only so far. It can be reused for verifier rewrites under certain constraints. The interpreter's tmp "register" has therefore been remapped into extending the register set with hidden ax register and reusing that for a number of instructions that needed the prior temporary variable internally (e.g. div, mod). This allows for zero increase in stack space usage in the interpreter, and enables (restricted) generic use in rewrites otherwise as long as such a patchlet does not make use of these instructions. The sanitation mask is dynamic and relative to the offset the map value or stack pointer currently holds. There are various cases that need to be taken under consideration for the masking, e.g. such operation could look as follows: ptr += val or val += ptr or ptr -= val. Thus, the value to be sanitized could reside either in source or in destination register, and the limit is different depending on whether the ALU op is addition or subtraction and depending on the current known and bounded offset. The limit is derived as follows: limit := max_value_size - (smin_value + off). For subtraction: limit := umax_value + off. This holds because we do not allow any pointer arithmetic that would temporarily go out of bounds or would have an unknown value with mixed signed bounds where it is unclear at verification time whether the actual runtime value would be either negative or positive. For example, we have a derived map pointer value with constant offset and bounded one, so limit based on smin_value works because the verifier requires that statically analyzed arithmetic on the pointer must be in bounds, and thus it checks if resulting smin_value + off and umax_value + off is still within map value bounds at time of arithmetic in addition to time of access. Similarly, for the case of stack access we derive the limit as follows: MAX_BPF_STACK + off for subtraction and -off for the case of addition where off := ptr_reg->off + ptr_reg->var_off.value. Subtraction is a special case for the masking which can be in form of ptr += -val, ptr -= -val, or ptr -= val. In the first two cases where we know that the value is negative, we need to temporarily negate the value in order to do the sanitation on a positive value where we later swap the ALU op, and restore original source register if the value was in source. The sanitation of pointer arithmetic alone is still not fully sufficient as is, since a scenario like the following could happen ... PTR += 0x1000 (e.g. K-based imm) PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON PTR += 0x1000 PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON [...] ... which under speculation could end up as ... PTR += 0x1000 PTR -= 0 [ truncated by mitigation ] PTR += 0x1000 PTR -= 0 [ truncated by mitigation ] [...] ... and therefore still access out of bounds. To prevent such case, the verifier is also analyzing safety for potential out of bounds access under speculative execution. Meaning, it is also simulating pointer access under truncation. We therefore "branch off" and push the current verification state after the ALU operation with known 0 to the verification stack for later analysis. Given the current path analysis succeeded it is likely that the one under speculation can be pruned. In any case, it is also subject to existing complexity limits and therefore anything beyond this point will be rejected. In terms of pruning, it needs to be ensured that the verification state from speculative execution simulation must never prune a non-speculative execution path, therefore, we mark verifier state accordingly at the time of push_stack(). If verifier detects out of bounds access under speculative execution from one of the possible paths that includes a truncation, it will reject such program. Given we mask every reg-based pointer arithmetic for unprivileged programs, we've been looking into how it could affect real-world programs in terms of size increase. As the majority of programs are targeted for privileged-only use case, we've unconditionally enabled masking (with its alu restrictions on top of it) for privileged programs for the sake of testing in order to check i) whether they get rejected in its current form, and ii) by how much the number of instructions and size will increase. We've tested this by using Katran, Cilium and test_l4lb from the kernel selftests. For Katran we've evaluated balancer_kern.o, Cilium bpf_lxc.o and an older test object bpf_lxc_opt_-DUNKNOWN.o and l4lb we've used test_l4lb.o as well as test_l4lb_noinline.o. We found that none of the programs got rejected by the verifier with this change, and that impact is rather minimal to none. balancer_kern.o had 13,904 bytes (1,738 insns) xlated and 7,797 bytes JITed before and after the change. Most complex program in bpf_lxc.o had 30,544 bytes (3,817 insns) xlated and 18,538 bytes JITed before and after and none of the other tail call programs in bpf_lxc.o had any changes either. For the older bpf_lxc_opt_-DUNKNOWN.o object we found a small increase from 20,616 bytes (2,576 insns) and 12,536 bytes JITed before to 20,664 bytes (2,582 insns) and 12,558 bytes JITed after the change. Other programs from that object file had similar small increase. Both test_l4lb.o had no change and remained at 6,544 bytes (817 insns) xlated and 3,401 bytes JITed and for test_l4lb_noinline.o constant at 5,080 bytes (634 insns) xlated and 3,313 bytes JITed. This can be explained in that LLVM typically optimizes stack based pointer arithmetic by using K-based operations and that use of dynamic map access is not overly frequent. However, in future we may decide to optimize the algorithm further under known guarantees from branch and value speculation. Latter seems also unclear in terms of prediction heuristics that today's CPUs apply as well as whether there could be collisions in e.g. the predictor's Value History/Pattern Table for triggering out of bounds access, thus masking is performed unconditionally at this point but could be subject to relaxation later on. We were generally also brainstorming various other approaches for mitigation, but the blocker was always lack of available registers at runtime and/or overhead for runtime tracking of limits belonging to a specific pointer. Thus, we found this to be minimally intrusive under given constraints. With that in place, a simple example with sanitized access on unprivileged load at post-verification time looks as follows: # bpftool prog dump xlated id 282 [...] 28: (79) r1 = *(u64 *)(r7 +0) 29: (79) r2 = *(u64 *)(r7 +8) 30: (57) r1 &= 15 31: (79) r3 = *(u64 *)(r0 +4608) 32: (57) r3 &= 1 33: (47) r3 |= 1 34: (2d) if r2 > r3 goto pc+19 35: (b4) (u32) r11 = (u32) 20479 | 36: (1f) r11 -= r2 | Dynamic sanitation for pointer 37: (4f) r11 |= r2 | arithmetic with registers 38: (87) r11 = -r11 | containing bounded or known 39: (c7) r11 s>>= 63 | scalars in order to prevent 40: (5f) r11 &= r2 | out of bounds speculation. 41: (0f) r4 += r11 | 42: (71) r4 = *(u8 *)(r4 +0) 43: (6f) r4 <<= r1 [...] For the case where the scalar sits in the destination register as opposed to the source register, the following code is emitted for the above example: [...] 16: (b4) (u32) r11 = (u32) 20479 17: (1f) r11 -= r2 18: (4f) r11 |= r2 19: (87) r11 = -r11 20: (c7) r11 s>>= 63 21: (5f) r2 &= r11 22: (0f) r2 += r0 23: (61) r0 = *(u32 *)(r2 +0) [...] JIT blinding example with non-conflicting use of r10: [...] d5: je 0x0000000000000106 _ d7: mov 0x0(%rax),%edi | da: mov $0xf153246,%r10d | Index load from map value and e0: xor $0xf153259,%r10 | (const blinded) mask with 0x1f. e7: and %r10,%rdi |_ ea: mov $0x2f,%r10d | f0: sub %rdi,%r10 | Sanitized addition. Both use r10 f3: or %rdi,%r10 | but do not interfere with each f6: neg %r10 | other. (Neither do these instructions f9: sar $0x3f,%r10 | interfere with the use of ax as temp fd: and %r10,%rdi | in interpreter.) 100: add %rax,%rdi |_ 103: mov 0x0(%rdi),%eax [...] Tested that it fixes Jann's reproducer, and also checked that test_verifier and test_progs suite with interpreter, JIT and JIT with hardening enabled on x86-64 and arm64 runs successfully. [0] Speculose: Analyzing the Security Implications of Speculative Execution in CPUs, Giorgi Maisuradze and Christian Rossow, https://arxiv.org/pdf/1801.04084.pdf [1] A Systematic Evaluation of Transient Execution Attacks and Defenses, Claudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp, Benjamin von Berg, Philipp Ortner, Frank Piessens, Dmitry Evtyushkin, Daniel Gruss, https://arxiv.org/pdf/1811.05441.pdf Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Reported-by: Jann Horn <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
linux
bigvul
1
null
null
null
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which are used internally. We're adding a regression test for `gdImageJpegPtr()`, but not for `gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to trigger failure of the respective `gdImage*Ctx()` calls. This potential security issue has been reported by Solmaz Salimi (aka. Rooney).
553702980ae89c83f2d6e254d62cf82e204956d0
php-src
bigvul
1
null
null
null
[trunk] fixed a buffer overflow in opj_tcd_init_decode_tile Update issue 431
5d00b719f4b93b1445e6fb4c766b9a9883c57949
openjpeg
bigvul
1
null
null
null
tun: allow positive return values on dev_get_valid_name() call If the name argument of dev_get_valid_name() contains "%d", it will try to assign it a unit number in __dev__alloc_name() and return either the unit number (>= 0) or an error code (< 0). Considering positive values as error values prevent tun device creations relying this mechanism, therefor we should only consider negative values as errors here. Signed-off-by: Julien Gomes <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
5c25f65fd1e42685f7ccd80e0621829c105785d9
linux
bigvul
1
null
null
null
Externally Reported Low Severity Security Vulnerability: SMS Resend Vulnerability in Android Bug 17671795 Require SEND_SMS permission so apps without it won't be able to trick the messaging app into sending messages. Change-Id: Ibb1bc8ac33cdc2df956b79ba3dd16b37c44b955d
008d6202fca4002a7dfe333f22377faa73585c67
android
bigvul
1
null
null
null
SECURITY: Don't pass a usable Pending Intent to 3rd parties. Unfortunately the Settings app has super powers. We shouldn't let untrusted 3rd party authenticators re-purpose those powers to their own nefarious ends. This means that we shouldn't pass along PendingIntents that can have addressing information (component, action, category) filled in by third parties. Bug: 17356824 Change-Id: I397d26c5f465ddfb0e58bbc66cd44756e58cc507
f5d3e74ecc2b973941d8adbe40c6b23094b5abb7
android
bigvul
1
null
null
null
Externally Reported Moderate Security Issue: SQL Injection in WAPPushManager Bug 17969135 Use query (instead of rawQuery) and pass in arguments instead of building the query with a giant string. Add a unit test that fails with the old code but passes with the new code. Change-Id: Id04a1db6fb95fcd923e1f36f5ab3b94402590918
48ed835468c6235905459e6ef7df032baf3e4df6
android
bigvul
1
null
null
null
Add additional checks in ObjectInputStream Thanks to Jann Horn for reporting a bug in ObjectInputStream and sending the initial patch. Add some checks that the class of an object being deserialized still conforms to the requirements for serialization. Add some checks that the class being deserialized matches the type information (enum, serializable, externalizable) held in the stream. Delayed static initialization of classes until the type of the class has been validated against the stream content in some cases. Added more tests. Bug: 15874291 Change-Id: I0f0fe68e0d21e041c5160482113ae847c357b8f5
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
android
bigvul
1
null
null
null
Fix several ineffective integer overflow checks Commit edd4a76 (which addressed bugs 15328708, 15342615, 15342751) added several integer overflow checks. Unfortunately, those checks fail to take into account integer promotion rules and are thus themselves subject to an integer overflow. Cast the sizeof() operator to a uint64_t to force promotion while multiplying. Bug: 20139950 (cherry picked from commit e2e812e58e8d2716b00d7d82db99b08d3afb4b32) Change-Id: I080eb3fa147601f18cedab86e0360406c3963d7b
cf1581c66c2ad8c5b1aaca2e43e350cf5974f46d
android
bigvul
1
null
null
null
MPEG4Extractor.cpp: handle chunk_size > SIZE_MAX chunk_size is a uint64_t, so it can legitimately be bigger than SIZE_MAX, which would cause the subtraction to underflow. https://code.google.com/p/android/issues/detail?id=182251 Bug: 23034759 Change-Id: Ic1637fb26bf6edb0feb1bcf2876fd370db1ed547
6fe85f7e15203e48df2cc3e8e1c4bc6ad49dc968
android
bigvul
1
null
null
null
Fix unchecked length in Blob creation Applications can specify arbitrary blobs using insert(), check their length to prevent overflow issues. Bug:22802399 Change-Id: I4097bd891c733914df70da5e2c58783081d913bf
bb9f4392c2f1b11be3acdc1737828274ff1ec55b
android
bigvul
1
null
null
null
Guard against codecinfo overflow Bug: 21296336 Change-Id: I78be5141b3108142f12d7cb94839fa50f776d84a
304ef91624e12661e7e35c2c0c235da84a73e9c0
android
bigvul
1
null
null
null
Prevent insanely long passwords from crashing SystemUI Bug: 22214934 Change-Id: I32e238e53ac4b6dd0ae6de226b98894c495b256f
8fba7e6931245a17215e0e740e78b45f6b66d590
android
bigvul
1
null
null
null
Externally-reported Moderate severity vulnerability in SMS: Apps can bypass the SMS short code notification prompt Bug 22314646 DO NOT MERGE When android.permission.SEND_SMS_NO_CONFIRMATION was renamed to android.permission.SEND_RESPOND_VIA_MESSAGE in JB-MR2, the necessary change in SmsDispatcher was accidentally overlooked. Change-Id: I2c3aa79da8064e55cec5a786696de519c2bf0b07
df31d37d285dde9911b699837c351aed2320b586
android
bigvul
1
null
null
null
Check that the parcel contained the expected amount of region data. DO NOT MERGE bug:20883006 Change-Id: Ib47a8ec8696dbc37e958b8dbceb43fcbabf6605b
4cff1f49ff95d990d6c2614da5d5a23d02145885
android
bigvul
1
null
null
null
Disregard alleged binder entities beyond parcel bounds When appending one parcel's contents to another, ignore binder objects within the source Parcel that appear to lie beyond the formal bounds of that Parcel's data buffer. Bug 17312693 Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514 (cherry picked from commit 27182be9f20f4f5b48316666429f09b9ecc1f22e)
e68cbc3e9e66df4231e70efa3e9c41abc12aea20
android
bigvul
1
null
null
null
Prevent system uid component from running in an app process Bug: 21669445 Change-Id: I11d0bc5301d7e2a64972221f54f3cbd611f8e404 (cherry picked from commit 44368567f840e3469b5fd2c9399ed444b6f46ebf)
e3cde784e3d99966f313fe00dcecf191f6a44a31
android
bigvul
1
null
null
null
DO NOT MERGE Change to add STK_PERMISSION for stk related commands. Bug: 21697171 Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b
a5e904e7eb3aaec532de83ca52e24af18e0496b4
android
bigvul
1
null
null
null
audio effects: fix heap overflow Check consistency of effect command reply sizes before copying to reply address. Also add null pointer check on reply size. Also remove unused parameter warning. Bug: 21953516. Change-Id: I4cf00c12eaed696af28f3b7613f7e36f47a160c4 (cherry picked from commit 0f714a464d2425afe00d6450535e763131b40844)
aeea52da00d210587fb3ed895de3d5f2e0264c88
android
bigvul
1
null
null
null
OpenSSLX509Certificate: mark mContext as transient Since mContext should not participate in the serialization process, hide it with the transient qualifier. This will prevent the field from initialization during the unserialization of this class. Then of course the instance will be in a valid state. (cherry picked from commit 8d57b9dbbd883422a0ff02083bfcf637b097e504) Bug: 21437603 Change-Id: Ie9453c16d11820a91caff92c3f7b326d12f8a8f4
edf7055461e2d7fa18de5196dca80896a56e3540
android
bigvul
1
null
null
null
DLS parser: fix wave pool size check. Bug: 21132860. Change-Id: I8ae872ea2cc2e8fec5fa0b7815f0b6b31ce744ff (cherry picked from commit 2d7f8e1be2241e48458f5d3cab5e90be2b07c699)
e999f077f6ef59d20282f1e04786816a31fb8be6
android
bigvul
1
null
null
null
IOMX: Enable buffer ptr to buffer id translation for arm32 Bug: 20634516 Change-Id: Iac9eac3cb251eccd9bbad5df7421a07edc21da0c (cherry picked from commit 2d6b6601743c3c6960c6511a2cb774ef902759f4)
3cb1b6944e776863aea316e25fdc16d7f9962902
android
bigvul
1
null
null
null
HDCP: buffer over flow check -- DO NOT MERGE bug: 20222489 Change-Id: I3a64a5999d68ea243d187f12ec7717b7f26d93a3 (cherry picked from commit 532cd7b86a5fdc7b9a30a45d8ae2d16ef7660a72)
c82e31a7039a03dca7b37c65b7890ba5c1e18ced
android
bigvul
1
null
null
null
Lockdown AM.getRunningAppProcesses API with permission.REAL_GET_TASKS * Applications must now have ...permission.REAL_GET_TASKS to be able to get process information for all applications. * Only the process information for the calling application will be returned if the app doesn't have the permission. * Privilages apps will temporarily be able to get process information for all applications if they don't have the new permission, but have deprecated ...permission.GET_TASKS. Bug: 20034603 Change-Id: I67ae9491f65d2280adb6a81593693d499714a216 (cherry picked from commit 9dbaa54f6834e013a63f18bd51ace554de811d80)
aaa0fee0d7a8da347a0c47cef5249c70efee209e
android
bigvul
1
null
null
null
Add AUtils::isInRange, and use it to detect malformed MPEG4 nal sizes Bug: 19641538 Change-Id: I5aae3f100846c125decc61eec7cd6563e3f33777
d48f0f145f8f0f4472bc0af668ac9a8bce44ba9b
android
bigvul
1
null
null
null
Add some sanity checks Bug: 19400722 Change-Id: Ib3afdf73fd4647eeea5721c61c8b72dbba0647f6
51504928746edff6c94a1c498cf99c0a83bedaed
android
bigvul
1
null
null
null
Prevent integer overflow when processing covr MPEG4 atoms If the 'chunk_data_size' value is SIZE_MAX, an integer overflow will occur and cause an undersized buffer to be allocated. The following processing then overfills the resulting memory and creates a potentially exploitable condition. Ensure that integer overflow does not occur. Bug: 20923261 Change-Id: I75cce323aec04a612e5a230ecd7c2077ce06035f
2674a7218eaa3c87f2ee26d26da5b9170e10f859
android
bigvul
1
null
null
null
Prevent integer underflow if size is below 6 When processing 3GPP metadata, a subtraction operation may underflow and lead to a rather large linear byteswap operation in the subsequent framedata decoding code. Bound the 'size' value to prevent this from occurring. Bug: 20923261 Change-Id: I35dfbc8878c6b65cfe8b8adb7351a77ad4d604e5 (cherry picked from commit 9458e715d391ee8fe455fc31f07ff35ce12e0531)
f4f7e0c102819f039ebb1972b3dba1d3186bc1d1
android
bigvul
1
null
null
null
Fix integer underflow in covr MPEG4 processing When the 'chunk_data_size' variable is less than 'kSkipBytesOfDataBox', an integer underflow can occur. This causes an extraordinarily large value to be passed to MetaData::setData, leading to a buffer overflow. Bug: 20923261 Change-Id: Icd28f63594ad941eabb3a12c750a4a2d5d2bf94b
f4a88c8ed4f8186b3d6e2852993e063fc33ff231
android
bigvul
1
null
null
null
Fix integer overflow when handling MPEG4 tx3g atom When the sum of the 'size' and 'chunk_size' variables is larger than 2^32, an integer overflow occurs. Using the result value to allocate memory leads to an undersized buffer allocation and later a potentially exploitable heap corruption condition. Ensure that integer overflow does not occur. Bug: 20923261 Change-Id: Id050a36b33196864bdd98b5ea24241f95a0b5d1f
463a6f807e187828442949d1924e143cf07778c6
android
bigvul
1
null
null
null
DO NOT MERGE Don't take flags when creating app widget config activity. bug:19618745 Change-Id: I7973ebfc67ebf52f14890dda9eb891a7b8a5a095
0b98d304c467184602b4c6bce76fda0b0274bc07
android
bigvul
1
null
null
null
Fix integer underflow in ESDS processing Several arithmetic operations within parseESDescriptor could underflow, leading to an out-of-bounds read operation. Ensure that subtractions from 'size' do not cause it to wrap around. Bug: 20139950 (cherry picked from commit 07c0f59d6c48874982d2b5c713487612e5af465a) Change-Id: I377d21051e07ca654ea1f7037120429d3f71924a
5e751957ba692658b7f67eb03ae5ddb2cd3d970c
android
bigvul
1
null
null
null
Fix integer overflow during MP4 atom processing A few sample table related FourCC values are handled by the setSampleToChunkParams function. An integer overflow exists within this function. Validate that mNumSampleToChunkOffets will not cause an integer overflow. Bug: 20139950 (cherry picked from commit c24607c29c96f939aed9e33bfa702b1dd79da4b7) Change-Id: I49086952451b09a234d8b82669251ab9f1ef58d9
2434839bbd168469f80dd9a22f1328bc81046398
android
bigvul
1
null
null
null
Make Bitmap_createFromParcel check the color count. DO NOT MERGE When reading from the parcel, if the number of colors is invalid, early exit. Add two more checks: setInfo must return true, and Parcel::readInplace must return non-NULL. The former ensures that the previously read values (width, height, etc) were valid, and the latter checks that the Parcel had enough data even if the number of colors was reasonable. Also use an auto-deleter to handle deletion of the SkBitmap. Cherry pick from change-Id: Icbd562d6d1f131a723724883fd31822d337cf5a6 BUG=19666945 Change-Id: Iab0d218c41ae0c39606e333e44cda078eef32291
d44e5bde18a41beda39d49189bef7f2ba7c8f3cb
android
bigvul
1
null
null
null
Verify that the native handle was created The inputs to native_handle_create can cause an overflowed allocation, so check the return value of native_handle_create before accessing the memory it returns. Bug:19334482 Change-Id: I1f489382776c2a1390793a79dc27ea17baa9b2a2 (cherry picked from commit eaac99a7172da52a76ba48c26413778a74951b1a)
7dcd0ec9c91688cfa3f679804ba6e132f9811254
android
bigvul
1
null
null
null
Fix for corruption when numFds or numInts is too large. Bug: 18076253 Change-Id: I4c5935440013fc755e1d123049290383f4659fb6 (cherry picked from commit dfd06b89a4b77fc75eb85a3c1c700da3621c0118)
38803268570f90e97452cd9a30ac831661829091
android
bigvul
1
null
null
null
SampleTable: check integer overflow during table alloc Bug: 15328708 Bug: 15342615 Bug: 15342751 Change-Id: I6bb110a1eba46506799c73be8ff9a4f71c7e7053
edd4a76eb4747bd19ed122df46fa46b452c12a0d
android
bigvul
1
null
null
null
SampleIterator: clear members on seekTo error Bug: 31091777 Change-Id: Iddf99d0011961d0fd3d755e57db4365b6a6a1193 (cherry picked from commit 03237ce0f9584c98ccda76c2474a4ae84c763f5b)
89c03b3b9ff74a507a8b8334c50b08b334483556
android
bigvul
1
null
null
null
IOMX: allow configuration after going to loaded state This was disallowed recently but we still use it as MediaCodcec.stop only goes to loaded state, and does not free component. Bug: 31450460 Change-Id: I72e092e4e55c9f23b1baee3e950d76e84a5ef28d (cherry picked from commit e03b22839d78c841ce0a1a0a1ee1960932188b0b)
7c88b498fda1c2b608a9dd73960a2fd4d7b7e3f7
android
bigvul
1
null
null
null
DO NOT MERGE libvpx: Cherry-pick 8b4c315 from upstream Description from upstream: vp9_alloc_context_buffers: clear cm->mi* on failure this fixes a crash in vp9_dec_setup_mi() via vp9_init_context_buffers() should decoding continue and the decoder resyncs on a smaller frame Bug: 30593752 Change-Id: Iafbf1c4114062bf796f51a6b03be71328f7bcc69 (cherry picked from commit 737c8493693243838128788fe9c3abc51f17338e) (cherry picked from commit 3e88ffac8c80b76e15286ef8a7b3bd8fa246c761)
fdb1b40e7bb147c07bda988c9501ad223795d12d
android
bigvul
1
null
null
null
DO NOT MERGE | libvpx: Cherry-pick 0f42d1f from upstream Description from upstream: vp8: fix decoder crash with invalid leading keyframes decoding the same invalid keyframe twice would result in a crash as the second time through the decoder would be assumed to have been initialized as there was no resolution change. in this case the resolution was itself invalid (0x6), but vp8_peek_si() was only failing in the case of 0x0. invalid-vp80-00-comprehensive-018.ivf.2kf_0x6.ivf tests this case by duplicating the first keyframe and additionally adds a valid one to ensure decoding can resume without error. Bug: 30593765 Change-Id: I0de85f5a5eb5c0a5605230faf20c042b69aea507 (cherry picked from commit fc0466b695dce03e10390101844caa374848d903) (cherry picked from commit 1114575245cb9d2f108749f916c76549524f5136)
063be1485e0099bc81ace3a08b0ec9186dcad693
android
bigvul
1
null
null
null
OMXNodeInstance: sanity check portIndex. Bug: 31385713 Change-Id: Ib91d00eb5cc8c51c84d37f5d36d6b7ca594d201f (cherry picked from commit f80a1f5075a7c6e1982d37c68bfed7c9a611bb20)
1d4feebdb85db46e138530f360d9ff2490e14353
android
bigvul
1
null
null
null
Fix free-after-use for MediaHTTP fix free-after-use when we reconnect to an HTTP media source. Change-Id: I96da5a79f5382409a545f8b4e22a24523f287464 Tests: compilation and eyeballs Bug: 31373622 (cherry picked from commit dd81e1592ffa77812998b05761eb840b70fed121)
3b1c9f692c4d4b7a683c2b358fc89e831a641b88
android
bigvul
1
null
null
null
DO NOT MERGE: Fix vulnerability where large GPS XTRA data can be injected. -Can potentially crash system with OOM. Bug: 29555864 Change-Id: I7157f48dddf148a9bcab029cf12e26a58d8054f4 (cherry picked from commit 79375723f0f201a6759ddbfda57d491ff3fea64e)
218b813d5bc2d7d3952ea1861c38b4aa944ac59b
android
bigvul
1
null
null
null
ANQPFactory: catch all potential parsing errors Fix Merge Conflict for nyc-release The ANQP Element parsing code that parses untrusted data broadcasted by APs is currently untested, and might contain errors that will trigger exceptions that can crash the system service (e.g. null pointer exceptions). To contain this risk, catch all possible exceptions from the invoking ANQP element parsing code from ANQPFactory, and throw them again as ProtocolExceptions, which users of ANQPFactory already catch. BUG: 30230534 Change-Id: Icaba02c0e6739d94482cf4a5e704b59f8d4105b4
c2905409c20c8692d4396b8531b09e7ec81fa3fb
android
bigvul
1
null
null
null
Add EFFECT_CMD_SET_PARAM parameter checking Bug: 30204301 Change-Id: Ib9c3ee1c2f23c96f8f7092dd9e146bc453d7a290 (cherry picked from commit e4a1d91501d47931dbae19c47815952378787ab6)
c894aa36be535886a8e5ff02cdbcd07dd24618f6
android
bigvul
1
null
null
null
Limit capabilities of a11y gesture dispatch. Changing the service side to accept descriptions of motion events, not motion events themselves, so we can control their creation. Bug: 30647115 Change-Id: Ia6772a1fc05df91818e3f88959d1e2b4a35fe0cc (cherry picked from commit a8918f23c712e97fa1dc4911f64827d64fc906e5) (cherry picked from commit 157f416a3549420bd109dbc4931b437089e22d04)
5f256310187b4ff2f13a7abb9afed9126facd7bc
android
bigvul
1
null
null
null
Replace variable-length arrays on stack with malloc. Bug: 30202619 Change-Id: Ib95e08a1c009d88a4b4fd8d8fdba0641c6129008 (cherry picked from commit 943905bb9f99e3caa856b42c531e2be752da8834)
95610818918f6f11fe7d23aca1380e6c0fac2af0
android
bigvul
1
null
null
null
Fix vold vulnerability in FrameworkListener Modify FrameworkListener to ignore commands that exceed the maximum buffer length and send an error message. Bug: 29831647 Change-Id: I9e57d1648d55af2ca0191bb47868e375ecc26950 Signed-off-by: Connor O'Brien <[email protected]> (cherry picked from commit baa126dc158a40bc83c17c6d428c760e5b93fb1a) (cherry picked from commit 470484d2a25ad432190a01d1c763b4b36db33c7e)
771ab014c24a682b32990da08e87e2f0ab765bd2
android
bigvul
1
null
null
null
better validation lengths of strings in ID3 tags Validate lengths on strings in ID3 tags, particularly around 0. Also added code to handle cases when we can't get memory for copies of strings we want to extract from these tags. Affects L/M/N/master, same patch for all of them. Bug: 30744884 Change-Id: I2675a817a39f0927ec1f7e9f9c09f2e61020311e Test: play mp3 file which caused a <0 length. (cherry picked from commit d23c01546c4f82840a01a380def76ab6cae5d43f)
6d0249be2275fd4086783f259f4e2c54722a7c55
android
bigvul
1
null
null
null
Limit account id and id to longs The security issue occurs because id is allowed to be an arbitrary path instead of being limited to what it is -- a long. Both id and account id are now parsed into longs (and if either fails, an error will be logged and null will be returned). Tested/verified error is logged using the reported attack. BUG=30745403 Change-Id: Ia21418545bbaeb96fb5ab6c3f4e71858e57b8684 (cherry picked from commit 9794d7e8216138adf143a3b6faf3d5683316a662)
6b2b0bd7c771c698f11d7be89c2c57c8722c7454
android
bigvul
1
null
null
null
Bind fingerprint when we start authentication This fixes a bug where it was possible to authenticate the wrong user. We now bind the userId when we start authentication and confirm it when authentication completes. Fixes bug 30744668 (Cherry pick from Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2) Change-Id: I3584790c39eb2e8c435ad1b2d887bf9b8ebd36fe (cherry picked from commit 837d052ed4b5b75dfd4af44f5ad268e683bf2e13)
f5334952131afa835dd3f08601fb3bced7b781cd
android
bigvul
1
null
null
null
Camera: Prevent data size overflow Add a function to check overflow when calculating metadata data size. Bug: 30741779 Change-Id: I6405fe608567a4f4113674050f826f305ecae030
8e7a2b4d13bff03973dbad2bfb88a04296140433
android
bigvul
1
null
null
null
Camera metadata: Check for inconsistent data count Resolve merge conflict for nyc-release Also check for overflow of data/entry count on append. Bug: 30591838 Change-Id: Ibf4c3c6e236cdb28234f3125055d95ef0a2416a2
e9e44f797742f52996ebf307740dad58c28fd9b5
android
bigvul
1
null
null
null
30481342: Security Vulnerability - TOCTOU in MmsProvider allows access to files as phone (radio) uid Problem: MmsProvider.openFile validated the current _data column in the DB and then called ContentProvider.openFileHelper which was again reading from the DB. A race condition could cause the second DB read to read an updated, malicious value. Fix: instead of doing the first DB check and calling ContentProvider.openFileHelper, we're now just calling MmsProvider.safeOpenFileHelper which does a single check. Test: used the POC provided for this incident. b/30481342 Change-Id: I653129359130b9fae59d4c355320b266c158a698 (cherry picked from commit 5bc7f9682d72c89ba252be6471b2db9b7e7815e3)
3a3a5d145d380deef2d5b7c3150864cd04be397f
android
bigvul
1
null
null
null
MediaPlayerService: avoid invalid static cast Bug: 30204103 Change-Id: Ie0dd3568a375f1e9fed8615ad3d85184bcc99028 (cherry picked from commit ee0a0e39acdcf8f97e0d6945c31ff36a06a36e9d)
0c3b93c8c2027e74af642967eee5c142c8fd185d
android
bigvul
1
null
null
null
DO NOT MERGE: Clean up when recycling a pid with a pending launch Fix for accidental launch of a broadcast receiver in an incorrect app instance. Bug: 30202481 Change-Id: I8ec8f19c633f3aec8da084dab5fd5b312443336f (cherry picked from commit 55eacb944122ddc0a3bb693b36fe0f07b0fe18c9)
6c049120c2d749f0c0289d822ec7d0aa692f55c5
android
bigvul
1
null
null
null
Process: Fix communication with zygote. Don't write partial requests, and don't return (or throw) early after partially reading a response. bug: 30143607 Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1 (cherry picked from commit 448be0a62209c977593d81617853a8a428d013df)
2c7008421cb67f5d89f16911bdbe36f6c35311ad
android
bigvul
1
null
null
null
soundtrigger: add size check on sound model and recogntion data Bug: 30148546 Change-Id: I082f535a853c96571887eeea37c6d41ecee7d8c0 (cherry picked from commit bb00d8f139ff51336ab3c810d35685003949bcf8) (cherry picked from commit ef0c91518446e65533ca8bab6726a845f27c73fd)
035cb12f392860113dce96116a5150e2fde6f0cc
android
bigvul
1
null
null
null