func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
uint64_t php_mysqlnd_net_field_length_ll(const zend_uchar **packet) { register const zend_uchar *p = (zend_uchar *)*packet; if (*p < 251) { (*packet)++; return (uint64_t) *p; } switch (*p) { case 251: (*packet)++; return (uint64_t) MYSQLND_NULL_LENGTH; case 252: (*packet) += 3; return (uint64_...
0
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
61,246,706,935,008,150,000,000,000,000,000,000,000
24
Fix bug #81719: mysqlnd/pdo password buffer overflow
void MainWindow::onExternalTriggered(QAction *action) { LOG_DEBUG() << action->data().toString(); bool isExternal = !action->data().toString().isEmpty(); Settings.setPlayerExternal(action->data().toString()); MLT.stop(); bool ok = false; int screen = action->data().toInt(&ok); if (ok || acti...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
218,093,428,600,222,000,000,000,000,000,000,000,000
61
fix upgrade check is not using TLS correctly
static int sctp_getsockopt_delayed_ack_time(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_assoc_value params; struct sctp_association *asoc = NULL; struct sctp_sock *sp = sctp_sk(sk); if (len != sizeof(struct sctp_assoc_value)) return - EINVAL; if (c...
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
310,063,037,793,483,270,000,000,000,000,000,000,000
45
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
static int isunder(char *file, char *dir) { char *s1 = xabspath(dir, ABS_FILE), *s2 = xabspath(file, 0), *ss = s2; int rc = strstart(&ss, s2) && (!*ss || *ss=='/' || ss[-1]=='/'); free(s2); free(s1); return rc; }
1
[ "CWE-787" ]
toybox
6d4847934fc0fe47a3254ce6c0396d197a780cf4
97,427,692,132,315,700,000,000,000,000,000,000,000
10
Don't segfault if xabspath() returns null (spotted by Taolaw).
void LosslessScan::StartParseScan(class ByteStream *io,class Checksum *chk,class BufferCtrl *ctrl) { #if ACCUSOFT_CODE int i; FindComponentDimensions(); for(i = 0;i < m_ucCount;i++) { m_pDCDecoder[i] = m_pScan->DCHuffmanDecoderOf(i); } assert(ctrl->isLineBased()); m_pLineCtrl = dynamic_cast...
0
[ "CWE-119", "CWE-703" ]
libjpeg
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
271,612,712,915,975,070,000,000,000,000,000,000,000
23
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
proc_map_files_instantiate(struct inode *dir, struct dentry *dentry, struct task_struct *task, const void *ptr) { fmode_t mode = (fmode_t)(unsigned long)ptr; struct proc_inode *ei; struct inode *inode; inode = proc_pid_make_inode(dir->i_sb, task); if (!inode) return -ENOENT; ei = PROC_I(inode); ei->op....
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
238,305,311,459,191,570,000,000,000,000,000,000,000
28
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
kex_assemble_names(const char *def, char **list) { char *ret; if (list == NULL || *list == NULL || **list == '\0') { *list = strdup(def); return 0; } if (**list != '+') { return 0; } if ((ret = kex_names_cat(def, *list + 1)) == NULL) return SSH_ERR_ALLOC_FAIL; free(*list); *list = ret; return 0; }
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
155,418,487,139,294,300,000,000,000,000,000,000,000
18
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
bool run(OperationContext* txn, const string& dbname, BSONObj& cmdObj, int options, string& errmsg, BSONObjBuilder& result) { std::string userNameString; std::vector<RoleName> roles; Status status = auth::parseRolePossessionMan...
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
179,693,420,075,246,200,000,000,000,000,000,000,000
50
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
Status PySeqToTensor(PyObject* obj, DataType dtype, Tensor* ret) { ConverterState state; TF_RETURN_IF_ERROR(InferShapeAndType(obj, &state)); DataType requested_dtype = DT_INVALID; if (dtype != DT_INVALID) { requested_dtype = dtype; } // NOTE(josh11b): If don't successfully convert to the requested type,...
1
[ "CWE-20", "CWE-476" ]
tensorflow
5ac1b9e24ff6afc465756edf845d2e9660bd34bf
243,227,172,397,025,940,000,000,000,000,000,000,000
120
Fix segfault when attempting to convert string to float16. To make sure this gets fixed, add test for converting string to any numeric type. PiperOrigin-RevId: 286650886 Change-Id: I81f770ec2bbd33a863e8057ce198c679912fa8e0
void qmp_guest_suspend_ram(Error **err) { error_set(err, QERR_UNSUPPORTED); }
0
[ "CWE-264" ]
qemu
c689b4f1bac352dcfd6ecb9a1d45337de0f1de67
266,087,943,348,394,830,000,000,000,000,000,000,000
4
qga: set umask 0077 when daemonizing (CVE-2013-2007) The qemu guest agent creates a bunch of files with insecure permissions when started in daemon mode. For example: -rw-rw-rw- 1 root root /var/log/qemu-ga.log -rw-rw-rw- 1 root root /var/run/qga.state -rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log In a...
void bitbag_set_bit(struct bitbag *bb, int ndx) { int slot = ndx / BB_PER_SLOT_BITS; ndx %= BB_PER_SLOT_BITS; if (!bb->bits[slot]) { if (!(bb->bits[slot] = (uint32*)calloc(BB_PER_SLOT_INTS, 4))) out_of_memory("bitbag_set_bit"); } bb->bits[slot][ndx/32] |= 1u << (ndx % 32); }
0
[ "CWE-59" ]
rsync
4cad402ea8a91031f86c53961d78bb7f4f174790
101,255,370,090,509,050,000,000,000,000,000,000,000
12
Receiver now rejects invalid filenames in filelist. If the receiver gets a filename with a leading slash (w/o --relative) and/or a filename with an embedded ".." dir in the path, it dies with an error (rather than continuing). Those invalid paths should never happen in reality, so just reject someone trying to pull a ...
static void free_buffer (guchar *pixels, gpointer data) { g_free (pixels); }
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
20,325,650,454,645,390,000,000,000,000,000,000,000
4
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
static int srpt_get_u64_x(char *buffer, struct kernel_param *kp) { return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
143,976,323,430,471,700,000,000,000,000,000,000,000
4
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
write_from_file(int sock, char *file) { FILE *fd; int c; char buf[1]; fd = fopen(file, "r"); if (fd != NULL) { while ((c = fgetc(fd)) != EOF) { buf[0] = c; write(sock, buf, 1); } fclose(fd); } }
0
[ "CWE-119" ]
w3m
ba9d78faeba9024c3e8840579c3b0e959ae2cb0f
223,803,513,274,574,230,000,000,000,000,000,000,000
14
Prevent global-buffer-overflow in parseURL() Bug-Debian: https://github.com/tats/w3m/issues/41
static bool bpf_map_key_poisoned(const struct bpf_insn_aux_data *aux) { return aux->map_key_state & BPF_MAP_KEY_POISON; }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
124,433,609,790,897,610,000,000,000,000,000,000,000
4
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
**/ CImg<T>& boxfilter(const float boxsize, const int order, const char axis='x', const bool boundary_conditions=true, const unsigned int nb_iter=1) { if (is_empty() || !boxsize || (boxsize<=1 && !order)) return *this; const char naxis = cimg::lowercase(...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
62,842,530,976,800,510,000,000,000,000,000,000,000
32
Fix other issues in 'CImg<T>::load_bmp()'.
String *Item_copy_string::val_str(String *str) { // Item_copy_string is used without fix_fields call if (null_value) return (String*) 0; return &str_value; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
310,439,494,379,997,170,000,000,000,000,000,000,000
7
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
static unsigned char asn1_ulong_decode(struct asn1_ctx *ctx, unsigned char *eoc, unsigned long *integer) { unsigned char ch; unsigned int len; if (!asn1_octet_decode(ctx, &ch)) return 0; *integer = ch; if (ch == 0) len = 0; else len = 1; while (ctx->pointer < eoc) { if (++len > size...
0
[ "CWE-119" ]
linux-2.6
ddb2c43594f22843e9f3153da151deaba1a834c5
97,834,245,860,993,130,000,000,000,000,000,000,000
28
asn1: additional sanity checking during BER decoding - Don't trust a length which is greater than the working buffer. An invalid length could cause overflow when calculating buffer size for decoding oid. - An oid length of zero is invalid and allows for an off-by-one error when decoding oid because the first su...
nfsd4_encode_stateid(struct xdr_stream *xdr, stateid_t *sid) { __be32 *p; p = xdr_reserve_space(xdr, sizeof(stateid_t)); if (!p) return nfserr_resource; *p++ = cpu_to_be32(sid->si_generation); p = xdr_encode_opaque_fixed(p, &sid->si_opaque, sizeof(stateid_opaque_t)); return 0; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
18,623,504,201,712,086,000,000,000,000,000,000,000
12
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
BOOL update_write_scrblt_order(wStream* s, ORDER_INFO* orderInfo, const SCRBLT_ORDER* scrblt) { if (!Stream_EnsureRemainingCapacity(s, update_approximate_scrblt_order(orderInfo, scrblt))) return FALSE; orderInfo->fieldFlags = 0; orderInfo->fieldFlags |= ORDER_FIELD_01; update_write_coord(s, scrblt->nLeftRect); ...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
52,139,623,632,556,475,000,000,000,000,000,000,000
22
Fixed #6013: Check new length is > 0
void blk_mq_rq_timed_out(struct request *req, bool reserved) { struct blk_mq_ops *ops = req->q->mq_ops; enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; /* * We know that complete is set at this point. If STARTED isn't set * anymore, then the request isn't active and the "timeout" should * just be ignored. ...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
299,045,156,360,910,860,000,000,000,000,000,000,000
35
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static MagickBooleanType IsPICT(const unsigned char *magick,const size_t length) { if (length < 12) return(MagickFalse); /* Embedded OLE2 macintosh have "PICT" instead of 512 platform header. */ if (memcmp(magick,"PICT",4) == 0) return(MagickTrue); if (length < 528) return(MagickFalse); if (...
0
[ "CWE-190", "CWE-189", "CWE-703" ]
ImageMagick
0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734
328,165,326,310,765,160,000,000,000,000,000,000,000
15
static inline void hci_discovery_filter_clear(struct hci_dev *hdev) { hdev->discovery.result_filtering = false; hdev->discovery.report_invalid_rssi = true; hdev->discovery.rssi = HCI_RSSI_INVALID; hdev->discovery.uuid_count = 0; kfree(hdev->discovery.uuids); hdev->discovery.uuids = NULL; hdev->discovery.scan_sta...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
133,816,612,353,058,540,000,000,000,000,000,000,000
11
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>
static FILE *msg_cache_put(struct ImapData *idata, struct Header *h) { if (!idata || !h) return NULL; idata->bcache = msg_cache_open(idata); char id[64]; snprintf(id, sizeof(id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid); return mutt_bcache_put(idata->bcache, id); }
0
[ "CWE-119", "CWE-787" ]
neomutt
1b0f0d0988e6df4e32e9f4bf8780846ea95d4485
91,441,362,937,254,200,000,000,000,000,000,000,000
10
Don't overflow stack buffer in msg_parse_fetch
String *Item::check_well_formed_result(String *str, bool send_error) { /* Check whether we got a well-formed string */ CHARSET_INFO *cs= str->charset(); int well_formed_error; uint wlen= cs->cset->well_formed_len(cs, str->ptr(), str->ptr() + str->length(), ...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
313,711,046,389,788,900,000,000,000,000,000,000,000
37
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
TEST(ExistsMatchExpression, MatchesScalar) { ExistsMatchExpression exists; ASSERT(exists.init("a").isOK()); ASSERT(exists.matchesBSON(BSON("a" << 1), NULL)); ASSERT(exists.matchesBSON(BSON("a" << BSONNULL), NULL)); ASSERT(!exists.matchesBSON(BSON("b" << 1), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
52,204,341,910,225,490,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
bool test_unpriv_remount(int mount_flags, int remount_flags, int invalid_flags) { pid_t child; child = fork(); if (child == -1) { die("fork failed: %s\n", strerror(errno)); } if (child != 0) { /* parent */ pid_t pid; int status; pid = waitpid(child, &status, 0); if (pid == -1) { die("waitpid faile...
0
[ "CWE-269" ]
user-namespace
db181ce011e3c033328608299cd6fac06ea50130
19,821,905,792,685,758,000,000,000,000,000,000,000
60
mnt: Add tests for unprivileged remount cases that have found to be faulty Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Upon r...
static struct descriptor *find_branch_descriptor(struct descriptor *d, int z) { int b, key; b = (le16_to_cpu(d->control) & DESCRIPTOR_BRANCH_ALWAYS) >> 2; key = (le16_to_cpu(d->control) & DESCRIPTOR_KEY_IMMEDIATE) >> 8; /* figure out which descriptor the branch address goes in */ if (z == 2 && (b == 3 || key =...
0
[ "CWE-399" ]
linux-2.6
8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54
34,822,051,730,766,600,000,000,000,000,000,000,000
13
firewire: ohci: handle receive packets with a data length of zero Queueing to receive an ISO packet with a payload length of zero silently does nothing in dualbuffer mode, and crashes the kernel in packet-per-buffer mode. Return an error in dualbuffer mode, because the DMA controller won't let us do what we want, and...
static struct dentry *ext2_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) { return generic_fh_to_dentry(sb, fid, fh_len, fh_type, ext2_nfs_get_inode); }
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
109,763,823,159,415,610,000,000,000,000,000,000,000
6
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
static int get_options(int *argc, char ***argv) { int ho_error; MYSQL_PARAMETERS *mysql_params= mysql_get_parameters(); opt_max_allowed_packet= *mysql_params->p_max_allowed_packet; opt_net_buffer_length= *mysql_params->p_net_buffer_length; md_result_file= stdout; my_getopt_use_args_separator= TRUE; if (...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
36,226,187,386,238,480,000,000,000,000,000,000,000
99
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
static struct dst_entry *eafnosupport_ipv6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6, const struct in6_addr *final_dst) { return ERR_PTR(-EAFNOSUPPORT); }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
152,496,239,477,058,520,000,000,000,000,000,000,000
7
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
making_children () { if (already_making_children) return; already_making_children = 1; start_pipeline (); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
737,636,465,036,655,100,000,000,000,000,000,000
8
bash-4.4-rc2 release
void jpc_restore_t2state(jpc_enc_t *enc) { jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_enc_tile_t *tile; int prcno; jpc_enc_prc_t *prc; tile = enc->curtil...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
211,115,087,980,290,800,000,000,000,000,000,000,000
46
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...
nfs4_acl_new(int n) { struct nfs4_acl *acl; acl = kmalloc(sizeof(*acl) + n*sizeof(struct nfs4_ace), GFP_KERNEL); if (acl == NULL) return NULL; acl->naces = 0; return acl; }
0
[ "CWE-119" ]
linux-2.6
91b80969ba466ba4b915a4a1d03add8c297add3f
130,926,391,402,208,480,000,000,000,000,000,000,000
10
nfsd: fix buffer overrun decoding NFSv4 acl The array we kmalloc() here is not large enough. Thanks to Johann Dahm and David Richter for bug report and testing. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: David Richter <richterd@citi.umich.edu> Tested-by: Johann Dahm <jdahm@umich.edu>
xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, const char *xsd, xmlSchemaValidCtxtPtr ctxt, int options ATTRIBUTE_UNUSED) { if (reader == NULL) return(-1); if ((xsd != NULL) && (ctxt != NULL)) return(-1); if (((xsd != NULL) || (ctxt != NULL)) && ((reader->mo...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
11,557,406,324,525,683,000,000,000,000,000,000,000
104
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.
int SSL_CTX_SRP_CTX_init(struct ssl_ctx_st *ctx) { if (ctx == NULL) return 0; ctx->srp_ctx.SRP_cb_arg = NULL; /* set client Hello login callback */ ctx->srp_ctx.TLS_ext_srp_username_callback = NULL; /* set SRP N/g param callback for verification */ ctx->srp_ctx.SRP_verify_param_callback = NULL; /* set SRP cl...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
143,071,412,973,823,800,000,000,000,000,000,000,000
29
Add SRP support.
void BinaryProtocolReader::readI32(int32_t& i32) { i32 = in_.readBE<int32_t>(); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
311,497,458,836,306,760,000,000,000,000,000,000,000
3
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static int tipc_crypto_key_attach(struct tipc_crypto *c, struct tipc_aead *aead, u8 pos, bool master_key) { struct tipc_key key; int rc = -EBUSY; u8 new_key; spin_lock_bh(&c->lock); key = c->key; if (master_key) { new_key = KEY_MASTER; goto attach; } if (key.active && key.passive) goto exit; ...
0
[ "CWE-20" ]
linux
fa40d9734a57bcbfa79a280189799f76c88f7bb0
39,739,476,388,866,226,000,000,000,000,000,000,000
54
tipc: fix size validations for the MSG_CRYPTO type The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages to receive keys from other nodes in the cluster in order to decrypt any further messages from them. This patch verifies that any supplied sizes in the message body are valid for the received message...
read_16 (IOBUF inp) { unsigned short a; a = iobuf_get_noeof (inp) << 8; a |= iobuf_get_noeof (inp); return a; }
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
44,653,524,803,294,290,000,000,000,000,000,000,000
7
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static size_t get_num_req_pgts(struct user_ta_ctx *utc, vaddr_t *begin, vaddr_t *end) { vaddr_t b; vaddr_t e; if (TAILQ_EMPTY(&utc->vm_info->regions)) { core_mmu_get_user_va_range(&b, NULL); e = b; } else { struct vm_region *r; b = TAILQ_FIRST(&utc->vm_info->regions)->va; r = TAILQ_LAST(&utc->...
0
[ "CWE-20", "CWE-787" ]
optee_os
95f36d661f2b75887772ea28baaad904bde96970
124,018,765,921,348,800,000,000,000,000,000,000,000
25
core: tee_mmu_check_access_rights() check all pages Prior to this patch tee_mmu_check_access_rights() checks an address in each page of a supplied range. If both the start and length of that range is unaligned the last page in the range is sometimes not checked. With this patch the first address of each page in the ra...
void mutt_seqset_iterator_free (SEQSET_ITERATOR **p_iter) { SEQSET_ITERATOR *iter; if (!p_iter || !*p_iter) return; iter = *p_iter; FREE (&iter->full_seqset); FREE (p_iter); /* __FREE_CHECKED__ */ }
0
[ "CWE-125" ]
mutt
7c4779ac24d2fb68a2a47b58c7904118f40965d5
208,763,079,449,403,540,000,000,000,000,000,000,000
11
Fix seqset iterator when it ends in a comma. If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately.
static inline int matcher_run(const struct cli_matcher *root, const unsigned char *buffer, uint32_t length, const char **virname, struct cli_ac_data *mdata, uint32_t offset, const struct cli_target_info *tinfo, cli_file_t ftype, struct cli_matched_type **ftoffset, ...
0
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
39,607,072,609,513,887,000,000,000,000,000,000,000
143
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
static int rtsp_parse_request(HTTPContext *c) { const char *p, *p1, *p2; char cmd[32]; char url[1024]; char protocol[32]; char line[1024]; int len; RTSPMessageHeader header1 = { 0 }, *header = &header1; c->buffer_ptr[0] = '\0'; p = c->buffer; get_word(cmd, sizeof(cmd), &p); ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
219,640,637,379,386,500,000,000,000,000,000,000,000
88
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void MP4_FreeBox_cprt( MP4_Box_t *p_box ) { FREENULL( p_box->data.p_cprt->psz_notice ); }
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
223,318,774,309,588,340,000,000,000,000,000,000,000
4
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 ...
int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type) { if (vb2_fileio_is_active(q)) { dprintk(1, "file io in progress\n"); return -EBUSY; } return vb2_core_streamon(q, type); }
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
227,373,743,644,762,530,000,000,000,000,000,000,000
8
[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...
void ehci_reset(void *opaque) { EHCIState *s = opaque; int i; USBDevice *devs[NB_PORTS]; trace_usb_ehci_reset(); /* * Do the detach before touching portsc, so that it correctly gets send to * us or to our companion based on PORTSC_POWNER before the reset. */ for(i = 0; i < NB_PO...
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
312,179,313,820,884,830,000,000,000,000,000,000,000
47
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
bool CanOptimize(const NodeDef& node) const { DataType dtype = GetDataTypeFromAttr(node, "T"); if (!IsSupported(node.op(), dtype)) { return false; } if (IsInPreserveSet(node)) { return false; } if (!NodeIsOnCpu(node)) { return false; } if (NodeIsAlreadyFused(node)) { ...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
222,759,406,824,418,050,000,000,000,000,000,000,000
17
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
name_is_present (FrWindow *window, const char *current_dir, const char *new_name, char **reason) { gboolean retval = FALSE; int i; char *new_filename; int new_filename_l; *reason = NULL; new_filename = g_build_filename (current_dir, new_name, NULL); new_filename_l = strlen ...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
278,862,612,673,207,450,000,000,000,000,000,000,000
38
libarchive: sanitize filenames before extracting
static int tipc_nl_compat_node_dump(struct tipc_nl_compat_msg *msg, struct nlattr **attrs) { struct tipc_node_info node_info; struct nlattr *node[TIPC_NLA_NODE_MAX + 1]; int err; if (!attrs[TIPC_NLA_NODE]) return -EINVAL; err = nla_parse_nested(node, TIPC_NLA_NODE_MAX, attrs[TIPC_NLA_NODE], N...
0
[ "CWE-200" ]
net
5d2be1422e02ccd697ccfcd45c85b4a26e6178e2
233,496,298,097,753,000,000,000,000,000,000,000,000
21
tipc: fix an infoleak in tipc_nl_compat_link_dump link_info.str is a char array of size 60. Memory after the NULL byte is not initialized. Sending the whole object out can cause a leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
static long region_chg(struct resv_map *resv, long f, long t, long *out_regions_needed) { long chg = 0; spin_lock(&resv->lock); /* Count how many hugepages in this range are NOT represented. */ chg = add_reservation_in_range(resv, f, t, NULL, NULL, out_regions_needed); if (*out_regions_neede...
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
167,004,638,701,032,530,000,000,000,000,000,000,000
22
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
int RGWPutMetadataAccount::init_processing() { /* First, go to the base class. At the time of writing the method was * responsible only for initializing the quota. This isn't necessary * here as we are touching metadata only. I'm putting this call only * for the future. */ op_ret = RGWOp::init_processing()...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
60,879,129,467,863,020,000,000,000,000,000,000,000
48
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static inline Quantum GetPixelChannel(const Image *magick_restrict image, const PixelChannel channel,const Quantum *magick_restrict pixel) { if (image->channel_map[channel].traits == UndefinedPixelTrait) return((Quantum) 0); return(pixel[image->channel_map[channel].offset]); }
1
[ "CWE-20", "CWE-125" ]
ImageMagick
8187d2d8fd010d2d6b1a3a8edd935beec404dddc
152,634,049,806,887,420,000,000,000,000,000,000,000
7
https://github.com/ImageMagick/ImageMagick/issues/1610
void arm_iommu_detach_device(struct device *dev) { struct dma_iommu_mapping *mapping; mapping = to_dma_iommu_mapping(dev); if (!mapping) { dev_warn(dev, "Not attached\n"); return; } iommu_detach_device(mapping->domain, dev); kref_put(&mapping->kref, release_iommu_mapping); dev->archdata.mapping = NULL; se...
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
153,302,515,568,865,110,000,000,000,000,000,000,000
17
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
void Inspect::operator()(Compound_Selector_Ptr s) { for (size_t i = 0, L = s->length(); i < L; ++i) { (*s)[i]->perform(this); } if (s->has_line_break()) { if (output_style() != COMPACT) { append_optional_linefeed(); } } }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
28,088,596,297,278,690,000,000,000,000,000,000,000
11
Fix possible bug with handling empty reference combinators Fixes #2665
static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, int closing, int tx_ring) { struct pgv *pg_vec = NULL; struct packet_sock *po = pkt_sk(sk); unsigned long *rx_owner_map = NULL; int was_running, order = 0; struct packet_ring_buffer *rb; struct sk_buff_head *rb_queue; __be16 num; int err;...
0
[ "CWE-787" ]
linux
acf69c946233259ab4d64f8869d4037a198c7f06
280,136,327,965,089,300,000,000,000,000,000,000,000
165
net/packet: fix overflow in tpacket_rcv Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virt...
string_to_key(char_u *arg, int multi_byte) { if (*arg == '<') return find_key_option(arg + 1, TRUE); if (*arg == '^') return Ctrl_chr(arg[1]); if (multi_byte) return PTR2CHAR(arg); return *arg; }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
283,485,317,461,832,280,000,000,000,000,000,000,000
10
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
ReturnCode_t DataWriterImpl::unregister_instance( void* instance, const InstanceHandle_t& handle, bool dispose) { /// Preconditions if (writer_ == nullptr) { return ReturnCode_t::RETCODE_NOT_ENABLED; } if (instance == nullptr) { logError(PUBLISHER, "Data ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
130,863,936,173,173,440,000,000,000,000,000,000,000
68
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
GF_Err hmhd_box_size(GF_Box *s) { GF_HintMediaHeaderBox *ptr = (GF_HintMediaHeaderBox *)s; ptr->size += 16; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
312,031,190,060,345,560,000,000,000,000,000,000,000
6
fixed #1587
static void perf_pmu_nop_void(struct pmu *pmu) { }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
208,492,807,889,050,070,000,000,000,000,000,000,000
3
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) { int ret; if (tr->stop_count) return; WARN_ON_ONCE(!irqs_disabled()); if (!tr->allocated_snapshot) { /* Only the nop tracer should hit this when disabling */ WARN_ON_ONCE(tr->current_trace != &nop_trace); return; } arch_spi...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
116,698,367,186,934,200,000,000,000,000,000,000,000
34
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
void r_pkcs7_free_signeddata (RPKCS7SignedData* sd) { if (sd) { r_pkcs7_free_digestalgorithmidentifier (&sd->digestAlgorithms); r_pkcs7_free_contentinfo (&sd->contentInfo); r_pkcs7_free_extendedcertificatesandcertificates (&sd->certificates); r_pkcs7_free_certificaterevocationlists (&sd->crls); r_pkcs7_free_...
0
[ "CWE-476" ]
radare2
7ab66cca5bbdf6cb2d69339ef4f513d95e532dbf
216,329,745,974,964,700,000,000,000,000,000,000,000
10
Fix #7152 - Null deref in cms
pdu_store_window_scale_option(guint8 ws, struct tcp_analysis *tcpd) { if (tcpd) tcpd->fwd->win_scale=ws; }
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
78,205,581,512,487,740,000,000,000,000,000,000,000
5
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
int rsa_pkcs1_encrypt( rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, size_t ilen, const unsigned char *input, unsigned char *output ) { switch( ctx->padding ) ...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
296,623,713,561,714,870,000,000,000,000,000,000,000
23
RSA blinding on CRT operations to counter timing attacks
static int io_iopoll_check(struct io_ring_ctx *ctx, long min) { unsigned int nr_events = 0; int ret = 0; /* * We disallow the app entering submit/complete with polling, but we * still need to lock the ring to prevent racing with polled issue * that got punted to a workqueue. */ mutex_lock(&ctx->uring_lock)...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
247,798,219,764,292,200,000,000,000,000,000,000,000
53
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
_dbus_auth_ref (DBusAuth *auth) { _dbus_assert (auth != NULL); auth->refcount += 1; return auth; }
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
177,398,752,700,337,200,000,000,000,000,000,000,000
8
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
test_bson_validate (void) { char filename[64]; size_t offset; bson_t *b; int i; bson_error_t error; for (i = 1; i <= 38; i++) { bson_snprintf (filename, sizeof filename, "test%u.bson", i); b = get_bson (filename); BSON_ASSERT (bson_validate (b, BSON_VALIDATE_NONE, &offset)); b...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
19,349,136,931,692,260,000,000,000,000,000,000,000
181
CDRIVER-2269 Check for zero string length in codewscope
long long ass_step_sub(ASS_Track *track, long long now, int movement) { int i; ASS_Event *best = NULL; long long target = now; int direction = (movement > 0 ? 1 : -1) * !!movement; if (track->n_events == 0) return 0; do { ASS_Event *closest = NULL; long long closest_tim...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
254,996,015,607,362,800,000,000,000,000,000,000,000
49
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...
static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk, struct sk_buff *skb) { struct rtable *rt; struct flowi4 fl4 = { .flowi4_oif = skb_rtable(skb)->rt_iif, .daddr = ip_hdr(skb)->saddr, .saddr = ip_hdr(skb)->daddr, .flowi4_tos = RT_CONN_FLAGS(sk), .flowi4_proto = sk->sk_protoc...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
187,398,094,827,242,600,000,000,000,000,000,000,000
23
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...
static bool split_dfs_path(TALLOC_CTX *ctx, const char *nodepath, char **pp_server, char **pp_share, char **pp_extrapath) { char *p, *q; char *path; *pp_server = NULL; *pp_share = NULL; *pp_extrapath = NULL; path = talloc_strdup(ctx, nodepath); if (!path) { goto fail; } if ( path[0] != '\\...
0
[ "CWE-20" ]
samba
d724f835acb9f4886c0001af32cd325dbbf1f895
204,714,452,015,254,180,000,000,000,000,000,000,000
62
CVE-2015-5296: s3:libsmb: force signing when requiring encryption in do_connect() BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
find_gconf_key (gpointer key, gpointer value, gpointer user_data) { FindKeyInfo *info = (FindKeyInfo *) user_data; if (!info->found && !strcmp ((char *) key, info->key)) info->found = TRUE; }
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
263,068,114,389,486,600,000,000,000,000,000,000,000
7
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc, u16 qid, u16 sqsize) { struct nvmet_fc_tgt_queue *queue; unsigned long flags; int ret; if (qid > NVMET_NR_QUEUES) return NULL; queue = kzalloc((sizeof(*queue) + (sizeof(struct nvmet_fc_fcp_iod) * sqsize)), GFP_KERNEL); if (!queue) retu...
0
[ "CWE-119", "CWE-787" ]
linux
0c319d3a144d4b8f1ea2047fd614d2149b68f889
150,853,940,264,320,230,000,000,000,000,000,000,000
63
nvmet-fc: ensure target queue id within range. When searching for queue id's ensure they are within the expected range. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
static int ieee80211_config_default_key(struct wiphy *wiphy, struct net_device *dev, u8 key_idx, bool uni, bool multi) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); ieee80211_set_default_key(sdata, key_idx, uni, multi); return 0; }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
181,221,219,170,269,200,000,000,000,000,000,000,000
11
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
void OSD::tick() { assert(osd_lock.is_locked()); dout(10) << "tick" << dendl; if (is_active() || is_waiting_for_healthy()) { maybe_update_heartbeat_peers(); } if (is_waiting_for_healthy()) { start_boot(); } else if (is_preboot() && waiting_for_luminous_mons && monc->monmap.get_required...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
215,263,182,828,518,070,000,000,000,000,000,000,000
23
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
ofputil_protocol_set_tid(enum ofputil_protocol protocol, bool enable) { switch (protocol) { case OFPUTIL_P_OF10_STD: case OFPUTIL_P_OF10_STD_TID: return enable ? OFPUTIL_P_OF10_STD_TID : OFPUTIL_P_OF10_STD; case OFPUTIL_P_OF10_NXM: case OFPUTIL_P_OF10_NXM_TID: return enable ? OFPUTI...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
125,798,821,639,851,120,000,000,000,000,000,000,000
33
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>
MagickExport Image *InverseFourierTransformImage(const Image *magnitude_image, const Image *phase_image,const MagickBooleanType modulus, ExceptionInfo *exception) { Image *fourier_image; assert(magnitude_image != (Image *) NULL); assert(magnitude_image->signature == MagickCoreSignature); if (magnitude_...
0
[ "CWE-125" ]
ImageMagick6
f6ffc702c6eecd963587273a429dcd608c648984
259,077,846,025,315,000,000,000,000,000,000,000,000
123
https://github.com/ImageMagick/ImageMagick/issues/1588
template<typename t> CImg<T>& operator%=(const CImg<t>& img) { const ulongT siz = size(), isiz = img.size(); if (siz && isiz) { if (is_overlapped(img)) return *this%=+img; T *ptrd = _data, *const ptre = _data + siz; if (siz>isiz) for (ulongT n = siz/isiz; n; --n) fo...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
198,129,965,512,522,140,000,000,000,000,000,000,000
12
Fix other issues in 'CImg<T>::load_bmp()'.
\param filename Filename, as a C-string. \return \c true if the file format supports multiple images, \c false otherwise. **/ static bool is_saveable(const char *const filename) { const char *const ext = cimg::split_filename(filename); if (!cimg::strcasecmp(ext,"cimgz") || #ifdef cimg_...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
239,342,802,332,273,920,000,000,000,000,000,000,000
34
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
FLAC__bool process_subframe_( FLAC__StreamEncoder *encoder, unsigned min_partition_order, unsigned max_partition_order, const FLAC__FrameHeader *frame_header, unsigned subframe_bps, const FLAC__int32 integer_signal[], FLAC__Subframe *subframe[2], FLAC__EntropyCodingMethod_PartitionedRiceContents *partitioned_ri...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
96,823,990,904,028,350,000,000,000,000,000,000,000
234
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
date_strftime_internal(int argc, VALUE *argv, VALUE self, const char *default_fmt, void (*func)(VALUE, struct tmx *)) { VALUE vfmt; const char *fmt; long len; char buffer[SMALLBUF], *buf = buffer; struct tmx tmx; VALUE str; rb_scan_args(argc, argv, "01", &vfmt); if (a...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
337,972,060,959,107,200,000,000,000,000,000,000,000
52
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
void ADDCALL sass_option_push_include_path(struct Sass_Options* options, const char* path) { struct string_list* include_path = (struct string_list*) calloc(1, sizeof(struct string_list)); if (include_path == 0) return; include_path->string = path ? sass_copy_c_string(path) : 0; struct string_list*...
0
[ "CWE-125" ]
libsass
8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae
138,227,182,193,439,730,000,000,000,000,000,000,000
16
Optimize line_begin/end search in `handle_error` There is no need to advance by UTF-8 code points when searching for an ASCII character, because UTF-8 is a prefix-free encoding.
static void out_string(conn *c, const char *str) { size_t len; assert(c != NULL); if (c->noreply) { if (settings.verbose > 1) fprintf(stderr, ">%d NOREPLY %s\n", c->sfd, str); c->noreply = false; conn_set_state(c, conn_new_cmd); return; } if (settings.v...
0
[ "CWE-20" ]
memcached
d9cd01ede97f4145af9781d448c62a3318952719
243,733,363,984,315,700,000,000,000,000,000,000,000
32
Use strncmp when checking for large ascii multigets.
void __init swiotlb_adjust_size(unsigned long size) { /* * If swiotlb parameter has not been specified, give a chance to * architectures such as those supporting memory encryption to * adjust/expand SWIOTLB size for their use. */ if (default_nslabs != IO_TLB_DEFAULT_SIZE >> IO_TLB_SHIFT) return; size = ALI...
0
[ "CWE-200", "CWE-401" ]
linux
aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13
69,717,296,118,269,260,000,000,000,000,000,000,000
13
swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked h...
DEFUN (no_neighbor_capability_dynamic, no_neighbor_capability_dynamic_cmd, NO_NEIGHBOR_CMD2 "capability dynamic", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" "Advertise dynamic capability to this neighbor\n") { return peer_flag_unset_vty...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
286,441,301,860,561,270,000,000,000,000,000,000,000
11
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row) { if (stmt->data_cursor) { *row= (uchar *) stmt->data_cursor->data; stmt->data_cursor= stmt->data_cursor->next; return 0; } *row= 0; return MYSQL_NO_DATA; }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
2,226,606,111,143,346,000,000,000,000,000,000,000
11
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 int __init hugepage_init(void) { int err; struct kobject *hugepage_kobj; if (!has_transparent_hugepage()) { transparent_hugepage_flags = 0; return -EINVAL; } /* * hugepages can't be allocated by the buddy allocator */ MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER >= MAX_ORDER); /* * we use page->mapping ...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
149,908,585,095,070,000,000,000,000,000,000,000,000
61
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
PeerListWidget::~PeerListWidget() { saveSettings(); delete m_proxyModel; delete m_listModel; delete m_listDelegate; if (m_resolver) delete m_resolver; delete m_copyHotkey; }
0
[ "CWE-20", "CWE-79" ]
qBittorrent
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
172,524,187,794,463,620,000,000,000,000,000,000,000
10
Add Utils::String::toHtmlEscaped
static int nl80211_stop_sched_scan(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_sched_scan_request *req; struct cfg80211_registered_device *rdev = info->user_ptr[0]; u64 cookie; if (!rdev->wiphy.max_sched_scan_reqs || !rdev->ops->sched_scan_stop) return -EOPNOTSUPP; if (info->attrs[NL8...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
314,564,735,160,728,980,000,000,000,000,000,000,000
25
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
unzzip_list (int argc, char ** argv, int verbose) { int argn; ZZIP_MEM_DISK* disk; if (argc == 1) { printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); return EXIT_OK; /* better provide an archive argument */ } disk = zzip_mem_disk_open (argv[1]); if (! dis...
1
[ "CWE-772" ]
zziplib
83a2da55922f67e07f22048ac9671a44cc0d35c4
60,700,526,580,798,540,000,000,000,000,000,000,000
90
ensure disk_close to avoid mem-leak #40
static void mov_free(AVFormatContext *s) { MOVMuxContext *mov = s->priv_data; int i; if (mov->chapter_track) { if (mov->tracks[mov->chapter_track].par) av_freep(&mov->tracks[mov->chapter_track].par->extradata); av_freep(&mov->tracks[mov->chapter_track].par); } for (i = ...
0
[ "CWE-125" ]
FFmpeg
95556e27e2c1d56d9e18f5db34d6f756f3011148
5,187,394,558,543,754,400,000,000,000,000,000,000
28
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void ucma_copy_conn_event(struct rdma_ucm_conn_param *dst, struct rdma_conn_param *src) { if (src->private_data_len) memcpy(dst->private_data, src->private_data, src->private_data_len); dst->private_data_len = src->private_data_len; dst->responder_resources =src->responder_resources; dst->ini...
0
[ "CWE-416", "CWE-703" ]
linux
cb2595c1393b4a5211534e6f0a0fbad369e21ad8
117,015,862,407,442,670,000,000,000,000,000,000,000
15
infiniband: fix a possible use-after-free bug ucma_process_join() will free the new allocated "mc" struct, if there is any error after that, especially the copy_to_user(). But in parallel, ucma_leave_multicast() could find this "mc" through idr_find() before ucma_process_join() frees it, since it is already published...
void PackLinuxElf32::unpack(OutputFile *fo) { if (e_phoff != sizeof(Elf32_Ehdr)) {// Phdrs not contiguous with Ehdr throwCantUnpack("bad e_phoff"); } unsigned const c_phnum = get_te16(&ehdri.e_phnum); unsigned old_data_off = 0; unsigned old_data_len = 0; unsigned old_dtinit = 0; unsi...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
302,398,973,814,585,430,000,000,000,000,000,000,000
319
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
static void bpf_iter_fini_hash_map(void *priv_data) { struct bpf_iter_seq_hash_map_info *seq_info = priv_data; kfree(seq_info->percpu_value_buf); }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
290,621,357,956,093,100,000,000,000,000,000,000,000
6
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
CImg<floatT> get_streamline(const float x, const float y, const float z, const float L=256, const float dl=0.1f, const unsigned int interpolation_type=2, const bool is_backward_tracking=false, const bool is_oriented_only...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
20,687,587,613,571,593,000,000,000,000,000,000,000
28
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
output(const char *string) { fprintf(ofp, "%s", string); }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
80,321,864,546,015,340,000,000,000,000,000,000,000
4
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
int lxc_setgroups(int size, gid_t list[]) { if (setgroups(size, list) < 0) { SYSERROR("Failed to setgroups()."); return -errno; } NOTICE("Dropped additional groups."); return 0; }
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
167,069,532,817,356,390,000,000,000,000,000,000,000
10
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
nv_visual(cmdarg_T *cap) { if (cap->cmdchar == Ctrl_Q) cap->cmdchar = Ctrl_V; // 'v', 'V' and CTRL-V can be used while an operator is pending to make it // characterwise, linewise, or blockwise. if (cap->oap->op_type != OP_NOP) { motion_force = cap->oap->motion_force = cap->cmdchar; finish_op = ...
0
[ "CWE-416" ]
vim
e2fa213cf571041dbd04ab0329303ffdc980678a
40,382,348,727,698,016,000,000,000,000,000,000,000
99
patch 8.2.5024: using freed memory with "]d" Problem: Using freed memory with "]d". Solution: Copy the pattern before searching.
static inline unsigned int ScaleQuantumToLong(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((unsigned int) (16843009UL*quantum)); #else if (quantum <= 0.0) return(0UL); if ((16843009.0*quantum) >= 4294967295.0) return(4294967295UL); return((unsigned int) (16843009.0*quantum+0.5))...
1
[ "CWE-190" ]
ImageMagick
95d4e94e0353e503b71a53f5e6fad173c7c70c90
95,714,774,436,369,650,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1751
static int dev_match_devt(struct device *dev, void *data) { dev_t *devt = data; return dev->devt == *devt; }
0
[ "CWE-703" ]
linux
c290f8358acaeffd8e0c551ddcc24d1206143376
286,170,496,430,528,020,000,000,000,000,000,000,000
5
TTY: drop driver reference in tty_open fail path When tty_driver_lookup_tty fails in tty_open, we forget to drop a reference to the tty driver. This was added by commit 4a2b5fddd5 (Move tty lookup/reopen to caller). Fix that by adding tty_driver_kref_put to the fail path. I will refactor the code later. This is for ...
qemuProcessSetLinkStates(virQEMUDriverPtr driver, virDomainObjPtr vm, qemuDomainAsyncJob asyncJob) { qemuDomainObjPrivatePtr priv = vm->privateData; virDomainDefPtr def = vm->def; size_t i; int ret = -1; int rv; if (qemuDomainObjEnterMonitorAsyn...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
54,458,909,416,424,920,000,000,000,000,000,000,000
42
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static 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, ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
287,133,806,727,500,700,000,000,000,000,000,000,000
57
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563