func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int fts3EvalIncrPhraseNext( Fts3Cursor *pCsr, /* FTS Cursor handle */ Fts3Phrase *p, /* Phrase object to advance to next docid */ u8 *pbEof /* OUT: Set to 1 if EOF */ ){ int rc = SQLITE_OK; Fts3Doclist *pDL = &p->doclist; Fts3Table *pTab = (Fts3Tab...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
4,464,369,817,073,855,500,000,000,000,000,000,000
91
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
int qemu_target_page_bits(void) { return TARGET_PAGE_BITS; }
0
[ "CWE-125" ]
qemu
04bf2526ce87f21b32c9acba1c5518708c243ad0
98,561,063,340,393,440,000,000,000,000,000,000,000
4
exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by...
xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNodeSetContent : node == NULL\n"); #endif return; } switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE: case XM...
0
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
158,232,032,226,329,340,000,000,000,000,000,000,000
60
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
merge_selfsigs_subkey (KBNODE keyblock, KBNODE subnode) { PKT_public_key *mainpk = NULL, *subpk = NULL; PKT_signature *sig; KBNODE k; u32 mainkid[2]; u32 sigdate = 0; KBNODE signode; u32 curtime = make_timestamp (); unsigned int key_usage = 0; u32 keytimestamp = 0; u32 key_expire = 0; const byte *...
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
140,047,183,424,349,870,000,000,000,000,000,000,000
182
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 ...
h2_rx_window_update(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2) { uint32_t wu; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); ASSERT_RXTHR(h2); CHECK_OBJ_ORNULL(r2, H2_REQ_MAGIC); if (h2->rxf_len != 4) return (H2CE_FRAME_SIZE_ERROR); wu = vbe32dec(h2->rxf_data) & ~(1LU<<31); if (wu == 0) return (H2SE...
0
[ "CWE-444" ]
varnish-cache
d4c67d2a1a05304598895c24663c58a2e2932708
42,573,506,194,211,240,000,000,000,000,000,000,000
26
Take content length into account on H/2 request bodies When receiving H/2 data frames, make sure to take the advertised content length into account, and fail appropriately if the combined sum of the data frames does not match the content length.
static int selinux_socket_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk) { struct sk_security_struct *sksec_sock = sock->sk_security; struct sk_security_struct *sksec_other = other->sk_security; struct sk_security_struct *sksec_new = newsk->sk_security; struct c...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
321,865,973,401,632,640,000,000,000,000,000,000,000
34
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
static bool anal_fcn_del_bb(RCore *core, const char *input) { ut64 addr = r_num_math (core->num, input); if (!addr) { addr = core->offset; } RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, addr, -1); if (fcn) { if (!strcmp (input, "*")) { while (!r_list_empty (fcn->bbs)) { r_anal_function_remove_blo...
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
21,988,767,542,906,450,000,000,000,000,000,000,000
27
Fix segfault in adf (#16230)
static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, u32 exit_intr_info, unsigned long exit_qualification) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct vmcs12 *vmcs12 = get_vmcs12(vcpu); u32 vm_inst_error = 0; /* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE(vmx->...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
326,818,982,839,357,250,000,000,000,000,000,000,000
120
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt, xmlSchemaTypePtr type) { xmlSchemaTypePtr baseType = NULL; xmlSchemaAttributeUsePtr use; xmlSchemaItemListPtr uses, baseUses, prohibs = NULL; if (type->baseType == NULL) { PERROR_INT("xmlSchemaFixupTypeAttributeUses", "no base ty...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
26,711,012,897,063,973,000,000,000,000,000,000,000
184
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static void array_cleanup( char* arr[] , int arr_size) { int i=0; for( i=0; i< arr_size; i++ ){ if( arr[i*2] ){ efree( arr[i*2]); } } efree(arr); }
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
132,636,430,444,739,700,000,000,000,000,000,000,000
10
Fix bug #72241: get_icu_value_internal out-of-bounds read
string dotConcat(const std::string& a, const std::string &b) { if(a.empty() || b.empty()) return a+b; else return a+"."+b; }
0
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
148,342,452,824,161,850,000,000,000,000,000,000,000
7
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels
eval_vars( char_u *src, // pointer into commandline char_u *srcstart, // beginning of valid memory for src int *usedlen, // characters after src that are used linenr_T *lnump, // line number for :e command, or NULL char **errormsg, // pointer to error message int *escaped) // return value ha...
0
[ "CWE-125" ]
vim
d3a117814d6acbf0dca3eff1a7626843b9b3734a
334,073,266,132,418,000,000,000,000,000,000,000,000
309
patch 8.2.4009: reading one byte beyond the end of the line Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
sdap_ad_tokengroups_initgr_posix_sids_connect_done(struct tevent_req *subreq) { struct sdap_ad_tokengroups_initgr_posix_state *state = NULL; struct tevent_req *req = NULL; int ret; int dp_error = DP_ERR_FATAL; req = tevent_req_callback_data(subreq, struct tevent_req); state = tevent_req_data(re...
0
[ "CWE-264" ]
sssd
191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d
117,708,736,467,364,380,000,000,000,000,000,000,000
34
AD: process non-posix nested groups using tokenGroups When initgr is performed for AD supporting tokenGroups, do not skip non-posix groups. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58)
const char *diff_unique_abbrev(const unsigned char *sha1, int len) { int abblen; const char *abbrev; if (len == 40) return sha1_to_hex(sha1); abbrev = find_unique_abbrev(sha1, len); abblen = strlen(abbrev); if (abblen < 37) { static char hex[41]; if (len < abblen && abblen <= len + 2) sprintf(hex, "%s%....
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
91,072,146,179,195,670,000,000,000,000,000,000,000
19
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
void qemu_spice_display_init(DisplayState *ds) { assert(sdpy.ds == NULL); qemu_spice_display_init_common(&sdpy, ds); register_displaychangelistener(ds, &display_listener); sdpy.qxl.base.sif = &dpy_interface.base; qemu_spice_add_interface(&sdpy.qxl.base); assert(sdpy.worker); qemu_add_vm_ch...
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
291,833,424,284,843,000,000,000,000,000,000,000,000
14
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
selPrintToString(SEL *sel) { char is_center; char *str, *strptr; l_int32 type; l_int32 sx, sy, cx, cy, x, y; PROCNAME("selPrintToString"); if (!sel) return (char *)ERROR_PTR("sel not defined", procName, NULL); selGetParameters(sel, &sy, &sx, &cy, &cx); if ((str = (char *)LEPT_CALLOC...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
84,976,173,641,182,490,000,000,000,000,000,000,000
38
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
void ssl3_cbc_digest_record( const EVP_MD *digest, unsigned char* md_out, size_t* md_out_size, const unsigned char header[13], const unsigned char *data, size_t data_plus_mac_size, size_t data_plus_mac_plus_padding_size, const unsigned char *mac_secret, unsigned mac_secret_length, char is_sslv3) { unsigned ...
1
[ "CWE-310" ]
openssl
5f9345a2f0b592457fc4a619ac98ea59ffd394ba
214,698,647,160,452,300,000,000,000,000,000,000,000
290
ssl/s3_cbc.c: md_state alignment portability fix. RISCs are picky and alignment granted by compiler for md_state can be insufficient for SHA512. (cherry picked from commit 36260233e7e3396feed884d3f501283e0453c04f)
GF_Err iods_box_read(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 descSize; char *desc; GF_ObjectDescriptorBox *ptr = (GF_ObjectDescriptorBox *)s; //use the OD codec... descSize = (u32) (ptr->size); desc = (char*)gf_malloc(sizeof(char) * descSize); if (!desc) return GF_OUT_OF_MEM; gf_bs_read_data(bs, desc, d...
1
[ "CWE-476" ]
gpac
586e817dcd531bb3e75438390f1f753cfe6e940a
81,779,831,433,822,195,000,000,000,000,000,000,000
18
fixed #2046
dwg_model_y_max (const Dwg_Data *dwg) { assert (dwg); return dwg->header_vars.EXTMAX.y; }
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
49,176,360,847,710,405,000,000,000,000,000,000,000
5
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
proc_file_lseek(struct file *file, loff_t offset, int orig) { lock_kernel(); switch (orig) { case 0: if (offset < 0) goto out; file->f_pos = offset; unlock_kernel(); return(file->f_pos); case 1: if (offset + file->f_pos < 0) goto out; file->f_pos += offset; unlock_kernel(); return(fil...
1
[]
linux-2.6
8b90db0df7187a01fb7177f1f812123138f562cf
260,607,114,478,156,540,000,000,000,000,000,000,000
27
Insanity avoidance in /proc The old /proc interfaces were never updated to use loff_t, and are just generally broken. Now, we should be using the seq_file interface for all of the proc files, but converting the legacy functions is more work than most people care for and has little upside.. But at least we can make t...
static char *phar_get_link_location(phar_entry_info *entry) /* {{{ */ { char *p, *ret = NULL; if (!entry->link) { return NULL; } if (entry->link[0] == '/') { return estrdup(entry->link + 1); } p = strrchr(entry->filename, '/'); if (p) { *p = '\0'; spprintf(&ret, 0, "%s/%s", entry->filename, entry->link);...
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
302,674,865,181,092,040,000,000,000,000,000,000,000
17
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
compressed_to_ciphertext (gnutls_session_t session, uint8_t * cipher_data, int cipher_size, gnutls_datum_t *compressed, content_type_t type, record_parameters_st * params) { uint8_t * tag_ptr =...
1
[ "CWE-310" ]
gnutls
b495740f2ff66550ca9395b3fda3ea32c3acb185
240,626,911,650,660,580,000,000,000,000,000,000,000
137
changes in packet parsing.
static struct block_device *ext4_blkdev_get(dev_t dev, struct super_block *sb) { struct block_device *bdev; char b[BDEVNAME_SIZE]; bdev = blkdev_get_by_dev(dev, FMODE_READ|FMODE_WRITE|FMODE_EXCL, sb); if (IS_ERR(bdev)) goto fail; return bdev; fail: ext4_msg(sb, KERN_ERR, "failed to open journal device %s: %ld...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
185,556,595,605,281,100,000,000,000,000,000,000,000
15
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; int ret; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; if ((uint64_t)atom.size > (1<<30)) return AVERROR_INVALIDDATA; if (atom.size >= 10) { // Broke...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
17,089,598,105,127,095,000,000,000,000,000,000,000
32
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
__ieee80211_beacon_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_mutable_offsets *offs, bool is_template) { struct ieee80211_local *local = hw_to_local(hw); struct beacon_data *beacon = NULL; struct sk_buff *skb = NULL; struct ieee80211_tx_info *info; struct ie...
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
304,912,136,531,049,400,000,000,000,000,000,000,000
185
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...
tsize_t _tiffWriteProc(thandle_t hdata, tdata_t buf, tsize_t size) { TIFFSTATE *state = (TIFFSTATE *)hdata; tsize_t to_write; TRACE(("_tiffWriteProc: %d \n", (int)size)); dump_state(state); to_write = min(size, state->size - (tsize_t)state->loc); if (state->flrealloc && size>to_write) { ...
0
[ "CWE-190", "CWE-787" ]
Pillow
4e2def2539ec13e53a82e06c4b3daf00454100c4
319,934,761,458,815,330,000,000,000,000,000,000,000
39
Overflow checks for realloc for tiff decoding
template<typename tp, typename tc> CImg<T>& draw_polygon(const CImg<tp>& points, const tc *const color, const float opacity=1) { if (is_empty() || !points) return *this; if (!color) throw CImgArgumentException(_cimg_instance "draw...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
326,742,390,948,155,100,000,000,000,000,000,000,000
75
.
untrusted_launcher_response_callback (GtkDialog *dialog, int response_id, ActivateParametersDesktop *parameters) { GdkScreen *screen; char *uri; GFile *file; switch (response_id) { case RESPONSE_RUN: screen = gtk_widget_get_screen (GTK_WIDGET (parameters->parent_window)); uri = nautilus_f...
0
[]
nautilus
1e1c916f5537eb5e4144950f291f4a3962fc2395
59,553,655,479,255,890,000,000,000,000,000,000,000
35
Add "interactive" argument to nautilus_file_mark_desktop_file_trusted. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-mime-actions.c: Add "interactive" ...
static BROTLI_INLINE uint32_t GetInsertExtra(uint16_t inscode) { return kBrotliInsExtra[inscode]; }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
177,642,852,641,259,560,000,000,000,000,000,000,000
3
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
bool Item_null::send(Protocol *protocol, st_value *buffer) { return protocol->store_null(); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
323,577,905,060,630,600,000,000,000,000,000,000,000
4
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
xmlHashSize(xmlHashTablePtr table) { if (table == NULL) return(-1); return(table->nbElems); }
0
[ "CWE-399" ]
libxml2
8973d58b7498fa5100a876815476b81fd1a2412a
99,366,659,424,120,750,000,000,000,000,000,000,000
5
Add hash randomization to hash and dict structures Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash...
static bool dce83_construct( uint8_t num_virtual_links, struct dc *dc, struct dce110_resource_pool *pool) { unsigned int i; struct dc_context *ctx = dc->ctx; struct dc_bios *bp; ctx->dc_bios->regs = &bios_regs; pool->base.res_cap = &res_cap_83; pool->base.funcs = &dce80_res_pool_funcs; /******************...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
215,323,047,127,637,340,000,000,000,000,000,000,000
175
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
void perf_bp_event(struct perf_event *bp, void *data) { struct perf_sample_data sample; struct pt_regs *regs = data; perf_sample_data_init(&sample, bp->attr.bp_addr, 0); if (!bp->hw.state && !perf_exclude_event(bp, regs)) perf_swevent_event(bp, 1, &sample, regs); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
240,999,162,517,763,430,000,000,000,000,000,000,000
10
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...
flatpak_proxy_add_wildcarded_policy (FlatpakProxy *proxy, const char *name, FlatpakPolicy policy) { g_hash_table_replace (proxy->wildcard_policy, g_strdup (name), GINT_TO_POINTER (policy)); }
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
141,689,717,583,904,000,000,000,000,000,000,000,000
6
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
static void wdm_in_callback(struct urb *urb) { struct wdm_device *desc = urb->context; int status = urb->status; int length = urb->actual_length; spin_lock(&desc->iuspin); clear_bit(WDM_RESPONDING, &desc->flags); if (status) { switch (status) { case -ENOENT: dev_dbg(&desc->intf->dev, "nonzero urb sta...
0
[ "CWE-119", "CWE-269" ]
linux
c0f5ecee4e741667b2493c742b60b6218d40b3aa
211,145,399,598,249,400,000,000,000,000,000,000,000
52
USB: cdc-wdm: fix buffer overflow The buffer for responses must not overflow. If this would happen, set a flag, drop the data and return an error after user space has read all remaining data. Signed-off-by: Oliver Neukum <oliver@neukum.org> CC: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati...
static void filter_build_regex(struct filter_pred *pred) { struct regex *r = &pred->regex; char *search; enum regex_type type = MATCH_FULL; if (pred->op == OP_GLOB) { type = filter_parse_regex(r->pattern, r->len, &search, &pred->not); r->len = strlen(search); memmove(r->pattern, search, r->len+1); } switc...
0
[ "CWE-787" ]
linux
70303420b5721c38998cf987e6b7d30cc62d4ff1
162,929,031,952,135,470,000,000,000,000,000,000,000
30
tracing: Check for no filter when processing event filters The syzkaller detected a out-of-bounds issue with the events filter code, specifically here: prog[N].pred = NULL; /* #13 */ prog[N].target = 1; /* TRUE */ prog[N+1].pred = NULL; prog[N+1].target = 0; /* FALSE */ -> prog[N-1].target = N; prog[N-1].w...
MagickExport ssize_t ParsePixelChannelOption(const char *channels) { char *q, token[MagickPathExtent]; ssize_t channel; GetMagickToken(channels,NULL,token); if ((*token == ';') || (*token == '|')) return(RedPixelChannel); channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token)...
0
[ "CWE-399" ]
ImageMagick
6790815c75bdea0357df5564345847856e995d6b
267,697,187,079,972,100,000,000,000,000,000,000,000
21
Fixed memory leak in IsOptionMember.
cd_device_db_get_property (CdDeviceDb *ddb, const gchar *device_id, const gchar *property, GError **error) { CdDeviceDbPrivate *priv = GET_PRIVATE (ddb); gchar *error_msg = NULL; gchar *statement; gint rc; gchar *value = NULL; g_autoptr(GPtrArray) array_tmp = NULL; g_return_val_if_fail (CD_IS...
0
[ "CWE-200" ]
colord
adf41f36cf7214d7d6fa8d528b74eba47c377405
141,435,211,408,977,280,000,000,000,000,000,000,000
54
Fix a small memory leak in sqlite3_exec() Fixes https://github.com/hughsie/colord/issues/110
pk_transaction_get_tid (PkTransaction *transaction) { g_return_val_if_fail (PK_IS_TRANSACTION (transaction), NULL); g_return_val_if_fail (transaction->priv->tid != NULL, NULL); return transaction->priv->tid; }
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
54,715,245,070,569,510,000,000,000,000,000,000,000
7
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
void auth_request_default_verify_plain_continue(struct auth_request *request, verify_plain_callback_t *callback) { struct auth_passdb *passdb; enum passdb_result result; const char *cache_key, *error; const char *password = request->mech_password; i_assert(request->state == AUTH_REQUEST_STATE_MECH_CONTINUE)...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
108,797,289,026,346,050,000,000,000,000,000,000,000
70
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2, int hasNullEntries) { if ((set1 == NULL) && (hasNullEntries == 0)) { /* * Note that doing a memcpy of the list, namespace nodes are * just assigned to set1, since set2 is cleared anyway. */ set1 = xmlXPathNodeSetCreateSize(set2->nodeN...
0
[]
libxml2
03c6723043775122313f107695066e5744189a08
335,971,609,796,243,740,000,000,000,000,000,000,000
99
Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to s...
LEX_USER *create_default_definer(THD *thd, bool role) { LEX_USER *definer; if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER)))) return 0; thd->get_definer(definer, role); if (role && definer->user.length == 0) { my_error(ER_MALFORMED_DEFINER, MYF(0)); return 0; } else return defin...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
305,650,998,114,633,100,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...
int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, gpa_t gpa, unsigned long len) { struct kvm_memslots *slots = kvm_memslots(kvm); return __kvm_gfn_to_hva_cache_init(slots, ghc, gpa, len);
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
123,693,422,736,611,260,000,000,000,000,000,000,000
6
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
bgp_attr_nexthop (struct bgp_attr_parser_args *args) { struct peer *const peer = args->peer; struct attr *const attr = args->attr; const bgp_size_t length = args->length; in_addr_t nexthop_h, nexthop_n; /* Check nexthop attribute length. */ if (length != 4) { zlog (peer->log, LOG_ERR, "Nextho...
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
181,059,589,998,604,960,000,000,000,000,000,000,000
41
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
static int nci_dev_up(struct nfc_dev *nfc_dev) { struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); return nci_open_device(ndev); }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
323,236,840,873,713,300,000,000,000,000,000,000,000
6
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
static int expand_mmacro(Token * tline) { Token *startline = tline; Token *label = NULL; bool dont_prepend = false; Token **params, *t, *tt; MMacro *m; Line *l, *ll; int i, *paramlen; const char *mname; int nparam = 0; t = tline; t = skip_white(t); /* if (!tok_type(t,...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
258,097,016,822,009,840,000,000,000,000,000,000,000
211
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
int get_anon_bdev(dev_t *p) { int dev; int error; retry: if (ida_pre_get(&unnamed_dev_ida, GFP_ATOMIC) == 0) return -ENOMEM; spin_lock(&unnamed_dev_lock); error = ida_get_new_above(&unnamed_dev_ida, unnamed_dev_start, &dev); if (!error) unnamed_dev_start = dev + 1; spin_unlock(&unnamed_dev_lock); if (erro...
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
240,088,001,591,228,630,000,000,000,000,000,000,000
30
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
_vte_table_add(struct _vte_table *table, const char *pattern, gssize length, const char *result, GQuark quark) { _vte_table_addi(table, (const unsigned char *) pattern, length, pattern, length, result, quark, 0); }
0
[ "CWE-119" ]
vte
feeee4b5832b17641e505b7083e0d299fdae318e
67,146,201,302,304,290,000,000,000,000,000,000,000
9
emulation: Limit integer arguments to 65535 To guard against malicious sequences containing excessively big numbers, limit all parsed numbers to 16 bit range. Doing this here in the parsing routine is a catch-all guard; this doesn't preclude enforcing more stringent limits in the handlers themselves. https://bugzilla...
void fs_logger(const char *msg) { FsMsg *ptr = newmsg(); ptr->msg = strdup(msg); if (!ptr->msg) errExit("strdup"); insertmsg(ptr); }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
97,942,744,150,948,820,000,000,000,000,000,000,000
7
fixing CVE-2022-31214
static void __rpc_add_wait_queue_priority(struct rpc_wait_queue *queue, struct rpc_task *task) { struct list_head *q; struct rpc_task *t; INIT_LIST_HEAD(&task->u.tk_wait.links); q = &queue->tasks[task->tk_priority]; if (unlikely(task->tk_priority > queue->maxpriority)) q = &queue->tasks[queue->maxpriority]; li...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
251,514,342,123,341,480,000,000,000,000,000,000,000
17
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
void PSOutputDev::updateFlatness(GfxState *state) { writePSFmt("{0:d} i\n", state->getFlatness()); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
281,975,758,486,128,800,000,000,000,000,000,000,000
3
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
void dofeat(void) { # define FEAT "Extensions supported:" CRLF \ " UTF8" CRLF \ " EPRT" CRLF " IDLE" CRLF " MDTM" CRLF " SIZE" CRLF " MFMT" CRLF \ " REST STREAM" CRLF \ " MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;" CRLF \ " MLSD" CRLF \ " PRET" # ifdef WITH_TLS # d...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
18,356,872,946,557,904,000,000,000,000,000,000,000
48
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
formatVideoAttrs(XtermWidget xw, char *buffer, CELL *cell) { TScreen *screen = TScreenOf(xw); LineData *ld = GET_LINEDATA(screen, cell->row); *buffer = '\0'; if (ld != 0 && cell->col < (int) ld->lineSize) { IAttr attribs = ld->attribs[cell->col]; const char *delim = ""; if (attribs & INVERSE) { ...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
222,626,076,465,875,520,000,000,000,000,000,000,000
55
snapshot of project "xterm", label xterm-365d
SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long ret = -EINVAL; unsigned long charged = 0; bool locked = false; struct vm_userfaultfd_ctx u...
0
[ "CWE-459" ]
linux
eb66ae030829605d61fbef1909ce310e29f78821
279,715,616,008,693,730,000,000,000,000,000,000,000
123
mremap: properly flush TLB before releasing the page Jann Horn points out that our TLB flushing was subtly wrong for the mremap() case. What makes mremap() special is that we don't follow the usual "add page to list of pages to be freed, then flush tlb, and then free pages". No, mremap() obviously just _moves_ the p...
static unsigned int io_uring_nommu_mmap_capabilities(struct file *file) { return NOMMU_MAP_DIRECT | NOMMU_MAP_READ | NOMMU_MAP_WRITE; }
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
105,297,189,800,133,840,000,000,000,000,000,000,000
4
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>
has_database_privilege_name_id(PG_FUNCTION_ARGS) { Name username = PG_GETARG_NAME(0); Oid databaseoid = PG_GETARG_OID(1); text *priv_type_text = PG_GETARG_TEXT_P(2); Oid roleid; AclMode mode; AclResult aclresult; roleid = get_role_oid_or_public(NameStr(*username)); mode = convert_database_priv_string(...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
81,614,880,187,858,380,000,000,000,000,000,000,000
19
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
SYSCALL_DEFINE(ftruncate64)(unsigned int fd, loff_t length) { long ret = do_sys_ftruncate(fd, length, 0); /* avoid REGPARM breakage on x86: */ asmlinkage_protect(2, ret, fd, length); return ret; }
0
[ "CWE-732" ]
linux-stable
e57712ebebbb9db7d8dcef216437b3171ddcf115
118,874,587,508,282,700,000,000,000,000,000,000,000
7
merge fchmod() and fchmodat() guts, kill ancient broken kludge The kludge in question is undocumented and doesn't work for 32bit binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as mode had (since 0.99.14v and contrary to behaviour of any other Unix, prescriptions of POSIX, SuS and our own manpages) was kinda-...
TEST_F(SingleAllowMissingInOrListTest, MissingIssToken) { EXPECT_CALL(mock_cb_, onComplete(Status::JwtUnknownIssuer)); auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, ES256WithoutIssToken}}; context_ = Verifier::createContext(headers, parent_span_, &mock_cb_); verifier_->verify(context_); EXPEC...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
154,028,196,534,117,560,000,000,000,000,000,000,000
7
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
void set_geometry_type(uint type) { Type_geometry_attributes::set_geometry_type(type); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
73,418,347,600,482,135,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
add_interval(MYSQL_TIME *ltime, const Time_zone *time_zone, interval_type scale, INTERVAL interval) { if (date_add_interval(ltime, scale, interval)) return 0; uint not_used; return time_zone->TIME_to_gmt_sec(ltime, &not_used); }
0
[ "CWE-284" ]
server
0b5a5258abbeaf8a0c3a18c7e753699787fdf46e
172,596,682,810,975,700,000,000,000,000,000,000,000
9
MW-416 DDL replication moved after acl checking galera_events test shows a regression with the original fix for MW-416 Reason was that Events::drop_event() can be called also from inside event execution, and there we have a speacial treatment for event, which executes "DROP EVENT" statement, and runs TOI replication i...
TiledInputFile::Data::Data (int numThreads): numXTiles (0), numYTiles (0), partNumber (-1), multiPartBackwardSupport(false), numThreads(numThreads), memoryMapped(false), _streamData(NULL), _deleteStream(false) { // // We need at least one tileBuffer, but if threading is used, ...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
266,447,539,826,292,100,000,000,000,000,000,000,000
17
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
read_client_connect_attrs(char **ptr, size_t *max_bytes_available, const CHARSET_INFO *from_cs) { size_t length, length_length; char *ptr_save; /* not enough bytes to hold the length */ if (*max_bytes_available < 1) return true; /* read the length */ ptr_save= *ptr; length= ...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
259,813,115,275,674,560,000,000,000,000,000,000,000
33
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
PbrMetallicRoughness() : baseColorFactor(std::vector<double>{1.0, 1.0, 1.0, 1.0}), metallicFactor(1.0), roughnessFactor(1.0) {}
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
38,872,634,824,683,706,000,000,000,000,000,000,000
4
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int _progress_ufwd(pmixp_coll_t *coll) { pmixp_coll_tree_t *tree = &coll->state.tree; pmixp_ep_t ep[tree->chldrn_cnt]; int ep_cnt = 0; int rc, i; char *nodename = NULL; pmixp_coll_cbdata_t *cbdata = NULL; xassert(PMIXP_COLL_TREE_UPFWD == tree->state); /* for some reasons doesnt switch to downfwd */ s...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
336,750,762,050,586,150,000,000,000,000,000,000,000
140
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
int luaLogCommand(lua_State *lua) { int j, argc = lua_gettop(lua); int level; sds log; if (argc < 2) { lua_pushstring(lua, "redis.log() requires two arguments or more."); return lua_error(lua); } else if (!lua_isnumber(lua,-argc)) { lua_pushstring(lua, "First argument must b...
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
120,401,373,800,172,560,000,000,000,000,000,000,000
35
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
store_one(int c, char *s) { s[0] = (char)(c & 255); }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
114,555,551,530,797,000,000,000,000,000,000,000,000
4
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
vte_sequence_handler_soft_reset (VteTerminal *terminal, GValueArray *params) { vte_terminal_reset(terminal, FALSE, FALSE); }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
100,363,665,022,219,520,000,000,000,000,000,000,000
4
fix bug #548272 svn path=/trunk/; revision=2365
const char *charset_name(struct smb_iconv_handle *ic, charset_t ch) { switch (ch) { case CH_UTF16: return "UTF-16LE"; case CH_UNIX: return ic->unix_charset; case CH_DOS: return ic->dos_charset; case CH_UTF8: return "UTF8"; case CH_UTF16BE: return "UTF-16BE"; case CH_UTF16MUNGED: return "UTF16_MUNGED"; default: ...
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
223,298,157,450,624,600,000,000,000,000,000,000,000
13
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
NTTIME smbXcli_conn_server_system_time(struct smbXcli_conn *conn) { if (conn->protocol >= PROTOCOL_SMB2_02) { return conn->smb2.server.system_time; } return conn->smb1.server.system_time; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
299,945,031,838,879,070,000,000,000,000,000,000,000
8
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
FreeAuditTimer(void) { if (auditTimer != NULL) { /* Force output of pending messages */ TimerForce(auditTimer); TimerFree(auditTimer); auditTimer = NULL; } }
0
[ "CWE-863" ]
xserver
da15c7413916f754708c62c2089265528cd661e2
48,070,677,691,238,790,000,000,000,000,000,000,000
9
LogFilePrep: add a comment to the unsafe format string. CVE-2018-14665 also made it possible to exploit this to access memory. With -logfile forbidden when running with elevated privileges this is no longer an issue. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry...
void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, gfp_t gfp) { struct sctp_association *asoc; __u16 needed, freed; asoc = ulpq->asoc; if (chunk) { needed = ntohs(chunk->chunk_hdr->length); needed -= sizeof(sctp_data_chunk_t); } else needed = SCTP_DEFAULT_MAXWINDOW; freed = ...
0
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
289,304,298,553,509,440,000,000,000,000,000,000,000
34
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
void udta_del(GF_Box *s) { u32 i; GF_UserDataMap *map; GF_UserDataBox *ptr = (GF_UserDataBox *)s; if (ptr == NULL) return; i=0; while ((map = (GF_UserDataMap *)gf_list_enum(ptr->recordList, &i))) { gf_isom_box_array_del(map->other_boxes); gf_free(map); } gf_list_del(ptr->recordList); gf_free(ptr);
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
339,459,834,649,226,530,000,000,000,000,000,000,000
14
prevent dref memleak on invalid input (#1183)
GF_Err hdlr_Read(GF_Box *s, GF_BitStream *bs) { GF_HandlerBox *ptr = (GF_HandlerBox *)s; ptr->reserved1 = gf_bs_read_u32(bs); ptr->handlerType = gf_bs_read_u32(bs); gf_bs_read_data(bs, (char*)ptr->reserved2, 12); ISOM_DECREASE_SIZE(ptr, 20); if (ptr->size) { size_t len; ptr->nameUTF8 = (char*)gf_malloc((u3...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
270,092,450,935,669,200,000,000,000,000,000,000,000
33
prevent dref memleak on invalid input (#1183)
int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { if (stopped) { if (!(opts & OPENSSL_INIT_BASE_ONLY)) CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); return 0; } /* * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be t...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
48,698,833,410,058,300,000,000,000,000,000,000,000
141
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
void visit(Character &ope) override { found_ope = ope.shared_from_this(); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
285,042,036,465,956,870,000,000,000,000,000,000,000
1
Fix #122
int imap_create_mailbox (IMAP_DATA* idata, char* mailbox) { char buf[LONG_STRING*2], mbox[LONG_STRING]; imap_munge_mbox_name (idata, mbox, sizeof (mbox), mailbox); snprintf (buf, sizeof (buf), "CREATE %s", mbox); if (imap_exec (idata, buf, 0) != 0) { mutt_error (_("CREATE failed: %s"), imap_cmd_trailer ...
0
[ "CWE-200", "CWE-319" ]
mutt
3e88866dc60b5fa6aaba6fd7c1710c12c1c3cd01
84,358,961,198,354,415,000,000,000,000,000,000,000
15
Prevent possible IMAP MITM via PREAUTH response. This is similar to CVE-2014-2567 and CVE-2020-12398. STARTTLS is not allowed in the Authenticated state, so previously Mutt would implicitly mark the connection as authenticated and skip any encryption checking/enabling. No credentials are exposed, but it does allow m...
rad_cvt_addr(const void *data) { struct in_addr value; memcpy(&value.s_addr, data, sizeof value.s_addr); return value; }
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
201,937,777,788,709,760,000,000,000,000,000,000,000
7
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
void PlayerGeneric::setPeakAutoAdjust(bool b) { this->autoAdjustPeak = b; }
0
[ "CWE-416" ]
MilkyTracker
7afd55c42ad80d01a339197a2d8b5461d214edaf
272,256,525,108,257,030,000,000,000,000,000,000,000
4
Fix use-after-free in PlayerGeneric destructor
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length) { int i, si, di; uint8_t *dst; int bufidx; // src[0]&0x80; // forbidden bit h->nal_ref_idc = src[0] >> 5; h->nal_unit_type = src[0] & 0x1F; ...
0
[ "CWE-703" ]
FFmpeg
e8714f6f93d1a32f4e4655209960afcf4c185214
234,362,454,332,010,200,000,000,000,000,000,000,000
112
avcodec/h264: Clear delayed_pic on deallocation Fixes use of freed memory Fixes: case5_av_frame_copy_props.mp4 Found-by: Michal Zalewski <lcamtuf@coredump.cx> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dump_keyblob (tupledesc_t tuples) { size_t n; unsigned int tag; const void *value; log_info ("keyblob dump:\n"); tag = KEYBLOB_TAG_BLOBVERSION; value = find_tuple (tuples, tag, &n); while (value) { log_info (" tag: %-5u len: %-2u value: ", tag, (unsigned int)n); if (tag == KEYBLOB_TAG_E...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
141,419,736,456,855,930,000,000,000,000,000,000,000
22
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 ...
png_set_check_for_invalid_index(png_structrp png_ptr, int allowed) { png_debug(1, "in png_set_check_for_invalid_index"); if (allowed > 0) png_ptr->num_palette_max = 0; else png_ptr->num_palette_max = -1; }
0
[ "CWE-120" ]
libpng
a901eb3ce6087e0afeef988247f1a1aa208cb54d
50,705,072,961,310,700,000,000,000,000,000,000,000
10
[libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta).
TEST_F(OwnedImplTest, ReadReserveAndCommit) { BufferFragmentImpl frag("", 0, nullptr); Buffer::OwnedImpl buf; buf.add("bbbbb"); os_fd_t pipe_fds[2] = {0, 0}; auto& os_sys_calls = Api::OsSysCallsSingleton::get(); #ifdef WIN32 ASSERT_EQ(os_sys_calls.socketpair(AF_INET, SOCK_STREAM, 0, pipe_fds).rc_, 0); #els...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
13,455,521,335,043,260,000,000,000,000,000,000,000
26
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
static int megasas_pd_get_info_submit(SCSIDevice *sdev, int lun, MegasasCmd *cmd) { struct mfi_pd_info *info = cmd->iov_buf; size_t dcmd_size = sizeof(struct mfi_pd_info); uint64_t pd_size; uint16_t pd_id = ((sdev->id & 0xFF) << 8) | (lun & 0xFF); uint8_t cmdbuf...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
222,442,367,898,323,330,000,000,000,000,000,000,000
82
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
longlong Field_year::val_int(void) { ASSERT_COLUMN_MARKED_FOR_READ; DBUG_ASSERT(field_length == 2 || field_length == 4); int tmp= (int) ptr[0]; if (field_length != 4) tmp%=100; // Return last 2 char else if (tmp) tmp+=1900; return (longlong) tmp; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
83,392,009,755,726,700,000,000,000,000,000,000,000
11
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
up4(unsigned x) { return ~3u & (3+ x); }
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
87,565,762,369,288,260,000,000,000,000,000,000,000
4
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED) { oparg_T oa; clear_oparg(&oa); finish_op = FALSE; while ((!stuff_empty() || ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0) || (use_vpeekc && vpeekc() != NUL)) && !got_int) { update_topline_cursor(); #if...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
325,728,273,060,676,200,000,000,000,000,000,000,000
29
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
ATExecEnableDisableTrigger(Relation rel, char *trigname, char fires_when, bool skip_system, LOCKMODE lockmode) { EnableDisableTrigger(rel, trigname, fires_when, skip_system); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
77,346,387,684,154,540,000,000,000,000,000,000,000
5
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static void ipv4_link_failure(struct sk_buff *skb) { struct rtable *rt; ipv4_send_dest_unreach(skb); rt = skb_rtable(skb); if (rt) dst_set_expires(&rt->dst, 0); }
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
57,648,618,524,499,550,000,000,000,000,000,000,000
10
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
ldns_str2rdf_eui48(ldns_rdf **rd, const char *str) { unsigned int a, b, c, d, e, f; uint8_t bytes[6]; int l; if (sscanf(str, "%2x-%2x-%2x-%2x-%2x-%2x%n", &a, &b, &c, &d, &e, &f, &l) != 6 || l != (int)strlen(str)) { return LDNS_STATUS_INVALID_EUI48; } else { bytes[0] = a; bytes[1] = b; bytes[2] = c; ...
0
[]
ldns
3bdeed02505c9bbacb3b64a97ddcb1de967153b7
116,792,167,596,626,740,000,000,000,000,000,000,000
21
bugfix #1257: Free after reallocing to 0 size Thanks Stephan Zeisberg
flatpak_dir_needs_update_for_commit_and_subpaths (FlatpakDir *self, const char *remote, const char *ref, const char *target_commit, ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
265,446,661,957,928,820,000,000,000,000,000,000,000
54
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int do_video_get_event(unsigned int fd, unsigned int cmd, unsigned long arg) { struct video_event kevent; mm_segment_t old_fs = get_fs(); int err; set_fs(KERNEL_DS); err = sys_ioctl(fd, cmd, (unsigned long) &kevent); set_fs(old_fs); if (!err) { struct compat_video_event __user *up = compat_ptr(arg); ...
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
276,859,405,116,477,000,000,000,000,000,000,000,000
25
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
static uint16_t __sungem_mii_read(SunGEMState *s, uint8_t phy_addr, uint8_t reg_addr) { if (phy_addr != s->phy_addr) { return 0xffff; } /* Primitive emulation of a BCM5201 to please the driver, * ID is 0x00406210. TODO: Do a gigabit PHY like BCM5400 */ ...
0
[ "CWE-835" ]
qemu
8c92060d3c0248bd4d515719a35922cd2391b9b4
289,218,114,817,043,960,000,000,000,000,000,000,000
32
sungem: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande...
void begin_t() { if (!code_begin_t) return; mem[_cimg_mp_slot_x] = mem[_cimg_mp_slot_y] = mem[_cimg_mp_slot_z] = mem[_cimg_mp_slot_c] = 0; p_code_end = code_begin_t.end(); for (p_code = code_begin_t; p_code<p_code_end; ++p_code) { opcode._data = p_code->_data; c...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
249,799,681,606,557,670,000,000,000,000,000,000,000
11
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline int ishex(int a) { return (a >= 'A' && a <= 'F') || (a >= 'a' && a <= 'f') || (a >= '0' && a <= '9'); }
0
[ "CWE-119" ]
mupdf
60dabde18d7fe12b19da8b509bdfee9cc886aafc
99,146,521,953,289,400,000,000,000,000,000,000,000
6
Bug 694957: fix stack buffer overflow in xps_parse_color xps_parse_color happily reads more than FZ_MAX_COLORS values out of a ContextColor array which overflows the passed in samples array. Limiting the number of allowed samples to FZ_MAX_COLORS and make sure to use that constant for all callers fixes the problem. T...
static int fts3FunctionArg( sqlite3_context *pContext, /* SQL function call context */ const char *zFunc, /* Function name */ sqlite3_value *pVal, /* argv[0] passed to function */ Fts3Cursor **ppCsr /* OUT: Store cursor handle here */ ){ int rc; *ppCsr = (Fts3Cursor...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
46,432,746,742,056,110,000,000,000,000,000,000,000
18
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { int v; const UChar* p = *pp; (*pp)++; v = (EncISO_8859_7_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); if ((v | BIT_CTYPE_LOWER) != 0) { if (*p == 0xc0 || *p == 0xe0) return FALSE; else return TRUE; ...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
6,028,975,462,016,297,000,000,000,000,000,000,000
17
onig-5.9.2
int sys_waitpid(pid_t pid,int *status,int options) { #ifdef HAVE_WAITPID return waitpid(pid,status,options); #else /* HAVE_WAITPID */ return wait4(pid, status, options, NULL); #endif /* HAVE_WAITPID */ }
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
126,217,641,098,603,540,000,000,000,000,000,000,000
8
s3: nmbd: Fix bug 10633 - nmbd denial of service The Linux kernel has a bug in that it can give spurious wakeups on a non-blocking UDP socket for a non-deliverable packet. When nmbd was changed to use non-blocking sockets it became vulnerable to a spurious wakeup from poll/epoll. Fix sys_recvfile() to return on EWOU...
struct Line *LineBitmapRequester::Start8Lines(UBYTE c) { if (*m_pppImage[c] == NULL) { struct Line **target = m_pppImage[c]; int cnt = 8; do { *target = new(m_pEnviron) struct Line; (*target)->m_pData = (LONG *)m_pEnviron->AllocMem(m_pulWidth[c] * sizeof(LONG)); target = &((*target)->m_...
0
[ "CWE-476" ]
libjpeg
51c3241b6da39df30f016b63f43f31c4011222c7
53,768,466,745,874,430,000,000,000,000,000,000,000
13
Fixed a NULL-pointer access in the line-based reconstruction process in case no valid scan was found and no data is present.
static DexFieldId *dex_field_id_new(RzBuffer *buf, ut64 offset) { DexFieldId *field_id = RZ_NEW0(DexFieldId); if (!field_id) { return NULL; } read_le16_or_fail(buf, field_id->class_idx, dex_field_id_new_fail); read_le16_or_fail(buf, field_id->type_idx, dex_field_id_new_fail); read_le32_or_fail(buf, field_id->n...
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
46,848,446,276,848,630,000,000,000,000,000,000,000
16
fix #2969 - oob write (1 byte) in dex.c
static int __swiotlb_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, struct dma_attrs *attrs) { vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, is_device_dma_coherent(dev)); return __dma_common_mmap(dev, vma, cpu_addr, dma_...
0
[ "CWE-200" ]
linux
6829e274a623187c24f7cfc0e3d35f25d087fcc5
333,008,266,269,815,200,000,000,000,000,000,000,000
9
arm64: dma-mapping: always clear allocated buffers Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha, ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures. It turned out that some drivers rely on this 'feature'. Allocated buffer might be also exposed to userspace with dma_mmap() c...