func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ll_temac_ethtools_set_ringparam(struct net_device *ndev, struct ethtool_ringparam *ering) { struct temac_local *lp = netdev_priv(ndev); if (ering->rx_pending > RX_BD_NUM_MAX || ering->rx_mini_pending || ering->rx_jumbo_pending || ering->rx_pending > TX_BD_NUM_MAX) return -EINVAL; ...
0
[ "CWE-120", "CWE-787" ]
linux
c364df2489b8ef2f5e3159b1dff1ff1fdb16040d
6,708,159,548,838,287,000,000,000,000,000,000,000
18
net: ll_temac: Fix TX BD buffer overwrite Just as the initial check, we need to ensure num_frag+1 buffers available, as that is the number of buffers we are going to use. This fixes a buffer overflow, which might be seen during heavy network load. Complete lockup of TEMAC was reproducible within about 10 minutes of a...
output_buffer& operator<<(output_buffer& output, const RecordLayerHeader& hdr) { output[AUTO] = hdr.type_; output[AUTO] = hdr.version_.major_; output[AUTO] = hdr.version_.minor_; // length byte tmp[2]; c16toa(hdr.length_, tmp); output[AUTO] = tmp[0]; output[AUTO] = tmp[1]; retu...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
133,951,193,178,051,900,000,000,000,000,000,000,000
14
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
void read( Protocol_* iprot, const TypeInfo& typeInfo, ProtocolReaderStructReadState<Protocol_>& readState, void* object) { using WireTypeInfo = ProtocolReaderWireTypeInfo<Protocol_>; using WireType = typename WireTypeInfo::WireType; switch (typeInfo.type) { case protocol::TType::T_STRUCT: ...
0
[ "CWE-763" ]
fbthrift
bfda1efa547dce11a38592820916db01b05b9339
66,802,580,237,767,380,000,000,000,000,000,000,000
236
Fix handling of invalid union data in table-based serializer Summary: Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem...
static void __sched notrace __schedule(bool preempt) { struct task_struct *prev, *next; unsigned long *switch_count; struct rq *rq; int cpu; cpu = smp_processor_id(); rq = cpu_rq(cpu); prev = rq->curr; /* * do_exit() calls schedule() with preemption disabled as an exception; * however we must fix that up,...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
126,699,862,850,440,160,000,000,000,000,000,000,000
87
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method, int num_weights, png_const_fixed_point_p filter_weights, png_const_fixed_point_p filter_costs) { PNG_UNUSED(png_ptr) PNG_UNUSED(heuristic_method) PNG_UNUSED(num_weights) PNG_UNUSED(filter_weights) PNG_UNUSED(filter_costs)...
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
19,167,300,783,713,377,000,000,000,000,000,000,000
10
[libpng16] Reject attempt to write over-length PLTE chunk
void cil_destroy_classorder(struct cil_classorder *classorder) { if (classorder == NULL) { return; } if (classorder->class_list_str != NULL) { cil_list_destroy(&classorder->class_list_str, 1); } free(classorder); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
276,049,678,873,916,060,000,000,000,000,000,000,000
12
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void __init ip4_frags_ctl_register(void) { register_net_sysctl(&init_net, "net/ipv4", ip4_frags_ctl_table); }
0
[ "CWE-20" ]
linux
5d407b071dc369c26a38398326ee2be53651cfe4
10,696,727,607,383,381,000,000,000,000,000,000,000
4
ip: frags: fix crash in ip_do_fragment() A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member. so that frag->sk is not NULL. Hence crash occurrs in s...
static int pop_capabilities(struct PopAccountData *adata, int mode) { char buf[1024]; /* don't check capabilities on reconnect */ if (adata->capabilities) return 0; /* init capabilities */ if (mode == 0) { adata->cmd_capa = false; adata->cmd_stls = false; adata->cmd_user = 0; adata->cm...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
90,304,349,430,468,430,000,000,000,000,000,000,000
71
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
int caca_set_dither_brightness(caca_dither_t *d, float brightness) { /* FIXME */ d->brightness = brightness; return 0; }
0
[ "CWE-369" ]
libcaca
84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c
318,679,816,962,336,620,000,000,000,000,000,000,000
7
dither: fix integer overflows that were causing a division by zero. Fixes: #36 (CVE-2018-20544)
int task_set_sequence_head(davs2_mgr_t *mgr, davs2_seq_t *seq) { int ret = 0; davs2_thread_mutex_lock(&mgr->mutex_mgr); davs2_reconfigure_decoder(mgr); if (seq->valid_flag) { int newres = (mgr->seq_info.head.height != seq->head.height || mgr->seq_info.head.width != seq->head.width); ...
0
[ "CWE-787" ]
davs2
b41cf117452e2d73d827f02d3e30aa20f1c721ac
197,200,498,808,307,170,000,000,000,000,000,000,000
44
Add checking for `frame_rate_code`. Signed-off-by: luofl <falei.luo@gmail.com>
int tcp_mmap(struct file *file, struct socket *sock, struct vm_area_struct *vma) { if (vma->vm_flags & (VM_WRITE | VM_EXEC)) return -EPERM; vma->vm_flags &= ~(VM_MAYWRITE | VM_MAYEXEC); /* Instruct vm_insert_page() to not down_read(mmap_sem) */ vma->vm_flags |= VM_MIXEDMAP; vma->vm_ops = &tcp_vm_ops; re...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
55,318,619,506,495,100,000,000,000,000,000,000,000
13
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
get_scriptlocal_funcname(char_u *funcname) { char sid_buf[25]; int off; char_u *newname; if (funcname == NULL) return NULL; if (STRNCMP(funcname, "s:", 2) != 0 && STRNCMP(funcname, "<SID>", 5) != 0) // The function name is not a script-local function name return NULL; if (!SCRIPT_ID_VAL...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
311,262,373,448,833,450,000,000,000,000,000,000,000
31
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
static int pfkey_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct sk_buff *skb = NULL; struct sadb_msg *hdr = NULL; int err; err = -EOPNOTSUPP; if (msg->msg_flags & MSG_OOB) goto out; err = -EMSGSIZE; if ((unsigned int)len > sk->sk_sn...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
204,933,672,892,195,260,000,000,000,000,000,000,000
40
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
njs_vm_init(njs_vm_t *vm) { njs_int_t ret; njs_frame_t *frame; frame = (njs_frame_t *) njs_function_frame_alloc(vm, NJS_FRAME_SIZE); if (njs_slow_path(frame == NULL)) { njs_memory_error(vm); return NJS_ERROR; } frame->exception.catch = NULL; frame->exception.next = NULL...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
91,283,841,222,998,090,000,000,000,000,000,000,000
37
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
ebb_ews_mailbox_to_contact (EBookBackendEws *bbews, EContact **contact, GHashTable *values, const EwsMailbox *mb) { CamelInternetAddress *addr; gchar *value; if (!mb->name && !mb->email) return; addr = camel_internet_address_new (); camel_internet_address_add (addr, mb->name, mb->email ? ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
30,435,918,964,133,596,000,000,000,000,000,000,000
31
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
anniversary_populate (EContact *contact, gchar **values) { if (values[0]) { EContactDate *dt = e_contact_date_from_string (values[0]); e_contact_set (contact, E_CONTACT_ANNIVERSARY, dt); e_contact_date_free (dt); } }
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
332,146,218,768,367,340,000,000,000,000,000,000,000
9
Bug 796174 - strcat() considered unsafe for buffer overflow
void CLASS layer_thumb() { int i, c; char *thumb, map[][4] = { "012","102" }; colors = thumb_misc >> 5 & 7; thumb_length = thumb_width*thumb_height; thumb = (char *) calloc (colors, thumb_length); merror (thumb, "layer_thumb()"); fprintf (ofp, "P%d\n%d %d\n255\n", 5 + (colors >> 1), thumb_width, thumb_h...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
95,825,303,640,237,130,000,000,000,000,000,000,000
16
cumulated data checks patch
static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct nr_sock *nr = nr_sk(sk); struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)msg->msg_name; int err; struct sockaddr_ax25 sax; struct sk_buff *skb; unsigned char *asmptr; ...
0
[ "CWE-200" ]
linux-2.6
f6b97b29513950bfbf621a83d85b6f86b39ec8db
57,652,077,106,035,320,000,000,000,000,000,000,000
118
netrom: Fix nr_getname() leak nr_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int utf82u_index(int pos, const char *start) { int uc = 0; const char *end = start+pos; while ( start<end ) { utf8_ildb(&start); ++uc; } return( uc ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
204,707,213,178,145,780,000,000,000,000,000,000,000
10
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
u64 fuse_lock_owner_id(struct fuse_conn *fc, fl_owner_t id) { u32 *k = fc->scramble_key; u64 v = (unsigned long) id; u32 v0 = v; u32 v1 = v >> 32; u32 sum = 0; int i; for (i = 0; i < 32; i++) { v0 += ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]); sum += 0x9E3779B9; v1 += ((v0 << 4 ^ v0 >> 5) + v0) ^ (su...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
173,925,341,494,590,600,000,000,000,000,000,000,000
17
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
static inline __maybe_unused int h2s_id(const struct h2s *h2s) { return h2s ? h2s->id : 0; }
0
[ "CWE-119" ]
haproxy
3f0e1ec70173593f4c2b3681b26c04a4ed5fc588
147,019,361,216,202,060,000,000,000,000,000,000,000
4
BUG/CRITICAL: h2: fix incorrect frame length check The incoming H2 frame length was checked against the max_frame_size setting instead of being checked against the bufsize. The max_frame_size only applies to outgoing traffic and not to incoming one, so if a large enough frame size is advertised in the SETTINGS frame, ...
rb_str_comparable(VALUE str1, VALUE str2) { int idx1, idx2; int rc1, rc2; if (RSTRING_LEN(str1) == 0) return TRUE; if (RSTRING_LEN(str2) == 0) return TRUE; idx1 = ENCODING_GET(str1); idx2 = ENCODING_GET(str2); if (idx1 == idx2) return TRUE; rc1 = rb_enc_str_coderange(str1); rc2 = rb...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
166,342,949,385,827,550,000,000,000,000,000,000,000
23
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
modify_param_name(param_token *name) { const char *delim1 = memchr (name->b, '*', name->e - name->b); const char *delim2 = memrchr (name->b, '*', name->e - name->b); int result; if(delim1 == NULL) { result = NOT_RFC2231; } else if(delim1 == delim2) { if ((name->e - 1) == delim1) { ...
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
218,655,186,125,234,300,000,000,000,000,000,000,000
30
Introduce --trust-server-names. Close CVE-2010-2252.
static void k_fn(struct vc_data *vc, unsigned char value, char up_flag) { if (up_flag) return; if ((unsigned)value < ARRAY_SIZE(func_table)) { if (func_table[value]) puts_queue(vc, func_table[value]); } else pr_err("k_fn called with value=%d\n", value); }
1
[ "CWE-416" ]
linux
82e61c3909db51d91b9d3e2071557b6435018b80
284,145,277,611,626,130,000,000,000,000,000,000,000
11
vt: keyboard, extend func_buf_lock to readers Both read-side users of func_table/func_buf need locking. Without that, one can easily confuse the code by repeatedly setting altering strings like: while (1) for (a = 0; a < 2; a++) { struct kbsentry kbs = {}; strcpy((char *)kbs.kb_string, a ? ".\n" : "88888\n"); i...
static int bin_exports(RCore *r, int mode, ut64 laddr, int va, ut64 at, const char *name, const char *args) { return bin_symbols_internal (r, mode, laddr, va, at, name, true, args); }
0
[ "CWE-125" ]
radare2
1f37c04f2a762500222dda2459e6a04646feeedf
1,000,996,991,145,299,400,000,000,000,000,000,000
3
Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923)
columnToCell(TScreen *screen, int row, int col, CELL *cell) { while (row < screen->max_row) { CLineData *ld = GET_LINEDATA(screen, row); int last = LastTextCol(screen, ld, row); /* TRACE(("last(%d) = %d, have %d\n", row, last, col)); */ if (col <= last) { break; } /* * Stop if the current row does not...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
2,660,728,979,598,060,000,000,000,000,000,000,000
26
snapshot of project "xterm", label xterm-365d
int gdImageGrayScale(gdImagePtr src) { int x, y; int r,g,b,a; int new_pxl, pxl; typedef int (*FuncPtr)(gdImagePtr, int, int); FuncPtr f; f = GET_PIXEL_FUNCTION(src); if (src==NULL) { return 0; } for (y=0; y<src->sy; ++y) { for (x=0; x<src->sx; ++x) { pxl = f (src, x, y); r = gdImageRed(src, pxl); ...
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
191,752,304,043,103,640,000,000,000,000,000,000,000
33
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
int jp2_encode(jas_image_t *image, jas_stream_t *out, const char *optstr) { jp2_box_t *box; jp2_ftyp_t *ftyp; jp2_ihdr_t *ihdr; jas_stream_t *tmpstream; int allcmptssame; jp2_bpcc_t *bpcc; long len; uint_fast16_t cmptno; jp2_colr_t *colr; char buf[4096]; uint_fast32_t overhead; jp2_cdefchan_t *cdefchanent; ...
1
[ "CWE-476" ]
jasper
58ba0365d911b9f9dd68e9abf826682c0b4f2293
137,179,489,860,489,530,000,000,000,000,000,000,000
325
Added a check in the JP2 encoder to ensure that the image to be coded has at least one component. Also, made some small changes to a private build script.
void StreamReq::Dispose() { BaseObjectPtr<AsyncWrap> destroy_me{GetAsyncWrap()}; object()->SetAlignedPointerInInternalField( StreamReq::kStreamReqField, nullptr); destroy_me->Detach(); }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
37,761,514,958,495,906,000,000,000,000,000,000,000
6
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
static void mt_fix_const_field(struct hid_field *field, unsigned int usage) { if (field->usage[0].hid != usage || !(field->flags & HID_MAIN_ITEM_CONSTANT)) return; field->flags &= ~HID_MAIN_ITEM_CONSTANT; field->flags |= HID_MAIN_ITEM_VARIABLE; }
0
[ "CWE-787" ]
linux
35556bed836f8dc07ac55f69c8d17dce3e7f0e25
293,767,444,653,032,700,000,000,000,000,000,000,000
9
HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmab...
nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc) { struct nlm_host *host = req->a_host; struct rpc_clnt *clnt; struct nlm_args *argp = &req->a_args; struct nlm_res *resp = &req->a_res; struct rpc_message msg = { .rpc_argp = argp, .rpc_resp = resp, .rpc_cred = cred, }; int status; dpri...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
60,096,913,559,185,100,000,000,000,000,000,000,000
73
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...
int main(int argc, char **argv) { StrList **depend_ptr; timestamp(); iflag_set_default_cpu(&cpu); iflag_set_default_cpu(&cmd_cpu); pass0 = 0; want_usage = terminate_after_phase = false; nasm_set_verror(nasm_verror_gnu); error_file = stderr; tolower_init(); src_init(); /...
0
[ "CWE-476" ]
nasm
e996d28c70d45008085322b442b44a9224308548
252,512,517,825,300,640,000,000,000,000,000,000,000
198
labels: Don't nil dereference if no label provided An equ without label may cause nil dereference | equ 0x100 Fixes 98578071b9d71ecaa2344dd9c185237c1765041e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
bool check_func_default_processor(void *arg) { return true; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
57,076,057,852,016,710,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int sctp_setsockopt_delayed_ack(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_sack_info params; struct sctp_transport *trans = NULL; struct sctp_association *asoc = NULL; struct sctp_sock *sp = sctp_sk(sk); if (optlen == sizeof(struct sctp_sack_info)) { i...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
176,134,383,588,591,730,000,000,000,000,000,000,000
105
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
explicit BoostedTreesCalculateBestFeatureSplitOp( OpKernelConstruction* const context) : OpKernel(context) { OP_REQUIRES_OK(context, context->GetAttr("logits_dimension", &logits_dim_)); OP_REQUIRES_OK(context, context->GetAttr("split_type", &split_type_)); }
0
[ "CWE-125", "CWE-369" ]
tensorflow
e84c975313e8e8e38bb2ea118196369c45c51378
268,404,994,668,751,920,000,000,000,000,000,000,000
6
In tf.raw_ops.BoostedTreesSparseCalculateBestFeatureSplit, limit stat_dim in stats_summary_indices to under stats_dims in stats_summary_shape PiperOrigin-RevId: 387171191 Change-Id: I83ca8a75b22aa78c037e8b98779da6cced16bfaa
static struct sock *nr_find_peer(unsigned char index, unsigned char id, ax25_address *dest) { struct sock *s; spin_lock_bh(&nr_list_lock); sk_for_each(s, &nr_list) { struct nr_sock *nr = nr_sk(s); if (nr->your_index == index && nr->your_id == id && !ax25cmp(&nr->dest_addr, dest)) { bh_lock_sock(s); ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
252,885,545,700,426,960,000,000,000,000,000,000,000
20
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
dump_isodirrec(FILE *out, const unsigned char *isodirrec) { fprintf(out, " l %d,", toi(isodirrec + DR_length_offset, DR_length_size)); fprintf(out, " a %d,", toi(isodirrec + DR_ext_attr_length_offset, DR_ext_attr_length_size)); fprintf(out, " ext 0x%x,", toi(isodirrec + DR_extent_offset, DR_extent_siz...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
172,948,114,282,639,000,000,000,000,000,000,000,000
25
iso9660: validate directory record length
pickle_clear(PyObject *m) { _Pickle_ClearState(_Pickle_GetState(m)); return 0; }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
184,489,105,888,461,160,000,000,000,000,000,000,000
5
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static gboolean tcp_chr_telnet_init_io(QIOChannel *ioc, GIOCondition cond G_GNUC_UNUSED, gpointer user_data) { TCPCharDriverTelnetInit *init = user_data; ssize_t ret; ret = qio_channel_write(ioc, init->buf, init->buflen, NULL); ...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
116,224,786,354,374,530,000,000,000,000,000,000,000
27
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static bool tc_qdisc_dump_ignore(struct Qdisc *q) { return (q->flags & TCQ_F_BUILTIN) ? true : false; }
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
112,829,297,122,376,760,000,000,000,000,000,000,000
4
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static void register_subpage(AddressSpaceDispatch *d, MemoryRegionSection *section) { subpage_t *subpage; hwaddr base = section->offset_within_address_space & TARGET_PAGE_MASK; MemoryRegionSection *existing = phys_page_find(d->phys_map, base, d->map...
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
299,455,600,567,545,570,000,000,000,000,000,000,000
29
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
output_buffer& HandShakeHeader::get(output_buffer& out) const { return out << *this; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
151,126,870,064,576,340,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
template<typename T> inline T rol(const T& a, const unsigned int n=1) { return n?(T)((a<<n)|(a>>((sizeof(T)<<3) - n))):a;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
329,307,917,655,768,000,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
CImg<T> *data() { return _data; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
333,904,136,803,253,200,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.
unsigned long usecs_to_jiffies(const unsigned int u) { if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET)) return MAX_JIFFY_OFFSET; #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ); #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) return u * (HZ / USEC_PER_SEC); #els...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
29,720,805,157,929,910,000,000,000,000,000,000,000
13
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq, int wake_flags, bool success) { trace_sched_wakeup(p, success); check_preempt_curr(rq, p, wake_flags); p->state = TASK_RUNNING; #ifdef CONFIG_SMP if (p->sched_class->task_woken) p->sched_class->task_woken(rq, p); if (unlikely(rq...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
113,279,943,101,641,950,000,000,000,000,000,000,000
26
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) { /* * Don't forget to update Documentation/ on changes. */ static const char mnemonics[BITS_PER_LONG][2] = { /* * In case if we meet a flag we don't know about. */ [0 ... (BITS_PER_LONG-1)] = "??", [ilog2(VM_READ)] = "rd...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
136,817,303,914,484,620,000,000,000,000,000,000,000
66
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
ofputil_encode_ofp15_group_mod(enum ofp_version ofp_version, const struct ofputil_group_mod *gm) { struct ofpbuf *b; struct ofp15_group_mod *ogm; size_t start_ogm; struct ofputil_bucket *bucket; struct id_pool *bucket_ids = NULL; b = ofpraw_alloc(OFPRAW_OFPT15_GRO...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
15,639,003,244,732,496,000,000,000,000,000,000,000
59
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>
void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt) { /* Check for valid transport. */ SCTP_ASSERT(tp, "NULL transport", return); /* We should not be doing any RTO updates unless rto_pending is set. */ SCTP_ASSERT(tp->rto_pending, "rto_pending not set", return); if (tp->rttvar || tp->srtt) { ...
1
[]
linux
196d67593439b03088913227093e374235596e33
41,868,277,155,663,800,000,000,000,000,000,000,000
65
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
MODRET auth_pre_pass(cmd_rec *cmd) { const char *user; char *displaylogin; pr_auth_endpwent(cmd->tmp_pool); pr_auth_endgrent(cmd->tmp_pool); /* Handle cases where PASS might be sent before USER. */ user = pr_table_get(session.notes, "mod_auth.orig-user", NULL); if (user != NULL) { config_rec *c; ...
0
[ "CWE-59", "CWE-295" ]
proftpd
349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
225,287,114,285,020,780,000,000,000,000,000,000,000
106
Walk the entire DefaultRoot path, checking for symlinks of any component, when AllowChrootSymlinks is disabled.
void CLua::vfnreturns(const char *format, va_list args) { lua_State *ls = _state; int nrets = return_count(ls, format); int sp = -nrets - 1; const char *gs = strchr(format, '>'); if (gs) format = gs + 1; else if ((gs = strchr(format, ':'))) format = gs + 1; for (const char ...
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
25,416,394,409,691,470,000,000,000,000,000,000,000
44
Disable lua load(), loadstring() bytcode loading
static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct inode *inode = vma->vm_file->f_path.dentry->d_inode; int error; int ret = VM_FAULT_LOCKED; error = shmem_getpage(inode, vmf->pgoff, &vmf->page, SGP_CACHE, &ret); if (error) return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGB...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
230,010,770,088,162,840,000,000,000,000,000,000,000
16
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
mono_method_get_flags (MonoMethod *method, guint32 *iflags) { if (iflags) *iflags = method->iflags; return method->flags; }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
82,637,891,546,577,800,000,000,000,000,000,000,000
6
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
static void f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned int rate) { struct f2fs_fault_info *ffi = &sbi->fault_info; if (rate) { atomic_set(&ffi->inject_ops, 0); ffi->inject_rate = rate; ffi->inject_type = (1 << FAULT_MAX) - 1; } else { memset(ffi, 0, sizeof(struct f2fs_fault_info)); } }
0
[ "CWE-284" ]
linux
b9dd46188edc2f0d1f37328637860bb65a771124
164,178,669,314,177,160,000,000,000,000,000,000,000
13
f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
void Type_Signature_Free(struct _cms_typehandler_struct* self, void* Ptr) { _cmsFree(self ->ContextID, Ptr); }
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
187,504,789,128,200,740,000,000,000,000,000,000,000
4
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
void clearRemainingGauge() { if (useRetryBudget()) { remaining_.set(0); } }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
179,379,306,241,607,420,000,000,000,000,000,000,000
5
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid) { struct kvm_lapic_irq lapic_irq; lapic_irq.shorthand = APIC_DEST_NOSHORT; lapic_irq.dest_mode = APIC_DEST_PHYSICAL; lapic_irq.level = 0; lapic_irq.dest_id = apicid; lapic_irq.msi_redir_hint = false; lapic_irq.delivery_mode = APIC...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
37,595,694,238,721,890,000,000,000,000,000,000,000
13
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
static ssize_t ad_read_rsrc_adouble(vfs_handle_struct *handle, struct adouble *ad, const struct smb_filename *smb_fname) { size_t to_read; ssize_t len; int ret; bool ok; ret = SMB_VFS_NEXT_FSTAT(handle, ad->ad_fsp, &ad->ad_fsp->fsp_name->st); if (ret != 0) { DBG_ERR("fstat [%s] failed: %s\n", ...
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
315,298,529,720,321,040,000,000,000,000,000,000,000
55
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>
static int sas_configure_parent(struct domain_device *parent, struct domain_device *child, u8 *sas_addr, int include) { struct expander_device *ex_parent = &parent->ex_dev; int res = 0; int i; if (parent->parent) { res = sas_configure_parent(parent->parent, parent, sas_addr, include); if (res) ...
0
[ "CWE-401" ]
linux
3b0541791453fbe7f42867e310e0c9eb6295364d
17,380,916,258,340,153,000,000,000,000,000,000,000
35
scsi: libsas: delete sas port if expander discover failed The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be deleted when the expander failed to discover. This will cause resource leak and a further issue of kernel BUG like below: [159785.843156] port-2:17:29: trying to add phy phy-2:17:29 f...
TEST(ExpressionStrLenCP, ComputesLengthOfStringWithSpecialCharacters) { assertExpectedResults("$strLenCP", {{{Value("ºabøåß"_sd)}, Value(6)}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
337,765,666,037,329,120,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static void read_args_from_file(char const* filename, std::vector<PointerHolder<char> >& new_argv) { std::list<std::string> lines; if (strcmp(filename, "-") == 0) { QTC::TC("qpdf", "qpdf read args from stdin"); lines = QUtil::read_lines_from_file(std::cin); ...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
267,209,368,062,678,500,000,000,000,000,000,000,000
21
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static ssize_t bad_file_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) { return -EIO; }
0
[]
linux-2.6
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8
247,587,591,015,439,440,000,000,000,000,000,000
5
[PATCH] fix memory corruption from misinterpreted bad_inode_ops return values CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; } #define EIO_ERROR ((void *) (return_EIO)) static struct ino...
static void ldapsrv_call_wait_done(struct tevent_req *subreq) { struct ldapsrv_call *call = tevent_req_callback_data(subreq, struct ldapsrv_call); struct ldapsrv_connection *conn = call->conn; NTSTATUS status; conn->active_call = NULL; status = call->wait_recv(subreq); TALLOC_FREE(subreq); if (!NT_STATUS_I...
0
[ "CWE-703" ]
samba
f9b2267c6eb8138fc94df7a138ad5d87526f1d79
245,179,838,042,033,900,000,000,000,000,000,000,000
28
CVE-2021-3670 ldap_server: Ensure value of MaxQueryDuration is greater than zero BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> (cherry picked from commit e1ab0c43629686d1d2c0b0b2bcdc90057...
*/ int netdev_rx_handler_register(struct net_device *dev, rx_handler_func_t *rx_handler, void *rx_handler_data) { if (netdev_is_rx_handler_busy(dev)) return -EBUSY; if (dev->priv_flags & IFF_NO_RX_HANDLER) return -EINVAL; /* Note: rx_handler_data must be set before rx_handler */ rcu_assig...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
303,677,623,376,969,500,000,000,000,000,000,000,000
16
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
static void *established_get_first(struct seq_file *seq) { struct tcp_iter_state *st = seq->private; struct net *net = seq_file_net(seq); void *rc = NULL; st->offset = 0; for (; st->bucket <= tcp_hashinfo.ehash_mask; ++st->bucket) { struct sock *sk; struct hlist_nulls_node *node; struct inet_timewait_sock *...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
243,770,962,506,090,900,000,000,000,000,000,000,000
42
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 int chunk_stripes_range_filter(struct extent_buffer *leaf, struct btrfs_chunk *chunk, struct btrfs_balance_args *bargs) { int num_stripes = btrfs_chunk_num_stripes(leaf, chunk); if (bargs->stripes_min <= num_stripes && num_stripes <= bargs->stripes_max) return 0; return 1; }
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
191,227,493,530,170,600,000,000,000,000,000,000,000
12
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...
static PHP_FUNCTION(xmlwriter_start_document) { zval *pind; xmlwriter_object *intern; xmlTextWriterPtr ptr; char *version = NULL, *enc = NULL, *alone = NULL; int version_len, enc_len, alone_len, retval; #ifdef ZEND_ENGINE_2 zval *this = getThis(); if (this) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
198,401,531,111,818,860,000,000,000,000,000,000,000
36
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
CudnnSupport::createRnnDescriptor( int num_layers, int hidden_size, int input_size, int cell_size, int batch_size, dnn::RnnInputMode input_mode, dnn::RnnDirectionMode direction_mode, dnn::RnnMode rnn_mode, dnn::DataType data_type, const dnn::AlgorithmConfig& algorithm_config, float dropout, uint64 s...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
10,774,097,555,849,140,000,000,000,000,000,000,000
21
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
int commonio_open (struct commonio_db *db, int mode) { char *buf; char *cp; char *line; struct commonio_entry *p; void *eptr = NULL; int flags = mode; size_t buflen; int fd; int saved_errno; mode &= ~O_CREAT; if ( db->isopen || ( (O_RDONLY != mode) && (O_RDWR != mode))) { errno = EINVAL...
0
[ "CWE-119", "CWE-787" ]
shadow
954e3d2e7113e9ac06632aee3c69b8d818cc8952
122,117,509,460,420,730,000,000,000,000,000,000,000
156
Fix buffer overflow if NULL line is present in db. If ptr->line == NULL for an entry, the first cycle will exit, but the second one will happily write past entries buffer. We actually do not want to exit the first cycle prematurely on ptr->line == NULL. Signed-off-by: Tomas Mraz <tmraz@fedoraproject.org>
void setup_actions() { g["Definition"] = [&](const SemanticValues &sv, any &dt) { Data &data = *any_cast<Data *>(dt); auto is_macro = sv.choice() == 0; auto ignore = any_cast<bool>(sv[0]); auto name = any_cast<std::string>(sv[1]); std::vector<std::string> params; std::shared_...
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
300,960,907,312,263,200,000,000,000,000,000,000,000
292
Fix #122
static void __usbnet_status_stop_force(struct usbnet *dev) { if (dev->interrupt) { mutex_lock(&dev->interrupt_mutex); usb_kill_urb(dev->interrupt); dev_dbg(&dev->udev->dev, "killed interrupt URB for suspend\n"); mutex_unlock(&dev->interrupt_mutex); } }
0
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
189,356,585,481,670,030,000,000,000,000,000,000,000
9
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
static int sort_key_read(MI_SORT_PARAM *sort_param, void *key) { int error; SORT_INFO *sort_info=sort_param->sort_info; MI_INFO *info=sort_info->info; DBUG_ENTER("sort_key_read"); if ((error=sort_get_next_record(sort_param))) DBUG_RETURN(error); if (info->state->records == sort_info->max_records) { ...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
290,656,092,752,887,060,000,000,000,000,000,000,000
26
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
void Compute(OpKernelContext* context) override { typedef Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>> ConstEigenMatrixMap; typedef Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>> EigenMatrixMap; constexpr int tensor_in_and_out_dims = 4; const Tenso...
1
[ "CWE-369" ]
tensorflow
548b5eaf23685d86f722233d8fbc21d0a4aecb96
65,175,645,890,002,240,000,000,000,000,000,000,000
115
Fix divide by zero error in `fractional_pool_common.cc`. PiperOrigin-RevId: 371126221 Change-Id: Iea4b2f363aaeb116ab460e3bc592c687484af344
unsigned FAST_FUNC udhcp_option_idx(const char *name) { int n = index_in_strings(dhcp_option_strings, name); if (n >= 0) return n; { char buf[sizeof(dhcp_option_strings)]; char *d = buf; const char *s = dhcp_option_strings; while (s < dhcp_option_strings + sizeof(dhcp_option_strings) - 2) { *d++ = (*s ...
0
[ "CWE-20" ]
busybox
7280d2017d8075267a12e469983e38277dcf0374
2,087,317,214,614,450,300,000,000,000,000,000,000
18
udhcpc: sanitize hostnames in incoming packets. Closes 3979. The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval ...
exists_in_thread_func (GSimpleAsyncResult *res, GObject *object, GCancellable *cancellable) { GError *error; error = NULL; if (!polkit_system_bus_name_exists_sync (POLKIT_SUBJECT (object), cancellable, ...
0
[ "CWE-754" ]
polkit
a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81
146,725,542,987,764,580,000,000,000,000,000,000,000
14
GHSL-2021-074: authentication bypass vulnerability in polkit initial values returned if error caught
void snd_pcm_debug_name(struct snd_pcm_substream *substream, char *name, size_t len) { snprintf(name, len, "pcmC%dD%d%c:%d", substream->pcm->card->number, substream->pcm->device, substream->stream ? 'c' : 'p', substream->number); }
0
[ "CWE-416", "CWE-362" ]
linux
3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
142,524,523,744,430,200,000,000,000,000,000,000,000
9
ALSA: pcm : Call kill_fasync() in stream lock Currently kill_fasync() is called outside the stream lock in snd_pcm_period_elapsed(). This is potentially racy, since the stream may get released even during the irq handler is running. Although snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't guarantee th...
INDIRECT_CALLABLE_DECLARE(int ipv6_gro_complete(struct sk_buff *, int)); static int napi_gro_complete(struct sk_buff *skb) { struct packet_offload *ptype; __be16 type = skb->protocol; struct list_head *head = &offload_base; int err = -ENOENT; BUILD_BUG_ON(sizeof(struct napi_gro_cb) > sizeof(skb->cb)); if (NAPI_...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
324,760,375,292,496,300,000,000,000,000,000,000,000
35
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
LogStreamerMain(logstreamer_param *param) { if (!ReceiveXlogStream(param->bgconn, param->startptr, param->timeline, param->sysidentifier, param->xlogdir, reached_end_position, standby_message_timeout, NULL)) /* * Any errors will already have been reported in the function process, * ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
169,559,029,359,710,560,000,000,000,000,000,000,000
17
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...
TEST(ArrayOpsTest, BatchToSpace_ShapeFn) { ShapeInferenceTestOp op("BatchToSpace"); op.input_tensors.resize(2); TF_ASSERT_OK(NodeDefBuilder("test", "BatchToSpace") .Input("input", 0, DT_FLOAT) .Input("crops", 1, DT_INT32) .Attr("block_size", 2) ...
0
[ "CWE-125" ]
tensorflow
7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d
318,752,729,982,030,900,000,000,000,000,000,000,000
42
Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute. PiperOrigin-RevId: 402446942 Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9
prepare_payload_and_sign(struct tang_keys_info* tki) { if (!tki) { return 0; } size_t idx; json_t* jwk; json_array_foreach(tki->m_keys, idx, jwk) { if (jwk_valid_for_signing_and_verifying(jwk)) { if (json_array_append(tki->m_sign, jwk) == -1) { continue; ...
0
[ "CWE-200" ]
tang
e82459fda10f0630c3414ed2afbc6320bb9ea7c9
4,458,806,382,062,923,000,000,000,000,000,000,000
27
keys: move signing part out of find_by_thp() and to find_jws() (#81) Handle just signing keys in find_jws(), to make sure we are responding only to proper queries. Tests were also failing to detect this issue and were updated accordingly. Issue discovered by Twitter Kernel and OS team during a source code aud...
bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident) { DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)"); DBUG_ASSERT(is_open()); if (likely(is_open())) // Should always be true { bool check_purge; ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
70,661,250,104,947,830,000,000,000,000,000,000,000
101
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
TEST(GetComputedPathsTest, ExpressionObjectCorrectlyReportsComputedPathsNested) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); auto specObject = fromjson( "{a: {b: '$c'}," "d: {$map: {input: '$e', as: 'iter', in: {f: '$$iter.g'}}}}"); auto expr = Expression...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
201,752,244,825,251,570,000,000,000,000,000,000,000
13
SERVER-38070 fix infinite loop in agg expression
gst_matroska_demux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstMatroskaDemux *demux; g_return_if_fail (GST_IS_MATROSKA_DEMUX (object)); demux = GST_MATROSKA_DEMUX (object); switch (prop_id) { case PROP_MAX_GAP_TIME: GST_OBJECT_LOCK (demux); g_val...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
318,283,263,954,042,300,000,000,000,000,000,000,000
24
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
static void svm_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr) { }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
213,412,701,491,658,780,000,000,000,000,000,000,000
3
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
virtual void dump(const string& code, const string& message) const {}
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
237,854,415,591,832,740,000,000,000,000,000,000,000
1
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 <...
camel_network_service_init (CamelNetworkServiceInterface *iface) { iface->get_service_name = pop3_store_get_service_name; iface->get_default_port = pop3_store_get_default_port; }
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
13,629,906,142,838,539,000,000,000,000,000,000,000
5
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
static int cap_socket_setsockopt(struct socket *sock, int level, int optname) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
330,988,091,888,285,430,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *assignment_value; zend_uint arg_num = Z_LVAL(opline->op1.u.constant); zend_free_op free_res; zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC); zval **var_ptr; if (param == NULL) { ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
240,156,279,528,376,320,000,000,000,000,000,000,000
31
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
sessActivity(ptcpsess_t *const pSess, int *const continue_polling) { int lenRcv; int lenBuf; uchar *peerName; int lenPeer; int remsock = 0; /* init just to keep compiler happy... :-( */ sbool bEmitOnClose = 0; char rcvBuf[128*1024]; DEFiRet; DBGPRINTF("imptcp: new activity on session socket %d\n", pSess->sock...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
255,482,900,065,186,480,000,000,000,000,000,000,000
48
net bugfix: potential buffer overrun
static void dissect_INFO_REPLY(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree) { /* RTPS 1.0/1.1: * INFO_REPLY is *NOT* the same thing as the old INFO_REPLY. * * RTPS 1.2/2.0: * 0...2...........7...............
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
30,036,510,175,899,830,000,000,000,000,000,000,000
50
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
static int __net_init ipv4_frags_init_net(struct net *net) { /* Fragment cache limits. * * The fragment memory accounting code, (tries to) account for * the real memory usage, by measuring both the size of frag * queue struct (inet_frag_queue (ipv4:ipq/ipv6:frag_queue)) * and the SKB's truesize. * * A 64...
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
95,719,924,489,987,240,000,000,000,000,000,000,000
29
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata) { _cleanup_fdset_free_ FDSet *fds = NULL; Manager *m = userdata; char buf[NOTIFY_BUFFER_MAX+1]; struct iovec iovec = { .iov_base = buf, .iov_len = siz...
1
[ "CWE-20" ]
systemd
8523bf7dd514a3a2c6114b7b8fb8f308b4f09fc4
336,555,145,514,301,300,000,000,000,000,000,000,000
118
pid1: process zero-length notification messages again This undoes 531ac2b234. I acked that patch without looking at the code carefully enough. There are two problems: - we want to process the fds anyway - in principle empty notification messages are valid, and we should process them as usual, including logging using...
int bnx2x_release_hw_lock(struct bnx2x *bp, u32 resource) { u32 lock_status; u32 resource_bit = (1 << resource); int func = BP_FUNC(bp); u32 hw_lock_control_reg; /* Validating that the resource is within range */ if (resource > HW_LOCK_MAX_RESOURCE_VALUE) { BNX2X_ERR("resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALU...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
70,723,227,962,069,440,000,000,000,000,000,000,000
32
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static UINT32 update_glyph_offset(const BYTE* data, size_t length, UINT32 index, INT32* x, INT32* y, UINT32 ulCharInc, UINT32 flAccel) { if ((ulCharInc == 0) && (!(flAccel & SO_CHAR_INC_EQUAL_BM_BASE))) { UINT32 offset = data[index++]; if (offset & 0x80) { if (index + 1 < ...
0
[ "CWE-703", "CWE-125" ]
FreeRDP
c0fd449ec0870b050d350d6d844b1ea6dad4bc7d
41,150,128,179,172,720,000,000,000,000,000,000,000
29
Fixed Out-of-bound read in glyph_cache_put CVE-2020-11098 thanks to @antonio-morales for finding this.
void HTTPSession::resumeIngress(HTTPTransaction* txn) noexcept { VLOG(4) << *this << " resuming streamID=" << txn->getID() << ", liveTransactions_ was " << liveTransactions_; ++liveTransactions_; auto exTxns = txn->getExTransactions(); for (auto it = exTxns.begin(); it != exTxns.end(); ++it) { auto ex...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
258,823,653,336,126,560,000,000,000,000,000,000,000
16
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
bool memcpy_field_possible(const Field *from) const { return Field_str::memcpy_field_possible(from) && !compression_method() == !from->compression_method() && !table->copy_blobs; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
296,874,308,835,509,580,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static MagickBooleanType ReadHEICImageByID(const ImageInfo *image_info, Image *image,struct heif_context *heif_context,heif_item_id image_id, ExceptionInfo *exception) { const char *option; int stride_y, stride_cb, stride_cr; MagickBooleanType status; ssize_t y; struct heif_dec...
0
[ "CWE-125" ]
ImageMagick
868aad754ee599eb7153b84d610f2ecdf7b339f6
152,426,799,834,776,980,000,000,000,000,000,000,000
136
Always correct the width and height of the image (#1859).
static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount, struct vm_area_struct *vma, struct page *check_page) { struct mm_struct *mm = vma->vm_mm; pmd_t *pmd; pte_t *pte; pte_t pteval; spinlock_t *ptl; struct page *page; unsigned long address; unsigned long mmun_start; /* For mmu_notifier...
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
300,924,747,398,764,670,000,000,000,000,000,000,000
99
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
cdata_write (cdata_t *cd, GDataOutputStream *out, int type, guint8 *data, size_t size, gsize *bytes_written, GCancellable *cancellable, GError **error) { if (!cdata_set(cd, type, data, size)) return FALSE; guint32 datacsum = compute_checksum(cd->in, cd->ncbytes, 0); guint8...
0
[ "CWE-787" ]
gcab
c512f6ff0c82a1139b36db2b28f93edc01c74b4b
250,471,076,177,551,670,000,000,000,000,000,000,000
30
trivial: Allocate cdata_t on the heap Using a 91kB stack allocation for one object isn't awesome, and it also allows us to use g_autoptr() to simplify gcab_folder_extract()
PHP_FUNCTION(openssl_spki_new) { size_t challenge_len; char * challenge = NULL, * spkstr = NULL; zend_string * s = NULL; zend_resource *keyresource = NULL; const char *spkac = "SPKAC="; zend_long algo = OPENSSL_ALGO_MD5; zval *method = NULL; zval * zpkey = NULL; EVP_PKEY * pkey = NULL; NETSCAPE_SPKI *spki=NU...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
318,828,452,048,777,100,000,000,000,000,000,000,000
101
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)