func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int wc_ecc_get_oid(word32 oidSum, const byte** oid, word32* oidSz) { int x; if (oidSum == 0) { return BAD_FUNC_ARG; } /* find matching OID sum (based on encoded value) */ for (x = 0; ecc_sets[x].size != 0; x++) { if (ecc_sets[x].oidSum == oidSum) { int ret = 0; ...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
197,557,985,879,459,370,000,000,000,000,000,000,000
44
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
xfs_bmap_last_before( struct xfs_trans *tp, /* transaction pointer */ struct xfs_inode *ip, /* incore inode */ xfs_fileoff_t *last_block, /* last block */ int whichfork) /* data or attr fork */ { struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); struct xfs_bmbt_irec got; struct xfs_iext_cursor icur; in...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
121,495,008,943,910,540,000,000,000,000,000,000,000
32
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
static void stop_timer_thread(void) { if (timer_event) SetEvent(timer_event); /* tell thread to terminate */ if (timer_thread) { int rc = WaitForSingleObject(timer_thread, 1000); if (rc == WAIT_TIMEOUT) error("timer thread did not terminate timely"); else if (rc != WAIT_OBJECT_0) error("waiting for time...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
294,571,451,758,540,930,000,000,000,000,000,000,000
18
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, png_const_textp text_ptr, int num_text) { int i; png_debug1(1, "in %lx storage function", png_ptr == NULL ? 0xabadca11U : (unsigned long)png_ptr->chunk_name); if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL...
0
[ "CWE-120" ]
libpng
a901eb3ce6087e0afeef988247f1a1aa208cb54d
879,151,903,870,522,500,000,000,000,000,000,000
191
[libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta).
static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode, __be32 *psfsrc) { struct ip_sf_list *psf, *psf_prev; psf_prev = NULL; for (psf=pmc->sources; psf; psf=psf->sf_next) { if (psf->sf_inaddr == *psfsrc) break; psf_prev = psf; } if (!psf) { psf = kzalloc(sizeof(*psf), GFP_ATOMIC); if (!psf) ...
0
[ "CWE-399", "CWE-703", "CWE-369" ]
linux
a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27
245,848,400,760,382,500,000,000,000,000,000,000,000
27
igmp: Avoid zero delay when receiving odd mixture of IGMP queries Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP behavior on v3 query during v2-compatibility mode') added yet another case for query parsing, which can result in max_delay = 0. Substitute a value of 1, as in the usual v3 case. Rep...
Tfloat _linear_atXY_p(const float fx, const float fy, const int z=0, const int c=0) const { const float nfx = cimg::mod(fx,(float)_width), nfy = cimg::mod(fy,(float)_height); const unsigned int x = (unsigned int)nfx, y = (unsigned int)nfy; const float dx = ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
53,267,535,696,055,290,000,000,000,000,000,000,000
18
.
void html_hidden(const char *name, const char *value) { html("<input type='hidden' name='"); html_attr(name); html("' value='"); html_attr(value); html("'/>"); }
0
[]
cgit
513b3863d999f91b47d7e9f26710390db55f9463
7,800,655,027,318,934,000,000,000,000,000,000,000
8
ui-shared: prevent malicious filename from injecting headers
test_if_group_changed(List<Cached_item> &list) { DBUG_ENTER("test_if_group_changed"); List_iterator<Cached_item> li(list); int idx= -1,i; Cached_item *buff; for (i=(int) list.elements-1 ; (buff=li++) ; i--) { if (buff->cmp()) idx=i; } DBUG_PRINT("info", ("idx: %d", idx)); DBUG_RETURN(idx); ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
150,741,675,325,574,150,000,000,000,000,000,000,000
15
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
int ssl2_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) { long l; if (p != NULL) { l = c->id; if ((l & 0xff000000) != 0x02000000 && l != SSL3_CK_FALLBACK_SCSV) return (0); p[0] = ((unsigned char)(l >> 16L)) & 0xFF; p[1] = ((unsigned char)(l >> 8L)) & 0xFF;...
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
171,058,140,699,342,200,000,000,000,000,000,000,000
14
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb) { return ovs_nla_put_key(&flow->key, &flow->mask->key, OVS_FLOW_ATTR_MASK, true, skb); }
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
171,893,090,878,787,100,000,000,000,000,000,000,000
5
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
inline t max(const t& a, const t& b, const t& c, const t& d) { return std::max(std::max(a,b),std::max(c,d)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
122,420,081,095,217,900,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.
static int f2fs_read_single_page(struct inode *inode, struct page *page, unsigned nr_pages, struct f2fs_map_blocks *map, struct bio **bio_ret, sector_t *last_block_in_bio, bool is_readahead) { struct bio *bio = *bio_ret; const unsigned blkbits = inode->i_blkbits; const unsigned blocksize = 1...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
272,911,585,413,321,430,000,000,000,000,000,000,000
112
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static stbi__uint16 stbi__compute_y_16(int r, int g, int b) { return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
195,008,455,272,794,000,000,000,000,000,000,000,000
4
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static int snd_timer_user_release(struct inode *inode, struct file *file) { struct snd_timer_user *tu; if (file->private_data) { tu = file->private_data; file->private_data = NULL; mutex_lock(&tu->ioctl_lock); if (tu->timeri) snd_timer_close(tu->timeri); mutex_unlock(&tu->ioctl_lock); kfree(tu->queue)...
0
[ "CWE-362" ]
linux
af368027a49a751d6ff4ee9e3f9961f35bb4fede
260,908,025,766,172,380,000,000,000,000,000,000,000
17
ALSA: timer: Fix race among timer ioctls ALSA timer ioctls have an open race and this may lead to a use-after-free of timer instance object. A simplistic fix is to make each ioctl exclusive. We have already tread_sem for controlling the tread, and extend this as a global mutex to be applied to each ioctl. The downs...
static int check_crl_path(X509_STORE_CTX *ctx, X509 *x) { X509_STORE_CTX crl_ctx; int ret; /* Don't allow recursive CRL path validation */ if (ctx->parent) return 0; if (!X509_STORE_CTX_init(&crl_ctx, ctx->ctx, x, ctx->untrusted)) return -1; crl_ctx.crls = ctx->crls; /* Cop...
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
62,862,982,954,357,770,000,000,000,000,000,000,000
29
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
record_err_message(char *s) { if (fmInitialized) { if (!message_list) message_list = newGeneralList(); if (message_list->nitem >= LINES) popValue(message_list); pushValue(message_list, allocStr(s, -1)); } }
0
[ "CWE-119" ]
w3m
0c3f5d0e0d9269ad47b8f4b061d7818993913189
240,875,145,878,804,100,000,000,000,000,000,000,000
10
Prevent array index out of bounds for symbol Bug-Debian: https://github.com/tats/w3m/issues/38
void bgp_attr_unintern_sub(struct attr *attr) { /* aspath refcount shoud be decrement. */ if (attr->aspath) aspath_unintern(&attr->aspath); UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AS_PATH)); if (attr->community) community_unintern(&attr->community); UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_COMMUNIT...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
192,796,184,879,280,930,000,000,000,000,000,000,000
34
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni) { #ifdef __BIG_ENDIAN vni[0] = (__force __u8)(tun_id >> 16); vni[1] = (__force __u8)(tun_id >> 8); vni[2] = (__force __u8)tun_id; #else vni[0] = (__force __u8)((__force u64)tun_id >> 40); vni[1] = (__force __u8)((__force u64)tun_id >> 48); vni[2] = (__force _...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
170,112,240,579,039,180,000,000,000,000,000,000,000
12
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
wkbReadInt(wkbObj *w) { int i; memcpy(&i, w->ptr, sizeof(int)); w->ptr += sizeof(int); return i; }
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
205,339,839,289,626,230,000,000,000,000,000,000,000
7
Fix potential SQL Injection with postgis TIME filters (#4834)
setup_per_cpu_areas (void) { /* start_kernel() requires this... */ #ifdef CONFIG_ACPI_HOTPLUG_CPU prefill_possible_map(); #endif }
0
[ "CWE-119", "CWE-787" ]
linux
4dcc29e1574d88f4465ba865ed82800032f76418
25,233,769,512,322,880,000,000,000,000,000,000,000
7
[IA64] Workaround for RSE issue Problem: An application violating the architectural rules regarding operation dependencies and having specific Register Stack Engine (RSE) state at the time of the violation, may result in an illegal operation fault and invalid RSE state. Such faults may initiate a cascade of repeated ...
load_data_free (LoadData *load_data) { _g_object_unref (load_data->archive); _g_object_unref (load_data->cancellable); _g_object_unref (load_data->result); _g_object_unref (load_data->istream); g_free (load_data->buffer); g_free (load_data); }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
159,475,489,336,184,000,000,000,000,000,000,000,000
9
libarchive: sanitize filenames before extracting
int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address, u8 command, u8 *data) { return acpi_smbus_transaction(hc, protocol, address, command, data, 0); }
0
[ "CWE-200" ]
linux
43cdd1b716b26f6af16da4e145b6578f98798bf6
27,841,495,659,956,403,000,000,000,000,000,000,000
5
ACPI: sbshc: remove raw pointer from printk() message There's no need to be printing a raw kernel pointer to the kernel log at every boot. So just remove it, and change the whole message to use the correct dev_info() call at the same time. Reported-by: Wang Qize <wang_qize@venustech.com.cn> Cc: All applicable <stabl...
SCK_GetAnyLocalIPAddress(int family, IPAddr *local_addr) { local_addr->family = family; switch (family) { case IPADDR_INET4: local_addr->addr.in4 = INADDR_ANY; break; case IPADDR_INET6: #ifdef FEAT_IPV6 memcpy(&local_addr->addr.in6, &in6addr_any, sizeof (local_addr->addr.in6)); #else ...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
186,696,923,592,581,540,000,000,000,000,000,000,000
17
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
rb_event_ts_length(struct ring_buffer_event *event) { unsigned len = 0; if (event->type_len == RINGBUF_TYPE_TIME_EXTEND) { /* time extends include the data event after it */ len = RB_LEN_TIME_EXTEND; event = skip_time_extend(event); } return len + rb_event_length(event); }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
150,953,370,628,044,930,000,000,000,000,000,000,000
11
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { int v; const UChar* p = *pp; if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { (*pp)++; return TRUE; } (*pp)++; v = (EncISO_8859_1_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); if ((v...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
155,072,053,840,983,110,000,000,000,000,000,000,000
23
onig-5.9.2
TEST(UriSuite, TestUriUserInfoHostPort23Bug3510198RelatedOneTwo) { // Empty user info UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; int res; // 0 4 0 3 0 7 01 res = uriParseUriA(&stateA, "http" "://" "%2Fhost" "/"); ASSERT_TRUE(URI_SUCCESS == res); ASS...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
27,655,513,624,180,220,000,000,000,000,000,000,000
18
Fix uriParse*Ex* out-of-bounds read
best_access_path(JOIN *join, JOIN_TAB *s, table_map remaining_tables, const POSITION *join_positions, uint idx, bool disable_jbuf, double record_count, POSITION *pos, ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
122,531,427,681,255,500,000,000,000,000,000,000,000
638
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
get_target_file_for_link (GFile *src, GFile *dest_dir, const char *dest_fs_type, int count) { const char *editname; char *basename, *new_name; GFileInfo *info; GFile *dest; int max_length; max_length...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
231,671,506,939,121,740,000,000,000,000,000,000,000
65
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) { switch(reset_phase) { case MPT_IOC_SETUP_RESET: dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); break; case MPT_IOC_PRE_RESET: dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: MPT_IOC_PRE_RESET\n", ioc->na...
0
[ "CWE-362", "CWE-369" ]
linux
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
62,527,559,998,167,500,000,000,000,000,000,000,000
25
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 ...
fork_exec(char **argv) { pid_t pid; int status; struct sigaction act, old_act; int res = 0; act.sa_handler = SIG_DFL; sigemptyset(&act.sa_mask); act.sa_flags = 0; sigaction(SIGCHLD, &act, &old_act); if (log_file_name) flush_log_file(); pid = local_fork(); if (pid < 0) res = -1; else if (pid == 0) { ...
1
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
216,774,454,117,088,800,000,000,000,000,000,000,000
39
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
PHP_FUNCTION(dom_document_create_cdatasection) { zval *id; xmlNode *node; xmlDocPtr docp; int ret, value_len; dom_object *intern; char *value; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } DOM_GET_OBJ(...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
193,044,072,604,919,500,000,000,000,000,000,000,000
22
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
void noop_io_until_death(void) { char buf[1024]; if (!iobuf.in.buf || !iobuf.out.buf || iobuf.in_fd < 0 || iobuf.out_fd < 0 || kluge_around_eof) return; /* If we're talking to a daemon over a socket, don't short-circuit this logic */ if (msgs2stderr && daemon_connection >= 0) return; kluge_around_eof = 2; ...
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
162,274,943,825,341,700,000,000,000,000,000,000,000
20
Some extra file-list safety checks.
static size_t vxlan_get_size(const struct net_device *dev) { return nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_ID */ nla_total_size(sizeof(struct in6_addr)) + /* IFLA_VXLAN_GROUP{6} */ nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LINK */ nla_total_size(sizeof(struct in6_addr)) + /* IFLA_VXLAN_LOCAL{6} */ ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
301,758,746,350,174,300,000,000,000,000,000,000,000
29
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
list_functions(regmatch_T *regmatch) { int changed = func_hashtab.ht_changed; long_u todo = func_hashtab.ht_used; hashitem_T *hi; for (hi = func_hashtab.ht_array; todo > 0 && !got_int; ++hi) { if (!HASHITEM_EMPTY(hi)) { ufunc_T *fp = HI2UF(hi); --todo; if ((fp->uf_flags & FC_DEAD...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
94,415,037,312,992,190,000,000,000,000,000,000,000
30
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.
int snd_timer_global_new(char *id, int device, struct snd_timer **rtimer) { struct snd_timer_id tid; tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL; tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; tid.card = -1; tid.device = device; tid.subdevice = 0; return snd_timer_new(NULL, id, &tid, rtimer); }
0
[ "CWE-200", "CWE-362" ]
linux
ee8413b01045c74340aa13ad5bdf905de32be736
1,299,869,216,683,507,700,000,000,000,000,000,000
11
ALSA: timer: Fix double unlink of active_list ALSA timer instance object has a couple of linked lists and they are unlinked unconditionally at snd_timer_stop(). Meanwhile snd_timer_interrupt() unlinks it, but it calls list_del() which leaves the element list itself unchanged. This ends up with unlinking twice, and i...
int kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) { if (kvm_x86_ops->get_cpl(vcpu) != 0 || __kvm_set_xcr(vcpu, index, xcr)) { kvm_inject_gp(vcpu, 0); return 1; } return 0; }
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
246,948,354,876,897,160,000,000,000,000,000,000,000
9
kvm: x86: fix emulator buffer overflow (CVE-2014-0049) The problem occurs when the guest performs a pusha with the stack address pointing to an mmio address (or an invalid guest physical address) to start with, but then extending into an ordinary guest physical address. When doing repeated emulated pushes emulator_re...
gif_get_lzw (GifContext *context) { guchar *dest, *temp; gint lower_bound, upper_bound; /* bounds for emitting the area_updated signal */ gboolean bound_flag; gint first_pass; /* bounds for emitting the area_updated signal */ gint v; if (context->frame == NULL) { context->frame = g_new (GdkPixbuf...
1
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
6,223,379,527,732,253,000,000,000,000,000,000,000
231
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string) { cJSON *to_detach = cJSON_GetObjectItem(object, string); return cJSON_DetachItemViaPointer(object, to_detach); }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
125,008,748,345,245,270,000,000,000,000,000,000,000
6
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
PHP_METHOD(PharFileInfo, __construct) { char *fname, *arch, *entry, *error; int fname_len, arch_len, entry_len; phar_entry_object *entry_obj; phar_entry_info *entry_info; phar_archive_data *phar_data; zval *zobj = getThis(), arg1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &fname, &fname_len) == ...
0
[ "CWE-416" ]
php-src
d144590d38fa321b46b8e199c754006318985c84
110,222,047,609,002,520,000,000,000,000,000,000,000
59
Fix bug #72321 - use efree() for emalloc allocation
void CServer::DemoRecorder_HandleAutoStart() { if(Config()->m_SvAutoDemoRecord) { m_DemoRecorder.Stop(); char aFilename[128]; char aDate[20]; str_timestamp(aDate, sizeof(aDate)); str_format(aFilename, sizeof(aFilename), "demos/%s_%s.demo", "auto/autorecord", aDate); m_DemoRecorder.Start(Storage(), m_pCons...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
teeworlds
c68402fa7e279d42886d5951d1ea8ac2facc1ea5
28,327,978,235,769,240,000,000,000,000,000,000,000
18
changed a check
mysql_use_result(MYSQL *mysql) { MYSQL_RES *result; if (!mysql->fields) return(0); if (mysql->status != MYSQL_STATUS_GET_RESULT) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(0); } if (!(result=(MYSQL_RES*) calloc(1, sizeof(*result)+ sizeof(ulong)*mys...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
87,169,674,910,635,660,000,000,000,000,000,000,000
31
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
void jpc_mqdec_destroy(jpc_mqdec_t *mqdec) { if (mqdec->ctxs) { jas_free(mqdec->ctxs); } jas_free(mqdec); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
138,429,503,460,424,960,000,000,000,000,000,000,000
7
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 xfm_error(struct tree *xfm, const char *msg) { char *v = msg ? strdup(msg) : NULL; char *l = strdup("error"); if (l == NULL || v == NULL) return; tree_append(xfm, l, v); }
0
[]
augeas
f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26
101,947,745,503,005,620,000,000,000,000,000,000,000
8
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
virtual void help(stringstream& ss) const { ss << "Drops a single role. Before deleting the role completely it must remove it " "from any users or roles that reference it. If any errors occur in the middle " "of that process it's possible to be left in a state where the role ha...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
297,484,221,224,173,750,000,000,000,000,000,000,000
7
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
TEST_P(ProxyProtocolTest, V2ShortV4) { // An ipv4/tcp connection that has incorrect addr-len encoded constexpr uint8_t buffer[] = {0x0d, 0x0a, 0x0d, 0x0a, 0x00, 0x0d, 0x0a, 0x51, 0x55, 0x49, 0x54, 0x0a, 0x21, 0x21, 0x00, 0x04, 0x00, 0x08, 0x00, 0x02, '...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
304,962,246,685,258,700,000,000,000,000,000,000,000
10
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
open_files_data_unref (OpenFilesData *odata) { g_return_if_fail (odata != NULL); if (--odata->ref_count > 0) return; _g_string_list_free (odata->file_list); g_free (odata); }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
58,563,621,363,412,260,000,000,000,000,000,000,000
10
libarchive: sanitize filenames before extracting
is_loclist_cmd(int cmdidx) { if (cmdidx < 0 || cmdidx >= CMD_SIZE) return FALSE; return cmdnames[cmdidx].cmd_name[0] == 'l'; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
176,410,334,769,104,100,000,000,000,000,000,000,000
6
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
TEST_F(Http1ServerConnectionImplTest, HeaderOnlyResponse) { initialize(); NiceMock<MockRequestDecoder> decoder; Http::ResponseEncoder* response_encoder = nullptr; EXPECT_CALL(callbacks_, newStream(_, _)) .WillOnce(Invoke([&](ResponseEncoder& encoder, bool) -> RequestDecoder& { response_encoder = ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
302,269,357,146,383,470,000,000,000,000,000,000,000
23
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int rbd_init_disk(struct rbd_device *rbd_dev) { struct gendisk *disk; struct request_queue *q; unsigned int objset_bytes = rbd_dev->layout.object_size * rbd_dev->layout.stripe_count; int err; /* create gendisk info */ disk = alloc_disk(single_major ? (1 << RBD_SINGLE_MAJOR_PART_SHIFT) : RBD...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
117,338,013,333,062,730,000,000,000,000,000,000,000
79
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
TEST(HeaderMapImplTest, Iterate) { TestRequestHeaderMapImpl headers; headers.addCopy(LowerCaseString("hello"), "world"); headers.addCopy(LowerCaseString("foo"), "xxx"); headers.addCopy(LowerCaseString("world"), "hello"); LowerCaseString foo_key("foo"); headers.setReferenceKey(foo_key, "bar"); // set moves k...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
312,988,521,512,378,300,000,000,000,000,000,000,000
16
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void Server::msgUserState(ServerUser *uSource, MumbleProto::UserState &msg) { MSG_SETUP(ServerUser::Authenticated); VICTIM_SETUP; bool bNoBroadcast = false; Channel *root = qhChannels.value(0); if ((pDstServerUser->iId == 0) && (uSource->iId != 0)) { PERM_DENIED_TYPE(SuperUser); return; } msg.set_session(...
0
[ "CWE-20" ]
mumble
6b33dda344f89e5a039b7d79eb43925040654242
22,184,053,976,967,450,000,000,000,000,000,000,000
212
Don't crash on long usernames
Nef_polyhedron_2<T,Items,Mark> interior() const /*{\Mop returns the interior of |\Mvar|.}*/ { Nef_polyhedron_2<T,Items,Mark> res = *this; res.extract_interior(); return res; }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
129,521,200,853,424,570,000,000,000,000,000,000,000
6
Fix Nef_2 and Nef_S2 IO
GF_Err gf_isom_vvc_config_update_ex(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex, GF_VVCConfig *cfg, u32 operand_type, Bool keep_xps) { u32 array_incomplete; GF_TrackBox *trak; GF_Err e; GF_MPEGVisualSampleEntryBox *entry; GF_SampleDescriptionBox *stsd; e = CanAccessMovie(the_file, GF_ISOM_OPEN_WR...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
113,651,302,231,947,850,000,000,000,000,000,000,000
56
fixed #2165
static int merge_vertically(gx_device_txtwrite_t *tdev) { #ifdef TRACE_TXTWRITE text_list_entry_t *debug_x; #endif page_text_list_t *y_list = tdev->PageData.y_ordered_list; while (y_list && y_list->next) { page_text_list_t *next = y_list->next; bool collision = false; float overlap ...
0
[ "CWE-476" ]
ghostpdl
407c98a38c3a6ac1681144ed45cc2f4fc374c91f
183,413,837,894,917,670,000,000,000,000,000,000,000
106
txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref" Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph name or Unicode code point from the glyph ID, as this is not a valid ID.
cmsBool _cmsReadWCharArray(cmsIOHANDLER* io, cmsUInt32Number n, wchar_t* Array) { cmsUInt32Number i; cmsUInt16Number tmp; _cmsAssert(io != NULL); for (i=0; i < n; i++) { if (Array != NULL) { if (!_cmsReadUInt16Number(io, &tmp)) return FALSE; Array[i] = (wchar_t) tmp; ...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
336,167,211,974,692,800,000,000,000,000,000,000,000
21
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...
static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int flags) { DECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg->msg_name); struct sock *sk = sock->sk; struct sk_buff *skb; struct qrtr_cb *cb; int copied, rc; lock_sock(sk); if (sock_flag(sk, SOCK_ZAPPED)) { release_sock(sk); ...
1
[ "CWE-909" ]
linux
50535249f624d0072cd885bcdce4e4b6fb770160
320,360,106,188,195,820,000,000,000,000,000,000,000
51
net: qrtr: fix a kernel-infoleak in qrtr_recvmsg() struct sockaddr_qrtr has a 2-byte hole, and qrtr_recvmsg() currently does not clear it before copying kernel data to user space. It might be too late to name the hole since sockaddr_qrtr structure is uapi. BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 ...
SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, unsigned int, flags, struct sockaddr __user *, addr, int, addr_len) { struct socket *sock; struct sockaddr_storage address; int err; struct msghdr msg; struct iovec iov; int fput_needed; if (len > INT_MAX) len = INT_MAX; sock = sockfd_loo...
0
[ "CWE-399", "CWE-703" ]
linux
ed6fe9d614fc1bca95eb8c0ccd0e92db00ef9d5d
115,540,843,308,344,730,000,000,000,000,000,000,000
42
Fix order of arguments to compat_put_time[spec|val] Commit 644595f89620 ("compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c") introduced a bug where the helper functions to take either a 64-bit or compat time[spec|val] got the arguments in the wrong order, passing the kernel stack pointer off as a user pointer (and...
void Magick::Image::level(const double blackPoint_,const double whitePoint_, const double gamma_) { modifyImage(); GetPPException; (void) LevelImage(image(),blackPoint_,whitePoint_,gamma_,exceptionInfo); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
309,823,789,531,240,840,000,000,000,000,000,000,000
8
Added missing return to avoid use after free.
GF_Err gf_decrypt_fragment(GF_ISOFile *mp4, const char *drm_file, const char *dst_file, const char *fragment_name, u32 fs_dump_flags) { return gf_decrypt_file_ex(mp4, drm_file, dst_file, 0, fragment_name, fs_dump_flags); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
4,298,634,424,401,827,700,000,000,000,000,000,000
4
fixed #2138
mailimf_address_list_parse(const char * message, size_t length, size_t * indx, struct mailimf_address_list ** result) { size_t cur_token; clist * list; struct mailimf_address_list * address_list; int r; int res; cur_token = * indx; r = mailimf_struct_list_parse(message, length, &cur_toke...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
98,096,297,164,688,510,000,000,000,000,000,000,000
40
Fixed crash #274
void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info) { int hash; struct sock *raw_sk; const struct iphdr *iph; struct net *net; hash = protocol & (RAW_HTABLE_SIZE - 1); read_lock(&raw_v4_hashinfo.lock); raw_sk = sk_head(&raw_v4_hashinfo.ht[hash]); if (raw_sk != NULL) { iph = (const struct iphdr ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
239,582,975,197,150,700,000,000,000,000,000,000,000
25
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 void reset_packet_state(AVFormatContext *s) { ASFContext *asf = s->priv_data; int i; asf->state = PARSE_PACKET_HEADER; asf->offset = 0; asf->return_subpayload = 0; asf->sub_left = 0; asf->sub_header_offset = 0; asf->packet_offset = asf->...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
162,763,868,608,710,900,000,000,000,000,000,000,000
31
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
acl_fetch_http_auth_grp(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp) { if (!args || args->type != ARGT_USR) return 0; CHECK_HTTP_MESSAGE_FIRST(); if (!get_http_auth(l4)) return 0; /* acl_match_auth() will need several i...
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
97,353,588,246,261,790,000,000,000,000,000,000,000
29
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
static bool mg_atone(struct mg_str str, struct mg_addr *addr) { if (str.len > 0) return false; addr->ip = 0; addr->is_ip6 = false; return true; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
165,020,207,759,929,840,000,000,000,000,000,000,000
6
Protect against the directory traversal in mg_upload()
static int openpic_load(QEMUFile* f, void *opaque, int version_id) { OpenPICState *opp = (OpenPICState *)opaque; unsigned int i; if (version_id != 1) { return -EINVAL; } qemu_get_be32s(f, &opp->gcr); qemu_get_be32s(f, &opp->vir); qemu_get_be32s(f, &opp->pir); qemu_get_be32s(f, ...
1
[ "CWE-119" ]
qemu
73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e
333,219,402,084,427,620,000,000,000,000,000,000,000
47
openpic: avoid buffer overrun on incoming migration CVE-2013-4534 opp->nb_cpus is read from the wire and used to determine how many IRQDest elements to read into opp->dst[]. If the value exceeds the length of opp->dst[], MAX_CPU, opp->dst[] can be overrun with arbitrary data from the wire. Fix this by failing migrat...
ZEND_API zval* ZEND_FASTCALL _zend_hash_str_update_ind(HashTable *ht, const char *str, size_t len, zval *pData ZEND_FILE_LINE_DC) { zend_string *key = zend_string_init(str, len, ht->u.flags & HASH_FLAG_PERSISTENT); zval *ret = _zend_hash_add_or_update_i(ht, key, pData, HASH_UPDATE | HASH_UPDATE_INDIRECT ZEND_FILE_LIN...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
36,139,318,017,531,537,000,000,000,000,000,000,000
7
Fix #73832 - leave the table in a safe state if the size is too big.
read_yin_grouping(struct lys_module *module, struct lys_node *parent, struct lyxml_elem *yin, int options, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; struct lyxml_elem *sub, *next, root; struct lys_node *node = NULL; struct lys_node *retval; struct lys_node_grp...
0
[ "CWE-252" ]
libyang
a3917d95d516e3de267d3cfa5d4d3715a90e8777
15,413,466,291,165,177,000,000,000,000,000,000,000
142
yin parser BUGFIX invalid memory access ... in case there were some unresolved extensions. Fixes #1454 Fixes #1455
static char **split_line(const SERVER_REC *server, const char *line, const char *target, int len) { const char *start = settings_get_str("split_line_start"); const char *end = settings_get_str("split_line_end"); gboolean onspace = settings_get_bool("split_line_on_space"); char *recoded_start = recode_out(server...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
278,242,664,304,810,530,000,000,000,000,000,000,000
69
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
bool Item_param::add_as_clone(THD *thd) { LEX *lex= thd->lex; uint master_pos= pos_in_query + lex->clone_spec_offset; List_iterator_fast<Item_param> it(lex->param_list); Item_param *master_param; while ((master_param = it++)) { if (master_pos == master_param->pos_in_query) return master_param->reg...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
2,983,293,294,243,452,000,000,000,000,000,000,000
14
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
int sftp_reply_status(sftp_client_message msg, uint32_t status, const char *message) { ssh_buffer out; ssh_string s; out = ssh_buffer_new(); if (out == NULL) { return -1; } s = ssh_string_from_char(message ? message : ""); if (s == NULL) { SSH_BUFFER_FREE(out); return -1; } if (ssh_...
0
[ "CWE-476" ]
libssh-mirror
533d881b0f4b24c72b35ecc97fa35d295d063e53
2,302,500,305,736,915,000,000,000,000,000,000,000
31
sftpserver: Add missing NULL check for ssh_buffer_new() Thanks to Ramin Farajpour Cami for spotting this. Fixes T232 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Header::tileDescription () { return typedAttribute <TileDescriptionAttribute> ("tiles").value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
310,329,672,793,438,260,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int decode_fsinfo(struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo) { unsigned int savep; uint32_t attrlen, bitmap[3]; int status; if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) goto xdr_error; if ((status = decode_attr_bitmap(xdr, bitmap)) != 0) goto xdr_error; if ((status = decode_attr_length(...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
70,670,062,986,414,300,000,000,000,000,000,000,000
58
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static void __sched_fork(unsigned long clone_flags, struct task_struct *p) { p->on_rq = 0; p->se.on_rq = 0; p->se.exec_start = 0; p->se.sum_exec_runtime = 0; p->se.prev_sum_exec_runtime = 0; p->se.nr_migrations = 0; p->se.vruntime = 0; INIT_LIST_HEAD(&p->se.group_node); #ifdef CONFIG_FAIR_GROUP_SCHED...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
174,753,169,323,554,730,000,000,000,000,000,000,000
57
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...
uint32_t next_cluster(DOS_FS * fs, uint32_t cluster) { uint32_t value; FAT_ENTRY curEntry; get_fat(&curEntry, fs->fat, cluster, fs); value = curEntry.value; if (FAT_IS_BAD(fs, value)) die("Internal error: next_cluster on bad cluster"); return FAT_IS_EOF(fs, value) ? -1 : value; }
0
[ "CWE-703", "CWE-189" ]
dosfstools
07908124838afcc99c577d1d3e84cef2dbd39cb7
36,048,704,227,102,660,000,000,000,000,000,000,000
12
set_fat(): Fix off-by-2 error leading to corruption in FAT12 In FAT12 two 12 bit entries are combined to a 24 bit value (three bytes). Therefore, when an even numbered FAT entry is set in FAT12, it must be be combined with the following entry. To prevent accessing beyond the end of the FAT array, it must be checked th...
static pj_status_t encode_msgint_attr(const void *a, pj_uint8_t *buf, unsigned len, const pj_stun_msg_hdr *msghdr, unsigned *printed) { const pj_stun_msgint_attr *ca = (const pj_stun_msgint_attr*)a; PJ_CHECK_STACK(); PJ_UNUSED_ARG(msghdr); if (len < 24) return PJ...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
339,940,915,684,718,900,000,000,000,000,000,000,000
25
Merge pull request from GHSA-2qpg-f6wf-w984
nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, struct nfs4_sessionid *sid, u32 minorversion) { return NULL; }
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
63,761,109,929,707,290,000,000,000,000,000,000,000
5
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
connection_release_nolock_ext(Connection *conn, int release_only) { if (conn->c_refcnt <= 0) { slapi_log_err(SLAPI_LOG_ERR, "connection_release_nolock_ext", "conn=%" PRIu64 " fd=%d Attempt to release connection that is not acquired\n", conn->c_connid, conn->c_sd);...
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
44,127,054,813,702,895,000,000,000,000,000,000,000
14
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
parse_uri(const char *scheme, const char *uri, char **userp, char **hostp, int *portp, char **pathp) { char *uridup, *cp, *tmp, ch; char *user = NULL, *host = NULL, *path = NULL; int port = -1, ret = -1; size_t len; len = strlen(scheme); if (strncmp(uri, scheme, len) != 0 || strncmp(uri + len, "://", 3) != 0...
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
8,511,537,706,123,625,000,000,000,000,000,000,000
89
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
int git_path_dirname_r(git_buf *buffer, const char *path) { const char *endp; int is_prefix = 0, len; /* Empty or NULL string gets treated as "." */ if (path == NULL || *path == '\0') { path = "."; len = 1; goto Exit; } /* Strip trailing slashes */ endp = path + strlen(path) - 1; while (endp > path && *...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
52,536,120,561,495,600,000,000,000,000,000,000,000
67
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
quoted_strchr (s, c, flags) char *s; int c, flags; { register char *p; for (p = s; *p; p++) { if (((flags & ST_BACKSL) && *p == '\\') || ((flags & ST_CTLESC) && *p == CTLESC)) { p++; if (*p == '\0') return ((char *)NULL); continue; } else if (*p == c) return p; }...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
242,185,384,353,284,040,000,000,000,000,000,000,000
21
bash-4.4-rc2 release
void php_filter_email(PHP_INPUT_FILTER_PARAM_DECL) { /* Check section 6 of rfc 822 http://www.faqs.org/rfcs/rfc822.html */ const unsigned char allowed_list[] = LOWALPHA HIALPHA DIGIT "!#$%&'*+-=?^_`{|}~@.[]"; filter_map map; filter_map_init(&map); filter_map_update(&map, 1, allowed_list); filter_map_apply(va...
0
[ "CWE-190" ]
php-src
57b997ebf99e0eb9a073e0dafd2ab100bd4a112d
24,146,565,935,709,140,000,000,000,000,000,000,000
10
Fix bug #71637: Multiple Heap Overflow due to integer overflows
static void free_minor(int minor) { spin_lock(&_minor_lock); idr_remove(&_minor_idr, minor); spin_unlock(&_minor_lock); }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
257,839,749,565,157,100,000,000,000,000,000,000,000
6
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
bool Item_trigger_field::eq(const Item *item, bool binary_cmp) const { return item->type() == TRIGGER_FIELD_ITEM && row_version == ((Item_trigger_field *)item)->row_version && !my_strcasecmp(system_charset_info, field_name, ((Item_trigger_field *)item)->field_name); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
185,210,551,419,253,300,000,000,000,000,000,000,000
7
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
uint8_t intsetFind(intset *is, int64_t value) { uint8_t valenc = _intsetValueEncoding(value); return valenc <= intrev32ifbe(is->encoding) && intsetSearch(is,value,NULL); }
0
[ "CWE-190" ]
redis
789f10156009b404950ad717642a9496ed887083
250,046,900,483,006,000,000,000,000,000,000,000,000
4
Fix integer overflow in intset (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer v...
se::DeviceMemory<T> AsDeviceMemory(const T* cuda_memory) { se::DeviceMemoryBase wrapped(const_cast<T*>(cuda_memory)); se::DeviceMemory<T> typed(wrapped); return typed; }
0
[ "CWE-617", "CWE-703" ]
tensorflow
31bd5026304677faa8a0b77602c6154171b9aec1
204,540,854,568,079,600,000,000,000,000,000,000,000
5
Prevent check fail in FFT PiperOrigin-RevId: 372031044 Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299
struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, const u8 *addr, gfp_t gfp) { struct ieee80211_local *local = sdata->local; struct sta_info *sta; struct timespec uptime; struct ieee80211_tx_latency_bin_ranges *tx_latency; int i; sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp); ...
1
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
21,100,269,408,258,766,000,000,000,000,000,000,000
123
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
void qemu_chr_fe_set_handlers(CharBackend *b, IOCanReadHandler *fd_can_read, IOReadHandler *fd_read, IOEventHandler *fd_event, void *opaque, GMainContext *context) { ...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
293,000,167,580,567,600,000,000,000,000,000,000,000
46
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 void init_translation_status(struct intel_iommu *iommu) { u32 gsts; gsts = readl(iommu->reg + DMAR_GSTS_REG); if (gsts & DMA_GSTS_TES) iommu->flags |= VTD_FLAG_TRANS_PRE_ENABLED; }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
45,302,327,032,981,380,000,000,000,000,000,000,000
8
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...
setclr_flags( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt, u_long set ) { struct conf_sys_flags *sf; u_int32 flags; if (INFO_NITEMS(inpkt->err_nitems) > 1) { msyslog(LOG_ERR, "setclr_flags: err_nitems > 1"); req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); return; } sf = (struct conf_sys_flags...
0
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
26,940,363,352,318,913,000,000,000,000,000,000,000
49
[TALOS-CAN-0052] crash by loop counter underrun.
static char *get_flags(struct ListHead *hflags, char *s) { /* sanity-check string */ const size_t plen = mutt_str_startswith(s, "FLAGS", CASE_IGNORE); if (plen == 0) { mutt_debug(LL_DEBUG1, "not a FLAGS response: %s\n", s); return NULL; } s += plen; SKIPWS(s); if (*s != '(') { mutt_debug(L...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
31,051,906,072,085,375,000,000,000,000,000,000,000
45
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>
void onComplete(const Status& status, ContextImpl& context) const override { auto& completion_state = context.getCompletionState(this); if (completion_state.is_completed_) { return; } // If any of children is OK, return OK if (Status::Ok == status) { completion_state.is_completed_ = t...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
189,310,605,952,851,100,000,000,000,000,000,000,000
39
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
void CWebServer::RemoveUsersSessions(const std::string& username, const WebEmSession & exceptSession) { m_sql.safe_query("DELETE FROM UserSessions WHERE (Username=='%q') and (SessionID!='%q')", username.c_str(), exceptSession.id.c_str()); }
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
332,305,393,144,956,400,000,000,000,000,000,000,000
3
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
do_save_yourself (GsmXSMPClient *client, int save_type, gboolean allow_interact) { g_assert (client->priv->conn != NULL); if (client->priv->next_save_yourself != -1) { /* Either we're currently doing a shutdown and there's a checkpoin...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
183,112,748,588,474,250,000,000,000,000,000,000,000
53
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
void ImportEPUB::ReadMetadataLinkElement(QXmlStreamReader *opf_reader) { QString relation = opf_reader->attributes().value("", "rel").toString(); QString mtype = opf_reader->attributes().value("", "media-type").toString(); QString props = opf_reader->attributes().value("", "properties").toString(); QStr...
0
[ "CWE-22" ]
Sigil
04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4
213,229,350,716,964,700,000,000,000,000,000,000,000
37
further harden against malicious epubs and produce error message
char * CFStringToCharArr(CFStringRef aString) { if (aString == NULL) { return NULL; } CFIndex length = CFStringGetLength(aString); CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1; char *buffer = (char *)malloc(maxSize); if (CFStringGetCString(aString, buffer, max...
0
[ "CWE-415" ]
docker-credential-helpers
87c80bfba583eadc087810d17aa631ef4e405efc
123,982,491,125,858,310,000,000,000,000,000,000,000
14
Fix a double free in the List functions The code was set up so that it would free the individual items and the data in `freeListData`, but there was already a Go `defer` to free the data item, resulting in a double free. Remove the `free` in `freeListData` and leave the original one. In addition, move the `defer` fo...
static int btrfs_del_sys_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset) { struct btrfs_super_block *super_copy = fs_info->super_copy; struct btrfs_disk_key *disk_key; struct btrfs_chunk *chunk; u8 *ptr; int ret = 0; u32 num_stripes; u32 array_size; u32 len = 0; u32 cur; struct btrfs_key key; lockdep...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
307,084,032,097,705,700,000,000,000,000,000,000,000
45
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing) { KaxBlock & theBlock = GetChild<KaxBlock>(*this); assert(ParentCluster != NULL); theBlock.SetParent(*ParentCluster); ParentTrack = &...
0
[ "CWE-200", "CWE-399", "CWE-119" ]
libmatroska
0a2d3e3644a7453b6513db2f9bc270f77943573f
325,793,031,595,906,600,000,000,000,000,000,000,000
22
KaxBlockInternal: check EBML lace sizes against available buffer space
const char* SSL_get_cipher(SSL* ssl) { return ssl->getSecurity().get_parms().cipher_name_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
5,284,097,527,237,758,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void mhac_box_del(GF_Box *s) { GF_MHAConfigBox *ptr = (GF_MHAConfigBox *) s; if (ptr->mha_config) gf_free(ptr->mha_config); gf_free(s);
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
316,445,616,270,294,500,000,000,000,000,000,000,000
6
fixed #1587
static void forward_req_info(CephContext *cct, req_info& info, const std::string& bucket_name) { /* the request of container or object level will contain bucket name. * only at account level need to append the bucket name */ if (info.script_uri.find(bucket_name) != std::string::npos) { return; } ldout(c...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
106,917,708,036,151,140,000,000,000,000,000,000,000
13
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 <...