func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
blink_state_is_inverted() { #ifdef FEAT_TERMRESPONSE return rbm_status.tr_progress == STATUS_GOT && rcs_status.tr_progress == STATUS_GOT && initial_cursor_blink != initial_cursor_shape_blink; #else return FALSE; #endif }
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
8,164,347,740,736,980,000,000,000,000,000,000,000
10
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
isdn_dumppkt(char *s, u_char *p, int len, int dumplen) { int dumpc; printk(KERN_DEBUG "%s(%d) ", s, len); for (dumpc = 0; (dumpc < dumplen) && (len); len--, dumpc++) printk(" %02x", *p++); printk("\n"); }
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
186,742,297,924,101,100,000,000,000,000,000,000,000
9
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
void bdecode_node::swap(bdecode_node& n) { /* bool lhs_is_root = (m_root_tokens == &m_tokens); bool rhs_is_root = (n.m_root_tokens == &n.m_tokens); // swap is only defined between non-root nodes // and between root-nodes. They may not be mixed! // note that when swapping root nodes, all bdecode_node // e...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
209,507,876,263,827,570,000,000,000,000,000,000,000
31
fix out-of-bounds read in bdecode Fixes #2099
asn1_get_bit_der (const unsigned char *der, int der_len, int *ret_len, unsigned char *str, int str_size, int *bit_len) { int len_len = 0, len_byte; if (der_len <= 0) return ASN1_GENERIC_ERROR; len_byte = asn1_get_length_der (der, der_len, &len_len) - 1; if (len_byte < 0) return ASN1_DER_ERROR; ...
0
[ "CWE-131" ]
libtasn1
1c3ccb3e040bf13e342ee60bc23b21b97b11923f
176,214,686,618,803,420,000,000,000,000,000,000,000
27
Do not return illegal values in asn1_get_bit_der().
print_resources_callback (WinLibrary *fi, WinResource *wr, WinResource *type_wr, WinResource *name_wr, WinResource *lang_wr) { const char *type, *offset; int32_t id; size_t size; /* get named resource type if possible */ type = NULL; if (parse...
0
[]
icoutils
a8c8543731ed255e6f8bb81c662155f98710ac20
5,381,349,517,498,412,000,000,000,000,000,000,000
28
wrestool: read_library() moves memory around, check it doesn't overwrite header data
static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) { struct btrfs_ioctl_space_args space_args; struct btrfs_ioctl_space_info space; struct btrfs_ioctl_space_info *dest; struct btrfs_ioctl_space_info *dest_orig; struct btrfs_ioctl_space_info __user *user_dest; struct btrfs_space_info *in...
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
16,191,678,458,868,907,000,000,000,000,000,000,000
139
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
static void __exit ext4_exit_fs(void) { ext4_exit_crypto(); ext4_destroy_lazyinit_thread(); unregister_as_ext2(); unregister_as_ext3(); unregister_filesystem(&ext4_fs_type); destroy_inodecache(); ext4_exit_mballoc(); ext4_exit_sysfs(); ext4_exit_system_zone(); ext4_exit_pageio(); ext4_exit_es(); }
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
100,809,595,801,248,250,000,000,000,000,000,000,000
14
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static int SetExtKeyUsage(Cert* cert, byte* output, word32 outSz, byte input) { int idx = 0, oidListSz = 0, totalSz, ret = 0; const byte extkeyusage_oid[] = { 0x06, 0x03, 0x55, 0x1d, 0x25 }; if (output == NULL) return BAD_FUNC_ARG; /* Skip to OID List */ totalSz = 2 + sizeof(extkeyusage_oi...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
316,617,889,274,225,300,000,000,000,000,000,000,000
77
OCSP: improve handling of OCSP no check extension
static void intel_pmu_flush_branch_stack(void) { /* * Intel LBR does not tag entries with the * PID of the current task, then we need to * flush it on ctxsw * For now, we simply reset it */ if (x86_pmu.lbr_nr) intel_pmu_lbr_reset(); }
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
298,319,085,930,666,030,000,000,000,000,000,000,000
11
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
njs_function_lambda_frame(njs_vm_t *vm, njs_function_t *function, const njs_value_t *this, const njs_value_t *args, njs_uint_t nargs, njs_bool_t ctor) { size_t n, frame_size; uint32_t args_count, value_count, value_size, temp_size; njs_value_t *value, *bound,...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
148,302,761,814,800,910,000,000,000,000,000,000,000
119
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...
void bgp_notify_send(struct peer *peer, uint8_t code, uint8_t sub_code) { bgp_notify_send_with_data(peer, code, sub_code, NULL, 0); }
0
[ "CWE-125" ]
frr
ff6db1027f8f36df657ff2e5ea167773752537ed
219,133,338,958,181,500,000,000,000,000,000,000,000
4
bgpd: Make sure hdr length is at a minimum of what is expected Ensure that if the capability length specified is enough data. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
build_next (GstRTSPBuilder * builder, GstRTSPMessage * message, GstRTSPConnection * conn, gboolean block) { GstRTSPResult res; while (TRUE) { switch (builder->state) { case STATE_START: { guint8 c; builder->offset = 0; res = read_bytes (conn, (guint8 *) buil...
1
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
13,204,189,256,961,024,000,000,000,000,000,000,000
206
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
do_mount (GVfsBackend *backend, GVfsJobMount *mount_job, GMountSpec *mount_spec, GMountSource *mount_source, gboolean is_automount) { GVfsBackendAdmin *self = G_VFS_BACKEND_ADMIN (backend); GVfsJob *job = G_VFS_JOB (mount_job); GError *error = NULL; GMountSpec *real_spec;...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
222,852,477,339,679,280,000,000,000,000,000,000,000
31
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb) { struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); /* * Assign an (opaque) qpolicy priority value to skb->priority. * * We are overloading this skb field for use with the qpolicy subystem. * The skb->priority is normally used for the SO_PRIORITY...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
115,274,847,876,048,590,000,000,000,000,000,000,000
40
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static bool schannel_data_pending(const struct connectdata *conn, int sockindex) { const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; if(connssl->use) /* SSL/TLS is in use */ return (BACKEND->decdata_offset > 0 || (BACKEND->encdata_offset > 0 && !BACKE...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
54,188,264,197,998,970,000,000,000,000,000,000,000
11
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static void ack_flush(void *_completed) { }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
78,116,484,288,619,710,000,000,000,000,000,000,000
3
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static void link_block_group(struct btrfs_block_group *cache) { struct btrfs_space_info *space_info = cache->space_info; int index = btrfs_bg_flags_to_raid_index(cache->flags); down_write(&space_info->groups_sem); list_add_tail(&cache->list, &space_info->block_groups[index]); up_write(&space_info->groups_sem); }
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
318,331,253,186,208,330,000,000,000,000,000,000,000
9
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
ins_insert(int replaceState) { #ifdef FEAT_EVAL set_vim_var_string(VV_INSERTMODE, (char_u *)((State & REPLACE_FLAG) ? "i" : replaceState == MODE_VREPLACE ? "v" : "r"), 1); #endif ins_apply_autocmds(EVENT_INSERTCHANGE); if (State & REPLACE_FLAG) State = MODE_INSERT | (State & MODE_LANGMAP); ...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
284,325,702,147,966,160,000,000,000,000,000,000,000
19
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
netsnmp_mibindex_lookup( const char *dirname ) { int i; static char tmpbuf[300]; for (i=0; i<_mibindex; i++) { if ( _mibindexes[i] && strcmp( _mibindexes[i], dirname ) == 0) { snprintf(tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d", get_persistent_direct...
1
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
307,388,636,319,241,230,000,000,000,000,000,000,000
18
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
Status SetOpDevice(EagerContext& ctx, EagerOperation* op, Device** device) { // Here in local execute, set preferred device to be on the local task to // avoid placing op on a remote device with higher priority. const DeviceNameUtils::ParsedName& preferred_device = DeviceNameUtils::HasSomeDetails(op->GetDev...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
285,520,204,884,804,400,000,000,000,000,000,000,000
30
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
void HGraphBuilder::VisitForTypeOf(Expression* expr) { ValueContext for_value(this, ARGUMENTS_NOT_ALLOWED); for_value.set_for_typeof(true); Visit(expr); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
12,687,299,258,454,356,000,000,000,000,000,000,000
5
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
join_args (GPtrArray *argv_array, gsize *len_out) { gchar *string; gchar *ptr; gint i; gsize len = 0; for (i = 0; i < argv_array->len; i++) len += strlen (argv_array->pdata[i]) + 1; string = g_new (gchar, len); *string = 0; ptr = string; for (i = 0; i < argv_array->len; i++) ptr = g_stpcpy ...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
190,137,148,104,867,980,000,000,000,000,000,000,000
19
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
static int nfsd_init_socks(struct net *net) { int error; struct nfsd_net *nn = net_generic(net, nfsd_net_id); if (!list_empty(&nn->nfsd_serv->sv_permsocks)) return 0; error = svc_create_xprt(nn->nfsd_serv, "udp", net, PF_INET, NFS_PORT, SVC_SOCK_DEFAULTS); if (error < 0) return error; error = svc_crea...
0
[ "CWE-20" ]
linux
e6838a29ecb484c97e4efef9429643b9851fba6e
90,208,802,925,013,400,000,000,000,000,000,000,000
20
nfsd: check for oversized NFSv2/v3 arguments A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large...
CImg<intT> _select(CImgDisplay &disp, const char *const title, const unsigned int feature_type, unsigned int *const XYZ, const int origX, const int origY, const int origZ, const bool exit_on_anykey, const bool reset_view3d,...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
194,108,455,483,016,420,000,000,000,000,000,000,000
581
Fix other issues in 'CImg<T>::load_bmp()'.
put_be32(struct ofpbuf *b, ovs_be32 x) { ofpbuf_put(b, &x, sizeof x); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
329,313,464,429,107,600,000,000,000,000,000,000,000
4
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
void X509_REQ_set_extension_nids(int *nids) { ext_nids = nids; }
0
[]
openssl
28a00bcd8e318da18031b2ac8778c64147cd54f9
172,020,320,735,590,040,000,000,000,000,000,000,000
4
Check public key is not NULL. CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
MultiPartInputFile::~MultiPartInputFile() { for (map<int, GenericInputFile*>::iterator it = _data->_inputFiles.begin(); it != _data->_inputFiles.end(); it++) { delete it->second; } delete _data; }
0
[ "CWE-94", "CWE-787" ]
openexr
8b5370c688a7362673c3a5256d93695617a4cd9a
153,751,902,417,663,300,000,000,000,000,000,000,000
10
Fix #491, issue with part number range check reconstructing chunk offset table The chunk offset was incorrectly testing for a part number that was the same size (i.e. an invalid index) Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
proto_tree_new_item(field_info *new_fi, proto_tree *tree, tvbuff_t *tvb, gint start, gint length, guint encoding) { proto_item *pi; guint32 value, n; guint64 value64; ws_in4_addr ipv4_value; float floatval; double doubleval; const char *stringval = NULL; nstime_t time_stamp; gboo...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
265,565,778,431,687,480,000,000,000,000,000,000,000
485
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static void scsi_write_complete(void * opaque, int ret) { SCSIDiskReq *r = (SCSIDiskReq *)opaque; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); uint32_t n; if (r->req.aiocb != NULL) { r->req.aiocb = NULL; bdrv_acct_done(s->bs, &r->acct); } if (ret) { if...
0
[ "CWE-119", "CWE-787" ]
qemu
103b40f51e4012b3b0ad20f615562a1806d7f49a
96,322,933,218,345,000,000,000,000,000,000,000,000
28
scsi-disk: commonize iovec creation between reads and writes Also, consistently use qiov.size instead of iov.iov_len. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
static ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned nr) { if (!(ctxt->regs_valid & (1 << nr))) { ctxt->regs_valid |= 1 << nr; ctxt->_regs[nr] = ctxt->ops->read_gpr(ctxt, nr); } return ctxt->_regs[nr]; }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
124,439,979,050,939,210,000,000,000,000,000,000,000
8
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
ldbm_config_mode_get(void *arg) { struct ldbminfo *li = (struct ldbminfo *)arg; return (void *)((uintptr_t)(li->li_mode)); }
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
276,514,705,517,052,060,000,000,000,000,000,000,000
6
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
my_decimal *val_decimal(my_decimal *to) { return m_value.to_datetime(current_thd).to_decimal(to); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
43,422,978,638,496,910,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
time_t file_modified_time(const std::string& fname) { struct stat buf; if(::stat(fname.c_str(),&buf) == -1) return 0; return buf.st_mtime; }
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
13,187,151,258,660,588,000,000,000,000,000,000,000
8
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
static int recheck_discard_flags(AVFormatContext *s, int first) { HLSContext *c = s->priv_data; int i, changed = 0; /* Check if any new streams are needed */ for (i = 0; i < c->n_playlists; i++) c->playlists[i]->cur_needed = 0; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s...
0
[ "CWE-703", "CWE-835" ]
FFmpeg
7ec414892ddcad88313848494b6fc5f437c9ca4a
180,918,937,368,613,350,000,000,000,000,000,000,000
39
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
void set_task_stack_end_magic(struct task_struct *tsk) { unsigned long *stackend; stackend = end_of_stack(tsk); *stackend = STACK_END_MAGIC; /* for overflow detection */ }
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
193,273,468,868,493,000,000,000,000,000,000,000,000
7
fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new erro...
_rl_isescape (c) int c; { switch (c) { case '\007': case '\b': case '\f': case '\n': case '\r': case TAB: case 0x0b: return (1); default: return (0); } }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
114,231,486,059,524,770,000,000,000,000,000,000,000
15
bash-4.4-rc2 release
static int checkout_conflicts_foreach( checkout_data *data, git_index *index, git_iterator *workdir, git_vector *pathspec, int (*cb)(const git_index_entry *, const git_index_entry *, const git_index_entry *, void *), void *payload) { git_index_conflict_iterator *iterator = NULL; const git_index_entry *ancestor,...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
259,427,569,574,800,900,000,000,000,000,000,000,000
32
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
lexer_string_is_use_strict (parser_context_t *context_p) /**< context */ { JERRY_ASSERT (context_p->token.type == LEXER_LITERAL && context_p->token.lit_location.type == LEXER_STRING_LITERAL); return (context_p->token.lit_location.length == 10 && !context_p->token.lit_location.has_escape ...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
154,356,251,146,810,860,000,000,000,000,000,000,000
9
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
Dictionary(const std::vector<std::string> &v) : trie_(v) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
253,732,843,453,047,300,000,000,000,000,000,000,000
1
Fix #122
static void lsr_read_extend_class(GF_LASeRCodec *lsr, char **out_data, u32 *out_len, const char *name) { u32 len; GF_LSR_READ_INT(lsr, len, lsr->info->cfg.extensionIDBits, "reserved"); len = lsr_read_vluimsbf5(lsr, "len"); // while (len) gf_bs_read_int(lsr->bs, 1); gf_bs_read_long_int(lsr->bs, len); if (out_data) ...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
335,661,467,609,856,970,000,000,000,000,000,000,000
10
fixed #2213
static int mxf_compute_sample_count(MXFContext *mxf, int stream_index, uint64_t *sample_count) { int i, total = 0, size = 0; AVStream *st = mxf->fc->streams[stream_index]; MXFTrack *track = st->priv_data; AVRational time_base = av_inv_q(track->edit_rate); AVRation...
0
[ "CWE-703", "CWE-834" ]
FFmpeg
900f39692ca0337a98a7cf047e4e2611071810c2
296,166,223,698,373,740,000,000,000,000,000,000,000
40
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
double Item_func_tan::val_real() { DBUG_ASSERT(fixed == 1); double value= args[0]->val_real(); if ((null_value=args[0]->null_value)) return 0.0; return check_float_overflow(tan(value)); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
13,892,087,172,611,378,000,000,000,000,000,000,000
8
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static int jas_iccattrtab_replace(jas_iccattrtab_t *attrtab, int i, jas_iccuint32_t name, jas_iccattrval_t *val) { jas_iccattrval_t *newval; jas_iccattr_t *attr; if (!(newval = jas_iccattrval_clone(val))) goto error; attr = &attrtab->attrs[i]; jas_iccattrval_destroy(attr->val); attr->name = name; attr->val =...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
155,226,130,317,349,830,000,000,000,000,000,000,000
15
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...
static void LogPolygonInfo(const PolygonInfo *polygon_info) { EdgeInfo *p; ssize_t i, j; (void) LogMagickEvent(DrawEvent,GetMagickModule()," begin active-edge"); p=polygon_info->edges; for (i=0; i < (ssize_t) polygon_info->number_edges; i++) { (void) LogMagickEvent(DrawEvent,GetMagickMo...
0
[]
ImageMagick
f4cdb3f3aab28273960ffacf1d356312b56ffd27
154,392,818,616,740,640,000,000,000,000,000,000,000
29
https://github.com/ImageMagick/ImageMagick/issues/3338
bool CModules::OnBroadcast(CString& sMessage) { MODHALTCHK(OnBroadcast(sMessage)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
310,456,638,311,889,200,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
decode_NXAST_RAW_FIN_TIMEOUT(const struct nx_action_fin_timeout *naft, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { struct ofpact_fin_timeout *oft; oft = ofpact_put_FIN_TIMEOUT(out); oft->fin_idle_timeout = ntohs(naft->fin_idle_tim...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
250,490,126,087,108,560,000,000,000,000,000,000,000
11
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void test_map_at_the_end(void) { uc_engine *uc; uint8_t mem[0x1000]; memset(mem, 0xff, 0x100); OK(uc_open(UC_ARCH_X86, UC_MODE_64, &uc)); OK(uc_mem_map(uc, 0xfffffffffffff000, 0x1000, UC_PROT_ALL)); OK(uc_mem_write(uc, 0xfffffffffffff000, mem, sizeof(mem))); uc_assert_err(UC_ERR_W...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
243,859,515,250,758,540,000,000,000,000,000,000,000
18
Fix crash when mapping a big memory and calling uc_close
isoent_collect_dirs(struct vdd *vdd, struct isoent *rootent, int depth) { struct isoent *np; if (rootent == NULL) rootent = vdd->rootent; np = rootent; do { /* Register current directory to pathtable. */ path_table_add_entry(&(vdd->pathtbl[depth]), np); if (np->subdirs.first != NULL && depth + 1 < vdd->ma...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
153,769,635,933,997,390,000,000,000,000,000,000,000
31
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static Point_3 convert(const CGAL::Point_3<R>& p){return p.exact();}
0
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
314,301,190,937,653,100,000,000,000,000,000,000,000
1
Fix Nef_3
bool CModule::AddSocket(CSocket* pSocket) { if (!pSocket) { return false; } m_sSockets.insert(pSocket); return true; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
332,330,494,476,578,270,000,000,000,000,000,000,000
8
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static bool device_is_rmrr_locked(struct device *dev) { if (!device_has_rmrr(dev)) return false; if (dev_is_pci(dev)) { struct pci_dev *pdev = to_pci_dev(dev); if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev)) return false; } return true; }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
82,178,076,314,194,230,000,000,000,000,000,000,000
14
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
discard_current_exception(void) { if (current_exception != NULL) discard_exception(current_exception, FALSE); did_throw = FALSE; need_rethrow = FALSE; }
0
[ "CWE-787" ]
vim
96b9bf8f74af8abf1e30054f996708db7dc285be
244,486,518,581,895,350,000,000,000,000,000,000,000
7
patch 9.0.0577: buffer underflow with unexpected :finally Problem: Buffer underflow with unexpected :finally. Solution: Check CSF_TRY can be found.
vhost_backend_cleanup(struct virtio_net *dev) { struct rte_vdpa_device *vdpa_dev; vdpa_dev = dev->vdpa_dev; if (vdpa_dev && vdpa_dev->ops->dev_cleanup != NULL) vdpa_dev->ops->dev_cleanup(dev->vid); if (dev->mem) { free_mem_region(dev); rte_free(dev->mem); dev->mem = NULL; } rte_free(dev->guest_pages); ...
0
[ "CWE-125", "CWE-787" ]
dpdk
6442c329b9d2ded0f44b27d2016aaba8ba5844c5
113,669,914,368,340,200,000,000,000,000,000,000,000
50
vhost: fix queue number check when setting inflight FD In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger than VHOST_MAX_VRING and cause write OOB as this number will be used to write inflight info in virtqueue structure. This pat...
static const char *vgacon_startup(void) { const char *display_desc = NULL; u16 saved1, saved2; volatile u16 *p; if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB || screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) { no_vga: #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; return conswitchp->co...
1
[ "CWE-125" ]
linux
973c096f6a85e5b5f2a295126ba6928d9a6afd45
324,644,882,273,631,130,000,000,000,000,000,000,000
189
vgacon: remove software scrollback support Yunhai Zhang recently fixed a VGA software scrollback bug in commit ebfdfeeae8c0 ("vgacon: Fix for missing check in scrollback handling"), but that then made people look more closely at some of this code, and there were more problems on the vgacon side, but also the fbcon sof...
static void sequencer_midi_output(int dev) { /* * Currently NOP */ }
0
[ "CWE-703", "CWE-189" ]
linux
b769f49463711205d57286e64cf535ed4daf59e9
19,204,778,753,540,620,000,000,000,000,000,000,000
6
sound/oss: remove offset from load_patch callbacks Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of uninitialized value, and signedness issue The offset passed to midi_synth_load_patch() can be essentially arbitrary. If it's greater than the header length, this will result in a copy_from_user(dst, src, n...
void comps_rtree_unset(COMPS_RTree * rt, const char * key) { COMPS_HSList * subnodes; COMPS_HSListItem * it; COMPS_RTreeData * rtdata; unsigned int offset, len, x; char found, ended; COMPS_HSList * path; struct Relation { COMPS_HSList * parent_nodes; COMPS_HSListItem * child...
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
183,867,761,226,793,300,000,000,000,000,000,000,000
96
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
static inline struct file *io_file_from_index(struct io_ring_ctx *ctx, int index) { struct io_fixed_file *slot = io_fixed_file_slot(&ctx->file_table, index); return (struct file *) (slot->file_ptr & FFS_MASK);
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
130,366,984,561,811,240,000,000,000,000,000,000,000
7
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
int bcf_get_format_string(const bcf_hdr_t *hdr, bcf1_t *line, const char *tag, char ***dst, int *ndst) { int i,tag_id = bcf_hdr_id2int(hdr, BCF_DT_ID, tag); if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FMT,tag_id) ) return -1; // no such FORMAT field in the header if ( bcf_hdr_id2type(hdr,BCF_HL_FMT,tag_id)!=B...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
266,829,559,832,835,600,000,000,000,000,000,000,000
38
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
find_session_from_type (int type, server *serv) { session *sess; GSList *list = sess_list; while (list) { sess = list->data; if (sess->type == type && serv == sess->server) return sess; list = list->next; } return NULL; }
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
31,151,328,167,741,190,000,000,000,000,000,000,000
13
Clean up handling CAP LS
cmsFloat64Number CMSEXPORT cmsGetProfileVersion(cmsHPROFILE hProfile) { _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; cmsUInt32Number n = Icc -> Version >> 16; return BaseToBase(n, 16, 10) / 100.0; }
0
[]
Little-CMS
d2d902b9a03583ae482c782b2f243f7e5268a47d
166,669,636,277,687,500,000,000,000,000,000,000,000
7
>Changes from Richard Hughes
xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { xmlAttrPtr prop; if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL)) return; if (tree->doc != doc) { if(tree->type == XML_ELEMENT_NODE) { prop = tree->properties; while (prop != NULL) { if (prop->atype == XML_ATTRIBUTE_ID) { ...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
246,114,280,736,592,400,000,000,000,000,000,000,000
38
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
static void free_note_info(struct elf_note_info *info) { struct elf_thread_core_info *threads = info->thread; while (threads) { unsigned int i; struct elf_thread_core_info *t = threads; threads = t->next; WARN_ON(t->notes[0].data && t->notes[0].data != &t->prstatus); for (i = 1; i < info->thread_notes; ++i)...
0
[ "CWE-284", "CWE-264" ]
linux
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
74,854,026,483,711,880,000,000,000,000,000,000,000
15
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top...
camel_ews_subscribable_init (CamelSubscribableInterface *iface) { iface->folder_is_subscribed = ews_store_folder_is_subscribed; iface->subscribe_folder_sync = ews_store_subscribe_folder_sync; iface->unsubscribe_folder_sync = ews_store_unsubscribe_folder_sync; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
74,325,584,684,735,290,000,000,000,000,000,000,000
6
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
hfs_cat_traverse(HFS_INFO * hfs, TSK_HFS_BTREE_CB a_cb, void *ptr) { TSK_FS_INFO *fs = &(hfs->fs_info); uint32_t cur_node; /* node id of the current node */ char *node; uint16_t nodesize; uint8_t is_done = 0; tsk_error_reset(); nodesize = tsk_getu16(fs->endian, hfs->catalog_h...
1
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
227,218,229,446,942,400,000,000,000,000,000,000,000
285
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
raw_send_socket (struct connection *conn, const void *vbuf, size_t len, int flags) { int sock = conn->sockout; const char *buf = vbuf; ssize_t r; int f = 0; #ifdef MSG_MORE if (flags & SEND_MORE) f |= MSG_MORE; #endif while (len > 0) { r = send (sock, buf, len, f); if (r == -1)...
0
[ "CWE-406" ]
nbdkit
c05686f9577fa91b6a3a4d8c065954ca6fc3fd62
246,348,760,482,004,300,000,000,000,000,000,000,000
25
server: Wait until handshake complete before calling .open callback Currently we call the plugin .open callback as soon as we receive a TCP connection: $ nbdkit -fv --tls=require --tls-certificates=tests/pki null \ --run "telnet localhost 10809" [...] Trying ::1... Connected to localhost. Escape ...
static void sctp_generate_t4_rto_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T4_RTO); }
0
[]
linux
196d67593439b03088913227093e374235596e33
146,971,691,203,903,220,000,000,000,000,000,000,000
5
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. ...
int subselect_union_engine::exec() { char const *save_where= thd->where; int res= unit->exec(); thd->where= save_where; return res; }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
134,931,615,237,633,540,000,000,000,000,000,000,000
7
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
TEST_P(SslIntegrationTest, RouterRequestAndResponseWithGiantBodyBuffer) { ConnectionCreationFunction creator = [&]() -> Network::ClientConnectionPtr { return makeSslClientConnection({}); }; testRouterRequestAndResponseWithBody(16 * 1024 * 1024, 16 * 1024 * 1024, false, false, &creator); checkStats(); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
305,212,064,542,543,600,000,000,000,000,000,000,000
7
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop) { gdImagePtr dst; /* check size */ if (crop->width<=0 || crop->height<=0) { return NULL; } /* allocate the requested size (could be only partially filled) */ if (src->trueColor) { dst = gdImageCreateTrueColor(crop->width, crop->height); gdImageS...
0
[ "CWE-189" ]
php-src
8f4a5373bb71590352fd934028d6dde5bc18530b
48,787,143,160,598,500,000,000,000,000,000,000,000
55
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) Initial fix was PHP stuff This one is libgd fix. - filter invalid crop size - dont try to copy on invalid position - fix crop size when out of src image - fix possible NULL deref - fix possible integer overfloow
static void testRelPath(CuTest *tc) { int r; r = aug_rm(aug, "/augeas/load/*"); CuAssertPositive(tc, r); r = aug_set(aug, "/augeas/load/Hosts/lens", "Hosts.lns"); CuAssertRetSuccess(tc, r); r = aug_set(aug, "/augeas/load/Hosts/incl", "etc/hosts"); CuAssertRetSuccess(tc, r); r = aug_loa...
0
[]
augeas
f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26
138,566,119,389,768,800,000,000,000,000,000,000,000
34
Fix umask handling when creating new files * src/transform.c (transform_save): faulty umask arithmetic would cause overly-open file modes when the umask contains "7", as the umask was incorrectly subtracted from the target file mode Fixes CVE-2013-6412, RHBZ#1034261
_gnutls_kx_encipher_type (gnutls_kx_algorithm_t kx_algorithm) { int ret = CIPHER_IGN; GNUTLS_PK_MAP_ALG_LOOP (ret = p->encipher_type) return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
114,005,389,976,103,740,000,000,000,000,000,000,000
6
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
char *ndpi_get_ip_string(const ndpi_ip_addr_t *ip, char *buf, u_int buf_len) { const u_int8_t *a = (const u_int8_t *) &ip->ipv4; #ifdef NDPI_DETECTION_SUPPORT_IPV6 if(ndpi_is_ipv6(ip)) { if(inet_ntop(AF_INET6, &ip->ipv6.u6_addr, buf, buf_len) == NULL) buf[0] = '\0'; return(buf); } #endif snprin...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
282,369,676,659,797,200,000,000,000,000,000,000,000
16
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static uint16_t player_write_media_attribute(struct avrcp_player *player, uint32_t id, uint8_t *buf, uint16_t *pos, uint16_t *offset) { uint16_t len; uint16_t attr_len; const char *value = NULL; DBG("%u", id); value = player_get_metadata(player, id); if (value == NULL) { *offset = 0; retur...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
224,660,048,903,825,350,000,000,000,000,000,000,000
33
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
print_p2r (const unsigned char *msg, size_t msglen) { switch (msglen? msg[0]:0) { case PC_to_RDR_IccPowerOn: print_p2r_iccpoweron (msg, msglen); break; case PC_to_RDR_IccPowerOff: print_p2r_iccpoweroff (msg, msglen); break; case PC_to_RDR_GetSlotStatus: print_p2r_getslots...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
322,126,669,914,588,000,000,000,000,000,000,000,000
51
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 bool create_directory_if_missing_recursive(const path& dirpath) { DBG_FS << "creating recursive directory: " << dirpath.string() << '\n'; if (dirpath.empty()) return false; error_code ec; bfs::file_status fs = bfs::status(dirpath); if (error_except_not_found(ec)) { ERR_FS << "Failed to retrieve file st...
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
240,742,604,660,233,380,000,000,000,000,000,000,000
24
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
addrinfo_from_hostent(const struct hostent *ent, int port, const struct evutil_addrinfo *hints) { int i; struct sockaddr_in sin; struct sockaddr_in6 sin6; struct sockaddr *sa; int socklen; struct evutil_addrinfo *res=NULL, *ai; void *addrp; if (ent->h_addrtype == PF_INET) { memset(&sin, 0, sizeof(sin)); ...
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
558,318,263,098,757,300,000,000,000,000,000,000
56
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
static int con_write(struct tty_struct *tty, const unsigned char *buf, int count) { int retval; retval = do_con_write(tty, buf, count); con_flush_chars(tty); return retval; }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
282,639,942,069,748,230,000,000,000,000,000,000,000
9
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
ClientHttpRequest::sslBumpEstablish(Comm::Flag errflag) { // Bail out quickly on Comm::ERR_CLOSING - close handlers will tidy up if (errflag == Comm::ERR_CLOSING) return; if (errflag) { debugs(85, 3, HERE << "CONNECT response failure in SslBump: " << errflag); getConn()->clientConne...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
245,862,673,869,585,300,000,000,000,000,000,000,000
25
Handle more Range requests (#790) Also removed some effectively unused code.
unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; int do_colour_align; struct vm_unmapped_area_info info; if (flags & MAP_FIXED) { /* We do not accept a share...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
115,898,335,285,733,770,000,000,000,000,000,000,000
45
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 ...
sctp_disposition_t sctp_sf_do_6_2_sack(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_FORCE()); return SCTP_DISPOSITION_CONSUME; }
0
[]
linux-2.6
7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5
185,960,446,714,363,970,000,000,000,000,000,000,000
9
[SCTP]: Allow spillover of receive buffer to avoid deadlock. This patch fixes a deadlock situation in the receive path by allowing temporary spillover of the receive buffer. - If the chunk we receive has a tsn that immediately follows the ctsn, accept it even if we run out of receive buffer space and renege data wi...
static void hns_nic_set_priv_ops(struct net_device *netdev) { struct hns_nic_priv *priv = netdev_priv(netdev); struct hnae_handle *h = priv->ae_handle; if (AE_IS_VER1(priv->enet_ver)) { priv->ops.fill_desc = fill_desc; priv->ops.get_rxd_bnum = get_rx_desc_bnum; priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tx;...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
74,543,071,065,820,370,000,000,000,000,000,000,000
27
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
netsnmp_query_get_default_session( void ) { static int warning_logged = 0; if (! _def_query_session && ! warning_logged) { if (! netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_INTERNAL_SECNAME)) { snmp_log(LOG_WARNING, ...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
282,799,741,093,075,560,000,000,000,000,000,000,000
17
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct module_qstate* qstate, int id, struct iter_qstate* iq, enum iter_state initial_state, enum iter_state finalstate, struct module_qstate** subq_ret, int v, int detached) { struct module_qstate* subq = NULL; struct iter_q...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
171,323,015,048,030,380,000,000,000,000,000,000,000
87
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
PJ_DEF(pj_status_t) pjsip_auth_clt_get_prefs(pjsip_auth_clt_sess *sess, pjsip_auth_clt_pref *p) { PJ_ASSERT_RETURN(sess && p, PJ_EINVAL); pj_memcpy(p, &sess->pref, sizeof(pjsip_auth_clt_pref)); return PJ_SUCCESS; }
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
38,242,128,908,805,685,000,000,000,000,000,000,000
8
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
static void mqtt_cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { if (ev == MG_EV_READ) { for (;;) { struct mg_mqtt_message mm; int rc = mg_mqtt_parse(c->recv.buf, c->recv.len, &mm); if (rc == MQTT_MALFORMED) { LOG(LL_ERROR, ("%lu MQTT malformed mes...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
333,983,389,625,359,500,000,000,000,000,000,000,000
41
Protect against the directory traversal in mg_upload()
void CodecClient::deleteRequest(ActiveRequest& request) { connection_->dispatcher().deferredDelete(request.removeFromList(active_requests_)); if (codec_client_callbacks_) { codec_client_callbacks_->onStreamDestroy(); } if (numActiveRequests() == 0) { enableIdleTimer(); } }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
251,756,102,295,288,730,000,000,000,000,000,000,000
9
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static struct iommu_domain *intel_iommu_domain_alloc(unsigned type) { struct dmar_domain *dmar_domain; struct iommu_domain *domain; if (type != IOMMU_DOMAIN_UNMANAGED) return NULL; dmar_domain = alloc_domain(DOMAIN_FLAG_VIRTUAL_MACHINE); if (!dmar_domain) { pr_err("Can't allocate dmar_domain\n"); return NU...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
49,381,887,974,566,960,000,000,000,000,000,000,000
27
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
static u32 kvm_async_pf_gfn_slot(struct kvm_vcpu *vcpu, gfn_t gfn) { int i; u32 key = kvm_async_pf_hash_fn(gfn); for (i = 0; i < roundup_pow_of_two(ASYNC_PF_PER_VCPU) && (vcpu->arch.apf.gfns[key] != gfn && vcpu->arch.apf.gfns[key] != ~0); i++) key = kvm_async_pf_next_probe(key); return key; }
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
59,003,045,371,258,710,000,000,000,000,000,000,000
12
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
void au1100fb_fb_rotate(struct fb_info *fbi, int angle) { struct au1100fb_device *fbdev = to_au1100fb_device(fbi); print_dbg("fb_rotate %p %d", fbi, angle); if (fbdev && (angle > 0) && !(angle % 90)) { fbdev->regs->lcd_control &= ~LCD_CONTROL_GO; fbdev->regs->lcd_control &= ~(LCD_CONTROL_SM_MASK); fbdev->r...
0
[ "CWE-119", "CWE-189", "CWE-703" ]
linux
7314e613d5ff9f0934f7a0f74ed7973b903315d1
184,960,873,848,914,430,000,000,000,000,000,000,000
16
Fix a few incorrectly checked [io_]remap_pfn_range() calls Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that really should use the vm_iomap_memory() helper. This trivially converts two of them to the helper, and comments about why the third one really needs to continue to use remap_pfn_range(), ...
switch (type) { #ifdef ELFCORE case ET_CORE: phnum = elf_getu16(swap, elfhdr.e_phnum); if (phnum > MAX_PHNUM) return toomany(ms, "program", phnum); flags |= FLAGS_IS_CORE; if (dophn_core(ms, clazz, swap, fd, (off_t)elf_getu(swap, elfhdr.e_phoff), phnum, (size_t)elf_getu16(swap, elfhdr.e_phentsi...
0
[ "CWE-399", "CWE-284" ]
file
b4c01141e5367f247b84dcaf6aefbb4e741842b8
173,631,565,254,096,040,000,000,000,000,000,000,000
43
- limit the number of program and section header number of sections to be processed to avoid excessive processing time. - if a bad note is found, return 0 to stop processing immediately.
art_pdf_recomposite_group_8(byte *gs_restrict *dstp, byte *gs_restrict dst_alpha_g, byte *gs_restrict src, byte src_alpha_g, int n_chan, byte alpha, gs_blend_mode_t blend_mode, int first_blend_spot, const pdf14_nonseparable_blending_procs_t * pblend_procs, pdf14_device *p14dev) { byt...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
8,199,871,080,138,303,000,000,000,000,000,000,000
63
Bug 701795: Segv due to image mask issue
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al, i, j, ret; unsigned int n; SSL3_RECORD *rr; void (*cb) (const SSL *ssl, int type2, int val) = NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_read_buffer(s)) retur...
0
[ "CWE-200", "CWE-203" ]
openssl
e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
246,689,684,589,305,750,000,000,000,000,000,000,000
496
Go into the error state if a fatal alert is sent or received If an application calls SSL_shutdown after a fatal alert has occured and then behaves different based on error codes from that function then the application may be vulnerable to a padding oracle. CVE-2019-1559 Reviewed-by: Richard Levitte <levitte@openssl....
static bool guest_state_valid(struct kvm_vcpu *vcpu) { if (enable_unrestricted_guest) return true; /* real mode guest state checks */ if (!is_protmode(vcpu) || (vmx_get_rflags(vcpu) & X86_EFLAGS_VM)) { if (!rmode_segment_valid(vcpu, VCPU_SREG_CS)) return false; if (!rmode_segment_valid(vcpu, VCPU_SREG_SS))...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
212,459,560,789,927,150,000,000,000,000,000,000,000
47
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
const char *MMDB_lib_version(void) { return PACKAGE_VERSION; }
0
[]
libmaxminddb
51255f113fe3c7b63ffe957636a7656a3ff9d1ff
87,421,242,521,728,500,000,000,000,000,000,000,000
4
Fix several segfaults from missing bounds checks These were found using afl-fuzz. There are several more similar failure that warrant investigation. If we want to add tests, I have several corrupt databases we could add, but these are trivially reproducible when using the existing test databases as input to afl-fuzz.
TEST(IndexBoundsBuilderTest, TranslateElemMatchValue) { auto testIndex = buildSimpleIndexEntry(); // Bounds generated should be the same as the embedded expression // except for the tightness. BSONObj obj = fromjson("{a: {$elemMatch: {$gt: 2}}}"); auto expr = parseMatchExpression(obj); BSONEleme...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
232,925,096,311,918,550,000,000,000,000,000,000,000
17
SERVER-44377 generate correct plan for indexed inequalities to null
static void disconnect_servers(GSList *servers, int chat_type) { GSList *tmp, *next; for (tmp = servers; tmp != NULL; tmp = next) { SERVER_REC *rec = tmp->data; next = tmp->next; if (rec->chat_type == chat_type) server_disconnect(rec); } }
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
18,298,410,506,793,857,000,000,000,000,000,000,000
12
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
static inline bool cpu_has_vmx_invvpid_single(void) { return vmx_capability.vpid & VMX_VPID_EXTENT_SINGLE_CONTEXT_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
293,356,772,627,994,900,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void controller::reload_all(bool unattended) { unsigned int unread_feeds, unread_articles; compute_unread_numbers(unread_feeds, unread_articles); unsigned int num_threads = cfg.get_configvalue_as_int("reload-threads"); time_t t1, t2, dt; unsigned int size; { std::lock_guard<std::mutex> feedlock(feeds_mutex); ...
0
[ "CWE-943", "CWE-787" ]
newsbeuter
96e9506ae9e252c548665152d1b8968297128307
88,341,445,379,880,540,000,000,000,000,000,000,000
76
Sanitize inputs to bookmark-cmd (#591) Newsbeuter didn't properly shell-escape the arguments passed to bookmarking command, which allows a remote attacker to perform remote code execution by crafting an RSS item whose title and/or URL contain something interpretable by the shell (most notably subshell invocations.) T...
static lsi_request *get_pending_req(LSIState *s) { lsi_request *p; QTAILQ_FOREACH(p, &s->queue, next) { if (p->pending) { return p; } } return NULL; }
0
[ "CWE-835" ]
qemu
de594e47659029316bbf9391efb79da0a1a08e08
288,690,565,247,888,730,000,000,000,000,000,000,000
11
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068) When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Move the existing loop exit after 10k iterations so that it cove...
write_viminfo_varlist(FILE *fp) { hashtab_T *gvht = get_globvar_ht(); hashitem_T *hi; dictitem_T *this_var; int todo; char *s = ""; char_u *p; char_u *tofree; char_u numbuf[NUMBUFLEN]; if (find_viminfo_parameter('!') == NULL) return; fputs(_("\n# global variables:\n"), fp); ...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
203,944,363,437,497,560,000,000,000,000,000,000,000
91
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.