func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
_bluetooth_client_get_default_adapter_discovering (BluetoothClient *self) { BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE (self); GtkTreePath *path; GtkTreeIter iter; gboolean ret; if (priv->default_adapter == NULL) return FALSE; path = gtk_tree_row_reference_get_path (priv->default_adapter); g...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
41,925,981,069,102,485,000,000,000,000,000,000,000
17
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
Connection( asio::io_service& io_service, Handler* handler, const std::string& server_name, std::tuple<Middlewares...>* middlewares, std::function<std::string()>& get_cached_date_str_f, detail::task_timer& task_timer, typename Adaptor::contex...
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
83,958,445,687,630,450,000,000,000,000,000,000,000
25
Prevent HTTP pipelining which Crow doesn't support.
static void l2cap_chan_del(struct sock *sk, int err) { struct l2cap_conn *conn = l2cap_pi(sk)->conn; struct sock *parent = bt_sk(sk)->parent; l2cap_sock_clear_timer(sk); BT_DBG("sk %p, conn %p, err %d", sk, conn, err); if (conn) { /* Unlink from channel list */ l2cap_chan_unlink(&conn->chan_list, sk); l2c...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
24,602,091,252,334,810,000,000,000,000,000,000,000
28
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) { const struct cred *old_cred; struct cred *override_cred; struct path path; struct inode *inode; int res; unsigned int lookup_flags = LOOKUP_FOLLOW; if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ return -EINVAL; over...
0
[ "CWE-284" ]
linux
54d5ca871e72f2bb172ec9323497f01cd5091ec7
16,211,443,423,835,860,000,000,000,000,000,000,000
75
vfs: add vfs_select_inode() helper Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+
add_len_mml(MinMaxLen* to, OnigDistance len) { to->min = distance_add(to->min, len); to->max = distance_add(to->max, len); }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
97,763,960,022,994,900,000,000,000,000,000,000,000
5
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static int apply_private_devices(const Unit *u, const ExecContext *c) { assert(u); assert(c); /* If PrivateDevices= is set, also turn off iopl and all @raw-io syscalls. */ if (!c->private_devices) return 0; if (skip_seccomp_unavailable(u, "PrivateDevices=")) ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
126,164,368,981,442,090,000,000,000,000,000,000,000
14
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, int id) { int dnsseclame = 0; enum response_type type; iq->num_current_queries--; if(!inplace_cb_query_response_call(qstate->env, qstate, iq->response)) log_err("unable to call query_response callback"); if(iq->response == NULL) { /*...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
197,231,606,406,030,300,000,000,000,000,000,000,000
451
- 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 tcp_seq_open(struct inode *inode, struct file *file) { struct tcp_seq_afinfo *afinfo = PDE_DATA(inode); struct tcp_iter_state *s; int err; err = seq_open_net(inode, file, &afinfo->seq_ops, sizeof(struct tcp_iter_state)); if (err < 0) return err; s = ((struct seq_file *)file->private_data)->private; ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
174,325,622,733,029,500,000,000,000,000,000,000,000
16
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
Window_frame_bound::print(String *str, enum_query_type query_type) { if (precedence_type == CURRENT) { str->append(STRING_WITH_LEN(" current row ")); return; } if (is_unbounded()) str->append(STRING_WITH_LEN(" unbounded ")); else offset->print(str ,query_type); switch (precedence_type) { ...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
3,950,445,684,034,728,400,000,000,000,000,000,000
22
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
int sqlite3Fts3MaxLevel(Fts3Table *p, int *pnMax){ int rc; int mxLevel = 0; sqlite3_stmt *pStmt = 0; rc = fts3SqlStmt(p, SQL_SELECT_MXLEVEL, &pStmt, 0); if( rc==SQLITE_OK ){ if( SQLITE_ROW==sqlite3_step(pStmt) ){ mxLevel = sqlite3_column_int(pStmt, 0); } rc = sqlite3_reset(pStmt); } *pn...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
27,892,952,012,676,090,000,000,000,000,000,000,000
15
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode) { EVP_CIPHER_CTX *ctx; unsigned char key[EVP_MAX_KEY_LENGTH], *p_key = NULL; unsigned char iv[EVP_MAX_IV_LENGTH], *p_iv = NULL; VALUE pass, init_v; if(rb_scan_args(argc, argv, "02", &pass, &init_v) > 0){ /* * oops. this code mistakes ...
0
[ "CWE-326", "CWE-310", "CWE-703" ]
openssl
8108e0a6db133f3375608303fdd2083eb5115062
134,998,305,026,575,430,000,000,000,000,000,000,000
45
cipher: don't set dummy encryption key in Cipher#initialize Remove the encryption key initialization from Cipher#initialize. This is effectively a revert of r32723 ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28). r32723, which added the key initialization, was a workaround for Ruby Bug #2768. For s...
JPEGQS_ATTR int QS_NAME(j_decompress_ptr srcinfo, jvirt_barray_ptr *coef_arrays, jpegqs_control_t *opts) { JDIMENSION comp_width, comp_height, blk_y; int i, ci, stride, iter, stride1 = 0, need_downsample = 0; jpeg_component_info *compptr; int64_t size; JQUANT_TBL *qtbl; JSAMPLE *image, *image1 = NULL, *image2 = NUL...
1
[]
jpeg-quantsmooth
3ab3838e610d361b71d937738edf156505c59c58
212,922,516,135,512,300,000,000,000,000,000,000,000
401
avoid divide-by-zero on damaged JPEG files Also fixed misleading indentation warnings from GCC.
void print_vma_addr(char *prefix, unsigned long ip) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; /* * Do not print if we are in atomic * contexts (in exception stacks, etc.): */ if (preempt_count()) return; down_read(&mm->mmap_sem); vma = find_vma(mm, ip); if (vma && vma->vm_file) ...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
158,079,701,056,646,140,000,000,000,000,000,000,000
34
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
njs_generate_test_jump_expression_end(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node) { njs_int_t ret; njs_vmcode_move_t *move; /* * The right expression usually uses node->index as destination, * however, if the expression is a literal, variable or assignment, ...
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
196,501,710,111,558,000,000,000,000,000,000,000,000
27
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
void CLASS parse_mos (int offset) { char data[40]; int skip, from, i, c, neut[4], planes=0, frot=0; static const char *mod[] = { "","DCB2","Volare","Cantare","CMost","Valeo 6","Valeo 11","Valeo 22", "Valeo 11p","Valeo 17","","Aptus 17","Aptus 22","Aptus 75","Aptus 65", "Aptus 54S","Aptus 65S","Aptus 75S...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
37,490,365,212,473,946,000,000,000,000,000,000,000
76
fixed two more problems found by fuzzer
int ogs_sbi_parse_response( ogs_sbi_message_t *message, ogs_sbi_response_t *response) { int rv; ogs_hash_index_t *hi; ogs_assert(response); ogs_assert(message); rv = ogs_sbi_parse_header(message, &response->h); if (rv != OGS_OK) { ogs_error("ogs_sbi_parse_header() failed"); ...
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
300,431,493,119,368,900,000,000,000,000,000,000,000
33
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
void CLASS kodak_jpeg_load_raw() { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; JSAMPARRAY buf; JSAMPLE (*pixel)[3]; int row, col; cinfo.err = jpeg_std_error (&jerr); jpeg_create_decompress (&cinfo); jpeg_stdio_src (&cinfo, ifp); cinfo.src->fill_input_buffer = fill_input_buffer; ...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
274,895,784,497,526,730,000,000,000,000,000,000,000
58
backported 0.15.4 datachecks
DataBuf readFile(const std::wstring& wpath) { FileIo file(wpath); if (file.open("rb") != 0) { throw WError(kerFileOpenFailed, wpath, "rb", strError().c_str()); } struct _stat st; if (0 != ::_wstat(wpath.c_str(), &st)) { throw WError(kerCallFailed, ...
0
[ "CWE-125" ]
exiv2
bd0afe0390439b2c424d881c8c6eb0c5624e31d9
161,101,932,509,424,630,000,000,000,000,000,000,000
17
Add bounds check to MemIo::seek(). (#944) - Regression test for missing bounds check in MemIo::seek() - Add bounds check to MemIo::seek(), this fixes CVE-2019-13504
static pj_status_t decode_empty_attr(pj_pool_t *pool, const pj_uint8_t *buf, const pj_stun_msg_hdr *msghdr, void **p_attr) { pj_stun_empty_attr *attr; PJ_UNUSED_ARG(msghdr); /* Check that the struct address is valid */ pj_assert(sizeof(pj_stun_empty_attr) == ATTR_HDR_LEN);...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
168,059,804,556,987,200,000,000,000,000,000,000,000
25
Merge pull request from GHSA-2qpg-f6wf-w984
datestr_from_pk (PKT_public_key *pk) { static char buffer[11+5]; time_t atime = pk->timestamp; return mk_datestr (buffer, atime); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
220,861,852,137,276,830,000,000,000,000,000,000,000
7
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
int32_t WebContents::ID() const { return weak_map_id(); }
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
234,255,077,817,532,100,000,000,000,000,000,000,000
3
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
static int wait_for_msg_done(struct smi_info *smi_info) { enum si_sm_result smi_result; smi_result = smi_info->handlers->event(smi_info->si_sm, 0); for (;;) { if (smi_result == SI_SM_CALL_WITH_DELAY || smi_result == SI_SM_CALL_WITH_TICK_DELAY) { schedule_timeout_uninterruptible(1); smi_result = sm...
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
134,501,206,351,466,910,000,000,000,000,000,000,000
26
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static int check_crl_time(X509_STORE_CTX *ctx, X509_CRL *crl, int notify) { time_t *ptime; int i; if (notify) ctx->current_crl = crl; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME) r...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
122,117,247,250,062,770,000,000,000,000,000,000,000
55
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
write8 (FILE *f, guint8 *data, gint count) { gint bytes; gint written; written = 0; while (count > 0) { bytes = fwrite ((char*) data, sizeof (char), count, f); if (bytes <= 0) break; count -= bytes; data += bytes; written += bytes; } return written;...
0
[ "CWE-787" ]
gdk-pixbuf
88af50a864195da1a4f7bda5f02539704fbda599
191,707,529,573,683,800,000,000,000,000,000,000,000
20
ico: Be more careful when parsing headers There is some redundancy between the ico directory and the bitmap image header. If the two disagree on the icon dimensions, just toss the image, instead of risking crashes or OOM later. Also add some more debug spew that helped in tracking this down, and make error messages mo...
show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { struct bgp *bgp; struct bgp_table *table; struct bgp_node *rn; struct bgp_node *rm; struct attr *attr; int rd_header; int header = 1; char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s";...
0
[ "CWE-119" ]
quagga
a3bc7e9400b214a0f078fdb19596ba54214a1442
79,051,750,710,958,300,000,000,000,000,000,000,000
76
bgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked length Address CERT vulnerability report VU#270232, memcpy to stack data structure based on length field from packet data whose length field upper-bound was not properly checked. This likely allows BGP peers that are enabled to send Labeled-VPN SAFI...
static inline bool __is_discard_front_mergeable(struct discard_info *cur, struct discard_info *front, unsigned int max_len) { return __is_discard_mergeable(cur, front, max_len); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
259,875,652,182,053,800,000,000,000,000,000,000,000
5
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static void dns_transaction_process_dnssec(DnsTransaction *t) { int r; assert(t); /* Are there ongoing DNSSEC transactions? If so, let's wait for them. */ r = dns_transaction_dnssec_ready(t); if (r < 0) goto fail; if (r == 0) /* We aren't ready yet (or o...
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
2,370,103,121,167,853,000,000,000,000,000,000,000
72
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
CallResult<bool> JSObject::putComputedWithReceiver_RJS( Handle<JSObject> selfHandle, Runtime *runtime, Handle<> nameValHandle, Handle<> valueHandle, Handle<> receiver, PropOpFlags opFlags) { assert( !opFlags.getMustExist() && "mustExist flag cannot be used with computed properties"...
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
303,246,646,436,119,250,000,000,000,000,000,000,000
276
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args) { __s32 __user *fds = (__s32 __user *) arg; unsigned nr_tables, i; struct file *file; int fd, ret = -ENOMEM; struct fixed_rsrc_ref_node *ref_node; struct fixed_rsrc_data *file_data; if (ctx->file_data) return -...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
336,463,264,081,108,870,000,000,000,000,000,000,000
88
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...
static void FVMenuEditInstrs(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); int index = FVAnyCharSelected(fv); SplineChar *sc; if ( index<0 ) return; sc = SFMakeChar(fv->b.sf,fv->b.map,index); SCEditInstructions(sc); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
109,816,419,438,718,110,000,000,000,000,000,000,000
9
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
virtual Value evaluate(const Document& root) const { // Just put all the values in a list. // By default, this is not associative/commutative so the results will change if // instantiated as commutative or associative and operations are reordered. vector<Value> values; for (E...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
219,652,124,741,125,250,000,000,000,000,000,000,000
10
SERVER-38070 fix infinite loop in agg expression
static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local, struct ieee80211_vif *vif, struct sta_info *sta, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_txq *txq = NUL...
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
60,893,199,083,103,500,000,000,000,000,000,000,000
41
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
static int readOHDRHeaderMessageFilterPipelineV1(struct READER *reader, uint8_t filters) { int i, j; uint16_t filter_identification_value, flags, number_client_data_values, namelength; if (readValue(reader, 6) != 0) { mylog("reserved values not zero\n");...
0
[ "CWE-787" ]
libmysofa
890400ebd092c574707d0c132124f8ff047e20e1
171,870,857,380,243,600,000,000,000,000,000,000,000
50
Fix for issue 163
ModuleExport size_t RegisterSGIImage(void) { MagickInfo *entry; entry=SetMagickInfo("SGI"); entry->decoder=(DecodeImageHandler *) ReadSGIImage; entry->encoder=(EncodeImageHandler *) WriteSGIImage; entry->magick=(IsImageFormatHandler *) IsSGI; entry->description=ConstantString("Irix RGB image"); entry...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
167,146,591,670,116,580,000,000,000,000,000,000,000
15
Fix ultra rare but potential memory-leak
inline size_t fwrite(const T *ptr, const size_t nmemb, std::FILE *stream) { if (!ptr || !stream) throw CImgArgumentException("cimg::fwrite(): Invalid writing request of %u %s%s from buffer %p to file %p.", nmemb,cimg::type<T>::string(),nmemb>1?"s":"",ptr,stream); ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
277,220,811,714,585,980,000,000,000,000,000,000,000
18
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
TEST(LtOp, MatchesArrayValue) { BSONObj operand = BSON("$lt" << 5); LTMatchExpression lt; ASSERT(lt.init("a", operand["$lt"]).isOK()); ASSERT(lt.matchesBSON(BSON("a" << BSON_ARRAY(6 << 4.5)), NULL)); ASSERT(!lt.matchesBSON(BSON("a" << BSON_ARRAY(6 << 7)), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
181,402,984,442,377,070,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void CNBL::NBComplete() { m_BuffersDone++; m_MappedBuffersDetached--; }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
9,214,392,209,127,574,000,000,000,000,000,000,000
5
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement) { unsigned exif_value_2a, offset_of_ifd; /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { ImageInfo->motorola_intel = 0; } els...
0
[ "CWE-416" ]
php-src
3fdde65617e9f954e2c964768aac8831005497e5
182,811,680,725,262,880,000,000,000,000,000,000,000
43
Fix #76409: heap use after free in _php_stream_free We must not close the stream in exif_read_from_impl(), since it is the responsibility of the (caller's) caller to do so, if it actually opened the stream. We simplify the reproduce script, which is actually about supplying a path to a directory (opposed to a regular...
static int display_preclose(void *handle, void *device) { IMAGE *img = image_find(handle, device); if (img == NULL) return -1; gtk_main_iteration_do(FALSE); img->buf = NULL; img->width = 0; img->height = 0; img->rowstride = 0; img->format = 0; gtk_widget_destroy(img->windo...
0
[]
ghostpdl
514595fc2cc84f51efdef563cf7a35a0050902e5
247,895,127,496,660,470,000,000,000,000,000,000,000
26
Bug 693038 - allow gsx to build against GTK+ 3.x Patch from galtgendo@gmail.com applied with changes to maintain compatibility with GTK+ 2.x, and replace a function deprecated in GTK+ 3.x. This patch drops GTK+ 1.x support. No cluster differences.
readlink(char * link, char * file, int len) { return (-1); }
0
[ "CWE-20" ]
ntp
c4cd4aaf418f57f7225708a93bf48afb2bc9c1da
110,614,714,361,495,290,000,000,000,000,000,000,000
3
CVE-2014-9297
static void jas_cmshapmatlut_init(jas_cmshapmatlut_t *lut) { lut->data = 0; lut->size = 0; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
209,754,905,708,088,330,000,000,000,000,000,000,000
5
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...
transformCreateStmt(CreateStmt *stmt, const char *queryString) { ParseState *pstate; CreateStmtContext cxt; List *result; List *save_alist; ListCell *elements; Oid namespaceid; Oid existing_relid; ParseCallbackState pcbstate; bool is_foreign_table = IsA(stmt, CreateForeignTableStmt); /* * We m...
1
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
88,931,636,816,265,680,000,000,000,000,000,000,000
187
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static bool io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force) { struct io_rings *rings = ctx->rings; struct io_uring_cqe *cqe; struct io_kiocb *req; unsigned long flags; LIST_HEAD(list); if (!force) { if (list_empty_careful(&ctx->cq_overflow_list)) return true; if ((ctx->cached_cq_tail - READ_...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
300,443,060,209,737,050,000,000,000,000,000,000,000
56
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
bool is_stat_open(uint32 access_mask) { const uint32_t stat_open_bits = (SYNCHRONIZE_ACCESS| FILE_READ_ATTRIBUTES| FILE_WRITE_ATTRIBUTES); return (((access_mask & stat_open_bits) != 0) && ((access_mask & ~stat_open_bits) == 0)); }
0
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
227,910,359,398,262,600,000,000,000,000,000,000,000
10
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
int vrend_draw_vbo(struct vrend_context *ctx, const struct pipe_draw_info *info, uint32_t cso, uint32_t indirect_handle, uint32_t indirect_draw_count_handle) { int i; bool new_program = false; struct vrend_resource *indirect_res = NULL; struct vrend_r...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
220,336,846,433,968,700,000,000,000,000,000,000,000
284
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
HttpHeaderEntry::parse(const char *field_start, const char *field_end, const http_hdr_owner_type msgType) { /* note: name_start == field_start */ const char *name_end = (const char *)memchr(field_start, ':', field_end - field_start); int name_len = name_end ? name_end - field_start :0; const char *value...
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
304,445,879,946,872,060,000,000,000,000,000,000,000
112
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
void ext4_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, ext4_group_t group) { struct ext4_group_info *grp = ext4_get_group_info(sb, group); struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb); ext4_grpblk_t i = 0; ext4_grpblk_t first; ext4_grpblk_t le...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
85,097,299,278,210,160,000,000,000,000,000,000,000
55
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
XLogRecPtrToBytePos(XLogRecPtr ptr) { uint64 fullsegs; uint32 fullpages; uint32 offset; uint64 result; XLByteToSeg(ptr, fullsegs); fullpages = (ptr % XLOG_SEG_SIZE) / XLOG_BLCKSZ; offset = ptr % XLOG_BLCKSZ; if (fullpages == 0) { result = fullsegs * UsableBytesInSegment; if (offset > 0) { Asser...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
271,583,609,371,130,040,000,000,000,000,000,000,000
35
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
swproc(gs_main_instance * minst, const char *arg, arg_list * pal) { char sw = arg[1]; ref vtrue; int code = 0; #undef initial_enter_name #define initial_enter_name(nstr, pvalue)\ i_initial_enter_name(minst->i_ctx_p, nstr, pvalue) make_true(&vtrue); arg += 2; /* skip - and letter...
1
[]
ghostpdl
407cc61e87b0fd9d44d72ca740af7d3c85dee78d
13,895,391,214,174,685,000,000,000,000,000,000,000
486
"starting_arg_file" should only apply once. The "starting_arg_file == true" setting should apply to the *first* call to lib_file_open() in the context of a given call to runarg(). Previously, it remained set for the entire duration of the runarg() call, resulting in the current directory being searched for any resourc...
static inline bool cpu_has_vmx_invpcid(void) { return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_ENABLE_INVPCID; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
76,483,285,559,038,460,000,000,000,000,000,000,000
5
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp, __be32 *p, struct nfs_openres *res) { struct xdr_stream xdr; struct compound_hdr hdr; int status; xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); status = decode_compound_hdr(&xdr, &hdr); if (status) ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
154,098,961,457,054,170,000,000,000,000,000,000,000
20
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
int oe_getsockopt( int sockfd, int level, int optname, void* optval, oe_socklen_t* optlen) { int ret = -1; oe_fd_t* sock; if (!(sock = oe_fdtable_get(sockfd, OE_FD_TYPE_SOCKET))) OE_RAISE_ERRNO(oe_errno); ret = sock->ops.socket.getsockopt(sock, level, optname, optval, optle...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
192,389,673,230,308,450,000,000,000,000,000,000,000
18
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *port) { int i; static const work_func_t sas_event_fns[DISC_NUM_EVENTS] = { [DISCE_DISCOVER_DOMAIN] = sas_discover_domain, [DISCE_REVALIDATE_DOMAIN] = sas_revalidate_domain, [DISCE_SUSPEND] = sas_suspend_devices, [DISCE_RESUME] = sas_resume_d...
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
139,843,826,140,761,070,000,000,000,000,000,000,000
17
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
TYPED_TEST(MultiProtocolTest, UnionWithRef) { { UnionWithRef oldObject; oldObject.set_fieldA(); { auto& ptr = oldObject.get_fieldA(); const_cast<std::unique_ptr<StructA>&>(ptr) = std::unique_ptr<StructA>(nullptr); } tablebased::UnionWithRef newObject; newObject.set_fieldA...
0
[ "CWE-763" ]
fbthrift
bfda1efa547dce11a38592820916db01b05b9339
249,460,964,450,614,480,000,000,000,000,000,000,000
77
Fix handling of invalid union data in table-based serializer Summary: Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem...
long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) { unsigned char *p; unsigned long l; long n; int i,al; if (s->s3->tmp.reuse_message) { s->s3->tmp.reuse_message=0; if ((mt >= 0) && (s->s3->tmp.message_type != mt)) { al=SSL_AD_UNEXPECTED_MESSAGE; SSLerr(SSL_F_SSL3_GET_MESS...
0
[]
openssl
0294b2be5f4c11e60620c0018674ff0e17b14238
73,984,931,839,771,910,000,000,000,000,000,000,000
143
Check EVP errors for handshake digests. Partial mitigation of PR#3200
static void cstm(JF, js_Ast *stm) { js_Ast *target; int loop, cont, then, end; emitline(J, F, stm); switch (stm->type) { case AST_FUNDEC: break; case STM_BLOCK: cstmlist(J, F, stm->a); break; case STM_EMPTY: if (F->script) { emitline(J, F, stm); emit(J, F, OP_POP); emit(J, F, OP_UNDEF); } ...
1
[ "CWE-703", "CWE-787" ]
mujs
df8559e7bdbc6065276e786217eeee70f28fce66
267,408,615,059,309,900,000,000,000,000,000,000,000
234
Bug 704749: Clear jump list after patching jump addresses. Since we can emit a statement multiple times when compiling try/finally we have to use a new patch list for each instance.
int security_sem_semctl(struct sem_array *sma, int cmd) { return security_ops->sem_semctl(sma, cmd); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
57,897,951,064,973,565,000,000,000,000,000,000,000
4
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...
void bnx2x_set_reset_in_progress(struct bnx2x *bp) { u32 val; u32 bit = BP_PATH(bp) ? BNX2X_PATH1_RST_IN_PROG_BIT : BNX2X_PATH0_RST_IN_PROG_BIT; bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); /* Set the bit */ val |= bit; REG_WR(bp, BNX2X_RECOVERY_GLOB_REG...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
322,792,586,619,720,500,000,000,000,000,000,000,000
13
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...
static inline void io_queue_link_head(struct io_kiocb *req) { if (unlikely(req->flags & REQ_F_FAIL_LINK)) { io_cqring_add_event(req, -ECANCELED); io_double_put_req(req); } else io_queue_sqe(req, NULL); }
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
155,018,938,927,397,780,000,000,000,000,000,000,000
8
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>
TEST_F(HttpHealthCheckerImplTest, SuccessServiceCheckWithAltPort) { const std::string host = "fake_cluster"; const std::string path = "/healthcheck"; setupServiceValidationHC(); EXPECT_CALL(runtime_.snapshot_, featureEnabled("health_check.verify_cluster", 100)) .WillOnce(Return(true)); EXPECT_CALL(*thi...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
228,494,990,919,784,770,000,000,000,000,000,000,000
34
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
bool CIRCSock::OnCTCPMessage(CCTCPMessage& Message) { bool bResult = false; CChan* pChan = nullptr; CString sTarget = Message.GetTarget(); if (sTarget.Equals(GetNick())) { if (Message.IsReply()) { IRCSOCKMODULECALL(OnCTCPReplyMessage(Message), &bResult); return bResult; ...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
15,849,460,413,606,710,000,000,000,000,000,000,000
66
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
virtual int next() { /* Allow multiple next() calls in EOF state. */ if (at_eof()) return -1; if (io_cache) { rownum++; } else { cache_pos+= ref_length; DBUG_ASSERT(cache_pos <= cache_end); } return 0; }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
134,136,107,475,018,790,000,000,000,000,000,000,000
17
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static int proc_task_fill_cache(struct file *filp, void *dirent, filldir_t filldir, struct task_struct *task, int tid) { char name[PROC_NUMBUF]; int len = snprintf(name, sizeof(name), "%d", tid); return proc_fill_cache(filp, dirent, filldir, name, len, proc_task_instantiate, task, NULL); }
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
109,710,544,773,601,500,000,000,000,000,000,000,000
8
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
static int of_unittest_device_exists(int unittest_nr, enum overlay_type ovtype) { const char *path; path = unittest_path(unittest_nr, ovtype); switch (ovtype) { case PDEV_OVERLAY: return of_path_platform_device_exists(path); case I2C_OVERLAY: return of_path_i2c_client_exists(path); } return 0; }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
96,354,617,305,424,200,000,000,000,000,000,000,000
14
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
repo_pull (OstreeRepo *self, FlatpakRemoteState *state, const char **dirs_to_pull, const char *ref_to_fetch, const char *rev_to_fetch, /* (nullable) */ ...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
196,120,989,390,467,650,000,000,000,000,000,000,000
123
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static void kvm_add_async_pf_gfn(struct kvm_vcpu *vcpu, gfn_t gfn) { u32 key = kvm_async_pf_hash_fn(gfn); while (vcpu->arch.apf.gfns[key] != ~0) key = kvm_async_pf_next_probe(key); vcpu->arch.apf.gfns[key] = gfn; }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
60,956,727,260,860,510,000,000,000,000,000,000,000
9
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
static bool io_cancel_cb(struct io_wq_work *work, void *data) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); struct io_cancel_data *cd = data; if (req->ctx != cd->ctx) return false; if (cd->flags & IORING_ASYNC_CANCEL_ANY) { ; } else if (cd->flags & IORING_ASYNC_CANCEL_FD) { if (req->fi...
0
[ "CWE-193" ]
linux
47abea041f897d64dbd5777f0cf7745148f85d75
47,559,238,734,644,730,000,000,000,000,000,000,000
23
io_uring: fix off-by-one in sync cancelation file check The passed in index should be validated against the number of registered files we have, it needs to be smaller than the index value to avoid going one beyond the end. Fixes: 78a861b94959 ("io_uring: add sync cancelation API through io_uring_register()") Reported...
MockDnsResolver::MockDnsResolver() { ON_CALL(*this, resolve(_, _, _)).WillByDefault(Return(&active_query_)); }
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
158,107,570,348,380,820,000,000,000,000,000,000,000
3
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
static int orinoco_ioctl_reset(struct net_device *dev, struct iw_request_info *info, void *wrqu, char *extra) { struct orinoco_private *priv = ndev_priv(dev); if (!capable(CAP_NET_ADMIN)) return -EPERM; if (info->cmd == (SIOCIWFIRSTPRIV + 0x1)) { printk(KERN_DEBUG "%s: Forcing res...
0
[]
linux
0a54917c3fc295cb61f3fb52373c173fd3b69f48
324,839,992,456,344,200,000,000,000,000,000,000,000
23
orinoco: fix TKIP countermeasure behaviour Enable the port when disabling countermeasures, and disable it on enabling countermeasures. This bug causes the response of the system to certain attacks to be ineffective. It also prevents wpa_supplicant from getting scan results, as wpa_supplicant disables countermeasures...
CImg<T>& _priority_queue_remove(unsigned int& siz) { (*this)(0,0) = (*this)(--siz,0); (*this)(0,1) = (*this)(siz,1); (*this)(0,2) = (*this)(siz,2); (*this)(0,3) = (*this)(siz,3); const float value = (*this)(0,0); unsigned int pos = 0, swap = 0; do { const unsigned ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
303,866,628,152,894,560,000,000,000,000,000,000,000
20
.
void CairoOutputDev::endTextObject(GfxState *state) { if (haveCSPattern) { haveCSPattern = gFalse; if (state->getFillColorSpace()->getMode() != csPattern) { if (textClipPath) { cairo_new_path (cairo); cairo_append_path (cairo, textClipPath); cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); cair...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
192,016,789,187,806,630,000,000,000,000,000,000,000
36
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
kauth_reply_print(netdissect_options *ndo, const u_char *bp, u_int length, uint32_t opcode) { const struct rx_header *rxh; uint8_t type; if (length <= sizeof(struct rx_header)) return; rxh = (const struct rx_header *) bp; /* * Print out the afs call we're invoking. The table used here was...
0
[]
tcpdump
4154778a262b4a7449141535a99da4d13b4c8b2e
257,436,194,181,750,130,000,000,000,000,000,000,000
48
RX: Fix a data fetch The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to fetch it.
apprentice_unmap(struct magic_map *map) { if (map == NULL) return; if (map->p != php_magic_database) { if (map->p == NULL) { int j; for (j = 0; j < MAGIC_SETS; j++) { if (map->magic[j]) { efree(map->magic[j]); } } } else { efree(map->p); } } efree(map); }
0
[ "CWE-17" ]
php-src
a72cd07f2983dc43a6bb35209dc4687852e53c09
60,506,119,216,817,730,000,000,000,000,000,000,000
18
Fixed bug #68665 (Invalid free)
void SSL::UnSetCompression() { secure_.use_connection().compression_ = false; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
120,758,194,863,172,100,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static struct hlist_head *unix_sockets_unbound(void *addr) { unsigned long hash = (unsigned long)addr; hash ^= hash >> 16; hash ^= hash >> 8; hash %= UNIX_HASH_SIZE; return &unix_socket_table[UNIX_HASH_SIZE + hash]; }
0
[ "CWE-287", "CWE-284" ]
linux
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
42,385,334,883,920,670,000,000,000,000,000,000,000
9
af_netlink: force credentials passing [CVE-2012-3520] Pablo Neira Ayuso discovered that avahi and potentially NetworkManager accept spoofed Netlink messages because of a kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data to the receiver if the sender did not provide such data, instead of not includ...
hash(XML_Parser parser, KEY s) { unsigned long h = hash_secret_salt; while (*s) h = CHAR_HASH(h, *s++); return h; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
201,125,408,121,074,400,000,000,000,000,000,000,000
7
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, int offset, unsigned int len, __wsum *csump) { __wsum csum = *csump; int partial_cnt = 0, err = 0; /* Skip over the finished iovecs */ while (offset >= iov->iov_len) { offset -= iov->iov_len; iov++; } while (len > 0) { u8 __u...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
2,630,076,689,597,829,000,000,000,000,000,000,000
75
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 void annotation_get_freespace(annotate_state_t *state, struct annotate_entry_list *entry) { uint64_t tavail = 0; struct buf value = BUF_INITIALIZER; (void) partlist_local_find_freespace_most(0, NULL, NULL, &tavail, NULL); buf_printf(&value, "%" PRIuMAX, (uint...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
297,821,175,708,120,420,000,000,000,000,000,000,000
11
annotate: don't allow everyone to write shared server entries
static int nntp_ac_add(struct Account *a, struct Mailbox *m) { if (!a || !m || (m->type != MUTT_NNTP)) return -1; return 0; }
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
246,820,203,145,117,600,000,000,000,000,000,000,000
6
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
x509_proxy_subject_name( const char *proxy_file ) { #if !defined(HAVE_EXT_GLOBUS) (void) proxy_file; set_error_string( NOT_SUPPORTED_MSG ); return NULL; #else char *subject_name = NULL; globus_gsi_cred_handle_t proxy_handle = x509_proxy_read( proxy_file ); if ( proxy_handle == NULL ) { return NULL; } subjec...
0
[ "CWE-20" ]
htcondor
2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d
172,323,560,154,705,730,000,000,000,000,000,000,000
22
(#6455) Fix issue validating VOMS proxies
void logargs(int argc, char **argv) { if (!arg_debug) return; int i; int len = 0; // calculate message length for (i = 0; i < argc; i++) len += strlen(argv[i]) + 1; // + ' ' // build message char msg[len + 1]; char *ptr = msg; for (i = 0; i < argc; i++) { sprintf(ptr, "%s ", argv[i]); ptr += strle...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
250,333,192,384,043,550,000,000,000,000,000,000,000
22
fixing CVE-2022-31214
StatusWith<UserHandle> AuthorizationManagerImpl::acquireUser(OperationContext* opCtx, const UserName& userName) { if (userName == internalSecurity.user->getName()) { return internalSecurity.user; } boost::optional<UserHandle> cachedUser =...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
183,260,532,464,660,450,000,000,000,000,000,000,000
52
SERVER-38984 Validate unique User ID on UserCache hit
GF_EXPORT u8 gf_isom_get_pl_indication(GF_ISOFile *movie, GF_ISOProfileLevelType PL_Code) { GF_IsomInitialObjectDescriptor *iod; if (!movie || !movie->moov) return 0xFF; if (!movie->moov->iods || !movie->moov->iods->descriptor) return 0xFF; if (movie->moov->iods->descriptor->tag != GF_ODF_ISOM_IOD_TAG) return 0xFF;...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
189,024,794,638,269,300,000,000,000,000,000,000,000
26
fixed #1706
CairoFontEngine::~CairoFontEngine() { int i; for (i = 0; i < cairoFontCacheSize; ++i) { if (fontCache[i]) delete fontCache[i]; } }
0
[ "CWE-20" ]
poppler
1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8
69,177,185,188,446,150,000,000,000,000,000,000,000
8
Fix a crash with invalid embedded fonts
static inline enum iucv_tx_notify qeth_compute_cq_notification(int sbalf15, int delayed) { enum iucv_tx_notify n; switch (sbalf15) { case 0: n = delayed ? TX_NOTIFY_DELAYED_OK : TX_NOTIFY_OK; break; case 4: case 16: case 17: case 18: n = delayed ? TX_NOTIFY_DELAYED_UNREACHABLE : TX_NOTIFY_UNREACHABLE;...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
153,612,731,455,706,620,000,000,000,000,000,000,000
23
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
delete_file (CommonJob *job, GFile *file, gboolean *skipped_file, SourceInfo *source_info, TransferInfo *transfer_info, gboolean toplevel) { GError *error; char *primary, *secondary, *details; int response; if (should_skip_file (job, file)) { *skipped_file = TRUE; return; } error = ...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
113,222,663,573,619,390,000,000,000,000,000,000,000
68
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static void json_trace(int errlevel, const char *fmt, ...) /* assemble command in printf(3) style */ { if (errlevel <= debuglevel && NULL != debugfp) { char buf[BUFSIZ] = {0}; va_list ap; (void)strlcpy(buf, "json: ", sizeof(buf)); va_start(ap, fmt); str_vappendf(buf, sizeof(buf), fmt, ap); va_end(ap); (voi...
0
[ "CWE-121" ]
gpsd
7646cbd04055a50b157312ba6b376e88bd398c19
155,971,807,899,461,100,000,000,000,000,000,000,000
15
Add bounds check in in_escape state of JSON parser.
virDomainDeleteConfig(const char *configDir, const char *autostartDir, virDomainObjPtr dom) { g_autofree char *configFile = NULL; g_autofree char *autostartLink = NULL; if ((configFile = virDomainConfigFile(configDir, dom->def->name)) == NULL) return -1; ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
109,126,334,745,332,500,000,000,000,000,000,000,000
27
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
vte_sequence_handler_SR (VteTerminal *terminal, GValueArray *params) { vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_sr); }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
321,062,889,681,661,570,000,000,000,000,000,000,000
4
fix bug #548272 svn path=/trunk/; revision=2365
DEFUN (clear_ip_bgp_all_soft_in, clear_ip_bgp_all_soft_in_cmd, "clear ip bgp * soft in", CLEAR_STR IP_STR BGP_STR "Clear all peers\n" "Soft reconfig\n" "Soft reconfig inbound update\n") { if (argc == 1) return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UNICAS...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
228,548,552,792,116,570,000,000,000,000,000,000,000
17
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
bool DaemonServer::handle_command(MCommand *m) { Mutex::Locker l(lock); int r = 0; std::stringstream ss; std::string prefix; assert(lock.is_locked_by_me()); /** * The working data for processing an MCommand. This lives in * a class to enable passing it into other threads for processing * outside...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
232,387,670,198,402,960,000,000,000,000,000,000,000
789
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, struct ieee80211_hdr *hdr, bool ack, u16 tx_time) { ieee80211_sta_tx_wmm_ac_notify(sdata, hdr, tx_time); if (!ieee80211_is_data(hdr->frame_control)) return; if (ieee80211_is_nullfunc(hdr->frame_control) && sdata->u.mgd.probe_send_c...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
77,750,040,205,315,980,000,000,000,000,000,000,000
21
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
void mobi_buffer_move(MOBIBuffer *buf, const int offset, const size_t len) { size_t aoffset = (size_t) abs(offset); unsigned char *source = buf->data + buf->offset; if (offset >= 0) { if (buf->offset + aoffset + len > buf->maxlen) { debug_print("%s", "End of buffer\n"); buf->...
1
[ "CWE-787" ]
libmobi
ab5bf0e37e540eac682a14e628853b918626e72b
112,966,685,438,841,870,000,000,000,000,000,000,000
21
fix oob write bug inside libmobi
static inline void vpid_sync_vcpu_single(struct vcpu_vmx *vmx) { if (vmx->vpid == 0) return; if (cpu_has_vmx_invvpid_single()) __invvpid(VMX_VPID_EXTENT_SINGLE_CONTEXT, vmx->vpid, 0); }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
172,257,209,846,693,440,000,000,000,000,000,000,000
8
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) { struct kmem_cache *s; void *ret; if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) return kmalloc_large(size, gfpflags); s = kmalloc_slab(size, gfpflags); if (unlikely(ZERO_OR_NULL_PTR(s))) return s; ret = slab_alloc(s, gfpflags,...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
269,421,888,701,701,430,000,000,000,000,000,000,000
20
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry) { unsigned long flags = 0; int bin; long hashv; IRDA_ASSERT( hashbin != NULL, return NULL;); IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); IRDA_ASSERT( entry != NULL, return NULL;); /* Synchronize */ if ( hashbin->hb_type & HB_LOCK ...
0
[ "CWE-200" ]
linux
4c03b862b12f980456f9de92db6d508a4999b788
192,066,402,900,653,550,000,000,000,000,000,000,000
50
irda: Fix lockdep annotations in hashbin_delete(). A nested lock depth was added to the hasbin_delete() code but it doesn't actually work some well and results in tons of lockdep splats. Fix the code instead to properly drop the lock around the operation and just keep peeking the head of the hashbin queue. Reported-...
envoy::config::core::v3::TrafficDirection ListenerFactoryContextBaseImpl::direction() const { return direction_; };
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
53,406,489,755,779,880,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>
int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev, int atomic, int hop) { return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop); }
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
186,246,009,548,196,230,000,000,000,000,000,000,000
5
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
static unsigned int XBMInteger(Image *image,short int *hex_digits) { int c; unsigned int value; /* Skip any leading whitespace. */ do { c=ReadBlobByte(image); if (c == EOF) return(0); } while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r')); /* Evaluate num...
1
[ "CWE-703", "CWE-834" ]
ImageMagick
d9a8234d211da30baf9526fbebe9a8438ea7e11c
334,225,489,732,792,000,000,000,000,000,000,000,000
36
https://github.com/ImageMagick/ImageMagick/issues/712
static void cil_reset_senscat(struct cil_senscat *senscat) { cil_reset_cats(senscat->cats); }
0
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
83,999,524,537,573,070,000,000,000,000,000,000,000
4
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...