func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static CURLcode wolfssl_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn, int sockindex, bool *done) { return wolfssl_connect_common(data, conn, sockindex, TRUE, done); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
134,234,630,588,144,200,000,000,000,000,000,000,000
6
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
type_add_cattrs (MonoDynamicImage *assembly, MonoReflectionTypeBuilder *tb) { int i; mono_image_add_cattrs (assembly, tb->table_idx, MONO_CUSTOM_ATTR_TYPEDEF, tb->cattrs); if (tb->fields) { for (i = 0; i < tb->num_fields; ++i) { MonoReflectionFieldBuilder* fb; fb = mono_array_get (tb->fields, MonoReflectio...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
33,991,438,634,497,245,000,000,000,000,000,000,000
48
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
rb_str_aset_m(argc, argv, str) int argc; VALUE *argv; VALUE str; { if (argc == 3) { if (TYPE(argv[0]) == T_REGEXP) { rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]); } else { rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]); } return argv[2]; } if (argc...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
225,780,020,848,544,400,000,000,000,000,000,000,000
19
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static CURLcode create_conn(struct SessionHandle *data, struct connectdata **in_connect, bool *async) { CURLcode result = CURLE_OK; struct connectdata *conn; struct connectdata *conn_temp = NULL; size_t urllen; char *user = NULL; char *passwd = NULL; ...
0
[ "CWE-264" ]
curl
31be461c6b659312100c47be6ddd5f0f569290f6
151,134,826,284,863,700,000,000,000,000,000,000,000
509
ConnectionExists: for NTLM re-use, require credentials to match CVE-2015-3143 Bug: http://curl.haxx.se/docs/adv_20150422A.html Reported-by: Paras Sethia
static int holtek_probe(struct hid_device *hdev, const struct hid_device_id *id) { int ret; ret = hid_parse(hdev); if (ret) { hid_err(hdev, "parse failed\n"); goto err; } ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); if (ret) { hid_err(hdev, "hw start failed\n"); goto err; } holtek...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
45,878,278,794,671,330,000,000,000,000,000,000,000
22
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static int __io_splice_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_splice* sp = &req->splice; unsigned int valid_flags = SPLICE_F_FD_IN_FIXED | SPLICE_F_ALL; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; sp->file_in = NULL; sp->len = READ_ONCE(sqe->len);...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
117,130,510,369,759,030,000,000,000,000,000,000,000
32
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
void testGetUrl() { cxxtools::QueryParams q; q.add("first name", "Tommi"); q.add("last name", "M\xa4kitalo"); q.add("some value"); std::string url = q.getUrl(); CXXTOOLS_UNIT_ASSERT_EQUALS(url, "first+name=Tommi&last+name=M%A4kital...
0
[ "CWE-399" ]
cxxtools
142bb2589dc184709857c08c1e10570947c444e3
213,203,959,019,315,040,000,000,000,000,000,000,000
10
fix parsing double % in query parameters
int imap_fast_trash (CONTEXT* ctx, char* dest) { IMAP_DATA* idata; char mbox[LONG_STRING]; char mmbox[LONG_STRING]; char prompt[LONG_STRING]; int n, rc; IMAP_MBOX mx; int triedcreate = 0; BUFFER *sync_cmd = NULL; int err_continue = MUTT_NO; idata = (IMAP_DATA*) ctx->data; if (imap_parse_path (de...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
78,271,968,279,183,850,000,000,000,000,000,000,000
106
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
**/ CImgList<T> get_split(const char axis, const int nb=-1) const { CImgList<T> res; if (is_empty()) return res; const char _axis = cimg::lowercase(axis); if (nb<0) { // Split by bloc size. const unsigned int dp = (unsigned int)(nb?-nb:1); switch (_axis) { case '...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
87,830,253,292,262,630,000,000,000,000,000,000,000
131
Fix other issues in 'CImg<T>::load_bmp()'.
ppmd_free(void *p, void *address) { (void)p; free(address); }
0
[ "CWE-190", "CWE-125" ]
libarchive
e79ef306afe332faf22e9b442a2c6b59cb175573
31,939,805,244,550,867,000,000,000,000,000,000,000
5
Issue #718: Fix TALOS-CAN-152 If a 7-Zip archive declares a rediculously large number of substreams, it can overflow an internal counter, leading a subsequent memory allocation to be too small for the substream data. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this issue.
static int ntop_http_get_prefix(lua_State* vm) { ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); lua_pushstring(vm, ntop->getPrefs()->get_http_prefix()); return(CONST_LUA_OK); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
330,563,920,367,649,260,000,000,000,000,000,000,000
6
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static void detect_allow_debuggers(int argc, char **argv) { int i; // detect --allow-debuggers for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--allow-debuggers") == 0) { arg_allow_debuggers = 1; break; } // detect end of firejail params if (strcmp(argv[i], "--") == 0) break; if (strncmp(ar...
1
[ "CWE-703" ]
firejail
6b8dba29d73257311564ee7f27b9b14758cc693e
49,805,141,378,251,375,000,000,000,000,000,000,000
17
security fix
BOOL ValidateOpensslSignature(BYTE* pbBuffer, DWORD dwBufferLen, BYTE* pbSignature, DWORD dwSigLen) { HCRYPTPROV hProv = 0; HCRYPTHASH hHash = 0; HCRYPTKEY hPubKey; // We could load and convert an openssl PEM, but since we know what we need... RSA_2048_PUBKEY pbMyPubKey = { { PUBLICKEYBLOB, CUR_BLOB_VERSION, 0, ...
0
[ "CWE-94" ]
rufus
19472668370aacec0dba9dda306601cfc4a4ed7e
143,372,723,807,671,900,000,000,000,000,000,000,000
78
[pki] don't link with wintrust.lib * WinTrust.lib is responsible for the MSASN1.dll sideloading issue described in #1877, so, since we only use it for WinVerifyTrustEx(), hook into that function manually. * Closes #1877 for the MinGW side. * Note that we will probably try to use the method suggested by @assarbad and...
AddOpenedHttpSocket(const Comm::ConnectionPointer &conn) { bool found = false; for (int i = 0; i < NHttpSockets && !found; ++i) { if ((found = HttpSockets[i] < 0)) HttpSockets[i] = conn->fd; } return found; }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
85,951,172,744,162,700,000,000,000,000,000,000,000
9
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
assemble_mountinfo(struct parsed_mount_info *parsed_info, const char *thisprogram, const char *mountpoint, const char *orig_dev, char *orgoptions) { int rc; rc = drop_child_privs(); if (rc) goto assemble_exit; if (getuid()) { rc = check_fstab(thisprogram, mountpoint, orig_dev, &orgoptions); i...
1
[ "CWE-362" ]
cifs-utils
810f7e4e0f2dbcbee0294d9b371071cb08268200
48,602,851,094,493,350,000,000,000,000,000,000,000
98
mount.cifs: guard against signals by unprivileged users If mount.cifs is setuid root, then the unprivileged user who runs the program can send the mount.cifs process a signal and kill it. This is not a huge problem unless we happen to be updating the mtab at the time, in which case the mtab lockfiles might not get cle...
static u32 iwl_dump_ini_paging_get_size(struct iwl_fw_runtime *fwrt, struct iwl_fw_ini_region_cfg *reg) { int i; u32 range_header_len = sizeof(struct iwl_fw_ini_error_dump_range); u32 size = sizeof(struct iwl_fw_ini_error_dump); if (fwrt->trans->trans_cfg->gen2) { for (i = 0; i < iwl_dump_ini_paging_ranges(...
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
144,628,091,149,709,160,000,000,000,000,000,000,000
19
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
re_search (bufp, string, size, startpos, range, regs) struct re_pattern_buffer *bufp; const char *string; int size, startpos, range; struct re_registers *regs; { return re_search_2 (bufp, NULL, 0, string, size, startpos, range, regs, size); }
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
247,483,182,249,101,630,000,000,000,000,000,000,000
9
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
tell_controller_about_resolved_result(entry_connection_t *conn, int answer_type, size_t answer_len, const char *answer, int ttl, t...
0
[ "CWE-532" ]
tor
602dcd8e3774b09242787ba3b0f0e0599530638a
239,367,727,125,550,160,000,000,000,000,000,000,000
33
hs-v2: Only log once the connection warning to v2 Closes #40474 Signed-off-by: David Goulet <dgoulet@torproject.org>
static void *name_block(struct mdesc_hdr *mdesc) { return ((void *) node_block(mdesc)) + mdesc->node_sz; }
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
77,657,613,566,759,510,000,000,000,000,000,000,000
4
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
struct sdma_engine *sdma_select_engine_vl( struct hfi1_devdata *dd, u32 selector, u8 vl) { struct sdma_vl_map *m; struct sdma_map_elem *e; struct sdma_engine *rval; /* NOTE This should only happen if SC->VL changed after the initial * checks on the QP/AH * Default will return engine 0 below */ ...
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
28,454,364,020,618,490,000,000,000,000,000,000,000
33
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
static void tcp_urg(struct sock *sk, struct sk_buff *skb, const struct tcphdr *th) { struct tcp_sock *tp = tcp_sk(sk); /* Check if we get a new urgent pointer - normally not. */ if (th->urg) tcp_check_urg(sk, th); /* Do we wait for any urgent data? - normally not... */ if (tp->urg_data == TCP_URG_NOTYET) { u...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
146,516,928,245,751,260,000,000,000,000,000,000,000
24
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
int lxc_unstack_mountpoint(const char *path, bool lazy) { int ret; int umounts = 0; pop_stack: ret = umount2(path, lazy ? MNT_DETACH : 0); if (ret < 0) { /* We consider anything else than EINVAL deadly to prevent going * into an infinite loop. (The other alternative is constantly * parsing /proc/self/mount...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
203,504,693,352,098,060,000,000,000,000,000,000,000
31
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
hv_store_string(HV *hv, const char *key, SV *val) { int32 hlen; char *hkey; SV **ret; hkey = (char *) pg_do_encoding_conversion((unsigned char *) key, strlen(key), GetDatabaseEncoding(), PG_UTF8); /* * This seems nowhere documented, but under Perl 5.8.0 and up, hv_store() * recognizes a ne...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
80,093,879,736,486,160,000,000,000,000,000,000,000
24
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
void LibRaw::adjust_bl() { int clear_repeat=0; if (O.user_black >= 0) { C.black = O.user_black; clear_repeat = 1; } for(int i=0; i<4; i++) if(O.user_cblack[i]>-1000000) { C.cblack[i] = O.user_cblack[i]; clear_repeat = 1; } if(clear_repeat) C...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
142,404,285,122,544,130,000,000,000,000,000,000,000
59
fixed two more problems found by fuzzer
TEST(SegmentSumOpModelTest, Int32Test_OneDimension) { SegmentSumOpModel<int32_t> model({TensorType_INT32, {3}}, {TensorType_INT32, {3}}); model.PopulateTensor<int32_t>(model.data(), {1, 2, 3}); model.PopulateTensor<int32_t>(model.segment_ids(), {0, 0, 1}); model.Invoke(); EX...
0
[ "CWE-703", "CWE-787" ]
tensorflow
204945b19e44b57906c9344c0d00120eeeae178a
16,233,027,097,298,190,000,000,000,000,000,000,000
9
[tflite] Validate segment ids for segment_sum. Segment identifiers in segment_sum should be in a 1-D tensor of same size as the first dimension of the input. The values of the tensor should be integers from {0, 1, 2, ... k-1}, where k is the first dimension of the input. The segment identifiers must not contain jumps ...
static void php_cli_server_poller_remove(php_cli_server_poller *poller, int mode, int fd) /* {{{ */ { if (mode & POLLIN) { PHP_SAFE_FD_CLR(fd, &poller->rfds); } if (mode & POLLOUT) { PHP_SAFE_FD_CLR(fd, &poller->wfds); } #ifndef PHP_WIN32 if (fd == poller->max_fd) { while (fd > 0) { fd--; if (PHP_SAFE_...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
11,906,944,490,246,394,000,000,000,000,000,000,000
20
slim post data
static int range_should_be_prefix(const unsigned char *min, const unsigned char *max, const int length) { unsigned char mask; int i, j; OPENSSL_assert(memcmp(min, max, length) <= 0); for (i = 0; i < length && min[i] == max[i]; i++) ; for (j = length - 1; j >= 0 && ...
0
[ "CWE-119", "CWE-787" ]
openssl
068b963bb7afc57f5bdd723de0dd15e7795d5822
126,101,019,186,620,770,000,000,000,000,000,000,000
44
Avoid out-of-bounds read Fixes CVE 2017-3735 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4276) (cherry picked from commit b23171744b01e473ebbfd6edad70c1c3825ffbcd)
CURLcode Curl_ossl_set_client_cert(struct Curl_easy *data, SSL_CTX *ctx, char *cert_file, const struct curl_blob *cert_blob, const char *cert_type, char *key_file, const struct cur...
0
[]
curl
139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08
176,551,961,564,496,460,000,000,000,000,000,000,000
15
openssl: don't leak the SRP credentials in redirects either Follow-up to 620ea21410030 Reported-by: Harry Sintonen Closes #8751
static int FNAME(cmpxchg_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gfn_t table_gfn, unsigned index, pt_element_t orig_pte, pt_element_t new_pte) { pt_element_t ret; pt_element_t *table; struct page *page; gpa_t gpa; gpa = mmu->translate_gpa(vcpu, table_gfn << PAGE_SHIFT, PFERR_USER_MASK|PFERR...
0
[ "CWE-20", "CWE-787" ]
linux
fa3d315a4ce2c0891cdde262562e710d95fba19e
163,002,015,541,190,000,000,000,000,000,000,000,000
24
KVM: Validate userspace_addr of memslot when registered This way, we can avoid checking the user space address many times when we read the guest memory. Although we can do the same for write if we check which slots are writable, we do not care write now: reading the guest memory happens more often than writing. [avi...
CURLcode Curl_open(struct SessionHandle **curl) { CURLcode result; struct SessionHandle *data; /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = calloc(1, sizeof(struct SessionHandle)); if(!data) { /* this is a very serious error */ DEBUGF(fprintf(stderr, "Error: cal...
0
[ "CWE-200" ]
curl
b3875606925536f82fc61f3114ac42f29eaf6945
26,956,144,493,002,706,000,000,000,000,000,000,000
61
curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds When duplicating a handle, the data to post was duplicated using strdup() when it could be binary and contain zeroes and it was not even zero terminated! This caused read out of bounds crashes/segfaults. Since the lib/strdup.c file no longer is easily sha...
send_unicast_request(struct neighbour *neigh, const unsigned char *prefix, unsigned char plen) { int rc, v4, pb, len; /* make sure any buffered updates go out before this request. */ flushupdates(neigh->ifp); debugf(BABEL_DEBUG_COMMON,"sending unicast request to %s for %s.", ...
0
[ "CWE-787" ]
frr
c3793352a8d76d2eee1edc38a9a16c1c8a6573f4
70,919,878,270,091,850,000,000,000,000,000,000,000
27
babeld: fix #10502 #10503 by repairing the checks on length This patch repairs the checking conditions on length in four functions: babel_packet_examin, parse_hello_subtlv, parse_ihu_subtlv, and parse_update_subtlv Signed-off-by: qingkaishi <qingkaishi@gmail.com>
void Box_ipma::derive_box_version() { int version = 0; bool large_property_indices = false; for (const Entry& entry : m_entries) { if (entry.item_ID > 0xFFFF) { version = 1; } for (const auto& assoc : entry.associations) { if (assoc.property_index > 0x7F) { large_property_indices...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
58,164,866,336,694,350,000,000,000,000,000,000,000
20
force fraction to a limited resolution to finally solve those pesky numerical edge cases
static inline hwaddr pcnet_rdra_addr(PCNetState *s, int idx) { while (idx < 1) idx += CSR_RCVRL(s); return s->rdra + ((CSR_RCVRL(s) - idx) * (BCR_SWSTYLE(s) ? 16 : 8)); }
0
[]
qemu
837f21aacf5a714c23ddaadbbc5212f9b661e3f7
107,241,823,296,328,140,000,000,000,000,000,000,000
5
net: pcnet: add check to validate receive data size(CVE-2015-7504) In loopback mode, pcnet_receive routine appends CRC code to the receive buffer. If the data size given is same as the buffer size, the appended CRC code overwrites 4 bytes after s->buffer. Added a check to avoid that. Reported by: Qinghao Tang <luodal...
setEdgeAttr(Agedge_t * ep, char *name, char *value, userdata_t * ud) { Agsym_t *ap; char *attrname; if (strcmp(name, "headport") == 0) { if (ud->edgeinverted) attrname = "tailport"; else attrname = "headport"; ap = agattr(root, AGEDGE, attrname, 0); if (!ap) ap = agattr(root, AGEDGE, att...
0
[ "CWE-476" ]
graphviz
839085f8026afd6f6920a0c31ad2a9d880d97932
298,284,173,060,837,340,000,000,000,000,000,000,000
30
attempted fix for null pointer deference on malformed input
static int _nfs4_do_open(struct inode *dir, struct path *path, fmode_t fmode, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res) { struct nfs4_state_owner *sp; struct nfs4_state *state = NULL; struct nfs_server *server = NFS_SERVER(dir); struct nfs4_opendata *opendata; int s...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
56,922,254,654,115,350,000,000,000,000,000,000,000
50
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static errcode_t write_primary_superblock(ext2_filsys fs, struct ext2_super_block *super) { __u16 *old_super, *new_super; int check_idx, write_idx, size; errcode_t retval; if (!fs->io->manager->write_byte || !fs->orig_super) { fallback: io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET); retval = io_c...
0
[]
e2fsprogs
f66e6ce4446738c2c7f43d41988a3eb73347e2f5
118,256,319,207,102,840,000,000,000,000,000,000,000
42
libext2fs: avoid buffer overflow if s_first_meta_bg is too big If s_first_meta_bg is greater than the of number block group descriptor blocks, then reading or writing the block group descriptors will end up overruning the memory buffer allocated for the descriptors. Fix this by limiting first_meta_bg to no more than ...
static int snmp_translate(struct nf_conn *ct, enum ip_conntrack_info ctinfo, struct sk_buff *skb) { struct iphdr *iph = ip_hdr(skb); struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); u_int16_t udplen = ntohs(udph->len); u_int16_t paylen = udplen - sizeof(struct udphdr); int dir = CTINFO2...
0
[ "CWE-119" ]
linux-2.6
ddb2c43594f22843e9f3153da151deaba1a834c5
298,862,230,042,055,620,000,000,000,000,000,000,000
36
asn1: additional sanity checking during BER decoding - Don't trust a length which is greater than the working buffer. An invalid length could cause overflow when calculating buffer size for decoding oid. - An oid length of zero is invalid and allows for an off-by-one error when decoding oid because the first su...
wenclose(const WINDOW *win, int y, int x) /* check to see if given window encloses given screen location */ { bool result = FALSE; T((T_CALLED("wenclose(%p,%d,%d)"), (const void *) win, y, x)); if (win != 0) { y -= win->_yoffset; result = ((win->_begy <= y && win->_begx <= x && (win->_begx + w...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
250,757,760,976,676,000,000,000,000,000,000,000,000
16
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
signed_descriptor_get_annotations(signed_descriptor_t *desc) { return signed_descriptor_get_body_impl(desc, 1); }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
265,124,498,260,716,500,000,000,000,000,000,000,000
4
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
static int hls_read_header(AVFormatContext *s) { URLContext *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque; HLSContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0; c->interrupt_callback = &s->interrupt_callback; c->first_packet = 1; c->first_timestamp = AV_NOPTS_VALU...
0
[ "CWE-703" ]
FFmpeg
7ba100d3e6e8b1e5d5342feb960a7f081d6e15af
88,619,711,585,540,420,000,000,000,000,000,000,000
192
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
static int protocol_client_auth(VncState *vs, uint8_t *data, size_t len) { /* We only advertise 1 auth scheme at a time, so client * must pick the one we sent. Verify this */ if (data[0] != vs->auth) { /* Reject auth */ VNC_DEBUG("Reject auth %d because it didn't match advertized\n", (int)data[0]); ...
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
132,562,629,913,477,590,000,000,000,000,000,000,000
57
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
_check_job_credential(launch_tasks_request_msg_t *req, uid_t uid, int node_id, hostset_t *step_hset, uint16_t protocol_version) { slurm_cred_arg_t arg; hostset_t s_hset = NULL; bool user_ok = _slurm_authorized_user(uid); bool verified = true; int host_index = -1; int rc; slurm_cred_t *cred...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
1,153,564,253,048,418,400,000,000,000,000,000,000
226
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
R_API int r_cmd_alias_append_raw(RCmd *cmd, const char *k, const ut8 *a, int sz) { RCmdAliasVal *v_old = r_cmd_alias_get (cmd, k); if (v_old) { if (!v_old->is_data) { return 1; } int new_len = 0; ut8 *new = alias_append_internal (&new_len, v_old, a, sz); if (!new) { return 1; } r_cmd_alias_set_raw...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
292,935,622,288,134,230,000,000,000,000,000,000,000
18
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
unconditional(const struct ipt_ip *ip) { unsigned int i; for (i = 0; i < sizeof(*ip)/sizeof(__u32); i++) if (((__u32 *)ip)[i]) return 0; return 1; }
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
144,373,342,018,141,700,000,000,000,000,000,000,000
10
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
int X509V3_add_value_bool(const char *name, int asn1_bool, STACK_OF(CONF_VALUE) **extlist) { if (asn1_bool) return X509V3_add_value(name, "TRUE", extlist); return X509V3_add_value(name, "FALSE", extlist); }
0
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
238,319,804,722,452,260,000,000,000,000,000,000,000
7
Fix append_ia5 function to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
bool dns_name_match(const char *zone, const char *name, size_t *host_part_len) { size_t zl = strlen(zone); size_t nl = strlen(name); ssize_t zi, ni; static const size_t fixup = 'a' - 'A'; if (zl > nl) { return false; } for (zi = zl, ni = nl; zi >= 0; zi--, ni--) { char zc = zone[zi]; char nc = name[ni]; ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
248,208,183,370,523,460,000,000,000,000,000,000,000
40
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void undo_dev_pagemap(int *nr, int nr_start, struct page **pages) { while ((*nr) - nr_start) { struct page *page = pages[--(*nr)]; ClearPageReferenced(page); put_page(page); } }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
77,434,729,911,699,050,000,000,000,000,000,000,000
9
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void exec_write_complete_cb(struct gatt_db_attribute *attr, int err, void *user_data) { struct exec_data *data = user_data; uint16_t handle = gatt_db_attribute_get_handle(attr); exec_next_prep_write(data, handle, err); }
0
[ "CWE-287" ]
bluez
00da0fb4972cf59e1c075f313da81ea549cb8738
154,551,665,348,633,070,000,000,000,000,000,000,000
8
shared/gatt-server: Fix not properly checking for secure flags When passing the mask to check_permissions all valid permissions for the operation must be set including BT_ATT_PERM_SECURE flags.
networkstatus_compute_bw_weights_v10(smartlist_t *chunks, int64_t G, int64_t M, int64_t E, int64_t D, int64_t T, int64_t weight_scale) { bw_weights_error_t berr = 0; int64_t Wgg = -1, Wgd = -1; int64_t Wmg = -1, Wme = -1, Wmd = -1; int64_...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
115,449,687,571,141,450,000,000,000,000,000,000,000
236
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno, J2K_T2_MODE t2_mode) { int p, q, pino; int compno, resno; int maxres = 0; int maxprec = 0; opj_pi_iterator_t *pi = NULL; opj_tcp_t *tcp = NULL; opj_tccp_t *tccp = NUL...
0
[ "CWE-369" ]
openjpeg
c5bd64ea146162967c29bd2af0cbb845ba3eaaaf
203,564,590,889,536,730,000,000,000,000,000,000,000
151
[MJ2] To avoid divisions by zero / undefined behaviour on shift Signed-off-by: Young_X <YangX92@hotmail.com>
void copyBytes(InStream* is, size_t length) { while (length > 0) { size_t n = check(1, length); is->readBytes(ptr, n); ptr += n; length -= n; } }
0
[ "CWE-20", "CWE-787" ]
tigervnc
0943c006c7d900dfc0281639e992791d6c567438
335,196,647,013,777,800,000,000,000,000,000,000,000
8
Use size_t for lengths in stream objects Provides safety against them accidentally becoming negative because of bugs in the calculations. Also does the same to CharArray and friends as they were strongly connection to the stream objects.
const void *dup_iter(struct iov_iter *new, struct iov_iter *old, gfp_t flags) { *new = *old; if (unlikely(new->type & ITER_PIPE)) { WARN_ON(1); return NULL; } if (new->type & ITER_BVEC) return new->bvec = kmemdup(new->bvec, new->nr_segs * sizeof(struct bio_vec), flags); else /* iovec and kv...
0
[ "CWE-200" ]
linux
b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
238,064,399,498,637,760,000,000,000,000,000,000,000
17
fix a fencepost error in pipe_advance() The logics in pipe_advance() used to release all buffers past the new position failed in cases when the number of buffers to release was equal to pipe->buffers. If that happened, none of them had been released, leaving pipe full. Worse, it was trivial to trigger and we end up ...
CtPtr ProtocolV2::ready() { ldout(cct, 25) << __func__ << dendl; reconnecting = false; replacing = false; // make sure no pending tick timer if (connection->last_tick_id) { connection->center->delete_time_event(connection->last_tick_id); } connection->last_tick_id = connection->center->create_time_e...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
282,671,634,642,485,030,000,000,000,000,000,000,000
33
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx) { /* just a convenient interface to EC_POINTs_mul() */ const EC_POINT *points[1]; const BIGNUM *scalars[1]; points[0] = point; scalars[0] = p_sc...
0
[]
openssl
21c856b75d81eff61aa63b4f036bb64a85bf6d46
157,889,185,478,320,860,000,000,000,000,000,000,000
15
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
static void checkdup(JF, js_Ast *list, js_Ast *end) { char nbuf[32], sbuf[32]; const char *needle, *straw; if (end->a->type == EXP_NUMBER) needle = jsV_numbertostring(J, nbuf, end->a->number); else needle = end->a->string; while (list->a != end) { if (list->a->type == end->type) { js_Ast *prop = list->a...
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
143,894,534,065,839,760,000,000,000,000,000,000,000
23
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
fix_current_dir(void) { if (curwin->w_localdir != NULL || curtab->tp_localdir != NULL) { char_u *dirname; // Window or tab has a local directory: Save current directory as // global directory (unless that was done already) and change to the // local directory. if (globaldir == NULL) { char_u cwd[MAX...
0
[ "CWE-416" ]
vim
28d032cc688ccfda18c5bbcab8b50aba6e18cde5
324,797,492,880,703,960,000,000,000,000,000,000,000
37
patch 8.2.4979: accessing freed memory when line is flushed Problem: Accessing freed memory when line is flushed. Solution: Make a copy of the pattern to search for.
func_clear_items(ufunc_T *fp) { ga_clear_strings(&(fp->uf_args)); ga_clear_strings(&(fp->uf_def_args)); ga_clear_strings(&(fp->uf_lines)); VIM_CLEAR(fp->uf_arg_types); VIM_CLEAR(fp->uf_block_ids); VIM_CLEAR(fp->uf_va_name); clear_type_list(&fp->uf_type_list); // Increment the refcount o...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
258,645,529,786,342,800,000,000,000,000,000,000,000
33
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
EXPORTED void freestrlist(struct strlist *l) { struct strlist *n; while (l) { n = l->next; free(l->s); if (l->p) charset_freepat(l->p); free((char *)l); l = n; } }
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
295,053,212,030,980,660,000,000,000,000,000,000,000
12
annotate: don't allow everyone to write shared server entries
perf_event_set_addr_filter(struct perf_event *event, char *filter_str) { LIST_HEAD(filters); int ret; /* * Since this is called in perf_ioctl() path, we're already holding * ctx::mutex. */ lockdep_assert_held(&event->ctx->mutex); if (WARN_ON_ONCE(event->parent)) return -EINVAL; ret = perf_event_parse_a...
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
315,136,758,066,622,900,000,000,000,000,000,000,000
38
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon) { const char *quotestr = "`"; const char *tick = NULL; char *ptr, *ptr2, *str; char *arroba = NULL; int i, ret = 0, pipefd; bool usemyblock = false; int scr_html = -1; int scr_color = -1; bool eos = false; bool haveQuote = false; if (!cmd) {...
0
[ "CWE-119", "CWE-787" ]
radare2
00e8f205475332d7842d0f0d1481eeab4e83017c
75,408,052,356,095,460,000,000,000,000,000,000,000
758
Fix #7727 - undefined pointers and out of band string access fixes
int main(void) { int fd, len, sock_opt; int error; struct cn_msg *message; struct pollfd pfd; struct nlmsghdr *incoming_msg; struct cn_msg *incoming_cn_msg; struct hv_kvp_msg *hv_msg; char *p; char *key_value; char *key_name; int op; int pool; char *if_name; struct hv_kvp_ipaddr_value *kvp_ip_val; daemo...
1
[]
char-misc
95a69adab9acfc3981c504737a2b6578e4d846ef
155,431,144,096,164,840,000,000,000,000,000,000,000
282
tools: hv: Netlink source address validation allows DoS The source code without this patch caused hypervkvpd to exit when it processed a spoofed Netlink packet which has been sent from an untrusted local user. Now Netlink messages with a non-zero nl_pid source address are ignored and a warning is printed into the sysl...
int compat_restore_altstack(const compat_stack_t __user *uss) { int err = compat_sys_sigaltstack(uss, NULL); /* squash all but -EFAULT for now */ return err == -EFAULT ? err : 0; }
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
332,954,621,730,010,400,000,000,000,000,000,000,000
6
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
static int svm_pre_enter_smm(struct kvm_vcpu *vcpu, char *smstate) { struct vcpu_svm *svm = to_svm(vcpu); int ret; if (is_guest_mode(vcpu)) { /* FED8h - SVM Guest */ put_smstate(u64, smstate, 0x7ed8, 1); /* FEE0h - SVM Guest VMCB Physical Address */ put_smstate(u64, smstate, 0x7ee0, svm->nested.vmcb); sv...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
205,022,643,007,912,300,000,000,000,000,000,000,000
21
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
CImg<T>& draw_image(const int x0, const int y0, const int z0, const CImg<ti>& sprite, const CImg<tm>& mask, const float opacity=1, const float mask_max_value=1) { return draw_image(x0,y0,z0,0,sprite,mask,opacity,mask_max_value); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
288,483,344,245,327,180,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void FileIo::setPath(const std::wstring& wpath) { close(); if (p_->wpMode_ == Impl::wpStandard) { std::string path; path.assign(wpath.begin(), wpath.end()); p_->path_ = path; } else { p_->wpath_ = wpath; } }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
7,507,238,127,092,291,000,000,000,000,000,000,000
10
Fix https://github.com/Exiv2/exiv2/issues/55
lys_node_dup_recursion(struct lys_module *module, struct lys_node *parent, const struct lys_node *node, struct unres_schema *unres, int shallow, int finalize) { struct lys_node *retval = NULL, *iter, *p; struct ly_ctx *ctx = module->ctx; enum int_log_opts prev_ilo; int i, j, rc; ...
1
[ "CWE-617" ]
libyang
5ce30801f9ccc372bbe9b7c98bb5324b15fb010a
285,924,519,260,520,700,000,000,000,000,000,000,000
455
schema tree BUGFIX freeing nodes with no module set Context must be passed explicitly for these cases. Fixes #1452
xps_setdash(gx_device_vector *vdev, const float *pattern, uint count, double offset) { gx_device_xps *xps = (gx_device_xps *)vdev; if_debug2m('_', vdev->memory, "xps_setdash count:%d offset:%g\n", count, offset); xps->can_stroke = (count == 0); return 0; }
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
108,484,534,804,460,670,000,000,000,000,000,000,000
8
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static int check_call(struct verifier_env *env, int func_id) { struct verifier_state *state = &env->cur_state; const struct bpf_func_proto *fn = NULL; struct reg_state *regs = state->regs; struct bpf_map *map = NULL; struct reg_state *reg; int i, err; /* find function prototype */ if (func_id < 0 || func_id >=...
0
[ "CWE-200" ]
linux
a1b14d27ed0965838350f1377ff97c93ee383492
122,767,051,560,803,900,000,000,000,000,000,000,000
81
bpf: fix branch offset adjustment on backjumps after patching ctx expansion When ctx access is used, the kernel often needs to expand/rewrite instructions, so after that patching, branch offsets have to be adjusted for both forward and backward jumps in the new eBPF program, but for backward jumps it fails to account ...
void setUpstreamLocalAddress( const Network::Address::InstanceConstSharedPtr& upstream_local_address) override { upstream_local_address_ = upstream_local_address; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
224,056,288,451,655,200,000,000,000,000,000,000,000
4
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
void SSL_CTX_set_cert_store(SSL_CTX *ctx,X509_STORE *store) { if (ctx->cert_store != NULL) X509_STORE_free(ctx->cert_store); ctx->cert_store=store; }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
64,464,684,699,873,670,000,000,000,000,000,000,000
6
Add Next Protocol Negotiation.
QPDFWriter::setR4EncryptionParameters( char const* user_password, char const* owner_password, bool allow_accessibility, bool allow_extract, qpdf_r3_print_e print, qpdf_r3_modify_e modify, bool encrypt_metadata, bool use_aes) { std::set<int> clear; interpretR3EncryptionParameters( clear, user_pa...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
169,761,618,312,770,300,000,000,000,000,000,000,000
14
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
void Http2Handler::add_stream(int32_t stream_id, std::unique_ptr<Stream> stream) { id2stream_[stream_id] = std::move(stream); }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
131,903,607,787,590,330,000,000,000,000,000,000,000
4
Don't read too greedily
static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) { struct xen_pcibk_dev_data *dev_data; int err; u16 val; struct pci_cmd_info *cmd = data; dev_data = pci_get_drvdata(dev); if (!pci_is_enabled(dev) && is_enable_cmd(value)) { if (unlikely(verbose_request)) printk(KERN_DEBUG DRV...
0
[ "CWE-284", "CWE-264" ]
linux
af6fc858a35b90e89ea7a7ee58e66628c55c776b
261,944,335,979,141,870,000,000,000,000,000,000,000
61
xen-pciback: limit guest control of command register Otherwise the guest can abuse that control to cause e.g. PCIe Unsupported Request responses by disabling memory and/or I/O decoding and subsequently causing (CPU side) accesses to the respective address ranges, which (depending on system configuration) may be fatal ...
bool qemu_ram_is_noreserve(RAMBlock *rb) { return rb->flags & RAM_NORESERVE; }
0
[ "CWE-908" ]
qemu
418ade7849ce7641c0f7333718caf5091a02fd4c
189,524,778,009,689,900,000,000,000,000,000,000,000
4
softmmu: Always initialize xlat in address_space_translate_for_iotlb The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_M...
const Network::Address::InstanceConstSharedPtr& localAddress() const override { return socket_->localAddress(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
71,963,395,804,086,500,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
wait_for_completion_killable_timeout(struct completion *x, unsigned long timeout) { return wait_for_common(x, timeout, TASK_KILLABLE); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
325,806,576,350,193,200,000,000,000,000,000,000,000
5
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
static unsigned long __init arch_reserved_kernel_pages(void) { return 0; }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
142,103,411,319,619,380,000,000,000,000,000,000,000
4
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void Item_ident::cleanup() { DBUG_ENTER("Item_ident::cleanup"); bool was_fixed= fixed; Item_result_field::cleanup(); db_name= orig_db_name; table_name= orig_table_name; field_name= orig_field_name; /* Store if this Item was depended */ if (was_fixed) { /* We can trust that depended_from set...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
333,901,570,474,105,200,000,000,000,000,000,000,000
19
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
void SplashOutputDev::updateLineDash(GfxState *state) { double *dashPattern; int dashLength; double dashStart; SplashCoord dash[20]; int i; state->getLineDash(&dashPattern, &dashLength, &dashStart); if (dashLength > 20) { dashLength = 20; } for (i = 0; i < dashLength; ++i) { dash[i] = (Splash...
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
251,580,683,782,040,000,000,000,000,000,000,000,000
19
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
_gnutls_version_priority (gnutls_session_t session, gnutls_protocol_t version) { /* actually returns the priority */ unsigned int i; if (session->internals.protocol_priority.priority == NULL) { gnutls_assert (); return -1; } for (i = 0; i < session->internals.protocol_priority.algorithms;...
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
26,244,843,631,967,184,000,000,000,000,000,000,000
17
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
keyval_get(struct keyval *kv, const char *name) { struct onekeyval *okv; if (!kv) return NULL; for (okv = kv->head; okv; okv = okv->next) { if (strcasecmp(okv->name, name) == 0) return okv->value; } return NULL; }
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
207,323,006,141,657,240,000,000,000,000,000,000,000
15
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
MagickExport void *AcquireQuantumMemory(const size_t count,const size_t quantum) { size_t size; if ((HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse) || (size > GetMaxMemoryRequest())) { errno=ENOMEM; return(NULL); } return(AcquireMagickMemory(size)); }
0
[ "CWE-369" ]
ImageMagick
70aa86f5d5d8aa605a918ed51f7574f433a18482
37,626,081,256,289,260,000,000,000,000,000,000,000
13
possible divide by zero + clear buffers
char at(int index) const { return v.at(v.size() - index - 1); }
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
157,537,146,157,198,110,000,000,000,000,000,000,000
4
Avoid uint overflow in case the length + index is over UINT_MAX
static int igmpv3_send_report(struct in_device *in_dev, struct ip_mc_list *pmc) { struct sk_buff *skb = NULL; struct net *net = dev_net(in_dev->dev); int type; if (!pmc) { rcu_read_lock(); for_each_pmc_rcu(in_dev, pmc) { if (pmc->multiaddr == IGMP_ALL_HOSTS) continue; if (ipv4_is_local_multicast(pmc-...
0
[ "CWE-362" ]
linux
23d2b94043ca8835bd1e67749020e839f396a1c2
202,645,100,122,569,570,000,000,000,000,000,000,000
36
igmp: Add ip_mc_list lock in ip_check_mc_rcu I got below panic when doing fuzz test: Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9...
void copyNodes(std::vector<Proxy> &source, std::vector<Proxy> &dest) { std::move(source.begin(), source.end(), std::back_inserter(dest)); }
0
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
258,243,570,722,518,800,000,000,000,000,000,000,000
4
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
static int avic_ldr_write(struct kvm_vcpu *vcpu, u8 g_physical_id, u32 ldr) { bool flat; u32 *entry, new_entry; flat = kvm_lapic_get_reg(vcpu->arch.apic, APIC_DFR) == APIC_DFR_FLAT; entry = avic_get_logical_id_entry(vcpu, ldr, flat); if (!entry) return -EINVAL; new_entry = READ_ONCE(*entry); new_entry &= ~AV...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
119,525,709,928,038,160,000,000,000,000,000,000,000
18
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
Item_blob(THD *thd, const char *name_arg, uint length): Item_partition_func_safe_string(thd, name_arg, (uint) safe_strlen(name_arg), &my_charset_bin) { max_length= length; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
272,404,699,124,599,560,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
const string name() override { return "delete_bucket_website"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
157,906,237,616,102,050,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static void veth_get_strings(struct net_device *dev, u32 stringset, u8 *buf) { switch(stringset) { case ETH_SS_STATS: memcpy(buf, &ethtool_stats_keys, sizeof(ethtool_stats_keys)); break; } }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
64,951,238,027,086,080,000,000,000,000,000,000,000
8
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
compute_binder_key(const mac_entry_st *prf, const uint8_t *key, size_t keylen, bool resuming, void *out) { int ret; const char ext_label[] = EXT_BINDER_LABEL; const size_t ext_label_len = sizeof(ext_label) - 1; const char res_label[] = RES_BINDER_LABEL; const size_t res_label_len = sizeof(res_label)...
0
[ "CWE-416" ]
gnutls
75a937d97f4fefc6f9b08e3791f151445f551cb3
167,813,658,580,077,070,000,000,000,000,000,000,000
27
pre_shared_key: avoid use-after-free around realloc Signed-off-by: Daiki Ueno <ueno@gnu.org>
_boolean_handled_accumulator (GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer dummy) { gboolean continue_emission; gboolean sign...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
160,497,521,034,840,860,000,000,000,000,000,000,000
14
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
grub_crypto_cbc_decrypt (grub_crypto_cipher_handle_t cipher, void *out, const void *in, grub_size_t size, void *iv) { const grub_uint8_t *inptr, *end; grub_uint8_t *outptr; grub_uint8_t ivt[GRUB_CRYPTO_MAX_CIPHER_BLOCKSIZE]; grub_size_t blocksize; if (!cipher->cipher->decrypt) return GPG_ERR_NOT_S...
0
[ "CWE-264" ]
grub
451d80e52d851432e109771bb8febafca7a5f1f2
322,291,503,264,876,080,000,000,000,000,000,000,000
27
Fix security issue when reading username and password This patch fixes two integer underflows at: * grub-core/lib/crypto.c * grub-core/normal/auth.c CVE-2015-8370 Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es> Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es> Also-By: Andrey Borzenkov <arvidjaar@...
void dev_remove_pack(struct packet_type *pt) { __dev_remove_pack(pt); synchronize_net(); }
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
322,747,297,256,016,170,000,000,000,000,000,000,000
6
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
foreach_namespace (const char* key, gconstpointer val, NameSpaceInfo *info) { MonoString *name = mono_string_new (mono_object_domain (info->res), key); mono_array_setref (info->res, info->idx, name); info->idx++; }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
140,591,496,119,449,900,000,000,000,000,000,000,000
7
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static int sisusb_do_init_gfxdevice(struct sisusb_usb_data *sisusb) { struct sisusb_packet packet; int ret; u32 tmp32; /* Do some magic */ packet.header = 0x001f; packet.address = 0x00000324; packet.data = 0x00000004; ret = sisusb_send_bridge_packet(sisusb, 10, &packet, 0); packet.header = 0x001f; pack...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
241,098,066,064,775,800,000,000,000,000,000,000,000
72
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
static char *build_dest_dir(const char *full_path) { assert(full_path); if (strstr(full_path, "/x86_64-linux-gnu/")) return RUN_LIB_DIR "/x86_64-linux-gnu"; return RUN_LIB_DIR; }
0
[ "CWE-284", "CWE-732" ]
firejail
eecf35c2f8249489a1d3e512bb07f0d427183134
9,626,860,922,766,188,000,000,000,000,000,000,000
6
mount runtime seccomp files read-only (#2602) avoid creating locations in the file system that are both writable and executable (in this case for processes with euid of the user). for the same reason also remove user owned libfiles when it is not needed any more
dtls1_retrieve_buffered_fragment(SSL *s, long max, int *ok) { /* (0) check whether the desired fragment is available * if so: * (1) copy over the fragment to s->init_buf->data[] * (2) update s->init_num */ pitem *item; hm_fragment *frag; int al; *ok = 0; item = pqueue_peek(s->d1->buffered_messages); if...
1
[]
openssl
c713a4c04d096fca04c42a95dddec235d9390136
104,947,732,292,039,380,000,000,000,000,000,000,000
49
PR: 2230 Submitted By: Robin Seggelmann <seggelmann@fh-muenster.de> Fix various DTLS fragment reassembly bugs.
static int parse_CPropertyRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CPropertyRestriction *v, const char *fmt, ...) { proto_tree *tree; proto_item *item; const char *txt, *str = NULL; va_list ap; va_start(ap, fmt); txt = wmem_strdup_vprintf(wm...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
41,138,076,705,319,220,000,000,000,000,000,000,000
29
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is...
1
[ "CWE-20" ]
net
85fbaa75037d0b6b786ff18658ddf0b4014ce2a4
135,795,067,011,413,470,000,000,000,000,000,000,000
102
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage of uninitialized memory to user in recv syscalls") conditionally updated addr_len if the msg_name is written to. The recv_error and rxpmtu functions relied on the re...
const CImg<T>& display(CImgDisplay &disp, const bool display_info, unsigned int *const XYZ=0, const bool exit_on_anykey=false) const { return _display(disp,0,display_info,XYZ,exit_on_anykey,false); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
109,039,578,272,683,080,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.