func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int avpriv_ac3_parse_header(AC3HeaderInfo **phdr, const uint8_t *buf,
size_t size)
{
return AVERROR(ENOSYS);
} | 1 | [
"CWE-476"
] | FFmpeg | 00e8181bd97c834fe60751b0c511d4bb97875f78 | 278,386,098,274,793,370,000,000,000,000,000,000,000 | 5 | avcodec/ac3_parser: Check init_get_bits8() for failure
Fixes: null pointer dereference
Fixes: ffmpeg_crash_6.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void Item_ref::save_val(Field *to)
{
(*ref)->save_result(to);
null_value= (*ref)->null_value;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 32,315,632,231,315,654,000,000,000,000,000,000,000 | 5 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
bool neg)
{
int len;
char tmp[TMPBUFLEN], *p = tmp;
sprintf(p, "%s%lu", neg ? "-" : "", val);
len = strlen(tmp);
if (len > *size)
len = *size;
if (copy_to_user(*buf, tmp, len))
return -EFAULT;
*size -= len;
*buf += len;
retu... | 0 | [
"CWE-284",
"CWE-264"
] | linux | bfdc0b497faa82a0ba2f9dddcf109231dd519fcc | 17,966,920,705,611,138,000,000,000,000,000,000,000 | 16 | sysctl: restrict write access to dmesg_restrict
When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel
ring buffer. But a root user without CAP_SYS_ADMIN is able to reset
dmesg_restrict to 0.
This is an issue when e.g. LXC (Linux Containers) are used and complete
user space is running without CA... |
DEFUN(prevMk, PREV_MARK, "Go to the previous mark")
{
Line *l;
int i;
if (!use_mark)
return;
if (Currentbuf->firstLine == NULL)
return;
i = Currentbuf->pos - 1;
l = Currentbuf->currentLine;
if (i < 0) {
l = l->prev;
if (l != NULL)
i = l->len - 1;
}
while (l != NULL) {
for ... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 203,675,044,270,584,300,000,000,000,000,000,000,000 | 33 | Make temporary directory safely when ~/.w3m is unwritable |
static void voice_filter(void)
{
struct voice_opt_s *opt;
struct SYMBOL *s;
regex_t r;
int pass, ret;
char *p;
/* scan the global, then the tune options */
pass = 0;
opt = voice_opts;
for (;;) {
if (!opt) {
if (pass != 0)
break;
opt = tune_voice_opts;
if (!opt)
break;
pass++;
}
p = &... | 0 | [
"CWE-787"
] | abcm2ps | dc0372993674d0b50fedfbf7b9fad1239b8efc5f | 243,414,799,245,770,750,000,000,000,000,000,000,000 | 46 | fix: crash when too many accidentals in K: (signature + explicit)
Issue #17. |
static long do_splice_to(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
int ret;
if (unlikely(!in->f_op || !in->f_op->splice_read))
return -EINVAL;
if (unlikely(!(in->f_mode & FMODE_READ)))
return -EBADF;
ret = rw_verify_area(READ, in, ppos, len);
if (... | 0 | [
"CWE-94"
] | linux-2.6 | 8811930dc74a503415b35c4a79d14fb0b408a361 | 159,840,396,015,582,900,000,000,000,000,000,000,000 | 18 | splice: missing user pointer access verification
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Wojc... |
static int vsock_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
size_t len)
{
int err;
struct sock *sk;
struct vsock_sock *vsk;
struct sockaddr_vm *remote_addr;
const struct vsock_transport *transport;
if (msg->msg_flags & MSG_OOB)
return -EOPNOTSUPP;
/* For now, MSG_DONTWAIT is always assu... | 1 | [
"CWE-667"
] | linux | c518adafa39f37858697ac9309c6cf1805581446 | 79,658,678,327,076,390,000,000,000,000,000,000,000 | 72 | vsock: fix the race conditions in multi-transport support
There are multiple similar bugs implicitly introduced by the
commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and
commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading").
The bug pattern:
[1] vsock_sock.transport pointer is copie... |
Object Parser::getObj(int recursion)
{
return getObj(gFalse, nullptr, cryptRC4, 0, 0, 0, recursion);
} | 0 | [
"CWE-190"
] | poppler | 0868c499a9f5f37f8df5c9fef03c37496b40fc8a | 114,951,352,577,993,380,000,000,000,000,000,000,000 | 4 | Parser::makeStream: Fix potential integer overflow |
static inline
struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
ext4_group_t group)
{
struct ext4_group_info ***grp_info;
long indexv, indexh;
BUG_ON(group >= EXT4_SB(sb)->s_groups_count);
grp_info = EXT4_SB(sb)->s_group_info;
indexv = group >> (EXT4_DESC_PER_BLOCK_BITS(sb));
inde... | 0 | [
"CWE-787"
] | linux | c37e9e013469521d9adb932d17a1795c139b36db | 216,339,378,683,108,600,000,000,000,000,000,000,000 | 11 | ext4: add more inode number paranoia checks
If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.
Also, if the superblock's first inode number field is too small,
refuse to mount the file system.
This addresses CVE-2018-10882.
https... |
spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
{
hashtab_T ht;
char_u line[MAXLINELEN];
char_u *p;
char_u *afflist;
char_u store_afflist[MAXWLEN];
int pfxlen;
int need_affix;
char_u *dw;
char_u *pc;
char_u *w;
int l;
hash_T hash;
hashitem_T *hi... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 82,205,376,900,112,660,000,000,000,000,000,000,000 | 211 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
void serverLog(int level, const char *fmt, ...) {
va_list ap;
char msg[LOG_MAX_LEN];
if ((level&0xff) < server.verbosity) return;
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
serverLogRaw(level,msg);
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 285,842,814,789,155,400,000,000,000,000,000,000,000 | 12 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_IS_SMALLER_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST))
{
USE_OPLINE
zval *op1, *op2;
int result;
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 139,623,708,168,554,870,000,000,000,000,000,000,000 | 13 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
schema_destroy( void )
{
oidm_destroy();
oc_destroy();
at_destroy();
mr_destroy();
mru_destroy();
syn_destroy();
if( schema_init_done ) {
ldap_pvt_thread_mutex_destroy( &ad_index_mutex );
ldap_pvt_thread_mutex_destroy( &ad_undef_mutex );
ldap_pvt_thread_mutex_destroy( &oc_undef_mutex );
}
} | 0 | [
"CWE-617"
] | openldap | 67670f4544e28fb09eb7319c39f404e1d3229e65 | 77,566,071,288,696,160,000,000,000,000,000,000,000 | 15 | ITS#9383 remove assert in certificateListValidate |
Item_splocal *get_item_splocal() { return this; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 37,596,861,216,111,077,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
TEST_F(RouterTest, MaxStreamDurationValidlyConfiguredWithoutRetryPolicy) {
NiceMock<Http::MockRequestEncoder> encoder1;
Http::ResponseDecoder* response_decoder = nullptr;
setUpstreamMaxStreamDuration(500);
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](H... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 256,260,297,217,779,650,000,000,000,000,000,000,000 | 23 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static int selinux_netcache_avc_callback(u32 event)
{
if (event == AVC_CALLBACK_RESET) {
sel_netif_flush();
sel_netnode_flush();
sel_netport_flush();
synchronize_net();
}
return 0;
} | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 232,996,884,269,056,620,000,000,000,000,000,000,000 | 10 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
static void __exit sixpack_exit_driver(void)
{
tty_unregister_ldisc(&sp_ldisc);
} | 0 | [
"CWE-787"
] | linux | 19d1532a187669ce86d5a2696eb7275310070793 | 167,276,388,238,789,360,000,000,000,000,000,000,000 | 4 | net: 6pack: fix slab-out-of-bounds in decode_data
Syzbot reported slab-out-of bounds write in decode_data().
The problem was in missing validation checks.
Syzbot's reproducer generated malicious input, which caused
decode_data() to be called a lot in sixpack_decode(). Since
rx_count_cooked is only 400 bytes and noone... |
void finish(int r) override {
osd->_committed_osd_maps(first, last, msg);
msg->put();
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 176,206,718,248,981,430,000,000,000,000,000,000,000 | 4 | 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 Image *ReadTIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
const char
*option;
float
*chromaticity,
x_position,
y_position,
x_resolution,
y_resolution;
Image
*image;
int
tiff_status;
MagickBooleanType
status;
MagickSizeType
number_pixe... | 0 | [
"CWE-119",
"CWE-703"
] | ImageMagick | 6e48aa92ff4e6e95424300ecd52a9ea453c19c60 | 199,444,066,334,825,700,000,000,000,000,000,000,000 | 1,052 | https://github.com/ImageMagick/ImageMagick/issues/268 |
onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,
OnigRegion* region, OnigOptionType option)
{
int r;
OnigMatchParam mp;
onig_initialize_match_param(&mp);
r = onig_match_with_param(reg, str, end, at, region, option, &mp);
onig_free_match_param_content(&mp);
return r;
... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 320,595,894,673,414,600,000,000,000,000,000,000,000 | 11 | fix heap-buffer-overflow |
static inline unsigned int RotateLeft(const unsigned int x)
{
return(((x << 8) | ((x >> 24) & 0xff)));
} | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 248,028,976,556,109,500,000,000,000,000,000,000,000 | 4 | possible divide by zero + clear buffers |
static u32 hso_port_to_mux(int port)
{
u32 result;
switch (port & HSO_PORT_MASK) {
case HSO_PORT_CONTROL:
result = 0x0;
break;
case HSO_PORT_APP:
result = 0x1;
break;
case HSO_PORT_PCSC:
result = 0x2;
break;
case HSO_PORT_GPS:
result = 0x3;
break;
case HSO_PORT_APP2:
result = 0x4;
break;
de... | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 133,932,354,477,470,550,000,000,000,000,000,000,000 | 25 | USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
The function hso_probe reads if_num from the USB device (as an u8) and uses
it without a length check to index an array, resulting in an OOB memory read
in hso_probe or hso_get_config_data.
Add a length check for both locations and updated hso_probe to ... |
void MainWindow::on_actionGPU_triggered(bool checked)
{
if (checked) {
QMessageBox dialog(QMessageBox::Warning,
qApp->applicationName(),
tr("GPU effects are experimental and may cause instability on some systems. "
"Some CPU... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 305,854,288,481,665,200,000,000,000,000,000,000,000 | 44 | fix upgrade check is not using TLS correctly |
FOLLY_ERASE void* invokeSet(VoidFuncPtr set, void* object) {
return reinterpret_cast<void* (*)(void*)>(set)(object);
} | 0 | [
"CWE-763"
] | fbthrift | bfda1efa547dce11a38592820916db01b05b9339 | 213,310,421,449,241,800,000,000,000,000,000,000,000 | 3 | Fix handling of invalid union data in table-based serializer
Summary:
Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem... |
static int try_render_page(fz_context *ctx, int pagenum, fz_cookie *cookie, int start, int interptime, char *fname, int bg, int solo, render_details *render)
{
int status;
if (out && !(bg && solo))
{
/* Output any page level headers (for banded formats). Don't do this if
* we're running in solo bgprint mode, c... | 0 | [
"CWE-369",
"CWE-22"
] | mupdf | 22c47acbd52949421f8c7cb46ea1556827d0fcbf | 185,304,240,296,541,300,000,000,000,000,000,000,000 | 126 | Bug 704834: Fix division by zero for zero width pages in muraster. |
static sdlPtr make_persistent_sdl(sdlPtr sdl)
{
sdlPtr psdl = NULL;
HashTable ptr_map;
HashTable bp_types, bp_encoders;
zend_string *key;
zend_hash_init(&bp_types, 0, NULL, NULL, 0);
zend_hash_init(&bp_encoders, 0, NULL, NULL, 0);
zend_hash_init(&ptr_map, 0, NULL, NULL, 0);
psdl = malloc(sizeof(*sdl));
memse... | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 78,543,353,107,357,610,000,000,000,000,000,000,000 | 183 | Fix bug #80672 - Null Dereference in SoapClient |
ssh_put_password(char *password)
{
int size;
char *padded;
if (datafellows & SSH_BUG_PASSWORDPAD) {
packet_put_cstring(password);
return;
}
size = roundup(strlen(password) + 1, 32);
padded = xcalloc(1, size);
strlcpy(padded, password, size);
packet_put_string(padded, size);
explicit_bzero(padded, size);
... | 0 | [
"CWE-20"
] | openssh-portable | 7d6a9fb660c808882d064e152d6070ffc3844c3f | 38,287,317,293,735,800,000,000,000,000,000,000,000 | 16 | - djm@cvs.openbsd.org 2014/04/01 03:34:10
[sshconnect.c]
When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
certificate keys to plain keys and attempt SSHFP resolution.
Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
dialog by offering only certificate ... |
std::string get_cwd()
{
char buf[1024];
const char* const res = getcwd(buf,sizeof(buf));
if(res != NULL) {
std::string str(res);
#ifdef _WIN32
std::replace(str.begin(),str.end(),'\\','/');
#endif
return str;
} else {
return "";
}
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 292,456,190,914,309,140,000,000,000,000,000,000,000 | 16 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
static int kernel_get_mempolicy(int __user *policy,
unsigned long __user *nmask,
unsigned long maxnode,
unsigned long addr,
unsigned long flags)
{
int err;
int uninitialized_var(pval);
nodemask_t nodes;
addr = untagged_addr(addr);
if (nmask != NULL && maxnode < nr_node_ids)
return -EINVAL;
er... | 0 | [
"CWE-787"
] | linux | aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd | 227,543,342,593,581,740,000,000,000,000,000,000,000 | 28 | mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
Using an empty (malformed) nodelist that is not caught during mount option
parsing leads to a stack-out-of-bounds access.
The option string that was used was: "mpol=prefer:,". However,
MPOL_PREFERRED requires a single node number, which is not being provi... |
TEST_F(QueryPlannerTest, NoFetchStageWhenTwoFieldAscendingSortIsCoveredByIndex) {
params.options &= ~QueryPlannerParams::INCLUDE_COLLSCAN;
addIndex(fromjson("{a: 1, b: 1}"));
// Sort on 'b', 'a'.
runQueryAsCommand(
fromjson("{find: 'testns', filter: {a: {$gt: 0}}, projection: {a: 1, b:1, _id: 0... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 236,774,617,133,458,930,000,000,000,000,000,000,000 | 14 | SERVER-44377 generate correct plan for indexed inequalities to null |
static int xdr_xcode_array2(const struct xdr_buf *buf, unsigned int base,
struct xdr_array2_desc *desc, int encode)
{
char *elem = NULL, *c;
unsigned int copied = 0, todo, avail_here;
struct page **ppages = NULL;
int err;
if (encode) {
if (xdr_encode_word(buf, base, desc->array_len) != 0)
return -EINV... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 256,833,529,519,034,370,000,000,000,000,000,000,000 | 192 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
int main( int argc, char *argv[] )
{
FILE *f;
int ret;
size_t n, buflen;
int listen_fd = -1;
int client_fd = -1;
unsigned char buf[2048];
unsigned char hash[20];
unsigned char buf2[2];
const char *pers = "dh_server";
entropy_context entropy;
ctr_drbg_context ctr_drbg;
... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 294,285,450,715,900,270,000,000,000,000,000,000,000 | 228 | RSA blinding on CRT operations to counter timing attacks |
static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
gnutls_x509_crt_t cert,
const char *pinnedpubkey)
{
/* Scratch */
size_t len1 = 0, len2 = 0;
unsigned char *buff1 = NULL;
gnutls_pubkey_t key = NULL;
/* Result is returned to c... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 118,534,021,919,348,480,000,000,000,000,000,000,000 | 57 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
vte_sequence_handler_uc (VteTerminal *terminal, GValueArray *params)
{
struct vte_charcell *cell;
int column;
VteScreen *screen;
screen = terminal->pvt->screen;
column = screen->cursor_current.col;
cell = vte_terminal_find_charcell(terminal,
column,
screen->cursor_current.row);
while ((cell != NUL... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 89,461,044,347,484,470,000,000,000,000,000,000,000 | 32 | fix bug #548272
svn path=/trunk/; revision=2365 |
int make_socketpair (int socks[2], int dummy) {
if (socks == 0) {
errno = EINVAL;
return -1;
}
dummy = socketpair(AF_UNIX, SOCK_STREAM, 0, socks);
if (dummy) {
socks[0] = socks[1] = -1;
}
return dummy;
} | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 231,492,940,338,331,000,000,000,000,000,000,000,000 | 14 | Avoid a crash (double-free) when SSH connection fails |
void RGWListBucket_ObjStore_S3v2::send_response()
{
if (op_ret < 0) {
set_req_state_err(s, op_ret);
}
dump_errno(s);
// Explicitly use chunked transfer encoding so that we can stream the result
// to the user without having to wait for the full length of it.
end_header(s, this, "application/xml", CHUNK... | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 277,956,490,411,925,930,000,000,000,000,000,000,000 | 71 | 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) |
rsvg_node_svg_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts)
{
const char *value;
RsvgNodeSvg *svg = (RsvgNodeSvg *) self;
if (rsvg_property_bag_size (atts)) {
if ((value = rsvg_property_bag_lookup (atts, "viewBox")))
svg->vbox = rsvg_css_parse_vbox (value);
... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 331,119,757,160,842,700,000,000,000,000,000,000,000 | 33 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static BROTLI_INLINE uint32_t CommandCopyLen(const Command* self) {
return self->copy_len_ & 0x1FFFFFF;
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 273,120,084,056,388,000,000,000,000,000,000,000,000 | 3 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
void setRequestIDProvider(const Http::RequestIdStreamInfoProviderSharedPtr& provider) override {
ASSERT(provider != nullptr);
request_id_provider_ = provider;
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 67,456,536,459,387,430,000,000,000,000,000,000,000 | 4 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
int unit_add_two_dependencies(Unit *u, UnitDependency d, UnitDependency e, Unit *other, bool add_reference) {
int r;
assert(u);
if ((r = unit_add_dependency(u, d, other, add_reference)) < 0)
return r;
if ((r = unit_add_dependency(u, e, other, add_reference)) < 0)
... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 306,340,987,117,065,920,000,000,000,000,000,000,000 | 13 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
static int loop(int fd)
{
void (*workfn) (int ci);
void (*deadfn) (int ci);
int rv, i;
rv = setup_transport();
if (rv < 0)
goto fail;
rv = setup_ticket();
if (rv < 0)
goto fail;
rv = write_daemon_state(fd, BOOTHD_STARTED);
if (rv != 0) {
log_error("write daemon state %d to lockfile error %s: %s",
... | 0 | [
"CWE-287",
"CWE-284"
] | booth | 35bf0b7b048d715f671eb68974fb6b4af6528c67 | 68,040,746,440,422,540,000,000,000,000,000,000,000 | 63 | Revert "Refactor: main: substitute is_auth_req macro"
This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c.
authfile != authkey
Signed-off-by: Jan Friesse <jfriesse@redhat.com> |
static void hci_cc_read_flow_control_mode(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_rp_read_flow_control_mode *rp = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
if (rp->status)
return;
hdev->flow_ctl_mode = rp->mode;
} | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 128,066,859,430,278,240,000,000,000,000,000,000,000 | 12 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
bool CIRCSock::IsFloodProtected(double fRate) {
return fRate > FLOOD_MINIMAL_RATE;
} | 0 | [
"CWE-20",
"CWE-284"
] | znc | d22fef8620cdd87490754f607e7153979731c69d | 194,390,573,033,546,620,000,000,000,000,000,000,000 | 3 | Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
_copyAlterTableCmd(const AlterTableCmd *from)
{
AlterTableCmd *newnode = makeNode(AlterTableCmd);
COPY_SCALAR_FIELD(subtype);
COPY_STRING_FIELD(name);
COPY_NODE_FIELD(def);
COPY_SCALAR_FIELD(behavior);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 217,848,236,690,418,480,000,000,000,000,000,000,000 | 12 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
const EVP_MD *dgst)
{
int nid;
char is_dsa;
if (pkey->type == EVP_PKEY_DSA || pkey->type == EVP_PKEY_EC)
is_dsa = 1;
else
is_dsa = 0;
/* We now need to add another PKCS7_SIGNER_IN... | 0 | [] | openssl | 544e3e3b69d080ee87721bd03c37b4d450384fb9 | 115,747,614,400,354,330,000,000,000,000,000,000 | 78 | PKCS#7: avoid NULL pointer dereferences with missing content
In PKCS#7, the ASN.1 content component is optional.
This typically applies to inner content (detached signatures),
however we must also handle unexpected missing outer content
correctly.
This patch only addresses functions reachable from parsing,
decryption... |
NTSTATUS rename_internals_fsp(connection_struct *conn,
files_struct *fsp,
struct smb_filename *smb_fname_dst_in,
const char *dst_original_lcomp,
uint32_t attrs,
bool replace_if_exists)
{
TALLOC_CTX *ctx = talloc_tos();
struct smb_filename *parent_dir_fname_dst = NULL;
struct smb_filename *parent_dir_f... | 0 | [
"CWE-200"
] | samba | 3ddc9344c2fa7461336899fbddb0bb80995e9170 | 58,187,089,789,172,030,000,000,000,000,000,000,000 | 440 | CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro.
Fixes the raw.write.bad-write test.
NB. We need the two (==0) changes in source3/smbd/smb2_reply.c
as the gcc optimizer now knows that the return from
smbreq_bufrem() can never be less than zero.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085
Remove... |
static void voutf(struct GlobalConfig *config,
const char *prefix,
const char *fmt,
va_list ap)
{
size_t width = (79 - strlen(prefix));
if(!config->mute) {
size_t len;
char *ptr;
char *print_buffer;
print_buffer = curlx_mvaprintf(fmt, ap);
i... | 1 | [
"CWE-190",
"CWE-125"
] | curl | d530e92f59ae9bb2d47066c3c460b25d2ffeb211 | 50,160,581,552,522,040,000,000,000,000,000,000,000 | 44 | voutf: fix bad arethmetic when outputting warnings to stderr
CVE-2018-16842
Reported-by: Brian Carpenter
Bug: https://curl.haxx.se/docs/CVE-2018-16842.html |
process_reading(time_t rtc_time, struct timespec *system_time)
{
double rtc_fast;
accumulate_sample(rtc_time, system_time);
switch (operating_mode) {
case OM_NORMAL:
if (n_samples_since_regression >= N_SAMPLES_PER_REGRESSION) {
run_regression(1, &coefs_valid, &coef_ref_time, &coef_seconds_fas... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 191,108,236,979,733,600,000,000,000,000,000,000,000 | 43 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
dir_s_open(int argc, VALUE *argv, VALUE klass)
{
struct dir_data *dp;
VALUE dir = TypedData_Make_Struct(klass, struct dir_data, &dir_data_type, dp);
dir_initialize(argc, argv, dir);
if (rb_block_given_p()) {
return rb_ensure(rb_yield, dir, dir_close, dir);
}
return dir;
} | 0 | [
"CWE-22"
] | ruby | bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8 | 333,470,110,369,262,630,000,000,000,000,000,000,000 | 12 | dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
GC_INNER void GC_set_and_save_fault_handler(GC_fault_handler_t h)
{
# if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
|| defined(HURD) || defined(FREEBSD) || defined(NETBSD)
struct sigaction act;
act.sa_handler = h;
# ifdef SIGACTION_FLAGS_NODEFER_HACK
... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 205,529,352,821,640,160,000,000,000,000,000,000,000 | 39 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static ssize_t WriteCALSRecord(Image *image,const char *data)
{
char
pad[128];
register const char
*p;
register ssize_t
i;
ssize_t
count;
i=0;
count=0;
if (data != (const char *) NULL)
{
p=data;
for (i=0; (i < 128) && (p[i] != '\0'); i++);
count=WriteBlob(image,(s... | 0 | [
"CWE-20",
"CWE-252"
] | ImageMagick | 6b6bff054d569a77973f2140c0e86366e6168a6c | 306,992,586,400,648,300,000,000,000,000,000,000,000 | 30 | https://github.com/ImageMagick/ImageMagick/issues/1199 |
static struct cgroup *cgroup_get_from_file(struct file *f)
{
struct cgroup_subsys_state *css;
struct cgroup *cgrp;
css = css_tryget_online_from_dir(f->f_path.dentry, NULL);
if (IS_ERR(css))
return ERR_CAST(css);
cgrp = css->cgroup;
if (!cgroup_on_dfl(cgrp)) {
cgroup_put(cgrp);
return ERR_PTR(-EBADF);
}
... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 253,496,001,730,539,540,000,000,000,000,000,000,000 | 17 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx,
struct wmi_connect_cmd *p)
{
struct sk_buff *skb;
struct wmi_connect_cmd *cm;
int res;
skb = ath6kl_wmi_get_new_buf(sizeof(*cm));
if (!skb)
return -ENOMEM;
cm = (struct wmi_connect_cmd *) skb->data;
memcpy(cm, p, sizeof(*cm));
res = ath6kl_... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 226,225,123,847,666,640,000,000,000,000,000,000,000 | 22 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
START_TEST(virgl_test_transfer_read_no_iov)
{
struct virgl_box box;
struct virgl_renderer_resource_create_args res;
int ret;
testvirgl_init_simple_1d_resource(&res, 1);
ret = virgl_renderer_resource_create(&res, NULL, 0);
ck_assert_int_eq(ret, 0);
virgl_renderer_ctx_attach_resource(1, res.handle);
r... | 0 | [
"CWE-909"
] | virglrenderer | b05bb61f454eeb8a85164c8a31510aeb9d79129c | 61,783,871,692,402,320,000,000,000,000,000,000,000 | 19 | vrend: clear memory when allocating a host-backed memory resource
Closes: #249
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
long _qunit_current_milli(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
long time = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
return time;
} | 0 | [
"CWE-94"
] | qdecoder | ce7c8a7ac450a823a11b06508ef1eb7441241f81 | 227,587,783,772,140,300,000,000,000,000,000,000,000 | 6 | security update: add check on improperly encoded input |
buf_byteidx_to_charidx(buf_T *buf, int lnum, int byteidx)
{
char_u *str;
char_u *t;
int count;
if (buf == NULL || buf->b_ml.ml_mfp == NULL)
return -1;
if (lnum > buf->b_ml.ml_line_count)
lnum = buf->b_ml.ml_line_count;
str = ml_get_buf(buf, lnum, FALSE);
if (str == NULL)
return -1;
... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 170,364,232,691,104,800,000,000,000,000,000,000,000 | 32 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
static void __submit_merged_bio(struct f2fs_bio_info *io)
{
struct f2fs_io_info *fio = &io->fio;
if (!io->bio)
return;
bio_set_op_attrs(io->bio, fio->op, fio->op_flags);
if (is_read_io(fio->op))
trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio);
else
trace_f2fs_prepare_write_bio(io->sbi->sb, fi... | 0 | [
"CWE-190"
] | linux | b86e33075ed1909d8002745b56ecf73b833db143 | 338,629,881,409,740,520,000,000,000,000,000,000,000 | 17 | f2fs: fix a dead loop in f2fs_fiemap()
A dead loop can be triggered in f2fs_fiemap() using the test case
as below:
...
fd = open();
fallocate(fd, 0, 0, 4294967296);
ioctl(fd, FS_IOC_FIEMAP, fiemap_buf);
...
It's caused by an overflow in __get_data_block():
...
bh->b_size = map.m_len << inode->i_blkbits;
...
... |
filepos_t EbmlMaster::RenderData(IOCallback & output, bool bForceRender, bool bWithDefault)
{
filepos_t Result = 0;
size_t Index;
if (!bForceRender) {
assert(CheckMandatory());
}
if (!bChecksumUsed) { // old school
for (Index = 0; Index < ElementList.size(); Index++) {
if (!bWithDefault && (El... | 0 | [
"CWE-703"
] | libebml | 88409e2a94dd3b40ff81d08bf6d92f486d036b24 | 11,177,343,349,768,835,000,000,000,000,000,000,000 | 30 | EbmlMaster: propagate upper level element after infinite sized one correctly
When the parser encountered a deeply nested element with an infinite
size then a following element of an upper level was not propagated
correctly. Instead the element with the infinite size was added into the
EBML element tree a second time r... |
int should_add_extension(SSL *s, unsigned int extctx, unsigned int thisctx,
int max_version)
{
/* Skip if not relevant for our context */
if ((extctx & thisctx) == 0)
return 0;
/* Check if this extension is defined for our protocol. If not, skip */
if (!extension_is_rel... | 0 | [
"CWE-476"
] | openssl | fb9fa6b51defd48157eeb207f52181f735d96148 | 91,693,235,916,540,730,000,000,000,000,000,000,000 | 16 | ssl sigalg extension: fix NULL pointer dereference
As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's
possible to crash an openssl tls secured server remotely by sending a
manipulated hello message in a rehandshake.
On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls
tls12_shared_s... |
static void bdrv_aio_co_cancel_em(BlockDriverAIOCB *blockacb)
{
BlockDriverAIOCBCoroutine *acb =
container_of(blockacb, BlockDriverAIOCBCoroutine, common);
bool done = false;
acb->done = &done;
while (!done) {
qemu_aio_wait();
}
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 74,312,631,185,513,980,000,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... |
void print_exth(const MOBIData *m) {
if (m->eh == NULL) {
return;
}
/* Linked list of MOBIExthHeader structures holds EXTH records */
const MOBIExthHeader *curr = m->eh;
if (curr != NULL) {
printf("\nEXTH records:\n");
}
uint32_t val32;
while (curr != NULL) {
/* c... | 0 | [
"CWE-476"
] | libmobi | c0699c8693c47f14a2e57dec7292e862ac7adf9c | 293,153,628,607,976,700,000,000,000,000,000,000,000 | 78 | Fix undefined behavior when passing null to strdup |
bool TextureInfo::operator==(const TextureInfo &other) const {
return this->extensions == other.extensions && this->extras == other.extras &&
this->index == other.index && this->texCoord == other.texCoord;
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 76,602,924,679,334,500,000,000,000,000,000,000,000 | 4 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
write_callback(char *ptr, size_t size, size_t nmemb, void *stream)
{
return util_write_callback(0, ptr, size, nmemb, stream);
} | 0 | [] | pycurl | 2a743674dcf152beaaf6adaddb1ef51b18d1fffe | 99,302,304,577,669,500,000,000,000,000,000,000,000 | 4 | Fix use after free in Curl object's HTTPPOST setopt with unicode FORM_BUFFERPTR.
Fixes use after free in the Curl object's HTTPPOST setopt when a unicode value
is passed as a value with a FORM_BUFFERPTR. The str object created from
the passed in unicode object would have its buffer used but the unicode object
would be... |
static void put_ctx(struct perf_event_context *ctx)
{
if (refcount_dec_and_test(&ctx->refcount)) {
if (ctx->parent_ctx)
put_ctx(ctx->parent_ctx);
if (ctx->task && ctx->task != TASK_TOMBSTONE)
put_task_struct(ctx->task);
call_rcu(&ctx->rcu_head, free_ctx);
}
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 220,545,371,511,271,300,000,000,000,000,000,000,000 | 10 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
wav_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
{ WAVLIKE_PRIVATE *wpriv ;
if ((wpriv = psf->container_data) == NULL)
return SFE_INTERNAL ;
switch (command)
{ case SFC_WAVEX_SET_AMBISONIC :
if ((SF_CONTAINER (psf->sf.format)) == SF_FORMAT_WAVEX)
{ if (datasize == SF_AMBISONIC... | 0 | [
"CWE-476"
] | libsndfile | 6f3266277bed16525f0ac2f0f03ff4626f1923e5 | 225,967,665,091,778,120,000,000,000,000,000,000,000 | 31 | Fix max channel count bug
The code was allowing files to be written with a channel count of exactly
`SF_MAX_CHANNELS` but was failing to read some file formats with the same
channel count. |
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
add_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRML... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 49,711,781,707,434,440,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void term_add_unichar(TERM_WINDOW *window, unichar chr)
{
if (vcmove) term_move_real();
switch (term_type) {
case TERM_TYPE_UTF8:
term_printed_text(unichar_isprint(chr) ? mk_wcwidth(chr) : 1);
term_addch_utf8(window, chr);
break;
case TERM_TYPE_BIG5:
if (chr > 0xff) {
term_printed_text(2... | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 189,531,075,365,901,140,000,000,000,000,000,000,000 | 24 | Merge branch 'security' into 'master'
See merge request !7 |
nm_g_ptr_array_contains (const GPtrArray *haystack, gpointer needle)
{
int i;
for (i = 0; haystack && (i < haystack->len); i++) {
if (g_ptr_array_index (haystack, i) == needle)
return TRUE;
}
return FALSE;
} | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 63,365,466,547,933,730,000,000,000,000,000,000,000 | 10 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
int tls_get_message_header(SSL *s, int *mt)
{
/* s->init_num < SSL3_HM_HEADER_LENGTH */
int skip_message, i, recvd_type, al;
unsigned char *p;
unsigned long l;
p = (unsigned char *)s->init_buf->data;
do {
while (s->init_num < SSL3_HM_HEADER_LENGTH) {
i = s->method->ssl_read... | 1 | [
"CWE-400"
] | openssl | 4b390b6c3f8df925dc92a3dd6b022baa9a2f4650 | 164,424,708,705,729,050,000,000,000,000,000,000,000 | 109 | Excessive allocation of memory in tls_get_message_header()
A TLS message includes 3 bytes for its length in the header for the message.
This would allow for messages up to 16Mb in length. Messages of this length
are excessive and OpenSSL includes a check to ensure that a peer is sending
reasonably sized messages in or... |
inline void Http2Session::Http2Settings::RefreshDefaults(Environment* env) {
AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
env->http2_state()->settings_buffer;
buffer[IDX_SETTINGS_HEADER_TABLE_SIZE] =
DEFAULT_SETTINGS_HEADER_TABLE_SIZE;
buffer[IDX_SETTINGS_ENABLE_PUSH] =
DEFAULT_SETTINGS_E... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 301,213,986,727,041,000,000,000,000,000,000,000,000 | 21 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
static int input_print_modalias(char *buf, int size, struct input_dev *id,
int add_cr)
{
int len;
len = snprintf(buf, max(size, 0),
"input:b%04Xv%04Xp%04Xe%04X-",
id->id.bustype, id->id.vendor,
id->id.product, id->id.version);
len += input_print_modalias_bits(buf + len, size - len,
... | 0 | [
"CWE-703",
"CWE-787"
] | linux | cb222aed03d798fc074be55e59d9a112338ee784 | 60,420,096,432,809,030,000,000,000,000,000,000,000 | 34 | Input: add safety guards to input_set_keycode()
If we happen to have a garbage in input device's keycode table with values
too big we'll end up doing clear_bit() with offset way outside of our
bitmaps, damaging other objects within an input device or even outside of
it. Let's add sanity checks to the returned old keyc... |
bool Field_time::can_be_substituted_to_equal_item(const Context &ctx,
const Item_equal *item_equal)
{
DBUG_ASSERT(item_equal->compare_type_handler()->cmp_type() != STRING_RESULT);
switch (ctx.subst_constraint()) {
case ANY_SUBST:
/*
A TIME field in a DAT... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 307,935,517,852,841,420,000,000,000,000,000,000,000 | 31 | 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 do_info(void)
{
if (do_test() != 0)
return 1;
const char *plugin_name = NULL;
if (g_NP_GetValue(NPPVpluginNameString, &plugin_name) == NPERR_NO_ERROR && plugin_name)
printf("PLUGIN_NAME %zd\n%s\n", strlen(plugin_name), plugin_name);
const char *plugin_desc = NULL;
if (g_NP_GetValue(NPPVpluginDesc... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 188,599,681,440,242,850,000,000,000,000,000,000,000 | 15 | Support all the new variables added |
TEST_P(DownstreamProtocolIntegrationTest, LargeCookieParsingMany) {
// Set header count limit to 2010.
uint32_t max_count = 2010;
config_helper_.addConfigModifier(
[&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager&
hcm) -> void {
hcm.mutable_co... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 282,720,859,727,388,700,000,000,000,000,000,000,000 | 27 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
inline char *str() const { return string.str; } | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 122,021,211,833,074,820,000,000,000,000,000,000,000 | 1 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static i64 seekcur_fdin(rzip_control *control)
{
if (!TMP_INBUF)
return lseek(control->fd_in, 0, SEEK_CUR);
return control->in_ofs;
} | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 24,218,331,476,089,900,000,000,000,000,000,000,000 | 6 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
static inline void __fs_reclaim_acquire(void) { } | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 295,521,213,560,838,240,000,000,000,000,000,000,000 | 1 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
if (clLvalue(s2v(ci->func))->p->is_vararg) {
int nextra = ci->u.l.nextraargs;
if (n <= nextra) {
*pos = ci->func - nextra + (n - 1);
return "(vararg)"; /* generic name for any vararg */
}
}
return NULL; /* no such vararg *... | 1 | [
"CWE-191"
] | lua | a585eae6e7ada1ca9271607a4f48dfb17868ab7b | 104,025,409,876,803,970,000,000,000,000,000,000,000 | 10 | Fixed bug: Negation overflow in getlocal/setlocal |
void nedpfree(nedpool *p, void *mem) THROWSPEC
{ /* Frees always happen in the mspace they happened in, so skip
locking the preferred mspace for this thread */
threadcache *tc;
int mymspace;
size_t memsize;
assert(mem);
GetThreadCache(&p, &tc, &mymspace, 0);
#if THREADCACHEMAX
memsize=nedblksize(mem);
assert(... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 71,940,081,639,119,490,000,000,000,000,000,000,000 | 17 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
void process_error(THD *thd)
{
if (context)
context->process_error(thd);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 242,183,298,102,927,600,000,000,000,000,000,000,000 | 5 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
PHP_FUNCTION(xml_get_error_code)
{
xml_parser *parser;
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &pind) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
RETVAL_LONG((long)XML_GetErrorCode(parser->parser));
} | 0 | [
"CWE-787"
] | php-src | 7d163e8a0880ae8af2dd869071393e5dc07ef271 | 322,483,221,511,328,100,000,000,000,000,000,000,000 | 12 | truncate results at depth of 255 to prevent corruption |
p2pa(UINT8 *out, const UINT8 *in, int xsize, const UINT8 *palette) {
int x;
for (x = 0; x < xsize; x++, in++) {
const UINT8 *rgba = &palette[in[0]];
*out++ = in[0];
*out++ = in[0];
*out++ = in[0];
*out++ = rgba[3];
}
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 48,103,870,818,805,330,000,000,000,000,000,000,000 | 10 | Use snprintf instead of sprintf |
static int khugepaged_wait_event(void)
{
return !list_empty(&khugepaged_scan.mm_head) ||
!khugepaged_enabled();
} | 0 | [
"CWE-399"
] | linux | 78f11a255749d09025f54d4e2df4fbcb031530e2 | 11,862,393,098,614,190,000,000,000,000,000,000,000 | 5 | mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups
The huge_memory.c THP page fault was allowed to run if vm_ops was null
(which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't
setup a special vma->vm_ops and it would fallback to regular anonymous
memory) but other THP logics weren't fully ac... |
static enum PartMode decode_part_mode(thread_context* tctx,
enum PredMode pred_mode, int cLog2CbSize)
{
de265_image* img = tctx->img;
if (pred_mode == MODE_INTRA) {
logtrace(LogSlice,"# part_mode (INTRA)\n");
int bit = decode_CABAC_bit(&tctx->cabac_decoder, &tctx->ctx_model[CONTEXT_MODEL_PART_MO... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 99,899,194,581,489,470,000,000,000,000,000,000,000 | 79 | fix check for valid PPS idx (#298) |
ssl_do_connect (server * serv)
{
char buf[128];
g_sess = serv->server_session;
if (SSL_connect (serv->ssl) <= 0)
{
char err_buf[128];
int err;
g_sess = NULL;
if ((err = ERR_get_error ()) > 0)
{
ERR_error_string (err, err_buf);
snprintf (buf, sizeof (buf), "(%d) %s", err, err_buf);
EMIT_SIGNAL (... | 0 | [
"CWE-310"
] | hexchat | c9b63f7f9be01692b03fa15275135a4910a7e02d | 59,729,112,896,652,540,000,000,000,000,000,000,000 | 169 | ssl: Validate hostnames
Closes #524 |
static inline void skcipher_unmap(struct scatter_walk *walk, void *vaddr)
{
if (PageHighMem(scatterwalk_page(walk)))
kunmap_atomic(vaddr);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 117,824,748,657,898,170,000,000,000,000,000,000,000 | 5 | crypto: skcipher - Add missing API setkey checks
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion. This patch restores them.
Cc: <stable@vger.kernel.org>
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng <sploving1@gmail.com>
Signed-of... |
static const char *print_uni_str(const Unicode *u, const unsigned uLen) {
GooString *gstr_buff1 = nullptr;
delete gstr_buff0;
if (!uLen) return "";
gstr_buff0 = GooString::format("{0:c}", (*u < 0x7F ? *u & 0xFF : '?'));
for (unsigned i = 1; i < uLen; i++) {
if (u[i] < 0x7F) {
gstr_buff1 = gstr_buf... | 0 | [
"CWE-824"
] | poppler | 30c731b487190c02afff3f036736a392eb60cd9a | 216,423,054,540,377,700,000,000,000,000,000,000,000 | 17 | Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit.
Closes #742 |
static int ext4_block_to_path(struct inode *inode,
ext4_lblk_t i_block,
ext4_lblk_t offsets[4], int *boundary)
{
int ptrs = EXT4_ADDR_PER_BLOCK(inode->i_sb);
int ptrs_bits = EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb);
const long direct_blocks = EXT4_NDIR_BLOCKS,
indirect_blocks = ptrs,
double_blocks... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 118,275,598,604,941,630,000,000,000,000,000,000,000 | 39 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
int flags, CPUWatchpoint **watchpoint)
{
#if 0
CPUWatchpoint *wp;
/* forbid ranges which are empty or run off the end of the address space */
if (len == 0 || (addr + len - 1) < addr) {
error_report("tried to s... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 339,919,780,753,008,100,000,000,000,000,000,000,000 | 33 | Fix crash when mapping a big memory and calling uc_close |
psutil_proc_name_and_args(PyObject *self, PyObject *args) {
int pid;
char path[1000];
psinfo_t info;
size_t argc;
int joined;
char **argv;
char *argv_plain;
const char *procfs_path;
PyObject *py_name = NULL;
PyObject *py_args = NULL;
PyObject *py_retlist = NULL;
if (! Py... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 25,772,195,772,872,940,000,000,000,000,000,000,000 | 65 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
static const char * r_cmd_java_strtok (const char *str1, const char b, size_t len) {
const char *p = str1;
size_t i = 0;
if (!p || !*p) {
return p;
}
if (len == -1) {
len = strlen (str1);
}
IFDBG r_cons_printf ("Looking for char (%c) in (%s) up to %d\n", b, p, len);
for ( ; i < len; i++,p++) {
if (*p == b... | 0 | [
"CWE-703",
"CWE-193"
] | radare2 | ced0223c7a1b3b5344af315715cd28fe7c0d9ebc | 144,791,867,601,278,850,000,000,000,000,000,000,000 | 22 | Fix unmatched array length in core_java.c (issue #16304) (#16313) |
mbfl_buffer_converter_flush(mbfl_buffer_converter *convd)
{
if (convd == NULL) {
return -1;
}
if (convd->filter1 != NULL) {
mbfl_convert_filter_flush(convd->filter1);
}
if (convd->filter2 != NULL) {
mbfl_convert_filter_flush(convd->filter2);
}
return 0;
} | 0 | [
"CWE-119"
] | php-src | 64f42c73efc58e88671ad76b6b6bc8e2b62713e1 | 248,024,848,597,944,250,000,000,000,000,000,000,000 | 15 | Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut |
int rand_pool_add(RAND_POOL *pool,
const unsigned char *buffer, size_t len, size_t entropy)
{
if (len > pool->max_len - pool->len) {
RANDerr(RAND_F_RAND_POOL_ADD, RAND_R_ENTROPY_INPUT_TOO_LONG);
return 0;
}
if (pool->buffer == NULL) {
RANDerr(RAND_F_RAND_POOL_ADD, ... | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 249,058,183,505,787,800,000,000,000,000,000,000,000 | 23 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
static PHP_FUNCTION(libxml_clear_errors)
{
xmlResetLastError();
if (LIBXML(error_list)) {
zend_llist_clean(LIBXML(error_list));
}
} | 0 | [
"CWE-200"
] | php-src | 8e76d0404b7f664ee6719fd98f0483f0ac4669d6 | 82,375,849,859,775,980,000,000,000,000,000,000,000 | 7 | Fixed external entity loading |
static bool query_cache_flush(sys_var *self, THD *thd, enum_var_type type)
{
#ifdef HAVE_QUERY_CACHE
query_cache.flush();
#endif /* HAVE_QUERY_CACHE */
return false;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 269,095,930,817,995,200,000,000,000,000,000,000,000 | 7 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
void LinkResolver::resolve_dynamic_call(CallInfo& result,
Handle bootstrap_specifier,
Symbol* method_name, Symbol* method_signature,
KlassHandle current_klass,
... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 303,218,541,318,624,300,000,000,000,000,000,000,000 | 20 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static int selinux_umount(struct vfsmount *mnt, int flags)
{
const struct cred *cred = current_cred();
return superblock_has_perm(cred, mnt->mnt_sb,
FILESYSTEM__UNMOUNT, NULL);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 237,706,035,240,941,070,000,000,000,000,000,000,000 | 7 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
uint64_t cluster_pos() const { return cluster_pos_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 230,042,303,719,924,300,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static void coroutine_fn bdrv_aio_flush_co_entry(void *opaque)
{
BlockDriverAIOCBCoroutine *acb = opaque;
BlockDriverState *bs = acb->common.bs;
acb->req.error = bdrv_co_flush(bs);
acb->bh = qemu_bh_new(bdrv_co_em_bh, acb);
qemu_bh_schedule(acb->bh);
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 31,640,438,272,943,565,000,000,000,000,000,000,000 | 9 | 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... |
static double mp_bool(_cimg_math_parser& mp) {
return (double)(bool)_mp_arg(2); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 37,072,373,738,047,196,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.