func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
schedule_call_ready_callbacks (NautilusDirectory *directory) { if (directory->details->call_ready_idle_id == 0) { directory->details->call_ready_idle_id = g_idle_add (call_ready_callbacks_at_idle, directory); } }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
208,692,643,455,934,160,000,000,000,000,000,000,000
7
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
R_API char *r_bin_java_print_string_cp_stringify(RBinJavaCPTypeObj *obj) { ut32 size = 255, consumed = 0; char *value = malloc (size); if (value) { memset (value, 0, size); consumed = snprintf (value, size, "%d.0x%04"PFMT64x ".%s.%d", obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMetas *)...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
302,295,976,348,545,430,000,000,000,000,000,000,000
23
Fix #10498 - Fix crash in fuzzed java files (#10511)
void btrfs_throttle(struct btrfs_fs_info *fs_info) { wait_current_trans(fs_info); }
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
85,629,409,677,246,750,000,000,000,000,000,000,000
4
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
handle_mlppp(netdissect_options *ndo, const u_char *p, int length) { if (!ndo->ndo_eflag) ND_PRINT((ndo, "MLPPP, ")); ND_PRINT((ndo, "seq 0x%03x, Flags [%s], length %u", (EXTRACT_16BITS(p))&0x0fff, /* only support 12-Bit sequence space for now */ bittok2str(ppp_ml_fla...
1
[ "CWE-125", "CWE-787" ]
tcpdump
7335163a6ef82d46ff18f3e6099a157747241629
244,854,354,035,808,030,000,000,000,000,000,000,000
11
CVE-2017-13038/PPP: Do bounds checking. This fixes a buffer over-read discovered by Brian 'geeknik' Carpenter. Add a test using the capture file supplied by Katie Holly.
int jas_stream_fillbuf(jas_stream_t *stream, int getflag) { int c; /* The stream must not be in an error or EOF state. */ if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) { return EOF; } /* The stream must be open for reading. */ if ((stream->openmode_ & JAS_STREAM_READ) == 0) { return EOF; } /* Make a ...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
251,344,906,632,611,400,000,000,000,000,000,000,000
43
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
TEST(ExpressionStrLenBytes, ComputesLengthOfString) { assertExpectedResults("$strLenBytes", {{{Value("abc"_sd)}, Value(3)}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
242,219,665,779,395,300,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static int __ims_pcu_execute_command(struct ims_pcu *pcu, u8 command, const void *data, size_t len, u8 expected_response, int response_time) { int error; pcu->expected_response = expected_response; init_completion(&pcu->cmd_done); error = ims_pcu_send_command(pcu, command, data, len); if (error...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
281,752,899,691,963,870,000,000,000,000,000,000,000
22
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
ElectronRenderFrameObserver::ElectronRenderFrameObserver( content::RenderFrame* frame, RendererClientBase* renderer_client) : content::RenderFrameObserver(frame), render_frame_(frame), renderer_client_(renderer_client) { // Initialise resource for directory listing. net::NetModule::SetResour...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
246,974,636,614,806,280,000,000,000,000,000,000,000
9
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static int crng_fast_load(const char *cp, size_t len) { unsigned long flags; char *p; if (!spin_trylock_irqsave(&primary_crng.lock, flags)) return 0; if (crng_init != 0) { spin_unlock_irqrestore(&primary_crng.lock, flags); return 0; } p = (unsigned char *) &primary_crng.state[4]; while (len > 0 && crng_in...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
283,536,581,586,567,400,000,000,000,000,000,000,000
24
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz, int strict) { mbfl_encoding_detector *identd; int i, num; mbfl_identify_filter *filter; if (elist == NULL || elistsz <= 0) { return NULL; } /* allocate */ identd = (mbfl_encoding_detector*)mbfl_malloc(sizeof(mbfl_encoding_detector)); if ...
0
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
332,496,173,333,568,260,000,000,000,000,000,000,000
40
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
static NTSTATUS dcesrv_lsa_CloseTrustedDomainEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_CloseTrustedDomainEx *r) { /* The result of a bad hair day from an IDL programmer? Not * implmented in Win2k3. You should always just lsa_Close * anyway. */ return NT_STATUS_NOT_IMPLEM...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
193,681,186,052,664,400,000,000,000,000,000,000,000
9
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...
gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int bgColor) { float _angle = (float)((- degrees / 180.0f) * M_PI); const unsigned int src_w = gdImageSX(src); const unsigned int src_h = gdImageSY(src); unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) +...
0
[ "CWE-125" ]
libgd
4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
51,369,147,135,665,330,000,000,000,000,000,000,000
121
Fixed memory overrun bug in gdImageScaleTwoPass _gdContributionsCalc would compute a window size and then adjust the left and right positions of the window to make a window within that size. However, it was storing the values in the struct *before* it made the adjustment. This change fixes that.
mailimf_comment_fws_ccontent_parse(const char * message, size_t length, size_t * indx) { size_t cur_token; int r; cur_token = * indx; r = mailimf_fws_parse(message, length, &cur_token); if ((r != MAILIMF_NO_ERROR) && (r != MAILIMF_ERROR_PARSE)) return r; r = mailimf_ccontent_parse(message, len...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
254,042,995,262,841,630,000,000,000,000,000,000,000
20
Fixed crash #274
static void spl_filesystem_tree_it_current_key(zend_object_iterator *iter, zval *key) { spl_filesystem_object *object = spl_filesystem_iterator_to_object((spl_filesystem_iterator *)iter); if (SPL_FILE_DIR_KEY(object, SPL_FILE_DIR_KEY_AS_FILENAME)) { ZVAL_STRING(key, object->u.dir.entry.d_name); } else { spl_fil...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
182,847,474,416,354,970,000,000,000,000,000,000,000
11
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
njs_function_capture_closure(njs_vm_t *vm, njs_function_t *function, njs_function_lambda_t *lambda) { void *start, *end; uint32_t n; njs_value_t *value, **closure; njs_native_frame_t *frame; if (lambda->nclosures == 0) { return NJS_OK; } frame...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
286,326,111,350,497,470,000,000,000,000,000,000,000
42
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
string_compare_by_pointer(const uschar **a, const uschar **b) { return Ustrcmp(CUS *a, CUS *b); }
1
[ "CWE-264" ]
exim
dd90c19962a63fe966e17c75b4a36639302d1e67
130,113,447,028,691,220,000,000,000,000,000,000,000
4
Fix portability issues on *BSD and MacOS (cherry picked from commit 2478dbdfba7cf729ddee43a5a77bde8c25ccdede) (cherry picked from commit 84bbb4d8164aae21a8e5418250359637d8aabc29) (cherry picked from commit cdbe36e825ffdeb88da83148a866db0c9c2806e7) (cherry picked from commit de5ba17561e686e5a05c9cc88288c82b563987de) (c...
*/ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, struct request *rq) { if (rq->cmd_flags & REQ_META) bfqq->meta_pending++; bfqq->last_request_pos = blk_rq_pos(rq) + blk_rq_sectors(rq); if (bfqq == bfqd->in_service_queue && bfq_bfqq_wait_request(bfqq)) { bool small_req = bfq...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
235,973,313,070,897,100,000,000,000,000,000,000,000
55
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
win_goto(win_T *wp) { #ifdef FEAT_CONCEAL win_T *owp = curwin; #endif #ifdef FEAT_PROP_POPUP if (ERROR_IF_ANY_POPUP_WINDOW) return; if (popup_is_popup(wp)) { emsg(_(e_not_allowed_to_enter_popup_window)); return; } #endif if (text_and_win_locked()) { beep_flush(); text_locked_msg(); re...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
248,760,710,154,103,830,000,000,000,000,000,000,000
42
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
bool disable_positive_acks() const { return false; }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
3,456,478,343,959,323,400,000,000,000,000,000,000
4
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static MagickBooleanType TransformsRGBImage(Image *image, ExceptionInfo *exception) { #define TransformsRGBImageTag "Transform/Image" static const float YCCMap[1389] = { 0.000000f, 0.000720f, 0.001441f, 0.002161f, 0.002882f, 0.003602f, 0.004323f, 0.005043f, 0.005764f, 0.006484f, 0.007205f, 0.0...
0
[ "CWE-369" ]
ImageMagick
75f6f5032690077cae3eaeda3c0165cc765eaeb5
11,813,101,146,197,390,000,000,000,000,000,000,000
1,177
https://github.com/ImageMagick/ImageMagick/issues/3295
int ssl3_check_cert_and_algorithm(SSL *s) { int i, idx; long alg_k, alg_a; EVP_PKEY *pkey = NULL; int pkey_bits; SESS_CERT *sc; #ifndef OPENSSL_NO_RSA RSA *rsa; #endif #ifndef OPENSSL_NO_DH DH *dh; #endif alg_k = s->s3->tmp.new_cipher->algorithm_mkey; alg_a = s->s3->tmp.new_cipher->...
0
[ "CWE-362" ]
openssl
939b4960276b040fc0ed52232238fcc9e2e9ec21
313,370,228,497,239,500,000,000,000,000,000,000,000
138
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
static void check_modules(int force) { static int checked = 0; int i; if (force || !checked) { for (i = 0; ap_loaded_modules[i]; ++i) { module *m = ap_loaded_modules[i]; if (!strcmp("event.c", m->name)) { mpm_type = H2_MPM_EVENT; ...
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
147,705,157,211,083,170,000,000,000,000,000,000,000
55
* Fixed keepalives counter on slave connections.
NAN_METHOD(XmlDocument::FromHtml) { Nan::HandleScope scope; v8::Local<v8::Object> options = Nan::To<v8::Object>(info[1]).ToLocalChecked(); v8::Local<v8::Value> baseUrlOpt = Nan::Get(options, Nan::New<v8::String>("baseUrl").ToLocalChecked()).ToLocalChecked(); v8::Local<v8::Value> encodingOpt ...
0
[ "CWE-400" ]
libxmljs
2501807bde9b38cfaed06d1e140487516d91379d
212,110,516,745,746,640,000,000,000,000,000,000,000
67
Ensure parseXml/parseHtml input is string or buffer (#594)
int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len) { struct super_block *sb = inode->i_sb; handle_t *handle; struct ext4_ext_path *path; struct ext4_extent *extent; ext4_lblk_t offset_lblk, len_lblk, ee_start_lblk = 0; unsigned int credits, ee_len; int ret = 0, depth, split_flag = 0; loff_t i...
0
[ "CWE-362" ]
linux
32ebffd3bbb4162da5ff88f9a35dd32d0a28ea70
248,002,631,721,172,100,000,000,000,000,000,000,000
161
ext4: fix races between buffered IO and collapse / insert range Current code implementing FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_INSERT_RANGE is prone to races with buffered writes and page faults. If buffered write or write via mmap manages to squeeze between filemap_write_and_wait_range() and truncate_pagecache() in...
static int p54u_load_firmware(struct ieee80211_hw *dev, struct usb_interface *intf) { struct usb_device *udev = interface_to_usbdev(intf); struct p54u_priv *priv = dev->priv; struct device *device = &udev->dev; int err, i; BUILD_BUG_ON(ARRAY_SIZE(p54u_fwlist) != __NUM_P54U_HWTYPES); init_completion(&pr...
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
314,812,277,415,670,270,000,000,000,000,000,000,000
30
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt) { int al; unsigned int ticklen; unsigned long ticket_lifetime_hint; if (!PACKET_get_net_4(pkt, &ticket_lifetime_hint) || !PACKET_get_net_2(pkt, &ticklen) || PACKET_remaining(pkt) != ticklen) { al = SSL_AD_DEC...
0
[ "CWE-476" ]
openssl
efbe126e3ebb9123ac9d058aa2bb044261342aaa
33,715,321,289,568,580,000,000,000,000,000,000,000
82
Fix missing NULL checks in CKE processing Reviewed-by: Rich Salz <rsalz@openssl.org>
PHP_FUNCTION(exif_read_data) { char *p_name, *p_sections_needed = NULL; size_t p_name_len, p_sections_needed_len = 0; zend_bool sub_arrays=0, read_thumbnail=0, read_all=0; int i, ret, sections_needed=0; image_info_type ImageInfo; char tmp[64], *sections_str, *s; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|sb...
0
[ "CWE-125" ]
php-src
887a7b571407f7a49a5e7cf1e612d21ef83fedb4
58,334,959,253,508,840,000,000,000,000,000,000,000
174
Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
multi_process_incoming_tun(struct multi_context *m, const unsigned int mpp_flags) { struct gc_arena gc = gc_new(); bool ret = true; if (BLEN(&m->top.c2.buf) > 0) { unsigned int mroute_flags; struct mroute_addr src, dest; const int dev_type = TUNNEL_TYPE(m->top.c1.tuntap); ...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
326,918,164,905,179,840,000,000,000,000,000,000,000
123
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
xps_add_tiff_image(xps_image_enum_t *pie) { gx_device_xps *xdev = (gx_device_xps *)(pie->dev); int code; code = add_file_to_zip_file(xdev, pie->file_name, pie->fid); gp_fclose(pie->fid); return code; }
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
191,865,573,249,144,470,000,000,000,000,000,000,000
9
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...
SCTP_STATIC int sctp_connect(struct sock *sk, struct sockaddr *addr, int addr_len) { int err = 0; struct sctp_af *af; sctp_lock_sock(sk); SCTP_DEBUG_PRINTK("%s - sk: %p, sockaddr: %p, addr_len: %d\n", __func__, sk, addr, addr_len); /* Validate addr_len before calling common connect/connectx routine...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
66,089,361,383,993,190,000,000,000,000,000,000,000
25
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static void i40e_queue_pair_clean_rings(struct i40e_vsi *vsi, int queue_pair) { i40e_clean_tx_ring(vsi->tx_rings[queue_pair]); if (i40e_enabled_xdp_vsi(vsi)) { /* Make sure that in-progress ndo_xdp_xmit calls are * completed. */ synchronize_rcu(); i40e_clean_tx_ring(vsi->xdp_rings[queue_pair]); } i40e_c...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
110,545,205,362,185,710,000,000,000,000,000,000,000
12
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static int __meminit slab_memory_callback(struct notifier_block *self, unsigned long action, void *arg) { struct memory_notify *mnb = arg; int ret = 0; int nid; nid = mnb->status_change_nid; if (nid < 0) goto out; switch (action) { case MEM_GOING_ONLINE: mutex_lock(&slab_mutex); ret = init_cache_nod...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
180,008,038,916,779,100,000,000,000,000,000,000,000
31
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
unicode_to_utf16be(char *p, size_t remaining, uint32_t uc) { char *utf16 = p; if (uc > 0xffff) { /* We have a code point that won't fit into a * wchar_t; convert it to a surrogate pair. */ if (remaining < 4) return (0); uc -= 0x10000; archive_be16enc(utf16, ((uc >> 10) & 0x3ff) + 0xD800); archive_be1...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
277,664,342,585,722,220,000,000,000,000,000,000,000
20
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
TEST_P(Http2CodecImplTestAll, TestCodecHeaderCompression) { initialize(); TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, true)); request_encoder_->encodeHeaders(request_headers, true); TestResponseHeaderMapImpl...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
81,311,108,809,469,680,000,000,000,000,000,000,000
29
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
TfLiteStatus EvalImpl(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteConvParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TfLiteTensor* output = GetOutput(context, node, 0); const TfLiteTensor* input = GetInput(context, node, 0); cons...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
273,912,856,111,980,140,000,000,000,000,000,000,000
61
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
void set_user(MEM_ROOT *mem, const char *user_arg) { user= user_arg && *user_arg ? strdup_root(mem, user_arg) : NULL; }
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
315,861,592,509,013,860,000,000,000,000,000,000,000
4
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt, mifi_t mifi, int assert) { struct sk_buff *skb; struct mrt6msg *msg; int ret; #ifdef CONFIG_IPV6_PIMSM_V2 if (assert == MRT6MSG_WHOLEPKT) skb = skb_realloc_headroom(pkt, -skb_network_offset(pkt) +sizeof(*msg)); else #endif ...
0
[ "CWE-20" ]
linux
99253eb750fda6a644d5188fb26c43bad8d5a745
48,670,875,237,278,740,000,000,000,000,000,000,000
88
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and prot...
asn1_der_decoding (asn1_node * element, const void *ider, int ider_len, char *errorDescription) { asn1_node node, p, p2, p3; char temp[128]; int counter, len2, len3, len4, move, ris, tlen; unsigned char class; unsigned long tag; int indefinite, result; const unsigned char *der = ider; node = *elem...
0
[]
libtasn1
cc10a8c5443c751d920cfaca1f104089e43296be
265,156,239,724,602,440,000,000,000,000,000,000,000
584
use DECR_LEN() in _asn1_extract_tag_der()
int ttfFont__Open_aux(ttfFont *self, ttfInterpreter *tti, gx_ttfReader *r, gs_font_type42 *pfont, const gs_matrix * char_tm, const gs_log2_scale_point *log2_scale, bool design_grid) { gs_point char_size, subpix_origin; gs_matrix post_transform; /* * Ghostscript proceses a ...
0
[ "CWE-125" ]
ghostpdl
937ccd17ac65935633b2ebc06cb7089b91e17e6b
33,776,805,103,281,144,000,000,000,000,000,000,000
39
Bug 698056: make bounds check in gx_ttfReader__Read more robust
static int pppoe_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; struct pppox_sock *po = pppox_sk(sk); int val; int err; switch (cmd) { case PPPIOCGMRU: err = -ENXIO; if (!(sk->sk_state & PPPOX_CONNECTED)) break; err = -EFAULT; if (put_user(po->pppoe_de...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
9,482,769,915,084,607,000,000,000,000,000,000,000
99
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
yaml_parser_fetch_flow_collection_end(yaml_parser_t *parser, yaml_token_type_t type) { yaml_mark_t start_mark, end_mark; yaml_token_t token; /* Reset any potential simple key on the current flow level. */ if (!yaml_parser_remove_simple_key(parser)) return 0; /* Decrease the flow l...
0
[ "CWE-20" ]
libyaml
e6aa721cc0e5a48f408c52355559fd36780ba32a
55,807,308,488,557,130,000,000,000,000,000,000,000
37
Fix for https://bitbucket.org/xi/libyaml/issue/10/ https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
static inline void Process_ipfix_option_templates(exporter_ipfix_domain_t *exporter, void *option_template_flowset, FlowSource_t *fs) { void *DataPtr; uint32_t size_left, size_required, i; // uint32_t nr_scopes, nr_options; uint16_t id, field_count, scope_field_count, offset, sampler_id_length; uint16_t offset_sampler...
1
[]
nfdump
ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8
191,426,774,837,058,700,000,000,000,000,000,000,000
155
Fix security issues in netflow_v9.c and ipfix.c
void __fastcall FullSynchronize( TTerminal * Terminal, TCustomScpExplorerForm * ScpExplorer, TStrings * CommandParams, int UseDefaults) { UnicodeString LocalDirectory; UnicodeString RemoteDirectory; SynchronizeDirectories(Terminal, CommandParams, LocalDirectory, RemoteDirectory); bool SaveMode = tru...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
317,379,309,514,621,000,000,000,000,000,000,000,000
29
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
static netdev_tx_t mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) { int npacks, pending; unsigned long flags; struct airo_info *ai = dev->ml_priv; if (!skb) { airo_print_err(dev->name, "%s: skb == NULL!",__func__); return NETDEV_TX_OK; } npacks = skb_queue_len (&ai->txq); if (npacks >= MA...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
96,933,402,971,539,370,000,000,000,000,000,000,000
35
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int sldns_str2wire_period_buf(const char* str, uint8_t* rd, size_t* len) { const char* end; uint32_t p = sldns_str2period(str, &end); if(*end != 0) return RET_ERR(LDNS_WIREPARSE_ERR_SYNTAX_PERIOD, end-str); if(*len < 4) return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; sldns_write_uint32(rd, p); *len = 4; return L...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
93,345,904,911,351,600,000,000,000,000,000,000,000
12
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
static int jpc_dec_decode(jpc_dec_t *dec) { jpc_ms_t *ms; jpc_dec_mstabent_t *mstabent; int ret; jpc_cstate_t *cstate; if (!(cstate = jpc_cstate_create())) { return -1; } dec->cstate = cstate; /* Initially, we should expect to encounter a SOC marker segment. */ dec->state = JPC_MHSOC; for (;;) { /* Ge...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
56,158,600,059,872,550,000,000,000,000,000,000,000
55
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
const QString Database::getFriend(const QString &hash) { QSqlQuery query; query.prepare(QLatin1String("SELECT `name` FROM `friends` WHERE `hash` = ?")); query.addBindValue(hash); query.exec(); if (query.next()) return query.value(0).toString(); return QString(); }
0
[ "CWE-310" ]
mumble
5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e
241,343,176,305,595,430,000,000,000,000,000,000,000
10
Explicitly remove file permissions for settings and DB
static WORD_DESC * parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at) char *name; int var_is_special, quoted; int *quoted_dollar_atp, *contains_dollar_at; { char *temp, *t; WORD_DESC *w; SHELL_VAR *v; /* See if it's a nameref first, behave in ksh93...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
5,809,419,352,100,561,000,000,000,000,000,000,000
46
Bash-4.4 patch 7
static inline void __elv_rqhash_del(struct request *rq) { hash_del(&rq->hash); rq->rq_flags &= ~RQF_HASHED; }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
24,376,007,732,295,897,000,000,000,000,000,000,000
5
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
*/ static int io_timeout_remove(struct io_kiocb *req, unsigned int issue_flags) { struct io_timeout_rem *tr = &req->timeout_rem; struct io_ring_ctx *ctx = req->ctx; int ret; if (!(req->timeout_rem.flags & IORING_TIMEOUT_UPDATE)) { spin_lock(&ctx->completion_lock); spin_lock_irq(&ctx->timeout_lock); ret = io...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
190,124,548,564,172,080,000,000,000,000,000,000,000
28
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int burl_normalize_path (buffer *b, buffer *t, int qs, int flags) { const unsigned char * const s = (unsigned char *)b->ptr; const int used = (int)buffer_string_length(b); int path_simplify = 0; for (int i = 0, len = qs < 0 ? used : qs; i < len; ++i) { if (s[i] == '.' && (s[i+1] != '.' ||...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
77,109,914,904,003,370,000,000,000,000,000,000,000
35
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
static void __pg_init_all_paths(struct multipath *m) { struct pgpath *pgpath; unsigned long pg_init_delay = 0; m->pg_init_count++; m->pg_init_required = 0; if (m->pg_init_delay_retry) pg_init_delay = msecs_to_jiffies(m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT ? m->pg_init_delay_msecs : DM_PG_INIT...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
20,818,807,983,777,408,000,000,000,000,000,000,000
19
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
static void user_ta_enter_close_session(struct tee_ta_session *s) { TEE_ErrorOrigin eo; struct tee_ta_param param = { 0 }; user_ta_enter(&eo, s, UTEE_ENTRY_FUNC_CLOSE_SESSION, 0, &param); }
0
[ "CWE-703", "CWE-189" ]
optee_os
7e768f8a473409215fe3fff8f6e31f8a3a0103c6
30,640,140,262,759,023,000,000,000,000,000,000,000
7
core: clear the entire TA area Previously we cleared (memset to zero) the size corresponding to code and data segments, however the allocation for the TA is made on the granularity of the memory pool, meaning that we did not clear all memory and because of that we could potentially leak code and data of a previous loa...
void reds_handle_agent_mouse_event(RedsState *reds, const VDAgentMouseState *mouse_state) { if (!reds->inputs_channel || !reds->agent_dev->priv->agent_attached) { return; } RedCharDeviceWriteBuffer *char_dev_buf = vdagent_new_write_buffer(reds->agent_dev.get(), ...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
17,723,121,990,359,976,000,000,000,000,000,000,000
23
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static inline bool clone3_stack_valid(struct kernel_clone_args *kargs) { if (kargs->stack == 0) { if (kargs->stack_size > 0) return false; } else { if (kargs->stack_size == 0) return false; if (!access_ok((void __user *)kargs->stack, kargs->stack_size)) return false; #if !defined(CONFIG_STACK_GROWSUP...
0
[ "CWE-665", "CWE-362" ]
linux
b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948
124,713,056,801,677,420,000,000,000,000,000,000,000
19
fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent current->group_leader->exit_signal may change during copy_process() if current->real_parent exits. Move the assignment inside tasklist_lock to avoid the race. Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com> Acked-by: Oleg Nesterov <oleg@redhat....
perf_cgroup_set_shadow_time(struct perf_event *event, u64 now) { }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
71,086,275,577,236,840,000,000,000,000,000,000,000
3
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
SendClientCutText(rfbClient* client, char *str, int len) { rfbClientCutTextMsg cct; if (!SupportsClient2Server(client, rfbClientCutText)) return TRUE; cct.type = rfbClientCutText; cct.length = rfbClientSwap32IfLE(len); return (WriteToRFBServer(client, (char *)&cct, sz_rfbClientCutTextMsg) && WriteToRFB...
1
[ "CWE-665" ]
libvncserver
2f5b2ad1c6c99b1ac6482c95844a84d66bb52838
295,104,012,427,040,730,000,000,000,000,000,000,000
11
LibVNCClient: don't leak uninitialised memory to remote The pad fields of the rfbClientCutTextMsg and rfbKeyEventMsg could contain arbitray memory belonging to the process, don't leak this to the remote. Closes #252
string_format(uschar *buffer, int buflen, char *format, ...) { BOOL yield; va_list ap; va_start(ap, format); yield = string_vformat(buffer, buflen, format, ap); va_end(ap); return yield; }
0
[]
exim
24c929a27415c7cfc7126c47e4cad39acf3efa6b
206,793,627,201,065,600,000,000,000,000,000,000,000
9
Buffer overrun fix. fixes: bug #787
xsmp_save (GsmClient *client, GError **error) { GsmClientRestartStyle restart_style; GKeyFile *keyfile = NULL; char *desktop_file_path = NULL; char *exec_program = NULL; char *exec_discard = NULL; char *startup_id = NULL; GError *lo...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
99,691,777,522,880,640,000,000,000,000,000,000,000
73
[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...
static int llcp_sock_accept(struct socket *sock, struct socket *newsock, int flags) { DECLARE_WAITQUEUE(wait, current); struct sock *sk = sock->sk, *new_sk; long timeo; int ret = 0; pr_debug("parent %p\n", sk); lock_sock_nested(sk, SINGLE_DEPTH_NESTING); if (sk->sk_state != LLCP_LISTEN) { ret = -EBAD...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
208,042,451,276,063,900,000,000,000,000,000,000,000
53
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static inline u32 from_hash(u32 id) { id &= 0xFFFF; if (id == 0xFFFF) return 32; if (!(id & 0x8000)) { if (id > 255) return 256; return id & 0xF; } return 16 + (id & 0xF); }
0
[ "CWE-416", "CWE-200" ]
linux
ef299cc3fa1a9e1288665a9fdc8bff55629fd359
215,929,089,115,148,240,000,000,000,000,000,000,000
12
net_sched: cls_route: remove the right filter from hashtable route4_change() allocates a new filter and copies values from the old one. After the new filter is inserted into the hash table, the old filter should be removed and freed, as the final step of the update. However, the current code mistakenly removes the ne...
void Magick::Image::strokeLineJoin(const Magick::LineJoin lineJoin_) { modifyImage(); options()->strokeLineJoin(lineJoin_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
43,750,223,281,885,160,000,000,000,000,000,000,000
5
Added missing return to avoid use after free.
int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) { struct super_block *sb; int err; int rc; if (!ext4_handle_valid(handle)) { ext4_put_nojournal(handle); return 0; } if (!handle->h_transaction) { err = jbd2_journal_stop(handle); return handle->h_err ? handle->h_err : err; ...
1
[ "CWE-416" ]
linux
6934da9238da947628be83635e365df41064b09b
80,053,357,401,885,860,000,000,000,000,000,000,000
26
ext4: fix potential use after free in __ext4_journal_stop There is a use-after-free possibility in __ext4_journal_stop() in the case that we free the handle in the first jbd2_journal_stop() because we're referencing handle->h_err afterwards. This was introduced in 9705acd63b125dee8b15c705216d7186daea4625 and it is wro...
T cubic_atXY_c(const float fx, const float fy, const int z, const int c) const { return cimg::type<T>::cut(cubic_atXY(fx,fy,z,c)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
322,800,550,071,334,870,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
__pfm_find_buffer_fmt(pfm_uuid_t uuid) { struct list_head * pos; pfm_buffer_fmt_t * entry; list_for_each(pos, &pfm_buffer_fmt_list) { entry = list_entry(pos, pfm_buffer_fmt_t, fmt_list); if (pfm_uuid_cmp(uuid, entry->fmt_uuid) == 0) return entry; } return NULL; }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
121,074,237,309,376,800,000,000,000,000,000,000,000
12
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr, u32 addr, u32 len) { int dmae_wr_max = DMAE_LEN32_WR_MAX(bp); int offset = 0; while (len > dmae_wr_max) { bnx2x_write_dmae(bp, phys_addr + offset, addr + offset, dmae_wr_max); offset += dmae_wr_max * 4; len -= dmae_wr...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
179,583,557,676,288,180,000,000,000,000,000,000,000
15
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void Compute(OpKernelContext* ctx) override { const Tensor& shape_t = ctx->input(0); const Tensor& alpha_t = ctx->input(1); OP_REQUIRES(ctx, TensorShapeUtils::IsVector(shape_t.shape()) && (shape_t.dtype() == DataType::DT_INT32 || shape_t.dtype() ==...
1
[ "CWE-703", "CWE-197" ]
tensorflow
27b417360cbd671ef55915e4bb6bb06af8b8a832
73,312,061,318,900,780,000,000,000,000,000,000,000
174
Prevent `int64` to `int` truncation in `Shard` API usage. The function argument in `Shard` must be a function of two `int64` arguments. However, we are passing in a function with two `int` arguments. Thus, for large workloads, these arguments get truncated from positive `int64` values to negative `int` ones, resulting...
InputBlockKind Scanner::echo(Output &out, std::string &block_name) { const opt_t *opts = out.block().opts; code_alc_t &alc = out.allocator; const char *x, *y; if (is_eof()) return INPUT_END; next: tok = cur; loop: location = cur_loc(); ptr = cur; #line 55 "src/parse/lex.cc" { unsigned ch...
0
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
11,353,228,059,873,966,000,000,000,000,000,000,000
1,096
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
static inline int security_ptrace_access_check(struct task_struct *child, unsigned int mode) { return cap_ptrace_access_check(child, mode); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
72,885,866,839,382,030,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static void clear_objectdata(HTStructured * me) { if (me) { HTChunkClear(&me->object); me->object_started = FALSE; me->object_declare = FALSE; me->object_shapes = FALSE; me->object_ismap = FALSE; FREE(me->object_usemap); FREE(me->object_id); FREE(me->object_title); FREE(me->object_data); FREE(me->object_t...
0
[ "CWE-416" ]
lynx-snapshots
280a61b300a1614f6037efc0902ff7ecf17146e9
308,756,128,656,715,270,000,000,000,000,000,000,000
19
snapshot of project "lynx", label v2-8-9dev_15b
MONGO_EXPORT void gridfs_destroy( gridfs *gfs ) { if ( gfs == NULL ) return; if ( gfs->dbname ) bson_free( ( char * )gfs->dbname ); if ( gfs->prefix ) bson_free( ( char * )gfs->prefix ); if ( gfs->files_ns ) bson_free( ( char * )gfs->files_ns ); if ( gfs->chunks_ns ) bson_free( ( char * )gfs->chunks...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
80,805,698,450,877,170,000,000,000,000,000,000,000
7
don't mix up int and size_t (first pass to fix that)
void newStream() { if (!codec_) { codec_ = new NiceMock<MockServerConnection>(); } decoder_filter_ = new NiceMock<MockStreamDecoderFilter>(); encoder_filter_ = new NiceMock<MockStreamEncoderFilter>(); EXPECT_CALL(filter_factory_, createFilterChain(_)) .WillOnce(Invoke([this](FilterCh...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
234,387,379,689,903,970,000,000,000,000,000,000,000
24
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void mac80211_hwsim_del_radio(struct mac80211_hwsim_data *data, const char *hwname, struct genl_info *info) { hwsim_mcast_del_radio(data->idx, hwname, info); debugfs_remove_recursive(data->debugfs); ieee80211_unregister_hw(data->hw); device_release_driver(data->dev); device_unregister(data...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
64,103,758,433,581,490,000,000,000,000,000,000,000
11
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static inline int major_to_index(unsigned major) { return major % CHRDEV_MAJOR_HASH_SIZE; }
0
[ "CWE-362" ]
linux
68faa679b8be1a74e6663c21c3a9d25d32f1c079
80,899,654,213,455,070,000,000,000,000,000,000,000
4
chardev: Avoid potential use-after-free in 'chrdev_open()' 'chrdev_open()' calls 'cdev_get()' to obtain a reference to the 'struct cdev *' stashed in the 'i_cdev' field of the target inode structure. If the pointer is NULL, then it is initialised lazily by looking up the kobject in the 'cdev_map' and so the whole proc...
CString CModule::GetWebPath() { switch (m_eType) { case CModInfo::GlobalModule: return "/mods/global/" + GetModName() + "/"; case CModInfo::UserModule: return "/mods/user/" + GetModName() + "/"; case CModInfo::NetworkModule: return "/mods/network/" + m_pNe...
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
100,097,805,375,861,040,000,000,000,000,000,000,000
13
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
gdIOCtx * gdNewDynamicCtxEx (int initialSize, void *data, int freeOKFlag) { dpIOCtx *ctx; dynamicPtr *dp; ctx = (dpIOCtx *) gdMalloc (sizeof (dpIOCtx)); dp = newDynamic(initialSize, data, freeOKFlag); ctx->dp = dp; ctx->ctx.getC = dynamicGetchar; ctx->ctx.putC = dynamicPutchar; ctx->ctx.getBuf = dynamicGet...
0
[ "CWE-119" ]
php-src
cc08cbc84d46933c1e9e0149633f1ed5d19e45e9
93,162,547,504,482,430,000,000,000,000,000,000,000
24
Fix #73280: Stack Buffer Overflow in GD dynamicGetbuf We make sure to never pass a negative `rlen` as size to memcpy(). Cf. <https://github.com/libgd/libgd/commit/53110871>.
void init_openvpn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask) { ndpi_set_bitmask_protocol_detection("OpenVPN", ndpi_struct, detection_bitmask, *id, NDPI_PROTOCOL_OPENVPN, ndpi_search_openvpn, NDPI_SELECTION_B...
0
[ "CWE-125" ]
nDPI
8e7b1ea7a136cc4e4aa9880072ec2d69900a825e
186,981,501,670,670,040,000,000,000,000,000,000,000
11
Fix for potential heap-buffer-overflow in ndpi_search_openvpn
TEST_P(ClusterMemoryTestRunner, MemoryLargeClusterSizeWithRealSymbolTable) { symbol_table_creator_test_peer_.setUseFakeSymbolTables(false); // A unique instance of ClusterMemoryTest allows for multiple runs of Envoy with // differing configuration. This is necessary for measuring the memory consumption // betw...
1
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
28,829,050,670,538,010,000,000,000,000,000,000,000
62
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int virtio_gpu_save(QEMUFile *f, void *opaque, size_t size, VMStateField *field, QJSON *vmdesc) { VirtIOGPU *g = opaque; struct virtio_gpu_simple_resource *res; int i; /* in 2d mode we should never find unprocessed commands here */ assert(QTAILQ_EMPTY(&g->cmdq)); ...
0
[ "CWE-772", "CWE-401" ]
qemu
dd248ed7e204ee8a1873914e02b8b526e8f1b80d
274,895,392,787,457,660,000,000,000,000,000,000,000
29
virtio-gpu: fix memory leak in set scanout In virtio_gpu_set_scanout function, when creating the 'rect' its refcount is set to 2, by pixman_image_create_bits and qemu_create_displaysurface_pixman function. This can lead a memory leak issues. This patch avoid this issue. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Rev...
std::string RGWPostObj_ObjStore_S3::get_current_filename() const { return s->object.name; }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
270,392,491,475,780,250,000,000,000,000,000,000,000
4
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
void Val(Decimal128& v) const { v = Decimal(); }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
255,575,114,534,873,660,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
void close_tmpoutbuf(rzip_control *control) { control->flags &= ~FLAG_TMP_OUTBUF; dealloc(control->tmp_outbuf); if (!BITS32) control->usable_ram = control->maxram += control->ramsize / 18; }
0
[ "CWE-703" ]
lrzip
4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4
29,448,556,011,164,300,000,000,000,000,000,000,000
7
Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure.
static CURLcode operate_do(struct GlobalConfig *global, struct OperationConfig *config) { char errorbuffer[CURL_ERROR_SIZE]; struct ProgressData progressbar; struct getout *urlnode; struct HdrCbData hdrcbdata; struct OutStruct heads; metalinkfile *mlfile_last = NULL; CURL *cu...
0
[ "CWE-125" ]
curl
481e0de00a9003b9c5220b120e3fc302d9b0932d
48,269,505,363,908,440,000,000,000,000,000,000,000
1,629
curl: point out unnecessary uses of -X in verbose mode It uses 'Note:' as a prefix as opposed to the common 'Warning:' to take down the tone a bit. It adds a warning for using -XHEAD on other methods becasue that may lead to a hanging connection.
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteL2NormParams*>(node->builtin_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(conte...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
184,849,632,344,405,800,000,000,000,000,000,000,000
36
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
ecb_ews_components_equal (ECalComponent *comp1, ECalComponent *comp2) { icalcomponent *icomp1, *icomp2; icalproperty *prop1; GHashTable *processed_props; gboolean equal = TRUE; if (!comp1 && !comp2) return TRUE; else if (!comp1 || !comp2) return FALSE; icomp1 = e_cal_component_get_icalcomponent (comp1...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
121,486,313,607,148,930,000,000,000,000,000,000,000
68
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
Item_func_nullif::str_op(String *str) { DBUG_ASSERT(fixed == 1); String *res; if (!compare()) { null_value=1; return 0; } res= args[2]->val_str(str); null_value= args[2]->null_value; return res; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
286,627,974,603,437,540,000,000,000,000,000,000,000
13
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 ...
*/ xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) || (ctxt->context->node->type == XML_NAMESPACE_DECL)) return(NULL); if (cur != NULL) { if ((cur->...
1
[ "CWE-119" ]
libxml2
ea90b894146030c214a7df6d8375310174f134b9
5,131,527,229,101,087,000,000,000,000,000,000,000
23
Fix a change of semantic on XPath preceding and following axis This was introduced in the prevous fix, while preceding-sibling and following sibling axis are empty for attributes and namespaces, preceding and following axis should still work based on the parent element. However the parent element is not available for ...
static MagickBooleanType SetDXT1Pixels(Image *image,ssize_t x,ssize_t y, DDSColors colors,size_t bits,Quantum *q) { register ssize_t i; ssize_t j; unsigned char code; for (j = 0; j < 4; j++) { for (i = 0; i < 4; i++) { if ((x + i) < (ssize_t) image->columns && (y + j) ...
0
[ "CWE-20", "CWE-617" ]
ImageMagick
0c5b1e430a83ef793a7334bbbee408cf3c628699
113,909,196,004,605,060,000,000,000,000,000,000,000
33
Added check to prevent image being 0x0 (reported in #489).
static void pp_error_list_macros(int severity) { int32_t saved_line; const char *saved_fname = NULL; severity |= ERR_PP_LISTMACRO | ERR_NO_SEVERITY; src_get(&saved_line, &saved_fname); if (istk) pp_list_one_macro(istk->mstk, severity); src_set(saved_line, saved_fname); }
0
[ "CWE-125" ]
nasm
3144e84add8b152cc7a71e44617ce6f21daa4ba3
64,444,752,401,467,920,000,000,000,000,000,000,000
13
preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
const char *session_info_get_active_session(struct session_info *si) { int r; char *old_session = si->session; si->session = NULL; r = sd_seat_get_active("seat0", &si->session, NULL); /* ENOENT happens when a seat is switching from one session to another */ if (r < 0 && r != -ENOENT) sy...
0
[ "CWE-362" ]
spice-vd_agent
5c50131797e985d0a5654c1fd7000ae945ed29a7
199,499,482,292,008,360,000,000,000,000,000,000,000
22
Better check for sessions Do not allow other users to hijack a session checking that the process is launched by the owner of the session. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Uri Lublin <uril@redhat.com>
double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { if (hb1 <= hb2) { spin_lock(&hb1->lock); if (hb1 < hb2) spin_lock_nested(&hb2->lock, SINGLE_DEPTH_NESTING); } else { /* hb1 > hb2 */ spin_lock(&hb2->lock); spin_lock_nested(&hb1->lock, SINGLE_DEPTH_NESTING); } }
0
[]
linux-2.6
5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc
288,538,362,911,926,380,000,000,000,000,000,000,000
11
futex_lock_pi() key refcnt fix This fixes a futex key reference count bug in futex_lock_pi(), where a key's reference count is incremented twice but decremented only once, causing the backing object to not be released. If the futex is created in a temporary file in an ext3 file system, this bug causes the file's inod...
static void theme_read_replaces(CONFIG_REC *config, THEME_REC *theme) { GSList *tmp; CONFIG_NODE *node; const char *p; int index; /* reset replace keys */ for (index = 0; index < 256; index++) theme->replace_keys[index] = -1; index = 0; node = config_node_traverse(config, "replac...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
318,869,584,999,471,800,000,000,000,000,000,000,000
29
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
void vmhd_del(GF_Box *s) { GF_VideoMediaHeaderBox *ptr = (GF_VideoMediaHeaderBox *)s; if (ptr == NULL) return; gf_free(ptr); }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
177,711,871,051,878,550,000,000,000,000,000,000,000
6
fixed 2 possible heap overflows (inc. #1088)
void mm_release(struct task_struct *tsk, struct mm_struct *mm) { struct completion *vfork_done = tsk->vfork_done; /* Get rid of any futexes when releasing the mm */ #ifdef CONFIG_FUTEX if (unlikely(tsk->robust_list)) { exit_robust_list(tsk); tsk->robust_list = NULL; } #ifdef CONFIG_COMPAT if (unlikely(tsk->co...
0
[ "CWE-20" ]
linux
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
224,490,830,598,698,480,000,000,000,000,000,000,000
49
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...
reply_get_NS_rrset(struct reply_info* rep) { size_t i; for(i=0; i<rep->rrset_count; i++) { if(rep->rrsets[i]->rk.type == htons(LDNS_RR_TYPE_NS)) { return rep->rrsets[i]; } } return NULL; }
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
179,097,045,409,693,280,000,000,000,000,000,000,000
10
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
int log_replay(struct ntfs_inode *ni, bool *initialized) { int err; struct ntfs_sb_info *sbi = ni->mi.sbi; struct ntfs_log *log; struct restart_info rst_info, rst_info2; u64 rec_lsn, ra_lsn, checkpt_lsn = 0, rlsn = 0; struct ATTR_NAME_ENTRY *attr_names = NULL; struct ATTR_NAME_ENTRY *ane; struct RESTART_TABLE ...
0
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
317,280,008,259,672,250,000,000,000,000,000,000,000
1,481
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
Segment::Segment(IMkvReader* pReader, long long elem_start, // long long elem_size, long long start, long long size) : m_pReader(pReader), m_element_start(elem_start), // m_element_size(elem_size), m_start(start), m_size(size), m_pos(start), m_pU...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
156,962,742,206,572,140,000,000,000,000,000,000,000
20
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
static void io_poll_remove_all(struct io_ring_ctx *ctx) { struct hlist_node *tmp; struct io_kiocb *req; int i; spin_lock_irq(&ctx->completion_lock); for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) { struct hlist_head *list; list = &ctx->cancel_hash[i]; hlist_for_each_entry_safe(req, tmp, list, hash_nod...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
74,881,741,269,929,210,000,000,000,000,000,000,000
16
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
ElectronWebContentsUtilityHandlerImpl::GetRenderFrameHost() { return content::RenderFrameHost::FromID(render_process_id_, render_frame_id_); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
95,099,080,649,977,330,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static int ext4_mb_cleanup_pa(struct ext4_group_info *grp) { struct ext4_prealloc_space *pa; struct list_head *cur, *tmp; int count = 0; list_for_each_safe(cur, tmp, &grp->bb_prealloc_list) { pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list); list_del(&pa->pa_group_list); count++; kmem_cache_...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
247,467,299,063,696,030,000,000,000,000,000,000,000
14
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...