func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void safe_fputs(const char *data) { const char *p; for (p = data; p && *p; p++) { if (iscntrl((unsigned char) *p)) fputc('?', stdout); else fputc(*p, stdout); } }
0
[ "CWE-200" ]
util-linux
5ebbc3865d1e53ef42e5f121c41faab23dd59075
178,709,017,777,079,100,000,000,000,000,000,000,000
11
mount: sanitize paths from non-root users $ mount /root/.ssh/../../dev/sda2 mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot this is too promiscuous. It seems better to ignore on command line specified paths which are not resolve-able for non-root users. Fixed version: $ mount /root...
int ZEXPORT inflateUndermine(strm, subvert) z_streamp strm; int subvert; { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR state->sane = !subvert; return Z_OK; #el...
0
[ "CWE-787" ]
zlib
eff308af425b67093bab25f80f1ae950166bece1
289,072,479,313,986,960,000,000,000,000,000,000,000
17
Fix a bug when getting a gzip header extra field with inflate(). If the extra field was larger than the space the user provided with inflateGetHeader(), and if multiple calls of inflate() delivered the extra header data, then there could be a buffer overflow of the provided space. This commit assures that provided spa...
obj_to_asn1obj(VALUE obj) { ASN1_OBJECT *a1obj; StringValueCStr(obj); a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 0); if(!a1obj) a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 1); if(!a1obj) ossl_raise(eASN1Error, "invalid OBJECT ID %"PRIsVALUE, obj); return a1obj; }
0
[ "CWE-119" ]
openssl
1648afef33c1d97fb203c82291b8a61269e85d3b
84,774,940,325,350,120,000,000,000,000,000,000,000
11
asn1: fix out-of-bounds read in decoding constructed objects OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bound...
void jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out) { char buf[8]; jas_iccsigtostr(attrval->type, buf); fprintf(out, "refcnt = %d; type = 0x%08"PRIxFAST32" %s\n", attrval->refcnt, attrval->type, jas_iccsigtostr(attrval->type, &buf[0])); if (attrval->ops->dump) { (*attrval->ops->dump)(attrval, out); ...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
213,599,495,409,693,740,000,000,000,000,000,000,000
10
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
pqGetErrorNotice3(PGconn *conn, bool isError) { PGresult *res = NULL; PQExpBufferData workBuf; char id; const char *val; const char *querytext = NULL; int querypos = 0; /* * Since the fields might be pretty long, we create a temporary * PQExpBuffer rather than using conn->workBuffer. workBuffer is inte...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
80,298,823,000,599,230,000,000,000,000,000,000,000
189
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
nm_utils_host_id_get(const guint8 **out_host_id, gsize *out_host_id_len) { const HostIdData *host_id; host_id = _host_id_get(); *out_host_id = host_id->host_id; *out_host_id_len = host_id->host_id_len; return host_id->is_good; }
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
21,548,318,938,761,374,000,000,000,000,000,000,000
9
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
int ass_track_set_feature(ASS_Track *track, ASS_Feature feature, int enable) { switch (feature) { case ASS_FEATURE_INCOMPATIBLE_EXTENSIONS: //-fallthrough #ifdef USE_FRIBIDI_EX_API case ASS_FEATURE_BIDI_BRACKETS: track->parser_priv->bidi_brackets = !!enable; #endif return 0; defa...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
65,080,178,239,883,700,000,000,000,000,000,000,000
14
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
qtdemux_parse_sidx (GstQTDemux * qtdemux, const guint8 * buffer, gint length) { GstSidxParser sidx_parser; GstIsoffParserResult res; guint consumed; gst_isoff_qt_sidx_parser_init (&sidx_parser); res = gst_isoff_qt_sidx_parser_add_data (&sidx_parser, buffer, length, &consumed); GST_DEBUG_OBJECT...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
86,957,250,086,568,990,000,000,000,000,000,000,000
17
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static void hci_cc_le_set_ext_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_cp_le_set_ext_scan_enable *cp; __u8 status = *((__u8 *) skb->data); BT_DBG("%s status 0x%2.2x", hdev->name, status); if (status) return; cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_EXT_SCAN_ENABLE); if ...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
1,196,983,289,048,727,800,000,000,000,000,000,000
17
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al,i,j,ret; unsigned int n; SSL3_RECORD *rr; void (*cb)(const SSL *ssl,int type2,int val)=NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_buffers(s)) return(-1); if ((type && (type != SSL3_RT_AP...
0
[ "CWE-326" ]
openssl
410a49a4fa1d2a1a9775ee29f9e40cbbda79c149
136,071,875,165,795,590,000,000,000,000,000,000,000
466
Fix for CVE-2014-0224 Only accept change cipher spec when it is expected instead of at any time. This prevents premature setting of session keys before the master secret is determined which an attacker could use as a MITM attack. Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue and providing the ...
int SSL_renegotiate(SSL *s) { if (s->renegotiate == 0) s->renegotiate=1; s->new_session=1; return(s->method->ssl_renegotiate(s)); }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
275,125,639,588,837,770,000,000,000,000,000,000,000
9
Add SRP support.
void GTextFieldShow(GGadget *g,int pos) { GTextField *gt = (GTextField *) g; GTextField_Show(gt,pos); _ggadget_redraw(g); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
80,226,909,772,837,560,000,000,000,000,000,000,000
6
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
ins_ctrl_ey(int tc) { int c = tc; if (ctrl_x_mode_scroll()) { if (c == Ctrl_Y) scrolldown_clamp(); else scrollup_clamp(); redraw_later(UPD_VALID); } else { c = ins_copychar(curwin->w_cursor.lnum + (c == Ctrl_Y ? -1 : 1)); if (c != NUL) { long tw_save; // The chara...
0
[ "CWE-126", "CWE-787" ]
vim
e98c88c44c308edaea5994b8ad4363e65030968c
179,701,690,000,589,800,000,000,000,000,000,000,000
39
patch 9.0.0218: reading before the start of the line Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
PUTTEXT_null(unsigned int x, unsigned int y, const char *s) { (void) s; /* avoid -Wunused warning */ (void) x; (void) y; }
0
[ "CWE-787" ]
gnuplot
963c7df3e0c5266efff260d0dff757dfe03d3632
79,857,134,442,133,940,000,000,000,000,000,000,000
6
Better error handling for faulty font syntax A missing close-quote in an enhanced text font specification could cause a segfault. Bug #2303
static int hwsim_write_simulate_radar(void *dat, u64 val) { struct mac80211_hwsim_data *data = dat; ieee80211_radar_detected(data->hw); return 0; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
102,403,582,672,392,660,000,000,000,000,000,000,000
8
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static int snd_msnd_write_cfg_io1(int cfg, int num, u16 io) { if (snd_msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) return -EIO; if (snd_msnd_write_cfg(cfg, IREG_IO1_BASEHI, HIBYTE(io))) return -EIO; if (snd_msnd_write_cfg(cfg, IREG_IO1_BASELO, LOBYTE(io))) return -EIO; return 0; }
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
22,411,686,324,875,196,000,000,000,000,000,000,000
10
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 void contract(OPENSSL_LHASH *lh) { OPENSSL_LH_NODE **n, *n1, *np; np = lh->b[lh->p + lh->pmax - 1]; lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */ if (lh->p == 0) { n = OPENSSL_realloc(lh->b, (unsigned int)(sizeof(OPENSSL_LH_NODE *) *...
0
[ "CWE-404" ]
openssl
64c85430f95200b6b51fe9475bd5203f7c19daf1
282,967,020,380,978,360,000,000,000,000,000,000,000
32
Fix bug in OPENSSL_LH_flush Fixes #18139. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18141) (cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e)
irc_server_outqueue_send (struct t_irc_server *server) { time_t time_now; char *pos, *tags_to_send; int priority, anti_flood; time_now = time (NULL); /* detect if system clock has been changed (now lower than before) */ if (server->last_user_message > time_now) server->last_use...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
257,705,313,526,151,970,000,000,000,000,000,000,000
80
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
GF_Err audio_sample_entry_Size(GF_Box *s) { GF_Err e; GF_MPEGAudioSampleEntryBox *ptr = (GF_MPEGAudioSampleEntryBox *)s; gf_isom_audio_sample_entry_size((GF_AudioSampleEntryBox*)s); if (ptr->is_qtff) return gf_isom_box_array_size(s, ptr->protections); if (ptr->esd) { e = gf_isom_box_size((GF_Box *)ptr->esd)...
0
[ "CWE-416" ]
gpac
6063b1a011c3f80cee25daade18154e15e4c058c
212,223,171,663,867,260,000,000,000,000,000,000,000
32
fix UAF in audio_sample_entry_Read (#1440)
is_desktop_file (NautilusFile *file) { return nautilus_file_is_mime_type (file, "application/x-desktop"); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
58,539,561,660,317,380,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics, GetBitContext *gb) { int aot = ac->oc[1].m4ac.object_type; if (aot != AOT_ER_AAC_ELD) { if (get_bits1(gb)) { av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n"); return AVERROR_...
0
[ "CWE-703" ]
FFmpeg
6e42ccb9dbc13836cd52cda594f819d17af9afa2
330,957,536,733,845,680,000,000,000,000,000,000,000
93
avcodec/aacdec: Fix pulse position checks in decode_pulses() Fixes out of array read Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void xfrm_audit_state_add(struct xfrm_state *x, int result, bool task_valid) { struct audit_buffer *audit_buf; audit_buf = xfrm_audit_start("SAD-add"); if (audit_buf == NULL) return; xfrm_audit_helper_usrinfo(task_valid, audit_buf); xfrm_audit_helper_sainfo(x, audit_buf); audit_log_format(audit_buf, " res=%u",...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
16,802,143,646,042,686,000,000,000,000,000,000,000
12
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
GF_Err drep_box_dump(GF_Box *a, FILE * trace) { GF_DREPBox *p; p = (GF_DREPBox *)a; gf_isom_box_dump_start(a, "RepeatedDataBytesBox", trace); gf_fprintf(trace, "RepeatedBytes=\""LLD"\">\n", p->nbBytes); gf_isom_box_dump_done("RepeatedDataBytesBox", a, trace); return GF_OK; }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
297,570,159,739,885,270,000,000,000,000,000,000,000
9
fixed #2138
void Compute(OpKernelContext* context) override { const Tensor* reverse_index_map_t; const Tensor* grad_values_t; OP_REQUIRES_OK(context, context->input("reverse_index_map", &reverse_index_map_t)); OP_REQUIRES_OK(context, context->input("grad_values", &grad_values_t)); const CP...
0
[ "CWE-617", "CWE-703", "CWE-787" ]
tensorflow
390611e0d45c5793c7066110af37c8514e6a6c54
220,172,366,288,150,650,000,000,000,000,000,000,000
61
Fix heap buffer overflow in `tf.raw_ops.SparseFillEmptyRowsGrad`. Also add tests as they were lacking PiperOrigin-RevId: 332566071 Change-Id: I44277578e26ff5fb3fdb0dcbba6e91b2ec3e7859
OPJ_BOOL opj_j2k_write_mct_record( opj_j2k_t *p_j2k, opj_mct_data_t * p_mct_record, struct opj_stream_private *p_stream, st...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
297,394,900,452,136,900,000,000,000,000,000,000,000
57
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
void do_connect(struct st_command *command) { int con_port= opt_port; char *con_options; my_bool con_ssl= 0, con_compress= 0; my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0; my_bool con_secure_auth= 1; struct st_connection* con_slot; static DYNAMIC_STRING ds_connection_name; static DYNAMIC_ST...
1
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
154,737,833,441,338,180,000,000,000,000,000,000,000
250
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
int propfind_collectionname(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr prop, xmlNodePtr resp, struct propstat propstat[], void *rock) { int r = propfind_fromdb(name, ns, fctx, prop, resp, propstat, rock)...
0
[]
cyrus-imapd
6703ff881b6056e0c045a7b795ce8ba1bbb87027
24,628,079,324,642,930,000,000,000,000,000,000,000
20
http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication
DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp, int flags) { int i, retval=0; JSAMPROW *row_pointer=NULL; JSAMPLE *_tmpbuf[MAX_COMPONENTS], *_tmpbuf2[MAX_COMPONENTS]; JSA...
0
[]
libjpeg-turbo
dab6be4cfb2f9307b5378d2d1dc74d9080383dc2
130,111,392,574,317,350,000,000,000,000,000,000,000
169
tjDecompressToYUV*(): Fix OOB write/double free ... when attempting to decompress grayscale JPEG images with sampling factors != 1. Fixes #387
static int coroutine_fn bdrv_co_do_preadv(BlockDriverState *bs, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, BdrvRequestFlags flags) { BlockDriver *drv = bs->drv; BdrvTrackedRequest req; /* TODO Lift BDRV_SECTOR_SIZE restriction in BlockDriver interface */ uint64_t align = MAX(BDRV_S...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
169,730,552,007,053,740,000,000,000,000,000,000,000
70
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
static void unzzip_big_entry_fprint(ZZIP_ENTRY* entry, FILE* out) { ZZIP_ENTRY_FILE* file = zzip_entry_fopen (entry, 0); if (file) { char buffer[1024]; int len; while ((len = zzip_entry_fread (buffer, 1024, 1, file))) { DBG2("entry read %i", len); fwrite (buffer, len, 1, out); } DBG2("entry ...
0
[]
zziplib
931f962ddfec0e00d6f486df2c56d9857b55944e
290,840,749,623,453,000,000,000,000,000,000,000,000
18
fopen may fail for a bad name -> EXIT_ERRORS in that case #17
local void put_trailer(unsigned long ulen, unsigned long clen, unsigned long check, unsigned long head) { unsigned char tail[46]; if (g.form > 1) { /* zip */ unsigned long cent; /* write data descriptor (as promised in local header) */ PUT4L(tail, 0...
0
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
168,231,573,340,925,500,000,000,000,000,000,000,000
73
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
rte_vhost_crypto_free(int vid) { struct virtio_net *dev = get_device(vid); struct vhost_crypto *vcrypto; if (unlikely(dev == NULL)) { VC_LOG_ERR("Invalid vid %i", vid); return -EINVAL; } vcrypto = dev->extern_data; if (unlikely(vcrypto == NULL)) { VC_LOG_ERR("Cannot find required data, is it initialized?"...
0
[ "CWE-125" ]
dpdk
acd4c92fa693bbea695f2bb42bb93fb8567c3ca5
60,978,977,164,331,690,000,000,000,000,000,000,000
27
vhost/crypto: validate keys lengths transform_cipher_param() and transform_chain_param() handle the payload data for the VHOST_USER_CRYPTO_CREATE_SESS message. These payloads have to be validated, since it could come from untrusted sources. Two buffers and their lengths are defined in this payload, one the the auth k...
static int parse_attach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *err) { ATTACH_MATCH *a; LIST *listp, *lastp; char *p; char *tmpminor; int len; int ret; /* Find the last item in the list that data points to. */ lastp = NULL; dprint(5, (debugfile, "parse_attach_list: ldata = %p, *ldata = %p...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
260,054,347,614,211,060,000,000,000,000,000,000,000
91
use a 64-bit random value in temporary filenames. closes #3158
static void sig_disconnected(IRC_SERVER_REC *server) { GSList *tmp; if (!IS_IRC_SERVER(server)) return; for (tmp = server->cmdqueue; tmp != NULL; tmp = tmp->next->next) { g_free(tmp->data); if (tmp->next->data != NULL) server_redirect_destroy(tmp->next->data); } g_slist_free(server-...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
57,245,918,679,937,120,000,000,000,000,000,000,000
38
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
xmlTextReaderFreeProp(xmlTextReaderPtr reader, xmlAttrPtr cur) { xmlDictPtr dict; if ((reader != NULL) && (reader->ctxt != NULL)) dict = reader->ctxt->dict; else dict = NULL; if (cur == NULL) return; if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue)) xmlDeregisterNodeDefaul...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
207,345,499,890,116,740,000,000,000,000,000,000,000
32
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
static int check_common(const char *unmatched, void *value, void *baton) { struct common_dir *dir = value; if (!dir) return 0; if (dir->is_dir && (unmatched[0] == 0 || unmatched[0] == '/')) return !dir->exclude; if (!dir->is_dir && unmatched[0] == 0) return !dir->exclude; return 0; }
0
[ "CWE-125" ]
git
11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d
273,496,799,313,198,630,000,000,000,000,000,000,000
15
is_ntfs_dotgit: use a size_t for traversing string We walk through the "name" string using an int, which can wrap to a negative value and cause us to read random memory before our array (e.g., by creating a tree with a name >2GB, since "int" is still 32 bits even on most 64-bit platforms). Worse, this is easy to trigg...
void HttpIntegrationTest::testDownstreamResetBeforeResponseComplete() { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(Http::TestHeaderMapImpl{{":method", "GET"}, {":path", "/...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
71,497,421,628,015,490,000,000,000,000,000,000,000
41
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
MagickExport void ImageToCustomStream(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { const MagickInfo *magick_info; ImageInfo *clone_info; MagickBooleanType blob_support, status; assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickC...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
251,938,463,923,222,000,000,000,000,000,000,000,000
119
https://github.com/ImageMagick/ImageMagick6/issues/43
t1mac_output_end(void) { output_current_post(); blocktyp = POST_END; output_current_post(); }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
121,628,594,919,170,400,000,000,000,000,000,000,000
6
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.
Formattable::adoptString(UnicodeString* stringToAdopt) { dispose(); fType = kString; fValue.fString = stringToAdopt; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
302,331,564,393,993,930,000,000,000,000,000,000,000
6
ICU-20246 Fixing another integer overflow in number parsing.
static Token *set_text(struct Token *t, const char *text, size_t len) { char *textp; if (t->len > INLINE_TEXT) nasm_free(t->text.p.ptr); nasm_zero(t->text); t->len = len = tok_check_len(len); textp = (len > INLINE_TEXT) ? (t->text.p.ptr = nasm_malloc(len+1)) : t->text.a; memcpy(textp, text,...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
5,404,394,638,812,095,000,000,000,000,000,000,000
16
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...
static inline int ping_hashfn(struct net *net, unsigned int num, unsigned int mask) { int res = (num + net_hash_mix(net)) & mask; pr_debug("hash(%d) = %d\n", num, res); return res; }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
62,794,243,716,917,480,000,000,000,000,000,000,000
7
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
crypto_req_cert_matching_data(krb5_context context, pkinit_plg_crypto_context plgctx, pkinit_req_crypto_context reqctx, pkinit_cert_matching_data **md_out) { *md_out = NULL; if (reqctx == NULL || reqctx->received_cert == ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
11,749,287,452,297,074,000,000,000,000,000,000,000
13
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
int mutt_socket_has_buffered_input (CONNECTION *conn) { return conn->bufpos < conn->available; }
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
182,885,690,213,621,340,000,000,000,000,000,000,000
4
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
CImgDisplay& show() { if (is_empty() || !_is_closed) return *this; cimg_lock_display(); if (_is_fullscreen) _init_fullscreen(); _map_window(); _is_closed = false; cimg_unlock_display(); return paint();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
151,206,753,308,338,000,000,000,000,000,000,000,000
9
Fix other issues in 'CImg<T>::load_bmp()'.
tiffsep1_print_page(gx_device_printer * pdev, gp_file * file) { tiffsep1_device * const tfdev = (tiffsep1_device *)pdev; int num_std_colorants = tfdev->devn_params.num_std_colorant_names; int num_order = tfdev->devn_params.num_separation_order_names; int num_spot = tfdev->devn_params.separations.num_sep...
1
[ "CWE-476" ]
ghostpdl
aadb53eb834b3def3ef68d78865ff87a68901804
94,942,191,959,140,470,000,000,000,000,000,000,000
274
Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField" The tiffsep and tiffsep1 only set 'code' to an error when an attempt is made to write a second output file without using %d in the OutputFile specification. Thi...
static int cipso_v4_map_lvl_hton(const struct cipso_v4_doi *doi_def, u32 host_lvl, u32 *net_lvl) { switch (doi_def->type) { case CIPSO_V4_MAP_PASS: *net_lvl = host_lvl; return 0; case CIPSO_V4_MAP_TRANS: if (host_lvl < doi_def->map.std->lvl.local_size && doi_def->map.std->lvl.local[host_lvl] < ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
114,112,265,893,127,760,000,000,000,000,000,000,000
19
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
TEST_F(SingleAllowMissingInOrListTest, MissingIssToken) { EXPECT_CALL(mock_cb_, onComplete(Status::Ok)); auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, ES256WithoutIssToken}}; context_ = Verifier::createContext(headers, parent_span_, &mock_cb_); verifier_->verify(context_); EXPECT_THAT(headers...
1
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
290,032,511,205,681,000,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 ...
static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns) { struct mnt_namespace *new_ns; int ret; new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL); if (!new_ns) return ERR_PTR(-ENOMEM); ret = ns_alloc_inum(&new_ns->ns); if (ret) { kfree(new_ns); return ERR_PTR(ret); } new_ns->n...
0
[ "CWE-703" ]
linux
cd4a40174b71acd021877341684d8bb1dc8ea4ae
48,269,569,244,872,890,000,000,000,000,000,000,000
23
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_...
bool ZstdDecompressorImpl::process(Buffer::Instance& output_buffer) { while (input_.pos < input_.size) { const size_t result = ZSTD_decompressStream(dctx_.get(), &output_, &input_); if (isError(result)) { return false; } getOutput(output_buffer); } return true; }
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
138,184,175,797,624,690,000,000,000,000,000,000,000
12
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, struct page **pages, struct vm_area_struct **vmas, unsigned long *position, unsigned long *nr_pages, long i, unsigned int flags, int *locked) { unsigned long pfn_offset; unsigned long vaddr = *position; unsigned long remainder = *...
0
[ "CWE-362" ]
linux
17743798d81238ab13050e8e2833699b54e15467
61,636,133,626,786,430,000,000,000,000,000,000,000
177
mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write ...
static int snd_line6_impulse_period_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 2000; return 0; }
0
[ "CWE-476" ]
linux
3450121997ce872eb7f1248417225827ea249710
97,161,191,179,691,790,000,000,000,000,000,000,000
9
ALSA: line6: Fix write on zero-sized buffer LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while the other part of the driver code writes the packet data w...
static char **SamplingFactorToList(const char *text) { char **textlist; register char *q; register const char *p; register ssize_t i; if (text == (char *) NULL) return((char **) NULL); /* Convert string to an ASCII list. */ textlist=(char **) AcquireQuantumMemory((size_t) MAX...
0
[ "CWE-416" ]
ImageMagick6
c1a5aa3f4214ad6e4748de84dad44398959014e1
101,287,211,734,791,690,000,000,000,000,000,000,000
44
https://github.com/ImageMagick/ImageMagick/issues/1641
static int unix_stream_read_generic(struct unix_stream_read_state *state, bool freezable) { struct scm_cookie scm; struct socket *sock = state->socket; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk); int copied = 0; int flags = state->flags; int noblock = flags & MSG_DONTWAIT; bool check_...
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
251,441,463,247,338,170,000,000,000,000,000,000,000
198
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
static int parse_num(const char **cp_p) { unsigned long num, scale; int ch, dot; const char *cp = *cp_p; num = 0; scale = 1; dot = 0; for(;;) { ch = *cp; if ( !dot && ch == '.' ) { scale = 1; dot = 1; } else if ( ch == '%' ) { scale = dot ? scale*100 : 100; cp++; /* % is always at the end */ ...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
276,298,831,269,512,180,000,000,000,000,000,000,000
35
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>
HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object, HValue* key, HValue* val, Expression* prop, ...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
253,514,001,347,781,070,000,000,000,000,000,000,000
211
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
gdIOCtx * gdNewDynamicCtx (int initialSize, void *data) { return gdNewDynamicCtxEx(initialSize, data, 1); }
0
[ "CWE-119" ]
php-src
cc08cbc84d46933c1e9e0149633f1ed5d19e45e9
300,793,309,986,205,440,000,000,000,000,000,000,000
4
Fix #73280: Stack Buffer Overflow in GD dynamicGetbuf We make sure to never pass a negative `rlen` as size to memcpy(). Cf. <https://github.com/libgd/libgd/commit/53110871>.
static int zipfileOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCsr){ ZipfileTab *pTab = (ZipfileTab*)p; ZipfileCsr *pCsr; pCsr = sqlite3_malloc(sizeof(*pCsr)); *ppCsr = (sqlite3_vtab_cursor*)pCsr; if( pCsr==0 ){ return SQLITE_NOMEM; } memset(pCsr, 0, sizeof(*pCsr)); pCsr->iId = ++pTab->iNextCsrid; ...
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
72,781,990,544,763,270,000,000,000,000,000,000,000
14
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
has_server_privilege_id_id(PG_FUNCTION_ARGS) { Oid roleid = PG_GETARG_OID(0); Oid serverid = PG_GETARG_OID(1); text *priv_type_text = PG_GETARG_TEXT_P(2); AclMode mode; AclResult aclresult; mode = convert_server_priv_string(priv_type_text); aclresult = pg_foreign_server_aclcheck(serverid, roleid, mode)...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
13,369,929,720,909,456,000,000,000,000,000,000,000
14
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...
static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) { /* If statement hasn't been prepared there is nothing to reset */ if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) { MYSQL *mysql= stmt->mysql; MYSQL_DATA *result= &stmt->result; /* Reset stored result set if so was requested o...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
50,404,584,742,086,590,000,000,000,000,000,000,000
66
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
static void opj_j2k_read_float64_to_int32(const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data; OPJ_UINT32 i; OPJ_FLOAT64 l_temp; for (i = 0; i < p_nb_elem; ++i) { o...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
251,025,779,949,446,000,000,000,000,000,000,000,000
16
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
void PSOutputDev::updateTextMat(GfxState *state) { double *mat; mat = state->getTextMat(); if (fabs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.00001) { // avoid a singular (or close-to-singular) matrix writePSFmt("[0.00001 0 0 0.00001 {0:.6g} {1:.6g}] Tm\n", mat[4], mat[5]); } else { writePSFmt("[{0:.6...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
88,481,237,935,064,440,000,000,000,000,000,000,000
12
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags) { X509 *signer, *x; STACK_OF(X509) *chain = NULL; X509_STORE_CTX ctx; int i, ret = 0; ret = ocsp_find_signer(&signer, bs, certs, st, flags); if (!ret) { OCSPerr(OCSP_F_OCSP_BASIC_VERIFY, OCSP_R_SIGNER_CE...
1
[ "CWE-310" ]
openssl
66e8211c0b1347970096e04b18aa52567c325200
188,546,323,467,855,220,000,000,000,000,000,000,000
86
Don't try and verify signatures if key is NULL (CVE-2013-0166) Add additional check to catch this in ASN1_item_verify too.
int ssl_parse_finished( ssl_context *ssl ) { int ret; unsigned int hash_len; unsigned char buf[36]; SSL_DEBUG_MSG( 2, ( "=> parse finished" ) ); ssl->handshake->calc_finished( ssl, buf, ssl->endpoint ^ 1 ); /* * Switch to our negotiated transform and session parameters for inbound *...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
85,053,869,785,019,040,000,000,000,000,000,000,000
92
Added max length checking of hostname
static void rpcproc_encode_null(void *rqstp, struct xdr_stream *xdr, void *obj) { }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
178,204,395,163,389,700,000,000,000,000,000,000,000
3
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...
_nc_outch(int ch) { putc(ch, stdout); return OK; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
247,268,648,513,572,530,000,000,000,000,000,000,000
5
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
coolkey_get_fixed_boolean_bit(CK_ATTRIBUTE_TYPE type) { switch(type) { case CKA_TOKEN: return 0x00000080; case CKA_PRIVATE: return 0x00000100; case CKA_MODIFIABLE: return 0x00000200; case CKA_DERIVE: return 0x00000400; case CKA_LOCAL: return 0x00000800...
0
[ "CWE-415" ]
OpenSC
c246f6f69a749d4f68626b40795a4f69168008f4
41,932,096,182,875,637,000,000,000,000,000,000,000
24
coolkey: Make sure the object ID is unique when filling list Thanks to oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
static int snd_msnd_activate_logical(int cfg, int num) { if (snd_msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) return -EIO; if (snd_msnd_write_cfg(cfg, IREG_ACTIVATE, LD_ACTIVATE)) return -EIO; return 0; }
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
60,467,276,816,452,300,000,000,000,000,000,000,000
8
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...
GF_Err ihdr_box_dump(GF_Box *a, FILE * trace) { GF_J2KImageHeaderBox *p = (GF_J2KImageHeaderBox *) a; gf_isom_box_dump_start(a, "ImageHeaderBox", trace); gf_fprintf(trace, "width=\"%d\" height=\"%d\" nb_comp=\"%d\" BPC=\"%d\" Compression=\"%d\" UnkC=\"%d\" IPR=\"%d\">\n", p->width, p->height, p->nb_comp, p->bpc, p-...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
21,779,901,013,245,927,000,000,000,000,000,000,000
8
fixed #2138
static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; struct bt_security sec; int len, err = 0; BT_DBG("sk %p", sk); if (level == SOL_L2CAP) return l2cap_sock_getsockopt_old(sock, optname, optval, optlen); if (leve...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
161,042,004,172,952,410,000,000,000,000,000,000,000
53
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
static void __kthread_bind(struct task_struct *p, unsigned int cpu, long state) { __kthread_bind_mask(p, cpumask_of(cpu), state); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
19,358,680,967,673,253,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
CImgDisplay& close() { return assign(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
247,297,300,337,654,450,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
CImg<T>& operator-=(const char *const expression) { return *this-=(+*this)._fill(expression,true,1,0,0,"operator-=",this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
50,810,093,318,259,450,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
size_t ad_setentryoff(struct adouble *ad, int eid, size_t off) { return ad->ad_eid[eid].ade_off = off; }
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
7,521,301,410,275,595,000,000,000,000,000,000,000
4
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
TEST(RegexMatchExpression, MalformedRegexAcceptedButMatchesNothing) { RegexMatchExpression regex; ASSERT_OK(regex.init("a", "[(*ACCEPT)", "")); ASSERT_FALSE(regex.matchesBSON(BSON("a" << ""))); ASSERT_FALSE(regex.matchesBSON(BSON("a" ...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
41,645,294,329,356,617,000,000,000,000,000,000,000
8
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a) { static const char *status_map[] = { "Granted.", "Granted with modifications.", "Rejected.", "Waiting.", "Revocation warning.", "Revoked." }; static struct status_map_st failure_map[] = { { TS_INFO_BAD_ALG, "unrecognized or unsupported ...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
159,286,450,805,132,980,000,000,000,000,000,000,000
67
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
collect_threads (gpointer key, gpointer value, gpointer user_data) { MonoInternalThread *thread = (MonoInternalThread*)value; struct wait_data *wait = (struct wait_data*)user_data; HANDLE handle; if (wait->num<MAXIMUM_WAIT_OBJECTS) { handle = OpenThread (THREAD_ALL_ACCESS, TRUE, thread->tid); if (handle == NUL...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
148,177,666,631,460,260,000,000,000,000,000,000,000
16
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
compile_gimmick_node(GimmickNode* node, regex_t* reg) { int r = 0; switch (node->type) { case GIMMICK_FAIL: r = add_op(reg, OP_FAIL); break; case GIMMICK_SAVE: r = add_op(reg, OP_SAVE_VAL); if (r != 0) return r; COP(reg)->save_val.type = node->detail_type; COP(reg)->save_val.id = nod...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
327,525,359,091,158,920,000,000,000,000,000,000,000
53
#207: Out-of-bounds write
Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int lineno, int col_offset, int end_lineno, int end_col_offset, PyArena *arena) { expr_ty p; if (!value) { PyErr_SetString(PyExc_ValueError, "field value is required for Attribute"); return NULL; ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
77,565,341,323,684,320,000,000,000,000,000,000,000
32
bpo-35766: Merge typed_ast back into CPython (GH-11645)
Status ExplicitShapes(InferenceContext* c) { std::vector<PartialTensorShape> shapes; TF_RETURN_IF_ERROR(c->GetAttr("shapes", &shapes)); if (shapes.empty()) { return errors::Internal("shapes attribute is empty"); } for (int i = 0, end = shapes.size(); i < end; ++i) { ShapeHandle output_shape; TF_RE...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
215,333,323,751,270,640,000,000,000,000,000,000,000
14
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
Output4bitPixel ( IN OUT EFI_IMAGE_INPUT *Image, IN UINT8 *Data, IN EFI_HII_IMAGE_PALETTE_INFO *PaletteInfo ) { UINT16 Xpos; UINT16 Ypos; UINTN OffsetY; EFI_GRAPHICS_O...
1
[ "CWE-787" ]
edk2
89910a39dcfd788057caa5d88b7e76e112d187b5
71,594,149,013,995,055,000,000,000,000,000,000,000
61
MdeModulePkg/HiiImage: Fix stack overflow when corrupted BMP is parsed (CVE-2018-12181) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135 For 4bit BMP, there are only 2^4 = 16 colors in the palette. But when a corrupted BMP contains more than 16 colors in the palette, today's implementation wrongly copies all ...
init_module(ngx_cycle_t *cycle) { if (passenger_main_conf.autogenerated.root_dir.len != 0 && !ngx_test_config) { if (first_start) { /* Ignore SIGPIPE now so that, if the watchdog fails to start, * Nginx doesn't get killed by the default SIGPIPE handler upon * writing th...
0
[ "CWE-362" ]
passenger
207870f5b7f5cc240587ab0977d6046782ae1d86
147,354,819,565,082,790,000,000,000,000,000,000,000
18
Fix privilege escalation in the Nginx module The vulnerability is exploitable with a non-standard passenger_instance_registry_dir, via a race condition where after a file was created, it was chowned via the path not the file descriptor. The chown entered the code in 2010, so Passenger 4 + 5 all affected.
static void ssl_calc_finished_tls_sha384( ssl_context *ssl, unsigned char *buf, int from ) { int len = 12; const char *sender; sha512_context sha512; unsigned char padbuf[48]; ssl_session *session = ssl->session_negotiate; if( !session ) session = ssl->session; SSL_...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
327,707,802,859,687,930,000,000,000,000,000,000,000
44
Added max length checking of hostname
static int config_props(AVFilterLink* link) { FPSContext *s = link->src->priv; link->time_base = av_inv_q(s->framerate); link->frame_rate= s->framerate; link->w = link->src->inputs[0]->w; link->h = link->src->inputs[0]->h; return 0; }
0
[ "CWE-399" ]
FFmpeg
cdd5df8189ff1537f7abe8defe971f80602cc2d2
68,742,963,815,201,230,000,000,000,000,000,000,000
11
avfilter/vf_fps: make sure the fifo is not empty before using it Fixes Ticket2905 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s) { struct ethhdr *eh = (void *) skb->data; if ((eh->h_dest[0] & 1) && !test_bit(bnep_mc_hash(eh->h_dest), (ulong *) &s->mc_filter)) return 1; return 0; }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
195,234,848,817,122,500,000,000,000,000,000,000,000
8
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
template<typename tf> CImg<floatT> get_isoline3d(CImgList<tf>& primitives, const float isovalue, const int size_x=-100, const int size_y=-100) const { if (_spectrum>1) throw CImgInstanceException(_cimg_instance "get_isoline3d(): In...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
8,553,677,177,183,849,000,000,000,000,000,000,000
22
Fix other issues in 'CImg<T>::load_bmp()'.
ar6000_unavail_ev(void *context, void *hif_handle) { struct ar6_softc *ar = (struct ar6_softc *)context; /* NULL out it's entry in the global list */ ar6000_devices[ar->arDeviceIndex] = NULL; ar6000_destroy(ar->arNetDev, 1); return 0; }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
284,805,343,909,326,050,000,000,000,000,000,000,000
9
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
void SoundTouch::flush() { int i; int numStillExpected; SAMPLETYPE *buff = new SAMPLETYPE[128 * channels]; // how many samples are still expected to output numStillExpected = (int)((long)(samplesExpectedOut + 0.5) - samplesOutput); if (numStillExpected < 0) numStillExpected = 0; ...
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
231,089,265,816,165,960,000,000,000,000,000,000,000
30
Replaced illegal-number-of-channel assertions with run-time exception
TEST_F(HttpConnectionManagerImplTest, RequestHeaderTimeoutCallbackDisarmsAndReturns408) { request_headers_timeout_ = std::chrono::milliseconds(10); setup(false, ""); Event::MockTimer* request_header_timer; EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { request_he...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
181,440,176,659,064,350,000,000,000,000,000,000,000
24
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int sctp_getsockopt_hmac_ident(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_endpoint *ep = sctp_sk(sk)->ep; struct sctp_hmacalgo __user *p = (void __user *)optval; struct sctp_hmac_algo_param *hmacs; __u16 data_len = 0; u32 num_idents; if (!ep->auth_enable) r...
0
[ "CWE-362", "CWE-703" ]
linux
2d45a02d0166caf2627fe91897c6ffc3b19514c4
312,713,132,688,020,670,000,000,000,000,000,000,000
29
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could l...
static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root, void *warn_ctx) { u64 isize; u32 nlink; int ret; int i; unsigned nofs_flag; struct extent_buffer *eb; struct btrfs_inode_item *inode_item; struct scrub_warning *swarn = warn_ctx; struct btrfs_fs_info *fs_info = swarn->dev->fs_info; ...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
88,433,920,295,886,980,000,000,000,000,000,000,000
92
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
int32_t ByteArray::CopyTo(int32_t dst_offset, ByteArray* array, int32_t src_offset, int32_t length) { assert(array); if (array->Size() < dst_offset + length) { // insufficient space return -1; } ByteVector b(COPY_BUFFER_SIZE); int32_t bytes_read = 0; int32_t index = 0; int3...
0
[ "CWE-119", "CWE-703" ]
sfntly
c56b85408bab232efd7e650f0994272a174e3b92
339,486,831,904,060,870,000,000,000,000,000,000,000
22
Add a bounds check to ByteArray::Get().
int cil_gen_filecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING | CIL_SYN_LIST | CIL_SYN_EMPTY_LIST, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); int...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
233,582,955,482,342,800,000,000,000,000,000,000,000
75
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 checkGrafana(const struct mg_connection *conn, const struct mg_request_info *request_info) { if(!strcmp(request_info->request_method, "OPTIONS") /* Allow for CORS inflight requests */ && !strncmp(request_info->uri, GRAFANA_URL, strlen(GRAFANA_URL))) /* Success */ return(1); return(0); }
0
[ "CWE-284", "CWE-335" ]
ntopng
30610bda60cbfc058f90a1c0a17d0e8f4516221a
175,461,127,913,440,450,000,000,000,000,000,000,000
10
Added code to randomize values returned by rand()
static void cypress_close(struct usb_serial_port *port) { struct cypress_private *priv = usb_get_serial_port_data(port); unsigned long flags; spin_lock_irqsave(&priv->lock, flags); kfifo_reset_out(&priv->write_fifo); spin_unlock_irqrestore(&priv->lock, flags); dev_dbg(&port->dev, "%s - stopping urbs\n", __func_...
0
[ "CWE-703" ]
linux
c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754
96,186,165,483,647,140,000,000,000,000,000,000,000
17
USB: cypress_m8: add endpoint sanity check An attack using missing endpoints exists. CVE-2016-3137 Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static void ceval(JF, js_Ast *fun, js_Ast *args) { int n = cargs(J, F, args); F->lightweight = 0; F->arguments = 1; if (n == 0) emit(J, F, OP_UNDEF); else while (n-- > 1) emit(J, F, OP_POP); emit(J, F, OP_EVAL); }
0
[ "CWE-703", "CWE-787" ]
mujs
df8559e7bdbc6065276e786217eeee70f28fce66
306,590,463,082,196,650,000,000,000,000,000,000,000
11
Bug 704749: Clear jump list after patching jump addresses. Since we can emit a statement multiple times when compiling try/finally we have to use a new patch list for each instance.
static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass) { lockdep_set_class_and_subclass(&dev->addr_list_lock, &vlan_netdev_addr_lock_key, subclass); netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, &subclass); }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
245,933,756,558,246,920,000,000,000,000,000,000,000
7
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
real_uptime(routerinfo_t *router, time_t now) { if (now < router->cache_info.published_on) return router->uptime; else return router->uptime + (now - router->cache_info.published_on); }
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
198,613,071,189,748,800,000,000,000,000,000,000,000
7
Don't give the Guard flag to relays without the CVE-2011-2768 fix
bool DL_Dxf::handleXData(DL_CreationInterface* creationInterface) { if (groupCode==1001) { creationInterface->addXDataApp(groupValue); return true; } else if (groupCode>=1000 && groupCode<=1009) { creationInterface->addXDataString(groupCode, groupValue); return true; } ...
0
[ "CWE-191" ]
qcad
1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8
111,116,290,263,120,570,000,000,000,000,000,000,000
24
check vertexIndex which might be -1 for broken DXF
xmlFreeElementTableEntry(void *elem, const xmlChar *name ATTRIBUTE_UNUSED) { xmlFreeElement((xmlElementPtr) elem); }
0
[ "CWE-416" ]
libxml2
652dd12a858989b14eed4e84e453059cd3ba340e
268,028,800,033,916,820,000,000,000,000,000,000,000
3
[CVE-2022-23308] Use-after-free of ID and IDREF attributes If a document is parsed with XML_PARSE_DTDVALID and without XML_PARSE_NOENT, the value of ID attributes has to be normalized after potentially expanding entities in xmlRemoveID. Otherwise, later calls to xmlGetID can return a pointer to previously freed memory...