func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
sctp_disposition_t sctp_sf_do_prm_asoc(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *repl; struct sctp_association* my_asoc; /* The comment below says that we enter...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
67,698,448,849,279,540,000,000,000,000,000,000,000
49
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
Status SparseReduceShapeFn(InferenceContext* c) { // Input 0: input_indices // Input 1: input_values // Input 2: input_shape // Input 3: reduction_axes // Attr: keep_dims bool keep_dims = false; TF_RETURN_IF_ERROR(c->GetAttr("keep_dims", &keep_dims)); const Tensor* shape_tensor = c->input_tensor(2); ...
1
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
229,662,855,690,899,600,000,000,000,000,000,000,000
44
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
chpass_principal_2_svc(chpass_arg *arg, struct svc_req *rqstp) { static generic_ret ret; char *prime_arg; gss_buffer_desc client_name, service_name; OM_uint32 minor_stat; kadm5_server_handle_t handle; ...
1
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
95,247,043,829,769,800,000,000,000,000,000,000,000
61
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
stonith_env_to_NVpair(Stonith* s) { /* Read the config names values from the environment */ const char ** config_names; int n_names; int j; StonithNVpair* ret; if ((config_names = stonith_get_confignames(s)) == NULL) { return NULL; } for (n_names=0; config_names[n_names] != NULL; ++n_names) { /* Just cou...
0
[ "CWE-287" ]
cluster-glue
3d7b464439ee0271da76e0ee9480f3dc14005879
2,314,333,878,625,259,000,000,000,000,000,000,000
39
Medium: stonith: add -E option to get the configuration from the environment
DRW_Vport() { reset();}
0
[ "CWE-191" ]
libdxfrw
fcd977cc7f8f6cc7f012e5b72d33cf7d77b3fa69
274,417,360,940,531,980,000,000,000,000,000,000,000
1
fixed heap use after free vulnerability CVE-2021-21900 as reported in TALOS-2021-1351 / CVE-2021-21900, DRW_TableEntry::parseCode had the potential to trigger an use after free exception with a malformed DXF file.
int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned int msn_end) { char *hdrreq = NULL; FILE *fp = NULL; char tempfile[PATH_MAX]; int msgno, idx; struct ImapHeader h; struct ImapStatus *status = NULL; int rc, mfhrc = 0, oldmsgcount; int fetch_msn_end = 0; unsigned int maxuid...
0
[ "CWE-119", "CWE-787" ]
neomutt
1b0f0d0988e6df4e32e9f4bf8780846ea95d4485
248,589,183,045,226,550,000,000,000,000,000,000,000
366
Don't overflow stack buffer in msg_parse_fetch
void refresh_status(THD *thd) { mysql_mutex_lock(&LOCK_status); /* Add thread's status variabes to global status */ add_to_status(&global_status_var, &thd->status_var); /* Reset thread's status variables */ bzero((uchar*) &thd->status_var, sizeof(thd->status_var)); /* Reset some global variables */ res...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
24,811,566,048,563,486,000,000,000,000,000,000,000
28
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
xmlFreePropList(xmlAttrPtr cur) { xmlAttrPtr next; if (cur == NULL) return; while (cur != NULL) { next = cur->next; xmlFreeProp(cur); cur = next; } }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
319,497,131,400,921,070,000,000,000,000,000,000,000
9
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
f_synstack(typval_T *argvars UNUSED, typval_T *rettv) { #ifdef FEAT_SYN_HL linenr_T lnum; colnr_T col; int i; int id; #endif rettv_list_set(rettv, NULL); #ifdef FEAT_SYN_HL lnum = tv_get_lnum(argvars); /* -1 on type error */ col = (colnr_T)tv_get_number(&argvars[1]) - 1; /* -1 on type e...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
246,553,999,957,563,760,000,000,000,000,000,000,000
31
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.
ASC_setTransportLayerType( T_ASC_Parameters * params, OFBool useSecureLayer) { if (params == NULL) return ASC_NULLKEY; params->DULparams.useSecureLayer = useSecureLayer; return EC_Normal; }
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
74,670,438,967,703,620,000,000,000,000,000,000,000
8
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
int single_open_size(struct file *file, int (*show)(struct seq_file *, void *), void *data, size_t size) { char *buf = seq_buf_alloc(size); int ret; if (!buf) return -ENOMEM; ret = single_open(file, show, data); if (ret) { kvfree(buf); return ret; } ((struct seq_file *)file->private_data)->buf = buf; ((...
0
[ "CWE-120", "CWE-787" ]
linux
8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b
194,841,175,669,411,300,000,000,000,000,000,000,000
16
seq_file: disallow extremely large seq buffer allocations There is no reasonable need for a buffer larger than this, and it avoids int overflow pitfalls. Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation") Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Reported-by: Qualys Security Advisory <qsa@qualy...
postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node =...
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
270,534,861,884,095,100,000,000,000,000,000,000,000
30
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
http_tls_upgrade(http_t *http) /* I - HTTP connection */ { int ret; /* Return value */ http_t myhttp; /* Local copy of HTTP data */ DEBUG_printf(("7http_tls_upgrade(%p)", (void *)http)); /* * Flush the connection to make sure any previous "Upgrade" message * has been read. */ httpFlush(http); ...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
302,194,916,147,059,700,000,000,000,000,000,000,000
78
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
xsltInitDocKeyTable(xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *nameURI) { xsltStylesheetPtr style; xsltKeyDefPtr keyd = NULL; int found = 0; #ifdef KEY_INIT_DEBUG fprintf(stderr, "xsltInitDocKeyTable %s\n", name); #endif style = ctxt->style; while (style ...
0
[]
libxslt
dc11b6b379a882418093ecc8adf11f6166682e8d
249,967,181,421,464,320,000,000,000,000,000,000,000
44
Fix crash with empty xsl:key/@match attribute See https://bugzilla.gnome.org/show_bug.cgi?id=685328 Also improve some xsl:key error messages.
aspath_finish (void) { hash_clean (ashash, (void (*)(void *))aspath_free); hash_free (ashash); ashash = NULL; if (snmp_stream) stream_free (snmp_stream); }
0
[ "CWE-20" ]
quagga
7a42b78be9a4108d98833069a88e6fddb9285008
167,727,966,800,495,130,000,000,000,000,000,000,000
9
bgpd: Fix AS_PATH size calculation for long paths If you have an AS_PATH with more entries than what can be written into a single AS_SEGMENT_MAX it needs to be broken up. The code that noticed that the AS_PATH needs to be broken up was not correctly calculating the size of the resulting message. This patch addresses...
str_node_split_last_char(StrNode* sn, OnigEncoding enc) { const UChar *p; Node* n = NULL_NODE; if (sn->end > sn->s) { p = onigenc_get_prev_char_head(enc, sn->s, sn->end, sn->end); if (p && p > sn->s) { /* can be split. */ n = node_new_str(p, sn->end); if (IS_NOT_NULL(n) && (sn->flag & NSTR_RA...
0
[ "CWE-476" ]
Onigmo
00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9
159,256,637,106,606,610,000,000,000,000,000,000,000
16
Fix SEGV in onig_error_code_to_str() (Fix #132) When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME, onig_error_code_to_str() crashes. onig_scan_env_set_error_string() should have been used when returning ONIGERR_INVALID_GROUP_NAME.
SampleInterleavedLSScan::~SampleInterleavedLSScan(void) { }
0
[ "CWE-617", "CWE-703" ]
libjpeg
4746b577931e926a49e50de9720a4946de3069a7
160,459,092,071,081,030,000,000,000,000,000,000,000
3
Fixed handling of empty JPEG-LS scans.
void test_curveto(bezctx *bc, double x1, double y1, double x2, double y2, double x3, double y3) { printf("test_curveto(%g,%g, %g,%g, %g,%g)\n",x1,y1,x2,y2,x3,y3); }
0
[ "CWE-787" ]
libspiro
35233450c922787dad42321e359e5229ff470a1e
81,265,118,115,090,110,000,000,000,000,000,000,000
4
CVE-2019-19847, Stack-based buffer overflow in the spiro_to_bpath0() Frederic Cambus (@fcambus) discovered a bug in call-test.c using: ./configure CFLAGS="-fsanitize=address" make ./tests/call-test[14,15,16,17,18,19] Fredrick Brennan (@ctrlcctrlv) provided bugfix. See issue #21
void sctp_chunk_assign_ssn(struct sctp_chunk *chunk) { struct sctp_stream *stream; struct sctp_chunk *lchunk; struct sctp_datamsg *msg; __u16 ssn, sid; if (chunk->has_ssn) return; /* All fragments will be on the same stream */ sid = ntohs(chunk->subh.data_hdr->stream); stream = &chunk->asoc->stream; /* No...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
196,342,740,119,143,640,000,000,000,000,000,000,000
32
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
bgp_capability_as4 (struct peer *peer, struct capability_header *hdr) { SET_FLAG (peer->cap, PEER_CAP_AS4_RCV); if (hdr->length != CAPABILITY_CODE_AS4_LEN) { zlog_err ("%s AS4 capability has incorrect data length %d", peer->host, hdr->length); return 0; } as_t as4 = strea...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
162,125,890,756,564,780,000,000,000,000,000,000,000
18
bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS * bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are detected, and the code will stop processing the OPEN and return. However it does so without calling bgp_notify_send to send a NOTIFY - which means the peer FSM doesn't g...
// Return type of a memory element as a string. CImg<charT> s_type(const unsigned int arg) const { CImg<charT> res; if (_cimg_mp_is_vector(arg)) { // Vector CImg<charT>::string("vectorXXXXXXXXXXXXXXXX").move_to(res); std::sprintf(res._data + 6,"%u",_cimg_mp_size(arg)); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
337,822,607,375,877,720,000,000,000,000,000,000,000
8
Fix other issues in 'CImg<T>::load_bmp()'.
f_ch_getjob(typval_T *argvars, typval_T *rettv) { channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0); if (channel != NULL) { rettv->v_type = VAR_JOB; rettv->vval.v_job = channel->ch_job; if (channel->ch_job != NULL) ++channel->ch_job->jv_refcount; } }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
164,123,146,815,252,900,000,000,000,000,000,000,000
12
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.
static int mov_write_nmhd_tag(AVIOContext *pb) { avio_wb32(pb, 12); ffio_wfourcc(pb, "nmhd"); avio_wb32(pb, 0); return 12; }
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
270,940,240,480,453,600,000,000,000,000,000,000,000
7
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
void _addReplyStringToList(redisClient *c, char *s, size_t len) { robj *tail; if (listLength(c->reply) == 0) { listAddNodeTail(c->reply,createStringObject(s,len)); } else { tail = listNodeValue(listLast(c->reply)); /* Append to this object when possible. */ if (tail->ptr != ...
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
49,947,629,715,668,100,000,000,000,000,000,000,000
18
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
static CImg<T> get_load_gif_external(const char *const filename, const char axis='z', const float align=0) { return CImgList<T>().load_gif_external(filename).get_append(axis,align); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
129,016,878,883,992,980,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
MagickExport void XConfigureImageColormap(Display *display, XResourceInfo *resource_info,XWindows *windows,Image *image) { Colormap colormap; /* Make standard colormap. */ XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); XMakeStandardColormap(display,windows->vi...
0
[ "CWE-401" ]
ImageMagick6
13801f5d0bd7a6fdb119682d34946636afdb2629
305,836,061,064,620,050,000,000,000,000,000,000,000
25
https://github.com/ImageMagick/ImageMagick/issues/1531
static int go7007_snd_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct go7007 *go = snd_pcm_substream_chip(substream); struct go7007_snd *gosnd = go->snd_context; switch (cmd) { case SNDRV_PCM_TRIGGER_START: /* Just set a flag to indicate we should signal ALSA when * sound comes in */ gosn...
0
[ "CWE-401" ]
linux
9453264ef58638ce8976121ac44c07a3ef375983
144,151,512,032,900,230,000,000,000,000,000,000
19
media: go7007: fix a miss of snd_card_free go7007_snd_init() misses a snd_card_free() in an error path. Add the missed call to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb __user *user_iocb, bool compat) { struct aio_kiocb *req; ssize_t ret; /* enforce forwards compatibility on users */ if (unlikely(iocb->aio_reserved2)) { pr_debug("EINVAL: reserve field set\n"); return -EINVAL; } /* pre...
0
[ "CWE-416" ]
linux
84c4e1f89fefe70554da0ab33be72c9be7994379
314,186,968,118,414,400,000,000,000,000,000,000,000
103
aio: simplify - and fix - fget/fput for io_submit() Al Viro root-caused a race where the IOCB_CMD_POLL handling of fget/fput() could cause us to access the file pointer after it had already been freed: "In more details - normally IOCB_CMD_POLL handling looks so: 1) io_submit(2) allocates aio_kiocb instance and p...
void Mounter::startTimer() { if (!timer) { timer=new QTimer(this); connect(timer, SIGNAL(timeout()), SLOT(timeout())); } timer->start(30000); }
1
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
241,922,433,772,760,000,000,000,000,000,000,000,000
8
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
extension_info_stop (NautilusDirectory *directory) { if (directory->details->extension_info_in_progress != NULL) { NautilusFile *file; file = directory->details->extension_info_file; if (file != NULL) { g_assert (NAUTILUS_IS_FILE (file)); g_assert (file->...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
121,603,352,153,860,000,000,000,000,000,000,000,000
21
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
ofputil_append_meter_config(struct ovs_list *replies, const struct ofputil_meter_config *mc) { struct ofpbuf *msg = ofpbuf_from_list(ovs_list_back(replies)); size_t start_ofs = msg->size; struct ofp13_meter_config *reply; ofpbuf_put_uninit(msg, sizeof *reply); ofputil_pu...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
295,958,045,565,110,150,000,000,000,000,000,000,000
17
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void SerializeNumberArrayProperty(const std::string &key, const std::vector<T> &value, json &obj) { if (value.empty()) return; json ary; JsonReserveArray(ary, value.size()); for (const auto &s : value) { JsonPushBack(a...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
124,094,526,691,259,350,000,000,000,000,000,000,000
12
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static void del_chan(struct pppox_sock *sock) { spin_lock(&chan_lock); clear_bit(sock->proto.pptp.src_addr.call_id, callid_bitmap); RCU_INIT_POINTER(callid_sock[sock->proto.pptp.src_addr.call_id], NULL); spin_unlock(&chan_lock); synchronize_rcu(); }
0
[ "CWE-200" ]
net
09ccfd238e5a0e670d8178cf50180ea81ae09ae1
223,609,520,062,080,280,000,000,000,000,000,000,000
8
pptp: verify sockaddr_len in pptp_bind() and pptp_connect() Reported-by: Dmitry Vyukov <dvyukov@gmail.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track) { int64_t duration = av_rescale_rnd(track->track_duration, MOV_TIMESCALE, track->timescale, AV_ROUND_UP); int version = duration < INT32_MAX ? 0 : 1; int en...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
65,379,683,827,079,640,000,000,000,000,000,000,000
84
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
int sqlite3Fts3UpdateMethod( sqlite3_vtab *pVtab, /* FTS3 vtab object */ int nArg, /* Size of argument array */ sqlite3_value **apVal, /* Array of arguments */ sqlite_int64 *pRowid /* OUT: The affected (or effected) rowid */ ){ Fts3Table *p = (Fts3Table *)p...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
271,635,667,715,510,600,000,000,000,000,000,000,000
138
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset, old_sigset_t __user *, oset) { old_sigset_t old_set, new_set; sigset_t new_blocked; old_set = current->blocked.sig[0]; if (nset) { if (copy_from_user(&new_set, nset, sizeof(*nset))) return -EFAULT; new_blocked = current->blocked; swi...
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
70,802,232,685,438,065,000,000,000,000,000,000,000
38
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
void ConnectionManagerImpl::ActiveStream::decodeHeaders(ActiveStreamDecoderFilter* filter, RequestHeaderMap& headers, bool end_stream) { // Headers filter iteration should always start with the next filter ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
96,798,626,576,626,930,000,000,000,000,000,000,000
56
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
MP4_Box_t *MP4_BoxGetNextChunk( stream_t *s ) { /* p_chunk is a virtual root container for the moof and mdat boxes */ MP4_Box_t *p_chunk; MP4_Box_t *p_tmp_box = NULL; p_tmp_box = calloc( 1, sizeof( MP4_Box_t ) ); if( unlikely( p_tmp_box == NULL ) ) return NULL; /* We might get a ftyp b...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
284,374,047,478,572,700,000,000,000,000,000,000,000
43
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) { #ifdef CONFIG_SLUB_CPU_PARTIAL struct page *oldpage; int pages; int pobjects; preempt_disable(); do { pages = 0; pobjects = 0; oldpage = this_cpu_read(s->cpu_slab->partial); if (oldpage) { pobjects = oldpage->pobjects; ...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
7,729,402,798,582,591,000,000,000,000,000,000,000
51
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...
static SLJIT_INLINE PCRE2_SPTR set_then_offsets(compiler_common *common, PCRE2_SPTR cc, sljit_u8 *current_offset) { PCRE2_SPTR end = bracketend(cc); BOOL has_alternatives = cc[GET(cc, 1)] == OP_ALT; /* Assert captures then. */ if (*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) current_offset = NULL; /* Conditional bl...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
299,672,022,501,735,900,000,000,000,000,000,000,000
32
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
static void fuse_lo_data_cleanup(struct lo_data *lo) { if (lo->inodes) { g_hash_table_destroy(lo->inodes); } if (lo->root.posix_locks) { g_hash_table_destroy(lo->root.posix_locks); } lo_map_destroy(&lo->fd_map); lo_map_destroy(&lo->dirp_map); lo_map_destroy(&lo->ino_map); ...
1
[ "CWE-281" ]
qemu
e586edcb410543768ef009eaa22a2d9dd4a53846
4,291,824,533,777,592,300,000,000,000,000,000,000
25
virtiofs: drop remapped security.capability xattr as needed On Linux, the 'security.capability' xattr holds a set of capabilities that can change when an executable is run, giving a limited form of privilege escalation to those programs that the writer of the file deemed worthy. Any write causes the 'security.capabil...
static void init_rsdr_hdr(SCV_RSDS_HEADER* rsds_hdr) { memset (rsds_hdr, 0, sizeof (SCV_RSDS_HEADER)); rsds_hdr->free = (void (*)(struct SCV_RSDS_HEADER*))free_rsdr_hdr; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
242,394,328,329,156,400,000,000,000,000,000,000,000
4
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static double clip(void *opaque, double val) { LutContext *s = opaque; double minval = s->var_values[VAR_MINVAL]; double maxval = s->var_values[VAR_MAXVAL]; return av_clip(val, minval, maxval); }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
39,961,278,252,594,655,000,000,000,000,000,000,000
8
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static inline void mm_inc_nr_pmds(struct mm_struct *mm) { atomic_long_inc(&mm->nr_pmds); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
323,659,353,468,395,340,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int sfile_close(jas_stream_obj_t *obj) { FILE *fp; fp = JAS_CAST(FILE *, obj); return fclose(fp); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
176,320,096,610,013,140,000,000,000,000,000,000,000
6
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...
mysql_send_query(MYSQL* mysql, const char* query, unsigned long length) { return ma_simple_command(mysql, COM_QUERY, query, length, 1,0); }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
67,441,807,333,904,925,000,000,000,000,000,000,000
4
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
static int compat_copy_everything_to_user(struct ebt_table *t, void __user *user, int *len, int cmd) { struct compat_ebt_replace repl, tmp; struct ebt_counter *oldcounters; struct ebt_table_info tinfo; int ret; void __user *pos; memset(&tinfo, 0, sizeof(tinfo)); if (cmd == EBT_SO_GET_ENTRIES) { tinfo....
0
[ "CWE-787" ]
linux
b71812168571fa55e44cdd0254471331b9c4c4c6
54,596,426,767,189,580,000,000,000,000,000,000,000
55
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets We need to make sure the offsets are not out of range of the total size. Also check that they are in ascending order. The WARN_ON triggered by syzkaller (it sets panic_on_warn) is changed to also bail out, no point in continuing parsing. Briefly tested...
static int ntop_interface_release_interface_alert(lua_State* vm) { return ntop_interface_engage_release_interface_alert(vm, false /* release */); }
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
28,888,544,448,413,624,000,000,000,000,000,000,000
3
Security fix: prevents empty host from being used
static inline bool vb2_queue_is_busy(struct video_device *vdev, struct file *file) { return vdev->queue->owner && vdev->queue->owner != file->private_data; }
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
145,610,435,889,344,440,000,000,000,000,000,000,000
4
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
static inline unsigned long kmem_cache_flags(unsigned long objsize, unsigned long flags, const char *name, void (*ctor)(struct kmem_cache *, void *)) { return flags; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
337,020,237,984,771,480,000,000,000,000,000,000,000
6
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
void write(const char* key, const char* str, bool quote) { char buf[CV_FS_MAX_LEN*4+16]; char* data = (char*)str; int i, len; if( !str ) CV_Error( CV_StsNullPtr, "Null string pointer" ); len = (int)strlen(str); if( len > CV_FS_MAX_LEN ) C...
0
[ "CWE-476" ]
opencv
5691d998ead1d9b0542bcfced36c2dceb3a59023
254,106,602,771,682,930,000,000,000,000,000,000,000
58
core(persistence): added null ptr checks
int dtls1_get_record(SSL *s) { int ssl_major, ssl_minor; int i, n; SSL3_RECORD *rr; unsigned char *p = NULL; unsigned short version; DTLS1_BITMAP *bitmap; unsigned int is_next_epoch; rr = &(s->s3->rrec); again: /* * The epoch may have changed. If so, process all the pending ...
0
[ "CWE-189" ]
openssl
b77ab018b79a00f789b0fb85596b446b08be4c9d
167,585,623,743,421,170,000,000,000,000,000,000,000
163
Fix DTLS replay protection The DTLS implementation provides some protection against replay attacks in accordance with RFC6347 section 4.1.2.6. A sliding "window" of valid record sequence numbers is maintained with the "right" hand edge of the window set to the highest sequence number we have received so far. Records ...
CImgDisplay& close() { if (is_empty() || _is_closed) return *this; Display *const dpy = cimg::X11_attr().display; cimg_lock_display(); if (_is_fullscreen) _desinit_fullscreen(); XUnmapWindow(dpy,_window); _window_x = _window_y = cimg::type<int>::min(); _is_closed = true; ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
135,627,476,216,085,400,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.
void sock_set_keepalive(struct sock *sk) { lock_sock(sk); if (sk->sk_prot->keepalive) sk->sk_prot->keepalive(sk, true); sock_valbool_flag(sk, SOCK_KEEPOPEN, true); release_sock(sk); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
51,582,218,052,436,110,000,000,000,000,000,000,000
8
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
usm_get_userList(void) { return userList; }
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
71,616,679,115,298,450,000,000,000,000,000,000,000
4
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
_terminate_all_steps(uint32_t jobid, bool batch) { List steps; ListIterator i; step_loc_t *stepd; int step_cnt = 0; int fd; steps = stepd_available(conf->spooldir, conf->node_name); i = list_iterator_create(steps); while ((stepd = list_next(i))) { if (stepd->jobid != jobid) { /* multiple jobs expected on...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
243,692,702,424,375,400,000,000,000,000,000,000,000
44
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
unsigned long ext4_count_dirs(struct super_block * sb) { unsigned long count = 0; ext4_group_t i, ngroups = ext4_get_groups_count(sb); for (i = 0; i < ngroups; i++) { struct ext4_group_desc *gdp = ext4_get_group_desc(sb, i, NULL); if (!gdp) continue; count += ext4_used_dirs_count(sb, gdp); } return count...
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
260,683,287,044,157,680,000,000,000,000,000,000,000
13
ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi...
__getcwd_generic (char *buf, size_t size) { /* Lengths of big file name components and entire file names, and a deep level of file name nesting. These numbers are not upper bounds; they are merely large values suitable for initial allocations, designed to be large enough for most real-world uses....
1
[ "CWE-284" ]
glibc
23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e
204,737,856,749,160,000,000,000,000,000,000,000,000
333
getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) No valid path returned by getcwd would fit into 1 byte, so reject the size early and return NULL with errno set to ERANGE. This change is prompted by CVE-2021-3999, which describes a single byte buffer underflow and overflow when all of the following condition...
std::uint32_t calculate_segment_size(std::uint32_t size) override { return size; }
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
222,795,181,402,567,930,000,000,000,000,000,000,000
4
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
s_free(STREAM s) { free(s->data); free(s); }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
155,982,979,061,555,200,000,000,000,000,000,000,000
5
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, unsigned int parentid) { struct Qdisc *sch; sch = qdisc_alloc(dev, ops); if (IS_ERR(sch)) goto errout; sch->stats_lock = &dev->queue_lock; sch->parent = parentid; if (!ops->init || ops->init(sch, NULL) == 0) return sch; q...
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
52,614,530,388,873,990,000,000,000,000,000,000,000
18
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
static bool file_current(struct augeas *aug, const char *fname, struct tree *finfo) { struct tree *mtime = tree_child(finfo, s_mtime); struct tree *file = NULL, *path = NULL; int r; struct stat st; int64_t mtime_i; if (mtime == NULL || mtime->value == NULL) retu...
0
[]
augeas
051c73a9a7ffe9e525f6f0a1b8f5198ff8cc6752
266,223,922,122,756,500,000,000,000,000,000,000,000
31
Fix regression in permissions of created files Commit 16387744 changed temporary file creation to use mkstemp, resulting in new files being created with 0600 permissions. For brand new files created through Augeas, their permissions stayed at 0600 rather than being set by the umask as before. * src/transform.c (tr...
bit_write_RL_LE (Bit_Chain *dat, BITCODE_RL value) { // most significant word first: bit_write_RS_LE (dat, value >> 16); bit_write_RS_LE (dat, value & 0xFFFF); }
0
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
30,165,757,545,075,200,000,000,000,000,000,000,000
6
encode: protect from stack under-flow From GH #178 fuzzing
void Item_field::save_org_in_field(Field *to, fast_field_copier fast_field_copier_func) { DBUG_ENTER("Item_field::save_org_in_field"); DBUG_PRINT("enter", ("setup: %p data: %p", to, fast_field_copier_func)); if (fast_field_copier_func) { if (field->...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
135,741,308,430,061,640,000,000,000,000,000,000,000
26
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.
gdk_pixbuf_get_height (const GdkPixbuf *pixbuf) { g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1); return pixbuf->height; }
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
161,026,237,055,023,590,000,000,000,000,000,000,000
6
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
static int cpu_subsys_online(struct device *dev) { struct cpu *cpu = container_of(dev, struct cpu, dev); int cpuid = dev->id; int from_nid, to_nid; int ret; from_nid = cpu_to_node(cpuid); if (from_nid == NUMA_NO_NODE) return -ENODEV; ret = cpu_device_up(dev); /* * When hot adding memory to memoryless node...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
269,422,797,136,877,100,000,000,000,000,000,000,000
22
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension) { mode_t ret; ret = mode & 0777; if (mode & P9_STAT_MODE_DIR) { ret |= S_IFDIR; } if (mode & P9_STAT_MODE_SYMLINK) { ret |= S_IFLNK; } if (mode & P9_STAT_MODE_SOCKET) { ret |= S_IFSOCK; } if ...
0
[ "CWE-399", "CWE-772" ]
qemu
e95c9a493a5a8d6f969e86c9f19f80ffe6587e19
307,223,533,795,246,500,000,000,000,000,000,000,000
42
9pfs: fix potential host memory leak in v9fs_read In 9pfs read dispatch function, it doesn't free two QEMUIOVector object thus causing potential memory leak. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
void rdma_destroy_qp(struct rdma_cm_id *id) { struct rdma_id_private *id_priv; id_priv = container_of(id, struct rdma_id_private, id); mutex_lock(&id_priv->qp_mutex); ib_destroy_qp(id_priv->id.qp); id_priv->id.qp = NULL; mutex_unlock(&id_priv->qp_mutex); }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
199,277,379,945,710,500,000,000,000,000,000,000,000
10
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
**/ CImg<Tfloat> operator-(const char *const expression) const { return CImg<Tfloat>(*this,false)-=expression;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
188,200,525,819,430,800,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
void js_dup(js_State *J) { CHECKSTACK(1); STACK[TOP] = STACK[TOP-1]; ++TOP; }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
340,197,760,681,093,100,000,000,000,000,000,000,000
6
Fix 697401: Error when dropping extra arguments to lightweight functions.
static size_t PSDPackbitsEncodeImage(Image *image,const size_t length, const unsigned char *pixels,unsigned char *compact_pixels, ExceptionInfo *exception) { int count; register ssize_t i, j; register unsigned char *q; unsigned char *packbits; /* Compress pixels with Packbits e...
0
[ "CWE-787" ]
ImageMagick
d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab
125,364,020,492,461,110,000,000,000,000,000,000,000
110
https://github.com/ImageMagick/ImageMagick/issues/350
static inline int to_pipe_swizzle(GLenum swizzle) { switch (swizzle) { case GL_RED: return PIPE_SWIZZLE_RED; case GL_GREEN: return PIPE_SWIZZLE_GREEN; case GL_BLUE: return PIPE_SWIZZLE_BLUE; case GL_ALPHA: return PIPE_SWIZZLE_ALPHA; case GL_ZERO: return PIPE_SWIZZLE_ZERO; case GL_ONE: return PIPE_S...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
150,072,427,481,393,600,000,000,000,000,000,000,000
14
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>
char *get_str(char *d, /* destination */ char *s, /* source */ int maxlen) /* max length */ { char c; maxlen--; /* have place for the EOS */ while (isspace((unsigned char) *s)) s++; if (*s == '"') { s++; while ((c = *s) != '\0') { if (c == '"') { s++; break; } if (c == '\\')...
0
[ "CWE-125", "CWE-787" ]
abcm2ps
3169ace6d63f6f517a64e8df0298f44a490c4a15
274,605,487,978,003,750,000,000,000,000,000,000,000
39
fix: crash when accidental without a note at start of line after K: Issue #84.
bool empty() const override { return false; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
249,384,144,996,119,750,000,000,000,000,000,000,000
1
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
unsigned char *next_protos_parse(unsigned short *outlen, const char *in) { size_t len; unsigned char *out; size_t i, start = 0; len = strlen(in); if (len >= 65535) return NULL; out = OPENSSL_malloc(strlen(in) + 1); if (!out) return NULL; for (i = 0; i <= len; ++i) { if (i == len || in[i] == ',') ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
68,665,449,666,795,430,000,000,000,000,000,000,000
33
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static ssize_t removable_show(struct device *dev, struct device_attribute *attr, char *buf) { return sysfs_emit(buf, "%d\n", (int)IS_ENABLED(CONFIG_MEMORY_HOTREMOVE)); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
85,599,920,799,105,590,000,000,000,000,000,000,000
5
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static int broken_blkgetsize(unsigned int fd, unsigned int cmd, unsigned long arg) { /* The mkswap binary hard codes it to Intel value :-((( */ return w_long(fd, BLKGETSIZE, arg); }
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
216,203,451,678,586,040,000,000,000,000,000,000,000
5
[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 zval *var_access(php_unserialize_data_t *var_hashx, zend_long id) { var_entries *var_hash = (*var_hashx)->first; #if VAR_ENTRIES_DBG fprintf(stderr, "var_access(%ld): %ld\n", var_hash?var_hash->used_slots:-1L, id); #endif while (id >= VAR_ENTRIES_MAX && var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { ...
0
[]
php-src
d76b293ac71aa5bd4e9a433192afef6e0dd5a4ee
86,080,294,475,928,800,000,000,000,000,000,000,000
18
forgot to commit this one
double result() const { return m_result; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
308,434,687,490,549,430,000,000,000,000,000,000,000
1
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...
GF_Err saiz_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SampleAuxiliaryInfoSizeBox*ptr = (GF_SampleAuxiliaryInfoSizeBox*) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; if (ptr->flags & 1) { gf_bs_write_u32(bs, ptr->aux_info_type); gf_bs_write_u32(bs, ptr->aux_...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
152,096,458,023,878,620,000,000,000,000,000,000,000
22
fixed #1587
int wm_SemFree(wm_Sem *s){ if ((s == NULL) || (*s == NULL)) return MQTT_CODE_ERROR_BAD_ARG; dispatch_release(*s); *s = NULL; return 0; }
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
62,366,196,628,884,030,000,000,000,000,000,000,000
8
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
free_xargs(xargs_t xargs) { if (xargs.dn) free (xargs.dn); if (xargs.linkdn) free(xargs.linkdn); if (xargs.containerdn) free (xargs.containerdn); if (xargs.tktpolicydn) free (xargs.tktpolicydn); }
0
[ "CWE-703" ]
krb5
04038bf3633c4b909b5ded3072dc88c8c419bf16
95,800,583,936,069,660,000,000,000,000,000,000,000
11
Support keyless principals in LDAP [CVE-2014-5354] Operations like "kadmin -q 'addprinc -nokey foo'" or "kadmin -q 'purgekeys -all foo'" result in principal entries with no keys present, so krb5_encode_krbsecretkey() would just return NULL, which then got unconditionally dereferenced in krb5_add_ber_mem_ldap_mod(). A...
int Lex_input_stream::scan_ident_start(THD *thd, Lex_ident_cli_st *str) { uchar c; bool is_8bit; CHARSET_INFO *const cs= thd->charset(); const uchar *const ident_map= cs->ident_map; DBUG_ASSERT(m_tok_start <= m_ptr); if (use_mb(cs)) { is_8bit= true; while (ident_map[c= yyGet()]) { int c...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
163,970,503,567,392,620,000,000,000,000,000,000,000
35
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static DWORD WINAPI serial_thread_func(LPVOID arg) { IRP* irp; wMessage message; SERIAL_DEVICE* serial = (SERIAL_DEVICE*)arg; UINT error = CHANNEL_RC_OK; while (1) { if (!MessageQueue_Wait(serial->MainIrpQueue)) { WLog_ERR(TAG, "MessageQueue_Wait failed!"); error = ERROR_INTERNAL_ERROR; break; } ...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
6,926,507,580,315,222,000,000,000,000,000,000,000
41
Fixed oob read in irp_write and similar
decode_sequence(const uint8_t *asn1, size_t len, const struct seq_info *seq, void *val) { krb5_error_code ret; const uint8_t *contents; size_t i, j, clen; taginfo t; assert(seq->n_fields > 0); for (i = 0; i < seq->n_fields; i++) { if (len == 0) break; ...
1
[ "CWE-674", "CWE-787" ]
krb5
57415dda6cf04e73ffc3723be518eddfae599bfd
6,902,928,871,791,624,000,000,000,000,000,000,000
55
Add recursion limit for ASN.1 indefinite lengths The libkrb5 ASN.1 decoder supports BER indefinite lengths. It computes the tag length using recursion; the lack of a recursion limit allows an attacker to overrun the stack and cause the process to crash. Reported by Demi Obenour. CVE-2020-28196: In MIT krb5 release...
int main(int argc, char **argv) { /* I18n */ setlocale(LC_ALL, ""); #if ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); #endif abrt_init(argv); /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( "& [opti...
0
[ "CWE-59" ]
abrt
3287aa12eb205cff95cdd00d6d6c5c9a4f8f0eca
295,760,646,513,487,400,000,000,000,000,000,000,000
75
daemon: allow only root user to trigger the post-create There is no reason to allow non-root users to trigger this functionality. Regular users can create abrt problems only through abrtd or abrt-dbus and both triggers the post-create. Other hooks run under root user (CCpp, Koops, VMCore, Xorg). Related: #1212861 S...
utf_find_illegal(void) { pos_T pos = curwin->w_cursor; char_u *p; int len; vimconv_T vimconv; char_u *tofree = NULL; vimconv.vc_type = CONV_NONE; if (enc_utf8 && (enc_canon_props(curbuf->b_p_fenc) & ENC_8BIT)) { // 'encoding' is "utf-8" but we are editing a 8-bit encoded file, // pos...
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
233,647,464,609,463,240,000,000,000,000,000,000,000
69
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
void addBytesReceived(uint64_t bytes_received) override { bytes_received_ += bytes_received; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
306,773,315,302,899,100,000,000,000,000,000,000,000
1
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
void cil_destroy_pcidevicecon(struct cil_pcidevicecon *pcidevicecon) { if (pcidevicecon == NULL) { return; } if (pcidevicecon->context_str == NULL && pcidevicecon->context != NULL) { cil_destroy_context(pcidevicecon->context); } free(pcidevicecon); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
311,474,371,863,783,700,000,000,000,000,000,000,000
12
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static int handle_interrupt_window(struct kvm_vcpu *vcpu) { vmcs_clear_bits(CPU_BASED_VM_EXEC_CONTROL, CPU_BASED_VIRTUAL_INTR_PENDING); kvm_make_request(KVM_REQ_EVENT, vcpu); ++vcpu->stat.irq_window_exits; return 1; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
322,074,609,639,636,560,000,000,000,000,000,000,000
10
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
void sdb_edit(procinfo *pi) { char * filename = omStrDup("/tmp/sdXXXXXX"); int f=mkstemp(filename); if (f==-1) { Print("cannot open %s\n",filename); omFree(filename); return; } if (pi->language!= LANG_SINGULAR) { Print("cannot edit type %d\n",pi->language); close(f); f=NULL; } ...
0
[ "CWE-269" ]
Singular
5f28fbf066626fa9c4a8f0e6408c0bb362fb386c
227,360,055,844,667,630,000,000,000,000,000,000,000
87
use mkstemp for sdb
static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id) { struct snd_msnd *chip = dev_id; void *pwDSPQData = chip->mappedbase + DSPQ_DATA_BUFF; /* Send ack to DSP */ /* inb(chip->io + HP_RXL); */ /* Evaluate queued DSP messages */ while (readw(chip->DSPQ + JQS_wTail) != readw(chip->DSPQ + JQS_wHead)) { u...
1
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
297,573,384,044,803,200,000,000,000,000,000,000,000
25
ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/sho...
static Token **count_mmac_params(Token *tline, int *nparamp, Token ***paramsp) { int paramsize; int nparam = 0; Token *t; Token **comma = NULL, **maybe_comma = NULL; Token **params; paramsize = PARAM_DELTA; nasm_newn(params, paramsize); t = skip_white(tline); if (t) { while...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
181,308,126,396,368,020,000,000,000,000,000,000,000
66
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...
flatpak_dir_migrate_config (FlatpakDir *self, gboolean *changed, GCancellable *cancellable, GError **error) { g_auto(GStrv) remotes = NULL; g_autoptr(GKeyFile) config = NULL; int i; if (changed != NULL) *changed ...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
124,063,129,380,537,290,000,000,000,000,000,000,000
78
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...
dump_word( slang_T *slang, char_u *word, char_u *pat, int *dir, int dumpflags, int wordflags, linenr_T lnum) { int keepcap = FALSE; char_u *p; char_u *tw; char_u cword[MAXWLEN]; char_u badword[MAXWLEN + 10]; int i; int flags = wordflags; if (dumpflags &...
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
153,981,615,817,378,050,000,000,000,000,000,000,000
82
patch 8.2.5072: using uninitialized value and freed memory in spell command Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
const HandShakeState& States::getHandShake() const { return handshakeLayer_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
271,462,250,516,944,030,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static int _consolefs_fsync(oe_fd_t* file) { OE_UNUSED(file); OE_RAISE_ERRNO(OE_EINVAL); done: return -1; }
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
303,673,104,289,429,270,000,000,000,000,000,000,000
7
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static int perf_ftrace_function_unregister(struct perf_event *event) { struct ftrace_ops *ops = &event->ftrace_ops; int ret = unregister_ftrace_function(ops); ftrace_free_filter(ops); return ret; }
0
[ "CWE-284", "CWE-264" ]
linux
12ae030d54ef250706da5642fc7697cc60ad0df7
313,449,418,164,232,400,000,000,000,000,000,000,000
7
perf/ftrace: Fix paranoid level for enabling function tracer The current default perf paranoid level is "1" which has "perf_paranoid_kernel()" return false, and giving any operations that use it, access to normal users. Unfortunately, this includes function tracing and normal users should not be allowed to enable func...
static struct vmcb_seg *svm_seg(struct kvm_vcpu *vcpu, int seg) { struct vmcb_save_area *save = &to_svm(vcpu)->vmcb->save; struct vmcb_save_area *save01 = &to_svm(vcpu)->vmcb01.ptr->save; switch (seg) { case VCPU_SREG_CS: return &save->cs; case VCPU_SREG_DS: return &save->ds; case VCPU_SREG_ES: return &save->es;...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
47,421,218,428,590,230,000,000,000,000,000,000,000
18
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr) { memset(ccs_hdr, 0x00, sizeof(struct ccs_header_st)); ccs_hdr->type = *(data++); }
0
[ "CWE-310" ]
openssl
34628967f1e65dc8f34e000f0f5518e21afbfc7b
54,709,919,675,491,360,000,000,000,000,000,000,000
6
Fix DTLS retransmission from previous session. For DTLS we might need to retransmit messages from the previous session so keep a copy of write context in DTLS retransmission buffers instead of replacing it after sending CCS. CVE-2013-6450.