func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
uint64_t Projection::ProjectionSize() const { uint64_t size = PayloadSize(); if (size > 0) size += EbmlMasterElementSize(libwebm::kMkvProjection, size); return size; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
253,826,172,884,643,300,000,000,000,000,000,000,000
8
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static void coerce_reg_to_size(struct bpf_reg_state *reg, int size) { u64 mask; /* clear high bits in bit representation */ reg->var_off = tnum_cast(reg->var_off, size); /* fix arithmetic bounds */ mask = ((u64)1 << (size * 8)) - 1; if ((reg->umin_value & ~mask) == (reg->umax_value & ~mask)) { reg->umin_value...
0
[ "CWE-119", "CWE-284" ]
linux
468f6eafa6c44cb2c5d8aad35e12f06c240a812a
290,248,484,756,654,400,000,000,000,000,000,000,000
19
bpf: fix 32-bit ALU op verification 32-bit ALU ops operate on 32-bit values and have 32-bit outputs. Adjust the verifier accordingly. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkman...
void ssl3_init_finished_mac(SSL *s) { EVP_MD_CTX_set_flags(&(s->s3->finish_dgst1), EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); EVP_DigestInit_ex(&(s->s3->finish_dgst1),s->ctx->md5, NULL); EVP_DigestInit_ex(&(s->s3->finish_dgst2),s->ctx->sha1, NULL); }
0
[ "CWE-310" ]
openssl
35a65e814beb899fa1c69a7673a8956c6059dce7
254,837,079,865,283,450,000,000,000,000,000,000,000
7
Make CBC decoding constant time. This patch makes the decoding of SSLv3 and TLS CBC records constant time. Without this, a timing side-channel can be used to build a padding oracle and mount Vaudenay's attack. This patch also disables the stitched AESNI+SHA mode pending a similar fix to that code. In order to be eas...
static void recalloc_sock(struct pool *pool, size_t len) { size_t old, new; old = strlen(pool->sockbuf); new = old + len + 1; if (new < pool->sockbuf_size) return; new = new + (RBUFSIZE - (new % RBUFSIZE)); applog(LOG_DEBUG, "Recallocing pool sockbuf to %lu", (unsigned long)new); pool->sockbuf = realloc(pool-...
0
[ "CWE-119", "CWE-787" ]
bfgminer
c80ad8548251eb0e15329fc240c89070640c9d79
222,609,483,372,658,420,000,000,000,000,000,000,000
16
Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
empathy_theme_adium_new (EmpathyAdiumData *data, const gchar *variant) { g_return_val_if_fail (data != NULL, NULL); return g_object_new (EMPATHY_TYPE_THEME_ADIUM, "adium-data", data, "variant", variant, NULL); }
0
[ "CWE-79" ]
empathy
739aca418457de752be13721218aaebc74bd9d36
238,434,287,667,693,500,000,000,000,000,000,000,000
10
theme_adium_append_message: escape alias before displaying it Not doing so can lead to nasty HTML injection from hostile users. https://bugzilla.gnome.org/show_bug.cgi?id=662035
get_element (fd_set *set, SCM element, SCM list) { int fd; if (scm_is_integer (element)) { fd = scm_to_int (element); } else { fd = SCM_FPORT_FDES (SCM_COERCE_OUTPORT (element)); } if (FD_ISSET (fd, set)) list = scm_cons (element, list); return list; }
0
[]
guile
245608911698adb3472803856019bdd5670b6614
72,382,440,883,071,790,000,000,000,000,000,000,000
16
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
static int ext4_rmdir(struct inode *dir, struct dentry *dentry) { int retval; struct inode *inode; struct buffer_head *bh; struct ext4_dir_entry_2 *de; handle_t *handle; /* Initialize quotas before so that eventual writes go in * separate transaction */ dquot_initialize(dir); dquot_initialize(dentry->d_inode...
0
[ "CWE-399" ]
linux
0e9a9a1ad619e7e987815d20262d36a2f95717ca
169,138,539,886,909,720,000,000,000,000,000,000,000
60
ext4: avoid hang when mounting non-journal filesystems with orphan list When trying to mount a file system which does not contain a journal, but which does have a orphan list containing an inode which needs to be truncated, the mount call with hang forever in ext4_orphan_cleanup() because ext4_orphan_del() will return...
static int fts3TermSelect( Fts3Table *p, /* Virtual table handle */ Fts3PhraseToken *pTok, /* Token to query for */ int iColumn, /* Column to query (or -ve for all columns) */ int *pnOut, /* OUT: Size of buffer at *ppOut */ char **ppOut ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
29,288,076,907,646,843,000,000,000,000,000,000,000
47
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
void CLASS minolta_rd175_load_raw() { uchar pixel[768]; unsigned irow, box, row, col; for (irow=0; irow < 1481; irow++) { if (fread (pixel, 1, 768, ifp) < 768) derror(); box = irow / 82; row = irow % 82 * 12 + ((box < 12) ? box | 1 : (box-12)*2); switch (irow) { case 1477: case 1479: contin...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
231,909,083,345,233,660,000,000,000,000,000,000,000
27
Avoid overflow in ljpeg_start().
_krb5_pk_rd_pa_reply(krb5_context context, const char *realm, void *c, krb5_enctype etype, const krb5_krbhst_info *hi, unsigned nonce, const krb5_data *req_buffer, PA_DATA *pa, krb5_keyblock **key) { krb5_pk_init_ctx ctx = c; krb5_error_code ret; size_...
0
[ "CWE-320" ]
heimdal
2f7f3d9960aa6ea21358bdf3687cee5149aa35cf
78,255,782,464,853,340,000,000,000,000,000,000,000
177
CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge when anonymous PKINIT is used. Failure to do so can permit an active attacker to become a man-in-the-middle. Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged...
rdpsnddbg_process(STREAM s) { unsigned int pkglen; static char *rest = NULL; char *buf; pkglen = s->end - s->p; /* str_handle_lines requires null terminated strings */ buf = (char *) xmalloc(pkglen + 1); STRNCPY(buf, (char *) s->p, pkglen + 1); str_handle_lines(buf, &rest, rdpsnddbg_line_handler, NULL); xfr...
1
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
124,620,596,001,370,960,000,000,000,000,000,000,000
15
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait, struct uffd_msg *msg) { ssize_t ret; DECLARE_WAITQUEUE(wait, current); struct userfaultfd_wait_queue *uwq; /* * Handling fork event requires sleeping operations, so * we drop the event_wqh lock, then do these ops, then * loc...
1
[ "CWE-416" ]
linux
384632e67e0829deb8015ee6ad916b180049d252
141,854,594,272,545,280,000,000,000,000,000,000,000
124
userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the u...
int getWidth() const { return w; }
0
[ "CWE-476", "CWE-190" ]
poppler
27354e9d9696ee2bc063910a6c9a6b27c5184a52
243,366,549,938,808,850,000,000,000,000,000,000,000
1
JBIG2Stream: Fix crash on broken file https://github.com/jeffssh/CVE-2021-30860 Thanks to David Warren for the heads up
void CLASS read_shorts(ushort *pixel, unsigned count) { if (fread(pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) swab((char *)pixel, (char *)pixel, count * 2); }
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
10,511,633,434,077,462,000,000,000,000,000,000,000
7
parse_qt: possible integer overflow
static int flush_task_priority(int how) { switch (how & (FLUSH_HIGHPRI|FLUSH_LOWPRI)) { case FLUSH_HIGHPRI: return RPC_PRIORITY_HIGH; case FLUSH_LOWPRI: return RPC_PRIORITY_LOW; } return RPC_PRIORITY_NORMAL; }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
166,951,427,046,196,170,000,000,000,000,000,000,000
10
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
void CConnectionTransportUDP::Received_ChallengeReply( const CMsgSteamSockets_UDP_ChallengeReply &msg, SteamNetworkingMicroseconds usecNow ) { // We should only be getting this if we are the "client" if ( ListenSocket() ) { ReportBadUDPPacketFromConnectionPeer( "ChallengeReply", "Shouldn't be receiving this unless...
0
[ "CWE-703" ]
GameNetworkingSockets
d944a10808891d202bb1d5e1998de6e0423af678
286,146,457,839,052,600,000,000,000,000,000,000,000
83
Tweak pointer math to avoid possible integer overflow
static int orinoco_ioctl_getsens(struct net_device *dev, struct iw_request_info *info, struct iw_param *srq, char *extra) { struct orinoco_private *priv = ndev_priv(dev); hermes_t *hw = &priv->hw; u16 val; int err; unsigned long flags; if (!priv->has_sensitivity) return -EOPNOTSUPP; if (orinoc...
0
[]
linux
0a54917c3fc295cb61f3fb52373c173fd3b69f48
23,552,613,386,621,160,000,000,000,000,000,000,000
28
orinoco: fix TKIP countermeasure behaviour Enable the port when disabling countermeasures, and disable it on enabling countermeasures. This bug causes the response of the system to certain attacks to be ineffective. It also prevents wpa_supplicant from getting scan results, as wpa_supplicant disables countermeasures...
int LZ4_NbCommonBytes (register U32 val) { # if defined(LZ4_BIG_ENDIAN) # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; _BitScanReverse( &r, val ); return (int)(r>>3); # elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin...
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
146,697,537,103,858,680,000,000,000,000,000,000,000
28
Fixed : issue 52 (reported by Ludwig Strigeus)
void AsyncConnection::prepare_send_message(uint64_t features, Message *m, bufferlist &bl) { ldout(async_msgr->cct, 20) << __func__ << " m" << " " << *m << dendl; // associate message with Connection (for benefit of encode_payload) if (m->empty_payload()) ldout(async_msgr->cct, 20) << __func__ << " encoding f...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
12,238,018,895,320,325,000,000,000,000,000,000,000
19
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
PHP_FUNCTION(imagegrabwindow) { HWND window; zend_long client_area = 0; RECT rc = {0}; RECT rc_win = {0}; int Width, Height; HDC hdc; HDC memDC; HBITMAP memBM; HBITMAP hOld; HINSTANCE handle; zend_long lwindow_handle; typedef BOOL (WINAPI *tPrintWindow)(HWND, HDC,UINT); tPrintWindow pPrintWindow = 0; gdI...
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
24,196,872,110,475,966,000,000,000,000,000,000,000
85
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
static int __init vhost_scsi_init(void) { int ret = -ENOMEM; /* * Use our own dedicated workqueue for submitting I/O into * target core to avoid contention within system_wq. */ vhost_scsi_workqueue = alloc_workqueue("vhost_scsi", 0, 0); if (!vhost_scsi_workqueue) goto out; ret = vhost_scsi_register(); if...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
227,409,425,739,137,300,000,000,000,000,000,000,000
28
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
generic_ret *init_2_svc(krb5_ui_4 *arg, struct svc_req *rqstp) { static generic_ret ret; gss_buffer_desc client_name, service_name; kadm5_server_handle_t handle; OM_uint32 minor_stat; const char *errmsg = NULL; size_t clen, slen; ...
1
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
37,842,362,757,581,875,000,000,000,000,000,000,000
52
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
static int coroutine_fn bdrv_co_do_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, BdrvRequestFlags flags) { if (nb_sectors < 0 || nb_sectors > (INT_MAX >> BDRV_SECTOR_BITS)) { return -EINVAL; } return bdrv_co_do_pwritev(bs, sector_num << BDRV_SECTOR_BIT...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
499,909,431,088,599,400,000,000,000,000,000,000
11
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
display_separation_gray_cs_to_cmyk_cm(gx_device * dev, frac gray, frac out[]) { int * map = (int *)(&((gx_device_display *) dev)->devn_params.separation_order_map); gray_cs_to_devn_cm(dev, map, gray, out); }
0
[]
ghostpdl
1ef5f08f2c2e27efa978f0010669ff22355c385f
111,818,504,469,313,950,000,000,000,000,000,000,000
7
Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829 The ICC profile checking needs to be told that the device supports_devn, so add a spec_op proc to return true when in separation mode, and add a proc for fill_rectangle_hl_color so that fillpage will work in Separation mode. This was fixed...
handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len) { struct in_addr tempip; char in[512]; char logindata[16]; char out[64*1024]; char unpacked[64*1024]; char *tmp[2]; int userid; int read; userid = -1; /* Everything here needs at least two chars in the name */ if (domain_len < 2) ...
1
[]
iodine
b715be5cf3978fbe589b03b09c9398d0d791f850
106,474,220,353,872,720,000,000,000,000,000,000,000
754
Fix authentication bypass bug The client could bypass the password check by continuing after getting error from the server and guessing the network parameters. The server would still accept the rest of the setup and also network traffic. Add checks for normal and raw mode that user has authenticated before allowing a...
PHP_FUNCTION(imagefttext) { php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW, 1); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
196,548,016,855,471,150,000,000,000,000,000,000,000
4
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
ccp_run_xts_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { struct ccp_xts_aes_engine *xts = &cmd->u.xts; struct ccp_dm_workarea key, ctx; struct ccp_data src, dst; struct ccp_op op; unsigned int unit_size, dm_offset; bool in_place = false; unsigned int sb_count; enum ccp_aes_type aestype; int ret;...
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
101,375,630,705,260,430,000,000,000,000,000,000,000
198
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
GF_Err tmax_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TMAXBox *ptr = (GF_TMAXBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->maxTime); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
130,899,867,618,699,040,000,000,000,000,000,000,000
10
prevent dref memleak on invalid input (#1183)
static int zipfileReadData( FILE *pFile, /* Read from this file */ u8 *aRead, /* Read into this buffer */ int nRead, /* Number of bytes to read */ i64 iOff, /* Offset to read from */ char **pzErrmsg /* OUT: Erro...
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
67,282,613,499,919,830,000,000,000,000,000,000,000
16
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
_XimDecodeInnerIMATTRIBUTE( Xim im, XIMArg *arg) { XIMResourceList res; XimDefIMValues im_values; if (!(res = _XimGetResourceListRec(im->private.proto.im_inner_resources, im->private.proto.im_num_inner_resources, arg->name))) return False; _XimGetCurrentIMValues(im, &im_values); ...
0
[ "CWE-190" ]
libx11
1703b9f3435079d3c6021e1ee2ec34fd4978103d
87,639,131,025,995,300,000,000,000,000,000,000,000
14
Change the data_len parameter of _XimAttributeToValue() to CARD16 It's coming from a length in the protocol (unsigned) and passed to functions that expect unsigned int parameters (_XCopyToArg() and memcpy()). Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Todd Carson <toc@daybefore.net>
e_ews_connection_utils_check_element (const gchar *function_name, const gchar *element_name, const gchar *expected_name) { g_return_val_if_fail (function_name != NULL, FALSE); g_return_val_if_fail (element_name != NULL, FALSE); g_return_val_if_fail (expected_name != NULL, FALSE); if (!g_str_equ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
247,271,791,859,433,130,000,000,000,000,000,000,000
17
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
static int read_channel_data(ALSDecContext *ctx, ALSChannelData *cd, int c) { GetBitContext *gb = &ctx->gb; ALSChannelData *current = cd; unsigned int channels = ctx->avctx->channels; int entries = 0; while (entries < channels && !(current->stop_flag = get_bits1(gb))) { ...
0
[ "CWE-787" ]
FFmpeg
18f94df8af04f2c02a25a7dec512289feff6517f
162,998,052,043,762,650,000,000,000,000,000,000,000
43
avcodec/alsdec: check predictor order against block length Fixes out of array access Fixes: abd3c041acbcb816be113455d138166b-asan_heap-oob_b11634_3707_cov_1707137151_als_05_2ch48k16b.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static void kvm_unpin_pages(struct kvm *kvm, pfn_t pfn, unsigned long npages) { unsigned long i; for (i = 0; i < npages; ++i) kvm_release_pfn_clean(pfn + i); }
0
[ "CWE-264" ]
kvm
32f6daad4651a748a58a3ab6da0611862175722f
72,265,381,980,997,020,000,000,000,000,000,000,000
7
KVM: unmap pages from the iommu when slots are removed We've been adding new mappings, but not destroying old mappings. This can lead to a page leak as pages are pinned using get_user_pages, but only unpinned with put_page if they still exist in the memslots list on vm shutdown. A memslot that is destroyed while an i...
connection_dirserv_add_servers_to_outbuf(dir_connection_t *conn) { int by_fp = (conn->dir_spool_src == DIR_SPOOL_SERVER_BY_FP || conn->dir_spool_src == DIR_SPOOL_EXTRA_BY_FP); int extra = (conn->dir_spool_src == DIR_SPOOL_EXTRA_BY_FP || conn->dir_spool_src == DIR_SPOOL_EXTRA_BY_DIGEST)...
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
324,402,914,865,831,650,000,000,000,000,000,000,000
71
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
cancel_pending_query (GdmSessionConversation *conversation) { if (conversation->pending_invocation == NULL) { return; } g_debug ("GdmSession: Cancelling pending query"); g_dbus_method_invocation_return_dbus_error (conversation->pending_invocation, ...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
319,325,551,433,219,040,000,000,000,000,000,000,000
13
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
convert_delimiter(char *path, char delim) { int i; char old_delim; if (path == NULL) return; if (delim == '/') old_delim = '\\'; else old_delim = '/'; for (i = 0; path[i] != '\0'; i++) { if (path[i] == old_delim) path[i] = delim; } }
0
[ "CWE-20" ]
linux
70945643722ffeac779d2529a348f99567fa5c33
75,049,358,868,462,960,000,000,000,000,000,000,000
18
cifs: always do is_path_accessible check in cifs_mount Currently, we skip doing the is_path_accessible check in cifs_mount if there is no prefixpath. I have a report of at least one server however that allows a TREE_CONNECT to a share that has a DFS referral at its root. The reporter in this case was using a UNC that ...
poppler_ps_file_set_duplex (PopplerPSFile *ps_file, gboolean duplex) { g_return_if_fail (ps_file->out == nullptr); ps_file->duplex = duplex; }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
57,938,599,541,447,790,000,000,000,000,000,000,000
6
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
NTSTATUS vfs_default_init(void) { return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_VFS_MODULE_NAME, &vfs_default_fns); }
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
130,229,756,465,510,620,000,000,000,000,000,000,000
5
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
static void vc_uniscr_insert(struct vc_data *vc, unsigned int nr) { struct uni_screen *uniscr = get_vc_uniscr(vc); if (uniscr) { char32_t *ln = uniscr->lines[vc->vc_y]; unsigned int x = vc->vc_x, cols = vc->vc_cols; memmove(&ln[x + nr], &ln[x], (cols - x - nr) * sizeof(*ln)); memset32(&ln[x], ' ', nr); } }
0
[ "CWE-416", "CWE-362" ]
linux
ca4463bf8438b403596edd0ec961ca0d4fbe0220
67,972,042,316,875,230,000,000,000,000,000,000,000
12
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console The VT_DISALLOCATE ioctl can free a virtual console while tty_release() is still running, causing a use-after-free in con_shutdown(). This occurs because VT_DISALLOCATE considers a virtual console's 'struct vc_data' to be unused as soon as the correspond...
RZ_API RZ_BORROW RzAnalysisVar *rz_analysis_function_get_var_byname(RzAnalysisFunction *fcn, const char *name) { rz_return_val_if_fail(fcn && name, NULL); void **it; rz_pvector_foreach (&fcn->vars, it) { RzAnalysisVar *var = *it; if (!strcmp(var->name, name)) { return var; } } return NULL; }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
97,749,443,002,136,250,000,000,000,000,000,000,000
11
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
MagickPrivate XWindows *XInitializeWindows(Display *display, XResourceInfo *resource_info) { Window root_window; XWindows *windows; /* Allocate windows structure. */ windows=(XWindows *) AcquireMagickMemory(sizeof(*windows)); if (windows == (XWindows *) NULL) { ThrowXWindowFatalExc...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
131,894,097,007,284,500,000,000,000,000,000,000,000
162
https://github.com/ImageMagick/ImageMagick/issues/1531
p11_rpc_buffer_add_mechanism_type_array_value (p11_buffer *buffer, const void *value, CK_ULONG value_length) { size_t count = value_length / sizeof (CK_MECHANISM_TYPE); /* Check if count can be converted to uint32_t. */ if (count > UINT32_MAX) { p11_buffer_fail (buffer); return; } /* ...
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
18,218,235,846,990,063,000,000,000,000,000,000,000
28
Check attribute length against buffer size If an attribute's length does not match the length of the byte array inside it, one length was used for allocation, and the other was used for memcpy. This additional check will instead return an error on malformed messages.
static int sas_ex_manuf_info(struct domain_device *dev) { u8 *mi_req; u8 *mi_resp; int res; mi_req = alloc_smp_req(MI_REQ_SIZE); if (!mi_req) return -ENOMEM; mi_resp = alloc_smp_resp(MI_RESP_SIZE); if (!mi_resp) { kfree(mi_req); return -ENOMEM; } mi_req[1] = SMP_REPORT_MANUF_INFO; res = smp_execute_...
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
45,243,069,313,681,150,000,000,000,000,000,000,000
35
scsi: libsas: fix memory leak in sas_smp_get_phy_events() We've got a memory leak with the following producer: while true; do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; done The buffer req is allocated and not freed after we return. Fix it. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") S...
**/ bool is_sameZC(const unsigned int size_z, const unsigned int size_c) const { return _depth==size_z && _spectrum==size_c;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
157,183,093,046,941,830,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
xmlSchemaModelGroupToModelGroupDefFixup( xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlSchemaModelGroupPtr mg) { xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg); while (particle != NULL) { if ((WXS_PARTICLE_TERM(particle) == NULL) || ((WXS_PARTICLE_TERM(particle))->type != XML_SC...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
288,401,505,768,554,500,000,000,000,000,000,000,000
31
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static void vrend_destroy_sub_context(struct vrend_sub_context *sub) { int i, j; struct vrend_streamout_object *obj, *tmp; vrend_clicbs->make_current(sub->gl_context); if (sub->fb_id) glDeleteFramebuffers(1, &sub->fb_id); if (sub->blit_fb_ids[0]) glDeleteFramebuffers(2, sub->blit_fb_ids); ...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
266,139,583,542,791,360,000,000,000,000,000,000,000
77
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
get_func_line( int c UNUSED, void *cookie, int indent UNUSED, getline_opt_T options UNUSED) { funccall_T *fcp = (funccall_T *)cookie; ufunc_T *fp = fcp->func; char_u *retval; garray_T *gap; // growarray with function lines // If breakpoints have been added/deleted need t...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
116,317,327,597,976,670,000,000,000,000,000,000,000
58
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
TEST_F(HttpConnectionManagerImplTest, ConnectAsUpgrade) { setup(false, "envoy-custom-server", false); EXPECT_CALL(filter_factory_, createUpgradeFilterChain("CONNECT", _, _)) .WillRepeatedly(Return(true)); EXPECT_CALL(*codec_, dispatch(_)) .WillRepeatedly(Invoke([&](Buffer::Instance& data) -> Http::S...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
297,715,658,440,595,240,000,000,000,000,000,000,000
23
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void key_garbage_collector(struct work_struct *work) { static LIST_HEAD(graveyard); static u8 gc_state; /* Internal persistent state */ #define KEY_GC_REAP_AGAIN 0x01 /* - Need another cycle */ #define KEY_GC_REAPING_LINKS 0x02 /* - We need to reap links */ #define KEY_GC_SET_TIMER 0x04 /* - We need to restar...
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
287,800,809,373,867,300,000,000,000,000,000,000,000
197
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
GetStringFontInfo ( IN HII_STRING_PACKAGE_INSTANCE *StringPackage, IN UINT8 FontId, OUT EFI_FONT_INFO **StringFontInfo ) { LIST_ENTRY *Link; HII_FONT_INFO *FontInfo; HII_GLOBAL_FONT_INFO ...
0
[]
edk2
764e8ba1389a617639d79d2c4f0d53f4ea4a7387
250,932,369,178,406,300,000,000,000,000,000,000,000
27
MdeModulePkg/String.c: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@in...
void TestContext::ReturnValue(HValue* value) { BuildBranch(value); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
248,129,554,115,799,600,000,000,000,000,000,000,000
3
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...
__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { int count = -1; if (size != 0) count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); if (count == -1) count = _vscprintf(format, ap); return count; }
0
[ "CWE-415" ]
nmap
350bbe0597d37ad67abe5fef8fba984707b4e9ad
13,797,469,511,194,455,000,000,000,000,000,000,000
10
Avoid a crash (double-free) when SSH connection fails
static void bnxt_ud_qp_hw_stall_workaround(struct bnxt_re_qp *qp) { if ((qp->ib_qp.qp_type == IB_QPT_UD || qp->ib_qp.qp_type == IB_QPT_GSI || qp->ib_qp.qp_type == IB_QPT_RAW_ETHERTYPE) && qp->qplib_qp.wqe_cnt == BNXT_RE_UD_QP_HW_STALL) { int qp_attr_mask; struct ib_qp_attr qp_attr; qp_attr_mas...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
28,547,205,887,542,480,000,000,000,000,000,000,000
15
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) { static bool check_once; if (check_once) return; check_once = true; WARN_ON(1); pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n"); if (vb->vb2_queue->allow_zero_bytesused) pr_warn("use VIDIOC_DECODER_CMD(V4L2_DEC_...
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
221,730,867,374,834,470,000,000,000,000,000,000,000
16
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
vrrp_init_sands(list l) { vrrp_t *vrrp; element e; LIST_FOREACH(l, vrrp, e) { vrrp->sands.tv_sec = TIMER_DISABLED; rb_insert_sort_cached(&vrrp->sockets->rb_sands, vrrp, rb_sands, vrrp_timer_cmp); vrrp_init_instance_sands(vrrp); vrrp->reload_master = false; } }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
174,824,061,663,170,650,000,000,000,000,000,000,000
12
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
UTI_SetQuitSignalsHandler(void (*handler)(int), int ignore_sigpipe) { struct sigaction sa; sa.sa_handler = handler; sa.sa_flags = SA_RESTART; if (sigemptyset(&sa.sa_mask) < 0) LOG_FATAL("sigemptyset() failed"); #ifdef SIGINT if (sigaction(SIGINT, &sa, NULL) < 0) LOG_FATAL("sigaction(%d) failed", SIG...
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
82,560,606,440,821,150,000,000,000,000,000,000,000
32
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
Status RoleGraph::addPrivilegeToRole(const RoleName& role, const Privilege& privilegeToAdd) { if (!roleExists(role)) { return Status(ErrorCodes::RoleNotFound, mongoutils::str::stream() << "Role: " << role.getFullName() << " does not exist...
0
[ "CWE-863" ]
mongo
fb87cc88ecb5d300f14cda7bc238d7d5132118f5
290,675,806,752,381,130,000,000,000,000,000,000,000
15
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
static apr_status_t init_callbacks(conn_rec *c, nghttp2_session_callbacks **pcb) { int rv = nghttp2_session_callbacks_new(pcb); if (rv != 0) { ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02926) "nghttp2_session_callbacks_new: %s", nghttp2_strerror(rv));...
0
[]
mod_h2
5e75e5685dd043fe93a5a08a15edd087a43f6968
219,162,967,117,198,800,000,000,000,000,000,000,000
24
v1.11.0 -------------------------------------------------------------------------------- * connection IO event handling reworked. Instead of reacting on incoming bytes, the state machine now acts on incoming frames that are affecting it. This reduces state transitions. * pytest suite now covers some basic tests...
static int key_get_type_from_user(char *type, const char __user *_type, unsigned len) { int ret; ret = strncpy_from_user(type, _type, len); if (ret < 0) return -EFAULT; if (ret == 0 || ret >= len) return -EINVAL; if (type[0] == '.') return -EPERM; type[len - 1] = '\0'; return 0; }
0
[ "CWE-399" ]
linux-2.6
0d54ee1c7850a954026deec4cd4885f331da35cc
114,342,808,805,678,730,000,000,000,000,000,000,000
21
security: introduce missing kfree Plug this leak. Acked-by: David Howells <dhowells@redhat.com> Cc: James Morris <jmorris@namei.org> Cc: <stable@kernel.org> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
smtp_getaddrinfo_cb(void *arg, int gaierrno, struct addrinfo *ai0) { struct smtp_session *s = arg; struct addrinfo *ai; char fwd[64], rev[64]; if (gaierrno) { if (gaierrno == EAI_NODATA || gaierrno == EAI_NONAME) s->fcrdns = 0; else { log_warnx("getaddrinfo: %s: %s", s->rdns, gai_strerror(gaierrno...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
65,922,730,024,551,400,000,000,000,000,000,000,000
29
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
static int read_image_debug_directory_entry(RBuffer *b, ut64 addr, PE_(image_debug_directory_entry) *entry) { st64 o_addr = r_buf_seek (b, 0, R_BUF_CUR); if (r_buf_seek (b, addr, R_BUF_SET) < 0) { return -1; } ut8 buf[sizeof (PE_(image_debug_directory_entry))]; r_buf_read (b, buf, sizeof (buf)); PE_READ_STRUCT_...
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
75,586,010,933,089,190,000,000,000,000,000,000,000
18
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
void region16_uninit(REGION16* region) { assert(region); if (region->data) { if ((region->data->size > 0) && (region->data != &empty_region)) free(region->data); region->data = NULL; } }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
25,044,270,512,985,390,000,000,000,000,000,000,000
12
Fixed #5645: realloc return handling
generateClonedIndexStmt(RangeVar *heapRel, Relation source_idx, const AttrMap *attmap, Oid *constraintOid) { Oid source_relid = RelationGetRelid(source_idx); HeapTuple ht_idxrel; HeapTuple ht_idx; HeapTuple ht_am; Form_pg_class idxrelrec; Form_pg_index idxrec; Form_pg_am amrec; oidvector *indcoll...
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
19,167,171,859,225,315,000,000,000,000,000,000,000
352
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
void warning_callback(const char *msg, void *client_data) { FILE *stream = (FILE*)client_data; fprintf(stream, "[WARNING] %s", msg); }
0
[ "CWE-119", "CWE-787" ]
openjpeg
cc3824767bde397fedb8a1ae4786a222ba860c8d
57,816,571,306,661,210,000,000,000,000,000,000,000
5
opj_mj2_extract: Check provided output prefix for length This uses snprintf() with correct buffer length instead of sprintf(), which prevents a buffer overflow when providing a long output prefix. Furthermore the program exits with an error when the provided output prefix is too long. Fixes #1088.
is_pci_gvt(struct pci_vdev *dev) { if (dev == NULL || strncmp(dev->dev_ops->class_name, "pci-gvt",7)) return 0; else return 1; }
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
169,795,686,380,147,920,000,000,000,000,000,000,000
7
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
int mingw_utime (const char *file_name, const struct utimbuf *times) { FILETIME mft, aft; int fh, rc; DWORD attrs; wchar_t wfilename[MAX_PATH]; if (xutftowcs_path(wfilename, file_name) < 0) return -1; /* must have write permission */ attrs = GetFileAttributesW(wfilename); if (attrs != INVALID_FILE_ATTRIBUTES...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
47,122,992,480,203,440,000,000,000,000,000,000,000
44
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...
HttpHeader::delById(Http::HdrType id) { debugs(55, 8, this << " del-by-id " << id); assert(any_registered_header(id)); if (!CBIT_TEST(mask, id)) return 0; int count = 0; HttpHeaderPos pos = HttpHeaderInitPos; while (HttpHeaderEntry *e = getEntry(&pos)) { if (e->id == id) ...
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
174,568,911,487,416,900,000,000,000,000,000,000,000
20
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
void Monitor::scrub_check_results() { dout(10) << __func__ << dendl; // compare int errors = 0; ScrubResult& mine = scrub_result[rank]; for (map<int,ScrubResult>::iterator p = scrub_result.begin(); p != scrub_result.end(); ++p) { if (p->first == rank) continue; if (p->second != mi...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
187,742,098,177,055,700,000,000,000,000,000,000,000
22
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int __packet_get_status(const struct packet_sock *po, void *frame) { union tpacket_uhdr h; smp_rmb(); h.raw = frame; switch (po->tp_version) { case TPACKET_V1: flush_dcache_page(pgv_to_page(&h.h1->tp_status)); return h.h1->tp_status; case TPACKET_V2: flush_dcache_page(pgv_to_page(&h.h2->tp_status))...
0
[ "CWE-787" ]
linux
acf69c946233259ab4d64f8869d4037a198c7f06
272,867,725,130,685,800,000,000,000,000,000,000,000
23
net/packet: fix overflow in tpacket_rcv Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virt...
void getconsxy(const struct vc_data *vc, unsigned char xy[static 2]) { /* clamp values if they don't fit */ xy[0] = min(vc->state.x, 0xFFu); xy[1] = min(vc->state.y, 0xFFu); }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
30,208,027,169,623,446,000,000,000,000,000,000,000
6
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->...
plperl_spi_prepare(char *query, int argc, SV **argv) { volatile SPIPlanPtr plan = NULL; volatile MemoryContext plan_cxt = NULL; plperl_query_desc *volatile qdesc = NULL; plperl_query_entry *volatile hash_entry = NULL; MemoryContext oldcontext = CurrentMemoryContext; ResourceOwner oldowner = CurrentResourceOwner; ...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
171,784,799,198,169,900,000,000,000,000,000,000,000
163
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
p_term("t_8b", T_8B) /* terminal key codes are not in here */ /* end marker */ {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT}
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
121,948,000,594,511,510,000,000,000,000,000,000,000
6
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
long machine_check_early(struct pt_regs *regs) { long handled = 0; __this_cpu_inc(irq_stat.mce_exceptions); add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE); if (cur_cpu_spec && cur_cpu_spec->machine_check_early) handled = cur_cpu_spec->machine_check_early(regs); return handled; }
0
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
45,171,086,074,492,270,000,000,000,000,000,000,000
12
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...
asmlinkage long sys_oabi_fstat64(unsigned long fd, struct oldabi_stat64 __user * statbuf) { struct kstat stat; int error = vfs_fstat(fd, &stat); if (!error) error = cp_oldabi_stat64(&stat, statbuf); return error; }
0
[ "CWE-264" ]
linux
7de249964f5578e67b99699c5f0b405738d820a2
120,261,062,131,700,700,000,000,000,000,000,000,000
9
arm: oabi compat: add missing access checks Add access checks to sys_oabi_epoll_wait() and sys_oabi_semtimedop(). This fixes CVE-2016-3857, a local privilege escalation under CONFIG_OABI_COMPAT. Cc: stable@vger.kernel.org Reported-by: Chiachih Wu <wuchiachih@gmail.com> Reviewed-by: Kees Cook <keescook@chromium.org> R...
PHP_MINIT_FUNCTION(dir) { static char dirsep_str[2], pathsep_str[2]; zend_class_entry dir_class_entry; INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions); dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry TSRMLS_CC); #ifdef ZTS ts_allocate_id(&dir_globals_id, sizeof(php_dir...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
197,258,317,118,326,070,000,000,000,000,000,000,000
80
Fixed bug #69418 - more s->p fixes for filenames
static int sctp_setsockopt_primary_addr(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_prim prim; struct sctp_transport *trans; if (optlen != sizeof(struct sctp_prim)) return -EINVAL; if (copy_from_user(&prim, optval, sizeof(struct sctp_prim))) return -EFAULT; trans = sctp_add...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
143,582,602,750,100,940,000,000,000,000,000,000,000
20
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
pk_transaction_dbus_return (GDBusMethodInvocation *context, const GError *error) { /* not set inside the test suite */ if (context == NULL) { if (error != NULL) g_warning ("context null, and error: %s", error->message); return; } if (error != NULL) g_dbus_method_invocation_return_gerror (context, error); ...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
100,320,870,878,066,380,000,000,000,000,000,000,000
13
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
void Field::error_generated_column_function_is_not_allowed(THD *thd, bool error) const { StringBuffer<64> tmp; vcol_info->expr->print(&tmp, (enum_query_type) (QT_TO_SYSTEM_CHARSET | QT_ITEM_IDEN...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
106,060,735,541,424,200,000,000,000,000,000,000,000
13
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int post_recv_io(struct rtrs_clt_con *con, size_t q_size) { int err, i; struct rtrs_clt_path *clt_path = to_clt_path(con->c.path); for (i = 0; i < q_size; i++) { if (clt_path->flags & RTRS_MSG_NEW_RKEY_F) { struct rtrs_iu *iu = &con->rsp_ius[i]; err = rtrs_iu_post_recv(&con->c, iu); } else { er...
0
[ "CWE-415" ]
linux
8700af2cc18c919b2a83e74e0479038fd113c15d
189,282,123,024,485,850,000,000,000,000,000,000,000
19
RDMA/rtrs-clt: Fix possible double free in error case Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt) to free memory. We shouldn't call kfree(clt) again, and we can't use the clt after kfree too. Replace device_register() with device_initialize() and device_add() so that dev_set_name can() ...
int main( int argc, char *argv[] ) { int keysize; unsigned long i, j, tsc; unsigned char tmp[64]; #if defined(POLARSSL_ARC4_C) arc4_context arc4; #endif #if defined(POLARSSL_DES_C) des3_context des3; des_context des; #endif #if defined(POLARSSL_AES_C) aes_context aes; #if defined(POLARSSL_GC...
1
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
27,013,844,866,474,920,000,000,000,000,000,000,000
427
RSA blinding on CRT operations to counter timing attacks
SocketBackend(StringInfo inBuf) { int qtype; /* * Get message type code from the frontend. */ qtype = pq_getbyte(); if (qtype == EOF) /* frontend disconnected */ { if (IsTransactionState()) ereport(COMMERROR, (errcode(ERRCODE_CONNECTION_FAILURE), errmsg("unexpected EOF on client connectio...
1
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
230,563,570,214,040,700,000,000,000,000,000,000,000
141
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
*/ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, void (*setup)(struct net_device *), unsigned int txqs, unsigned int rxqs) { struct net_device *dev; size_t alloc_size; struct net_device *p; BUG_ON(strlen(name) >= sizeof(dev->name)); if (txqs < 1) { pr_err("alloc_netdev: Unable to ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
100,305,700,748,002,060,000,000,000,000,000,000,000
99
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 void init_features(int gl_ver, int gles_ver) { for (enum features_id id = 0; id < feat_last; id++) { if (gl_ver >= feature_list[id].gl_ver || gles_ver >= feature_list[id].gles_ver) { set_feature(id); VREND_DEBUG(dbg_features, NULL, "Host feature %s provided by %s %3.1f\n", ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
301,114,342,356,962,600,000,000,000,000,000,000,000
24
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
std::list<HeaderEntryImpl>::const_iterator begin() const { return headers_.begin(); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
272,407,748,696,808,160,000,000,000,000,000,000,000
1
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...
static RtreeNode *rtreeNodeOfFirstSearchPoint(RtreeCursor *pCur, int *pRC){ sqlite3_int64 id; int ii = 1 - pCur->bPoint; assert( ii==0 || ii==1 ); assert( pCur->bPoint || pCur->nPoint ); if( pCur->aNode[ii]==0 ){ assert( pRC!=0 ); id = ii ? pCur->aPoint[0].id : pCur->sPoint.id; *pRC = nodeAcquire(...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
140,389,343,956,815,920,000,000,000,000,000,000,000
12
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
void RGWPutObj_ObjStore_S3::send_response() { if (op_ret) { set_req_state_err(s, op_ret); dump_errno(s); } else { if (s->cct->_conf->rgw_s3_success_create_obj_status) { op_ret = get_success_retcode( s->cct->_conf->rgw_s3_success_create_obj_status); set_req_state_err(s, op_ret); } if...
0
[ "CWE-79" ]
ceph
fce0b267446d6f3f631bb4680ebc3527bbbea002
67,035,135,894,489,200,000,000,000,000,000,000,000
49
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
armpmu_event_update(struct perf_event *event, struct hw_perf_event *hwc, int idx) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); u64 delta, prev_raw_count, new_raw_count; again: prev_raw_count = local64_read(&hwc->prev_count); new_raw_count = armpmu->read_counter(idx); if (local64_cmpxchg(&hwc->p...
0
[ "CWE-284", "CWE-264" ]
linux
8fff105e13041e49b82f92eef034f363a6b1c071
61,488,924,784,166,130,000,000,000,000,000,000,000
22
arm64: perf: reject groups spanning multiple HW PMUs The perf core implicitly rejects events spanning multiple HW PMUs, as in these cases the event->ctx will differ. However this validation is performed after pmu::event_init() is called in perf_init_event(), and thus pmu::event_init() may be called with a group leader...
Value ExpressionMap::serialize(bool explain) const { return Value(DOC("$map" << DOC("input" << _input->serialize(explain) << "as" << _varName << "in" << _each->serialize(explain)))); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
33,810,153,981,236,263,000,000,000,000,000,000,000
4
SERVER-38070 fix infinite loop in agg expression
translate_compat_table(struct net *net, const char *name, unsigned int valid_hooks, struct xt_table_info **pinfo, void **pentry0, unsigned int total_size, unsigned int number, unsigned int *hook_entries, unsigned int *underflows) { unsigned int i,...
0
[ "CWE-284", "CWE-264" ]
linux
ce683e5f9d045e5d67d1312a42b359cb2ab2a13c
187,107,456,434,314,700,000,000,000,000,000,000,000
151
netfilter: x_tables: check for bogus target offset We're currently asserting that targetoff + targetsize <= nextoff. Extend it to also check that targetoff is >= sizeof(xt_entry). Since this is generic code, add an argument pointing to the start of the match/target, we can then derive the base structure size from the...
static void remove_lease(GDHCPServer *dhcp_server, struct dhcp_lease *lease) { dhcp_server->lease_list = g_list_remove(dhcp_server->lease_list, lease); g_hash_table_remove(dhcp_server->nip_lease_hash, GINT_TO_POINTER((int) lease->lease_nip)); g_free(lease); }
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
244,686,256,722,107,820,000,000,000,000,000,000,000
9
gdhcp: Avoid reading invalid data in dhcp_get_option
static void cmd_notice(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) { const char *target, *msg; void *free_arg; CMD_IRC_SERVER(server); if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &target, &msg)) return; if (g_strcmp0(target, "*") == 0) target = item ==...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
244,734,716,758,357,340,000,000,000,000,000,000,000
21
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification) { int ret; struct fd f; struct sock *sock; struct inode *inode; struct mqueue_inode_info *info; struct sk_buff *nc; audit_mq_notify(mqdes, notification); nc = NULL; sock = NULL; if (notification != NULL) { if (unlikely(notification-...
0
[ "CWE-416" ]
linux
f991af3daabaecff34684fd51fac80319d1baad1
285,205,978,150,301,260,000,000,000,000,000,000,000
125
mqueue: fix a use-after-free in sys_mq_notify() The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has bee...
static ssize_t _hostfs_pread( oe_fd_t* desc, void* buf, size_t count, oe_off_t offset) { ssize_t ret = -1; file_t* file = _cast_file(desc); if (!file) OE_RAISE_ERRNO(OE_EINVAL); if (oe_syscall_pread_ocall(&ret, file->host_fd, buf, count, offset) != OE_OK) OE_RAI...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
85,298,025,314,331,800,000,000,000,000,000,000,000
19
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
int btrfs_orphan_cleanup(struct btrfs_root *root) { struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_key key, found_key; struct btrfs_trans_handle *trans; struct inode *inode; u64 last_objectid = 0; int ret = 0, nr_unlink = 0, nr_truncate = 0; if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
230,529,816,134,255,280,000,000,000,000,000,000,000
179
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
static void cm_remove_port_fs(struct cm_port *port) { int i; for (i = 0; i < CM_COUNTER_GROUPS; i++) kobject_put(&port->counter_group[i].obj); kobject_put(&port->port_obj); }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
246,118,091,670,451,640,000,000,000,000,000,000,000
9
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr, const uint8_t *buf, int len) { cpu_physical_memory_write_rom_internal(as, addr, buf, len, WRITE_DATA); }
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
150,789,104,217,587,650,000,000,000,000,000,000,000
5
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
MagickPrivate MagickBooleanType SyncImageProfiles(Image *image) { MagickBooleanType status; StringInfo *profile; status=MagickTrue; profile=(StringInfo *) GetImageProfile(image,"8BIM"); if (profile != (StringInfo *) NULL) if (Sync8BimProfile(image,profile) == MagickFalse) status=MagickFals...
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
15,326,747,284,567,996,000,000,000,000,000,000,000
19
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
**/ bool is_sameN(const unsigned int size_n) const { return _width==size_n;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
242,438,941,952,443,680,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static inline void slot_queue_add(struct sfq_slot *slot, struct sk_buff *skb) { skb->prev = slot->skblist_prev; skb->next = (struct sk_buff *)slot; slot->skblist_prev->next = skb; slot->skblist_prev = skb; }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
321,629,237,593,197,830,000,000,000,000,000,000,000
7
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
auth_userdb_preinit(struct auth *auth, const struct auth_userdb_settings *set) { struct auth_userdb *auth_userdb, **dest; auth_userdb = p_new(auth->pool, struct auth_userdb, 1); auth_userdb->set = set; auth_userdb->skip = auth_userdb_skip_parse(set->skip); auth_userdb->result_success = auth_db_rule_parse...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
241,306,963,713,385,650,000,000,000,000,000,000,000
35
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...