func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void mctp_serial_setup(struct net_device *ndev)
{
ndev->type = ARPHRD_MCTP;
/* we limit at the fixed MTU, which is also the MCTP-standard
* baseline MTU, so is also our minimum
*/
ndev->mtu = MCTP_SERIAL_MTU;
ndev->max_mtu = MCTP_SERIAL_MTU;
ndev->min_mtu = MCTP_SERIAL_MTU;
ndev->hard_header_len = 0;... | 0 | [] | linux | 6c342ce2239c182c2428ce5a44cb32330434ae6e | 223,159,393,842,261,100,000,000,000,000,000,000,000 | 18 | mctp: serial: Cancel pending work from ndo_uninit handler
We cannot do the cancel_work_sync from after the unregister_netdev, as
the dev pointer is no longer valid, causing a uaf on ldisc unregister
(or device close).
Instead, do the cancel_work_sync from the ndo_uninit op, where the dev
still exists, but the queue h... |
static void cache_refresh_iterator(gpointer key, gpointer value,
gpointer user_data)
{
struct cache_entry *entry = value;
cache_refresh_entry(entry);
} | 0 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 238,993,632,401,575,650,000,000,000,000,000,000,000 | 7 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtpmap( const pjmedia_sdp_attr *attr,
pjmedia_sdp_rtpmap *rtpmap)
{
pj_scanner scanner;
pj_str_t token;
pj_status_t status = -1;
char term = 0;
PJ_USE_EXCEPTION;
PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtpmap")==0, PJ_EINVALIDOP);
if (attr-... | 0 | [
"CWE-121",
"CWE-120",
"CWE-787"
] | pjproject | 560a1346f87aabe126509bb24930106dea292b00 | 143,014,222,769,869,670,000,000,000,000,000,000,000 | 90 | Merge pull request from GHSA-f5qg-pqcg-765m |
StartupXLOG(void)
{
XLogCtlInsert *Insert;
CheckPoint checkPoint;
bool wasShutdown;
bool reachedStopPoint = false;
bool haveBackupLabel = false;
XLogRecPtr RecPtr,
checkPointLoc,
EndOfLog;
XLogSegNo endLogSegNo;
TimeLineID PrevTimeLineID;
XLogRecord *record;
TransactionId oldestActiveXID;
bool ba... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 294,330,749,724,378,900,000,000,000,000,000,000,000 | 1,298 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static int pcd_tray_move(struct cdrom_device_info *cdi, int position)
{
char ej_cmd[12] = { 0x1b, 0, 0, 0, 3 - position, 0, 0, 0, 0, 0, 0, 0 };
return pcd_atapi(cdi->handle, ej_cmd, 0, pcd_scratch,
position ? "eject" : "close tray");
} | 0 | [
"CWE-476"
] | linux | f0d1762554014ce0ae347b9f0d088f2c157c8c72 | 107,055,108,090,094,200,000,000,000,000,000,000,000 | 7 | paride/pcd: Fix potential NULL pointer dereference and mem leak
Syzkaller report this:
pcd: pcd version 1.07, major 46, nice 0
pcd0: Autoprobe failed
pcd: No CD-ROM drive found
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP... |
virDomainInputDefFind(const virDomainDef *def,
const virDomainInputDef *input)
{
size_t i;
for (i = 0; i < def->ninputs; i++) {
if (virDomainInputDefEquals(input, def->inputs[i]))
return i;
}
return -1;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 95,215,552,731,901,860,000,000,000,000,000,000,000 | 12 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
termgui_get_color(char_u *name)
{
guicolor_T t;
if (*name == NUL)
return INVALCOLOR;
t = termgui_mch_get_color(name);
if (t == INVALCOLOR)
semsg(_(e_cannot_allocate_color_str), name);
return t;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 163,217,675,650,714,060,000,000,000,000,000,000,000 | 12 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
ZEND_METHOD(CURLFile, getPostFilename)
{
curlfile_get_property("postname", INTERNAL_FUNCTION_PARAM_PASSTHRU);
} | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 320,994,753,481,293,050,000,000,000,000,000,000,000 | 4 | Fix bug #73147: Use After Free in PHP7 unserialize() |
option_value2string(
struct vimoption *opp,
int scope) // OPT_GLOBAL and/or OPT_LOCAL
{
char_u *varp;
varp = get_varp_scope(opp, scope);
if (opp->flags & P_NUM)
{
long wc = 0;
if (wc_use_keyname(varp, &wc))
STRCPY(NameBuff, get_special_key_name((int)wc, 0));
else if (wc != 0)
S... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 652dee448618589de5528a9e9a36995803f5557a | 333,862,128,849,177,840,000,000,000,000,000,000,000 | 38 | patch 8.2.4245: ":retab 0" may cause illegal memory access
Problem: ":retab 0" may cause illegal memory access.
Solution: Limit the value of 'tabstop' to 10000. |
u32 conv_8bit_to_uni(unsigned char c)
{
unsigned short uni = translations[USER_MAP][c];
return uni == (0xf000 | c) ? c : uni;
} | 0 | [
"CWE-401"
] | tty | 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac | 35,428,432,017,379,874,000,000,000,000,000,000,000 | 5 | consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c
In function con_insert_unipair(), when allocation for p2 and p1[n]
fails, ENOMEM is returned, but previously allocated p1 is not freed,
remains as leaking memory. Thus we should free p1 as well when this
allocation fails.
Signed-off-by: Gen Zhang <bl... |
static void DumpBIH(unsigned char *BIH)
{
printf("biSize = %i \n",
(int) (BIH[3] << 24) + (BIH[2] << 16) + (BIH[1] << 8) +
(BIH[0]));
printf("biWidth = %i \n",
(int) (BIH[7] << 24) + (BIH[6] << 16) + (BIH[5] << 8) +
(BIH[4]));
printf("biHeight = %i \n",
(int) (BIH[... | 0 | [] | gdk-pixbuf | 779429ce34e439c01d257444fe9d6739e72a2024 | 234,375,435,938,677,850,000,000,000,000,000,000,000 | 32 | bmp: Detect integer overflow of the line width
Instead of risking crashes or OOM, return an error if
we detect integer overflow.
The commit also includes a test image that triggers
this overflow when used with pixbuf-read.
https://bugzilla.gnome.org/show_bug.cgi?id=768738 |
void resolvePorts(edge_t * e)
{
if (ED_tail_port(e).dyna)
ED_tail_port(e) =
resolvePort(agtail(e), aghead(e), &ED_tail_port(e));
if (ED_head_port(e).dyna)
ED_head_port(e) =
resolvePort(aghead(e), agtail(e), &ED_head_port(e));
} | 0 | [
"CWE-120"
] | graphviz | 784411ca3655c80da0f6025ab20634b2a6ff696b | 213,098,245,855,122,070,000,000,000,000,000,000,000 | 9 | fix: out-of-bounds write on invalid label
When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to... |
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
{
SSL_SESSION *r;
int ret = 0;
if ((c != NULL) && (c->session_id_length != 0)) {
if (lck)
CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
ret = 1;
... | 0 | [
"CWE-362"
] | openssl | 939b4960276b040fc0ed52232238fcc9e2e9ec21 | 36,298,315,944,916,090,000,000,000,000,000,000,000 | 27 | Fix race condition in NewSessionTicket
If a NewSessionTicket is received by a multi-threaded client when
attempting to reuse a previous ticket then a race condition can occur
potentially leading to a double free of the ticket data.
CVE-2015-1791
This also fixes RT#3808 where a session ID is changed for a session alr... |
nameserver_prod_callback(evutil_socket_t fd, short events, void *arg) {
struct nameserver *const ns = (struct nameserver *) arg;
(void)fd;
(void)events;
EVDNS_LOCK(ns->base);
nameserver_send_probe(ns);
EVDNS_UNLOCK(ns->base);
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 80,903,439,858,648,960,000,000,000,000,000,000,000 | 9 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
static int test_set(struct libmnt_test *ts, int argc, char *argv[])
{
const char *value = NULL, *name;
char *optstr;
int rc;
if (argc < 3)
return -EINVAL;
optstr = xstrdup(argv[1]);
name = argv[2];
if (argc == 4)
value = argv[3];
rc = mnt_optstr_set_option(&optstr, name, value);
if (!rc)
printf("resul... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 57202f5713afa2af20ffbb6ab5331481d0396f8d | 70,707,047,555,639,810,000,000,000,000,000,000,000 | 20 | libmount: fix UID check for FUSE umount [CVE-2021-3995]
Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.
Signed-off-by: Karel Zak <kzak@redhat.com> |
create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
ORDER *group, bool distinct, bool save_sum_fields,
ulonglong select_options, ha_rows rows_limit,
const char *table_alias, bool do_not_open,
bool keep_row_order)
{
MEM_ROOT *mem_root_save, own_root;
TABLE *... | 1 | [
"CWE-89"
] | server | 9b7886bbf1eeb80136f0c208ef74fcc300514f50 | 76,946,252,788,265,090,000,000,000,000,000,000,000 | 845 | MDEV-28403 ASAN heap-use-after-free in String::copy / get_field_default_value
This reverts commit 5ba77222e9fe7af8ff403816b5338b18b342053c
but keeps the test. A different fix for
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
internal temporary tables should use THD as expr_area |
njs_primitive_value_to_chain(njs_vm_t *vm, njs_chb_t *chain,
const njs_value_t *src)
{
njs_string_prop_t string;
switch (src->type) {
case NJS_NULL:
njs_chb_append_literal(chain, "null");
return njs_length("null");
case NJS_UNDEFINED:
njs_chb_append_literal(chain, "undefi... | 0 | [] | njs | 6549d49630ce5f5ac823fd3ae0c6c8558b8716ae | 308,519,500,098,878,800,000,000,000,000,000,000,000 | 41 | Fixed redefinition of special props in Object.defineProperty().
Previously, when NJS_PROPERTY_HANDLER property was updated it might be
left in inconsistent state. Namely, prop->type was left unchanged, but
prop->value did not have an expected property handler. As a result
consecutive reference to the property may re... |
static inline int ahg_header_set(u32 *arr, int idx, size_t array_size,
u8 dw, u8 bit, u8 width, u16 value)
{
if ((size_t)idx >= array_size)
return -ERANGE;
arr[idx++] = sdma_build_ahg_descriptor(value, dw, bit, width);
return idx;
} | 0 | [
"CWE-416"
] | linux | 3d2a9d642512c21a12d19b9250e7a835dcb41a79 | 30,411,717,421,403,054,000,000,000,000,000,000,000 | 8 | IB/hfi1: Ensure correct mm is used at all times
Two earlier bug fixes have created a security problem in the hfi1
driver. One fix aimed to solve an issue where current->mm was not valid
when closing the hfi1 cdev. It attempted to do this by saving a cached
value of the current->mm pointer at file open time. This is a ... |
void gf_bs_write_u16_le(GF_BitStream *bs, u32 val)
{
gf_bs_write_int(bs, val & 0xFF, 8);
gf_bs_write_int(bs, val>>8, 8);
} | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 173,365,476,998,436,200,000,000,000,000,000,000,000 | 5 | fixed #2165 |
static void qxl_enter_vga_mode(PCIQXLDevice *d)
{
if (d->mode == QXL_MODE_VGA) {
return;
}
dprint(d, 1, "%s\n", __FUNCTION__);
qemu_spice_create_host_primary(&d->ssd);
d->mode = QXL_MODE_VGA;
memset(&d->ssd.dirty, 0, sizeof(d->ssd.dirty));
} | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 324,893,328,287,815,370,000,000,000,000,000,000,000 | 10 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
_gd2ReadChunk (int offset, char *compBuf, int compSize, char *chunkBuf,
uLongf * chunkLen, gdIOCtx * in)
{
int zerr;
if (gdTell (in) != offset) {
GD2_DBG (printf ("Positioning in file to %d\n", offset));
gdSeek (in, offset);
} else {
GD2_DBG (printf ("Already Positioned in file to %d\n", offset... | 0 | [
"CWE-703",
"CWE-189",
"CWE-681"
] | libgd | 2bb97f407c1145c850416a3bfbcc8cf124e68a19 | 24,833,709,804,437,327,000,000,000,000,000,000,000 | 30 | gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corrupted chunks.
Thanks to Hans Jerry Illikainen <hji@dyntopia.com> for indepth report
and reproducer information. Made for easy test case writing :). |
const char* ExpressionFirst::getOpName() const {
return "$first";
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 27,474,929,426,888,350,000,000,000,000,000,000,000 | 3 | SERVER-49404 Enforce additional checks in $arrayToObject |
Status AddSparseTensor(OpKernelContext* ctx, const SparseTensor& sp,
int64* handle) {
PersistentTensor persistent_ix;
Tensor* ix;
TF_RETURN_IF_ERROR(ctx->allocate_persistent(
sp.indices().dtype(), sp.indices().shape(), &persistent_ix, &ix));
*ix = sp.indices();
Pe... | 0 | [
"CWE-369",
"CWE-754"
] | tensorflow | 69c68ecbb24dff3fa0e46da0d16c821a2dd22d7c | 30,803,675,794,617,386,000,000,000,000,000,000,000 | 24 | Fix overflow CHECK issue with `tf.raw_ops.AddManySparseToTensorsMap`.
PiperOrigin-RevId: 369492969
Change-Id: I1d70d6c0c92e3d7a25bc3b3aa2a0c0ac9688bf81 |
checkclearopq(oparg_T *oap)
{
if (oap->op_type == OP_NOP && !VIsual_active)
return FALSE;
clearopbeep(oap);
return TRUE;
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 121,286,614,744,502,580,000,000,000,000,000,000,000 | 7 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
Item *get_copy(THD *thd)
{ return get_item_copy<Item_string>(thd, this); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 293,537,515,369,926,250,000,000,000,000,000,000,000 | 2 | 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_MINIT_FUNCTION(openssl)
{
char * config_filename;
le_key = zend_register_list_destructors_ex(php_openssl_pkey_free, NULL, "OpenSSL key", module_number);
le_x509 = zend_register_list_destructors_ex(php_openssl_x509_free, NULL, "OpenSSL X.509", module_number);
le_csr = zend_register_list_destructors_ex(php_opens... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 243,943,922,534,079,620,000,000,000,000,000,000,000 | 148 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
reset_dp_packet_checksum_ol_flags(struct dp_packet *p)
{
p->mbuf.ol_flags &= ~(PKT_RX_L4_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD |
PKT_RX_IP_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD);
} | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 31,699,676,530,285,900,000,000,000,000,000,000,000 | 5 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
const uint8_t *smb1cli_conn_server_challenge(struct smbXcli_conn *conn)
{
return conn->smb1.server.challenge;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 314,112,425,460,099,080,000,000,000,000,000,000,000 | 4 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx)
{
return ctx->param;
} | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 45,826,746,644,204,880,000,000,000,000,000,000,000 | 4 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr,
struct iocb __user * __user *, iocbpp)
{
struct kioctx *ctx;
long ret = 0;
int i = 0;
struct blk_plug plug;
if (unlikely(nr < 0))
return -EINVAL;
ctx = lookup_ioctx(ctx_id);
if (unlikely(!ctx)) {
pr_debug("EINVAL: invalid context id\n");
retur... | 0 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 98,535,543,900,911,040,000,000,000,000,000,000,000 | 40 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
{
DBUG_ENTER("sub_select");
if (join_tab->last_inner)
{
JOIN_TAB *last_inner_tab= join_tab->last_inner;
for (JOIN_TAB *jt= join_tab; jt <= last_inner_tab; jt++)
jt->table->null_row= 0;
}
else
join_tab->table->null_row=0;
if (... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 159,154,125,392,741,640,000,000,000,000,000,000,000 | 115 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static int check_empty_slot(struct module *module, int slot)
{
return !slots[slot] || !*slots[slot];
} | 0 | [
"CWE-416"
] | linux | 2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac | 103,873,561,639,989,680,000,000,000,000,000,000,000 | 4 | ALSA: core: Fix card races between register and disconnect
There is a small race window in the card disconnection code that
allows the registration of another card with the very same card id.
This leads to a warning in procfs creation as caught by syzkaller.
The problem is that we delete snd_cards and snd_cards_lock ... |
static int selinux_inode_permission(struct inode *inode, int mask)
{
const struct cred *cred = current_cred();
u32 perms;
bool from_access;
bool no_block = mask & MAY_NOT_BLOCK;
struct inode_security_struct *isec;
u32 sid;
struct av_decision avd;
int rc, rc2;
u32 audited, denied;
from_access = mask & MAY_ACC... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 227,824,956,361,465,500,000,000,000,000,000,000,000 | 45 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *prev = NULL;
unsigned long flags;
spin_lock_irqsave(&ctx->complet... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 329,050,604,765,096,640,000,000,000,000,000,000,000 | 38 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
mp_fast_close_print(netdissect_options *ndo,
const u_char *opt, u_int opt_len, u_char flags _U_)
{
if (opt_len != 12)
return 0;
ND_PRINT((ndo, " key 0x%" PRIx64, EXTRACT_64BITS(opt + 4)));
return 1;
} | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 4c3aee4bb0294c232d56b6d34e9eeb74f630fe8c | 256,412,515,764,591,600,000,000,000,000,000,000,000 | 9 | CVE-2017-13040/MPTCP: Clean up printing DSS suboption.
Do the length checking inline; that means we print stuff up to the point
at which we run out of option data.
First check to make sure we have at least 4 bytes of option, so we have
flags to check.
This fixes a buffer over-read discovered by Kim Gwan Yeong.
Add ... |
mysqld_get_one_option(int optid,
const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
case '#':
#ifndef DBUG_OFF
DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
#endif
opt_endinfo=1; /* unireg: memory allocation */... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 130,554,761,328,582,030,000,000,000,000,000,000,000 | 262 | 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 virDomainLeaseDefFree(virDomainLeaseDefPtr def)
{
if (!def)
return;
VIR_FREE(def->lockspace);
VIR_FREE(def->key);
VIR_FREE(def->path);
VIR_FREE(def);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 259,034,156,755,023,100,000,000,000,000,000,000,000 | 11 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void *ext4_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct super_block *sb = seq->private;
ext4_group_t group;
++*pos;
if (*pos < 0 || *pos >= ext4_get_groups_count(sb))
return NULL;
group = *pos + 1;
return (void *) ((unsigned long) group);
} | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 44,948,572,680,869,380,000,000,000,000,000,000,000 | 11 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
static unsigned char *DecodeImage(Image *blob,Image *image,
size_t bytes_per_line,const unsigned int bits_per_pixel,size_t *extent)
{
MagickBooleanType
status;
MagickSizeType
number_pixels;
register ssize_t
i;
register unsigned char
*p,
*q;
size_t
bytes_per_pixel,
length,
... | 0 | [
"CWE-20",
"CWE-252"
] | ImageMagick | 6b6bff054d569a77973f2140c0e86366e6168a6c | 100,101,010,042,763,860,000,000,000,000,000,000,000 | 149 | https://github.com/ImageMagick/ImageMagick/issues/1199 |
HttpTransact::build_response(State* s, HTTPHdr* outgoing_response, HTTPVersion outgoing_version, HTTPStatus status_code,
const char *reason_phrase)
{
build_response(s, NULL, outgoing_response, outgoing_version, status_code, reason_phrase);
return;
} | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 159,306,977,850,818,500,000,000,000,000,000,000,000 | 6 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
static void
add_fifo_list (fd)
int fd;
{
if (dev_fd_list == 0 || fd >= totfds)
{
int ofds;
ofds = totfds;
totfds = getdtablesize ();
if (totfds < 0 || totfds > 256)
totfds = 256;
if (fd >= totfds)
totfds = fd + 2;
dev_fd_list = (char *)xrealloc (dev_fd_list, totfds);
... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 194,022,299,974,488,800,000,000,000,000,000,000,000 | 21 | Bash-4.4 patch 7 |
XML_SetBase(XML_Parser parser, const XML_Char *p) {
if (parser == NULL)
return XML_STATUS_ERROR;
if (p) {
p = poolCopyString(&parser->m_dtd->pool, p);
if (! p)
return XML_STATUS_ERROR;
parser->m_curBase = p;
} else
parser->m_curBase = NULL;
return XML_STATUS_OK;
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 50,597,627,925,072,110,000,000,000,000,000,000,000 | 12 | xmlparse.c: Deny internal entities closing the doctype |
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
{
struct usbnet *dev;
struct net_device *net;
struct usb_host_interface *interface;
struct driver_info *info;
struct usb_device *xdev;
int status;
const char *name;
struct usb_driver *driver = to_usb_driver(udev->dev.driver);... | 0 | [
"CWE-703"
] | linux | 1666984c8625b3db19a9abc298931d35ab7bc64b | 154,119,644,438,022,090,000,000,000,000,000,000,000 | 185 | usbnet: cleanup after bind() in probe()
In case bind() works, but a later error forces bailing
in probe() in error cases work and a timer may be scheduled.
They must be killed. This fixes an error case related to
the double free reported in
http://www.spinics.net/lists/netdev/msg367669.html
and needs to go on top of L... |
static struct bpf_prog *bpf_prog_clone_create(struct bpf_prog *fp_other,
gfp_t gfp_extra_flags)
{
gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags;
struct bpf_prog *fp;
fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags, PAGE_KERNEL);
if (fp != NULL) {
/* aux->prog still points to the fp... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 204,737,812,538,570,570,000,000,000,000,000,000,000 | 17 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
seamless_send_sync()
{
if (!g_seamless_rdp)
return (unsigned int) -1;
return seamless_send("SYNC", "");
} | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 216,786,274,995,267,200,000,000,000,000,000,000,000 | 7 | 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... |
load_gimp_2_6_file (gconstpointer data)
{
Gimp *gimp = GIMP (data);
GimpImage *image;
gchar *filename;
GFile *file;
filename = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"),
"app/tests/files/gimp-2-6-file.xcf",
NULL);
f... | 0 | [
"CWE-20",
"CWE-476"
] | gimp | c21eff4b031acb04fb4dfce8bd5fdfecc2b6524f | 42,842,795,715,156,950,000,000,000,000,000,000,000 | 26 | Issue #1689: create unique temporary file with g_file_open_tmp().
Not sure this is really solving the issue reported, which is that
`g_get_tmp_dir()` uses environment variables (yet as g_file_open_tmp()
uses g_get_tmp_dir()…). But at least g_file_open_tmp() should create
unique temporary files, which prevents overridi... |
bool Alter_table_prelocking_strategy::
handle_view(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *table_list, bool *need_prelocking)
{
return FALSE;
} | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 311,494,739,279,355,540,000,000,000,000,000,000,000 | 6 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
PHP_FUNCTION(openssl_pkcs12_export_to_file)
{
X509 * cert = NULL;
BIO * bio_out = NULL;
PKCS12 * p12 = NULL;
char * filename;
char * friendly_name = NULL;
int filename_len;
char * pass;
int pass_len;
zval **zcert = NULL, *zpkey = NULL, *args = NULL;
EVP_PKEY *priv_key = NULL;
long certresource, keyresource;
... | 1 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 28,306,530,706,532,783,000,000,000,000,000,000,000 | 79 | - 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 |
static inline int sk_wmem_alloc_get(const struct sock *sk)
{
return atomic_read(&sk->sk_wmem_alloc) - 1;
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 311,577,130,095,957,670,000,000,000,000,000,000,000 | 4 | 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... |
ALWAYS_INLINE void LoadThreeScalars(const T** data, Packet* l1, Packet* l2,
Packet* l3) {
LoadTwoScalars(data, l1, l2);
LoadSingleScalar(data, l3);
} | 0 | [
"CWE-125"
] | tensorflow | e6cf28c72ba2eb949ca950d834dd6d66bb01cfae | 14,263,038,293,146,036,000,000,000,000,000,000,000 | 5 | Validate that matrix dimension sizes in SparseMatMul are positive.
PiperOrigin-RevId: 401149683
Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d |
gin::Handle<WebContents> WebContents::CreateFromWebPreferences(
v8::Isolate* isolate,
const gin_helper::Dictionary& web_preferences) {
// Check if webPreferences has |webContents| option.
gin::Handle<WebContents> web_contents;
if (web_preferences.GetHidden("webContents", &web_contents) &&
!web_conte... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 118,328,806,306,668,040,000,000,000,000,000,000,000 | 32 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
~any() { delete content_; } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 138,233,035,143,862,220,000,000,000,000,000,000,000 | 1 | Fix #122 |
static CURLcode readwrite_data(struct Curl_easy *data,
struct connectdata *conn,
struct SingleRequest *k,
int *didwhat, bool *done,
bool *comeback)
{
CURLcode result = CURLE_OK;
ssize_t nread;... | 0 | [
"CWE-200"
] | curl | 7214288898f5625a6cc196e22a74232eada7861c | 4,866,899,667,371,687,600,000,000,000,000,000,000 | 348 | transfer: strip credentials from the auto-referer header field
Added test 2081 to verify.
CVE-2021-22876
Bug: https://curl.se/docs/CVE-2021-22876.html |
static void textview_show_contact_pic(TextView *textview)
{
#ifndef USE_ALT_ADDRBOOK
MsgInfo *msginfo = textview->messageview->msginfo;
GtkTextView *text = GTK_TEXT_VIEW(textview->text);
int x = 0;
gchar *filename = NULL;
GError *error = NULL;
GdkPixbuf *picture = NULL;
gint w, h;
GtkAllocation allocation;
if... | 0 | [
"CWE-601"
] | claws | ac286a71ed78429e16c612161251b9ea90ccd431 | 317,893,575,542,530,240,000,000,000,000,000,000,000 | 73 | harden link checker before accepting click |
static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret = 0;
int bus_no;
if (argc == 1) {
/* querying current setting */
#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *bus;
if (!i2c_get_cur_bus(&bus))
bus_no = dev_seq(bus);
else
bus_no = -1;
#else
bus... | 0 | [
"CWE-787"
] | u-boot | 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409 | 160,393,741,843,884,870,000,000,000,000,000,000,000 | 39 | i2c: fix stack buffer overflow vulnerability in i2c md command
When running "i2c md 0 0 80000100", the function do_i2c_md parses the
length into an unsigned int variable named length. The value is then
moved to a signed variable:
int nbytes = length;
#define DISP_LINE_LEN 16
int linebytes = (nbytes > DISP... |
STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
{
return(ctx->client_CA);
} | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 174,243,563,592,809,800,000,000,000,000,000,000,000 | 4 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
InstallXLogFileSegment(XLogSegNo *segno, char *tmppath,
bool find_free, int *max_advance,
bool use_lock)
{
char path[MAXPGPATH];
struct stat stat_buf;
XLogFilePath(path, ThisTimeLineID, *segno);
/*
* We want to be sure that only one process does this at a time.
*/
if (use_lock)
LWLockAcqui... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 337,704,774,786,587,700,000,000,000,000,000,000,000 | 73 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static int _(r_cmd_java_check_op_idx) (const ut8 *op_bytes, ut16 idx) {
return R_BIN_JAVA_USHORT (op_bytes, 0) == idx;
} | 0 | [
"CWE-703",
"CWE-193"
] | radare2 | ced0223c7a1b3b5344af315715cd28fe7c0d9ebc | 136,926,934,019,924,350,000,000,000,000,000,000,000 | 3 | Fix unmatched array length in core_java.c (issue #16304) (#16313) |
static __poll_t qrtr_tun_poll(struct file *filp, poll_table *wait)
{
struct qrtr_tun *tun = filp->private_data;
__poll_t mask = 0;
poll_wait(filp, &tun->readq, wait);
if (!skb_queue_empty(&tun->queue))
mask |= EPOLLIN | EPOLLRDNORM;
return mask;
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | a21b7f0cff1906a93a0130b74713b15a0b36481d | 314,996,077,208,263,800,000,000,000,000,000,000,000 | 12 | net: qrtr: fix memort leak in qrtr_tun_write_iter
In qrtr_tun_write_iter the allocated kbuf should be release in case of
error or success return.
v2 Update: Thanks to David Miller for pointing out the release on success
path as well.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. ... |
static int verify_cb(int ok, X509_STORE_CTX* csc)
{
if (ok != 1)
{
int err = X509_STORE_CTX_get_error(csc);
int derr = X509_STORE_CTX_get_error_depth(csc);
X509* where = X509_STORE_CTX_get_current_cert(csc);
const char* what = X509_verify_cert_error_string(err);
char* name = crypto_cert_subject(where);
W... | 0 | [
"CWE-787"
] | FreeRDP | 8305349a943c68b1bc8c158f431dc607655aadea | 75,265,801,506,247,545,000,000,000,000,000,000,000 | 18 | Fixed GHSL-2020-102 heap overflow
(cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581) |
SPL_METHOD(SplFileInfo, __construct)
{
spl_filesystem_object *intern;
char *path;
int len;
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) {
zend_re... | 1 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 187,512,870,099,966,500,000,000,000,000,000,000,000 | 22 | Fix bug #72262 - do not overflow int |
u_undofile_reset_and_delete(buf_T *buf)
{
char_u *file_name;
if (!buf->b_p_udf)
return;
file_name = u_get_undo_file_name(buf->b_ffname, TRUE);
if (file_name != NULL)
{
mch_remove(file_name);
vim_free(file_name);
}
set_option_value_give_err((char_u *)"undofile", 0L, NULL, OPT_LOCAL);
} | 0 | [
"CWE-787"
] | vim | 338f1fc0ee3ca929387448fe464579d6113fa76a | 272,833,163,935,532,300,000,000,000,000,000,000,000 | 16 | patch 8.2.5023: substitute overwrites allocated buffer
Problem: Substitute overwrites allocated buffer.
Solution: Disallow undo when in a substitute command. |
static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
sub_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRML... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 39,647,277,847,550,790,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 |
static int psi_poll_worker(void *data)
{
struct psi_group *group = (struct psi_group *)data;
sched_set_fifo_low(current);
while (true) {
wait_event_interruptible(group->poll_wait,
atomic_cmpxchg(&group->poll_wakeup, 1, 0) ||
kthread_should_stop());
if (kthread_should_stop())
break;
psi_poll_work(... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 266,930,449,777,017,850,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... |
void ConvAsGemm(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims,
int32 output_offset, int32 output_multiplie... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 76,286,306,378,224,880,000,000,000,000,000,000,000 | 41 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
int sftp_unlink(sftp_session sftp, const char *file) {
sftp_status_message status = NULL;
sftp_message msg = NULL;
ssh_string filename;
ssh_buffer buffer;
uint32_t id;
buffer = ssh_buffer_new();
if (buffer == NULL) {
ssh_set_error_oom(sftp->session);
return -1;
}
filename = ssh_string_from_c... | 0 | [] | libssh | 4d8420f3282ed07fc99fc5e930c17df27ef1e9b2 | 5,447,133,935,344,243,000,000,000,000,000,000,000 | 75 | sftp: Fix bug in sftp_mkdir not returning on error.
resolves: #84
(cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44) |
static void cmv_decode_intra(CmvContext * s, AVFrame *frame,
const uint8_t *buf, const uint8_t *buf_end)
{
unsigned char *dst = frame->data[0];
int i;
for (i=0; i < s->avctx->height && buf_end - buf >= s->avctx->width; i++) {
memcpy(dst, buf, s->avctx->width);
d... | 0 | [
"CWE-703"
] | FFmpeg | 5430839144c6da0160e8e0cfb0c8db01de432e94 | 268,081,110,530,878,430,000,000,000,000,000,000,000 | 12 | eacmv: clear references on frame dimensions change
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
TEST_F(BrotliDecompressorImplTest, DetectExcessiveCompressionRatio) {
const absl::string_view ten_whitespaces = " ";
Brotli::Compressor::BrotliCompressorImpl compressor{
default_quality,
default_window_bits,
default_input_block_bits,
false,
Brotli::Compressor::BrotliCompressor... | 0 | [] | envoy | cb4ef0b09200c720dfdb07e097092dd105450343 | 26,795,380,663,279,127,000,000,000,000,000,000,000 | 23 | decompressors: stop decompressing upon excessive compression ratio (#733)
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Co-authored-by: Ryan Hamilton <rch@google.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook, *next_hook;
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_FD];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !p... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 143,202,040,824,034,420,000,000,000,000,000,000,000 | 31 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
static void ipv4ll_start(GDHCPClient *dhcp_client)
{
guint timeout;
remove_timeouts(dhcp_client);
switch_listening_mode(dhcp_client, L_NONE);
dhcp_client->retry_times = 0;
dhcp_client->requested_ip = 0;
dhcp_client->requested_ip = arp_random_ip();
/*first wait a random delay to avoid storm of arp request on ... | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 226,794,148,697,023,000,000,000,000,000,000,000,000 | 22 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
static int calipso_opt_del(struct ipv6_opt_hdr *hop,
struct ipv6_opt_hdr **new)
{
int ret_val;
unsigned int start, end, delta, pad, hop_len;
ret_val = calipso_opt_find(hop, &start, &end);
if (ret_val)
return ret_val;
hop_len = ipv6_optlen(hop);
if (start == sizeof(*hop) && end == hop_len) {
/* There's... | 0 | [
"CWE-416"
] | linux | ad5d07f4a9cd671233ae20983848874731102c08 | 114,797,039,880,770,410,000,000,000,000,000,000,000 | 32 | cipso,calipso: resolve a number of problems with the DOI refcounts
The current CIPSO and CALIPSO refcounting scheme for the DOI
definitions is a bit flawed in that we:
1. Don't correctly match gets/puts in netlbl_cipsov4_list().
2. Decrement the refcount on each attempt to remove the DOI from the
DOI list, only re... |
TPM_RC_Marshal(TPM_RC *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += UINT32_Marshal(source, buffer, size);
return written;
} | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 316,523,208,103,580,900,000,000,000,000,000,000,000 | 6 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
nvmet_fc_alloc_tgt_pgs(struct nvmet_fc_fcp_iod *fod)
{
struct scatterlist *sg;
struct page *page;
unsigned int nent;
u32 page_len, length;
int i = 0;
length = fod->total_length;
nent = DIV_ROUND_UP(length, PAGE_SIZE);
sg = kmalloc_array(nent, sizeof(struct scatterlist), GFP_KERNEL);
if (!sg)
goto out;
sg_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0c319d3a144d4b8f1ea2047fd614d2149b68f889 | 122,576,959,007,301,720,000,000,000,000,000,000,000 | 48 | nvmet-fc: ensure target queue id within range.
When searching for queue id's ensure they are within the expected range.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
void Locked_tables_list::add_back_last_deleted_lock(TABLE_LIST *dst_table_list)
{
/* Link the lock back in the locked tables list */
dst_table_list->prev_global= m_locked_tables_last;
*m_locked_tables_last= dst_table_list;
m_locked_tables_last= &dst_table_list->next_global;
dst_table_list->next_global= 0;
m... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 255,439,361,296,598,580,000,000,000,000,000,000,000 | 9 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
R_API bool r_socket_listen (RSocket *s, const char *port, const char *certfile) {
return false;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 102,138,861,328,533,560,000,000,000,000,000,000,000 | 3 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
GF_Err pmax_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_PMAXBox *ptr = (GF_PMAXBox *)s;
ISOM_DECREASE_SIZE(ptr, 4)
ptr->maxSize = gf_bs_read_u32(bs);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 65,087,897,554,293,830,000,000,000,000,000,000,000 | 7 | fixed #1587 |
work_address_compare (EContact *ecard1,
EContact *ecard2)
{
return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_WORK);
} | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 118,093,360,948,832,300,000,000,000,000,000,000,000 | 5 | Bug 796174 - strcat() considered unsafe for buffer overflow |
ulonglong subselect_hash_sj_engine::rowid_merge_buff_size(
bool has_non_null_key, bool has_covering_null_row,
MY_BITMAP *partial_match_key_parts)
{
/* Total size of all buffers used by partial matching. */
ulonglong buff_size;
ha_rows row_count= tmp_table->file->stats.records;
uint rowid_length= tmp_table->... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 268,436,720,139,819,850,000,000,000,000,000,000,000 | 50 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
void auth_request_success_continue(struct auth_policy_check_ctx *ctx)
{
struct auth_request *request = ctx->request;
i_assert(request->state == AUTH_REQUEST_STATE_MECH_CONTINUE);
timeout_remove(&request->to_penalty);
if (request->failed || !request->passdb_success) {
/* password was valid, but some other check ... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 115,933,602,543,802,100,000,000,000,000,000,000,000 | 37 | 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... |
HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type) {
HMACCTX ctx = NULL;
ctx = malloc(sizeof(*ctx));
if (ctx == NULL) {
return NULL;
}
#ifndef OLD_CRYPTO
HMAC_CTX_init(ctx); // openssl 0.9.7 requires it.
#endif
switch(type) {
case SSH_HMAC_SHA1:
HMAC_Init(ctx, key, len, EVP_s... | 0 | [
"CWE-310"
] | libssh | e99246246b4061f7e71463f8806b9dcad65affa0 | 154,324,380,257,059,840,000,000,000,000,000,000,000 | 26 | security: fix for vulnerability CVE-2014-0017
When accepting a new connection, a forking server based on libssh forks
and the child process handles the request. The RAND_bytes() function of
openssl doesn't reset its state after the fork, but simply adds the
current process id (getpid) to the PRNG state, which is not g... |
static inline bool is_error_pfn(kvm_pfn_t pfn)
{
return !!(pfn & KVM_PFN_ERR_MASK);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 86,866,069,644,156,620,000,000,000,000,000,000,000 | 4 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
hold_new_jobs(cupsd_client_t *con, /* I - Connection */
ipp_attribute_t *uri) /* I - Printer URI */
{
http_status_t status; /* Policy status */
cups_ptype_t dtype; /* Destination type (printer/class) */
cupsd_printer_t *printer; /* Printer data */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "hold_new... | 0 | [
"CWE-20"
] | cups | 49fa4983f25b64ec29d548ffa3b9782426007df3 | 220,733,810,874,990,400,000,000,000,000,000,000,000 | 59 | DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8. |
LoadPage::LoadPage():
jsdelay(200),
windowStatus(""),
zoomFactor(1.0),
repeatCustomHeaders(false),
blockLocalFileAccess(false),
stopSlowScripts(true),
debugJavascript(false),
loadErrorHandling(abort),
mediaLoadErrorHandling(ignore),
cacheDir(""),
proxyHostNameLookup(false) {}; | 1 | [
"CWE-22"
] | wkhtmltopdf | 2a5f25077895fb075812c0f599326f079a59d6cf | 103,462,908,753,413,770,000,000,000,000,000,000,000 | 12 | BREAKING CHANGE: block local filesystem access by default
fixes #4536 |
get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
* In this case we just read right into the JSAMPLE buffer!
* Note that same code works for PPM and PGM files.
*/
{
ppm_source_ptr source = (ppm_source_ptr) sinfo;
if (! ReadO... | 0 | [] | libjpeg-turbo | 6709e4a0cfa44d4f54ee8ad05753d4aa9260cb91 | 235,590,378,640,712,980,000,000,000,000,000,000,000 | 12 | Check range of integer values in PPM text file
Add checks to ensure values are within the specified range.
Fixes mozilla/mozjpeg#141, closes #8 |
static void snd_card_set_id_no_lock(struct snd_card *card, const char *src,
const char *nid)
{
int len, loops;
bool is_default = false;
char *id;
copy_valid_id_string(card, src, nid);
id = card->id;
again:
/* use "Default" for obviously invalid strings
* ("card" conflicts with proc directories)
*/... | 0 | [
"CWE-416"
] | linux | 2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac | 129,472,622,461,226,000,000,000,000,000,000,000,000 | 47 | ALSA: core: Fix card races between register and disconnect
There is a small race window in the card disconnection code that
allows the registration of another card with the very same card id.
This leads to a warning in procfs creation as caught by syzkaller.
The problem is that we delete snd_cards and snd_cards_lock ... |
static struct geneve_dev *geneve_lookup(struct geneve_sock *gs,
__be32 addr, u8 vni[])
{
struct hlist_head *vni_list_head;
struct geneve_dev_node *node;
__u32 hash;
/* Find the device for this VNI */
hash = geneve_net_vni_hash(vni);
vni_list_head = &gs->vni_list[hash];
hlist_for_each_entry_rcu(node, vni_li... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 143,235,365,111,118,400,000,000,000,000,000,000,000 | 17 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
error(
const char *fmt,
...
)
{
va_list ap;
va_start(ap, fmt);
vwarning(fmt, ap);
va_end(ap);
exit(1);
} | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 303,900,294,310,938,160,000,000,000,000,000,000,000 | 11 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
agoo_con_res_prepend(agooCon c, agooRes res) {
pthread_mutex_lock(&c->res_lock);
res->next = c->res_head;
c->res_head = res;
if (NULL == c->res_tail) {
c->res_tail = res;
}
pthread_mutex_unlock(&c->res_lock);
} | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 318,440,652,525,437,560,000,000,000,000,000,000,000 | 9 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
xsltParseStylesheetProcess(xsltStylesheetPtr style, xmlDocPtr doc)
{
xsltCompilerCtxtPtr cctxt;
xmlNodePtr cur;
int oldIsSimplifiedStylesheet;
xsltInitGlobals();
if ((style == NULL) || (doc == NULL))
return(NULL);
cctxt = XSLT_CCTXT(style);
cur = xmlDocGetRootElement(doc);
if (cur =... | 0 | [] | libxslt | 7089a62b8f133b42a2981cf1f920a8b3fe9a8caa | 24,495,476,415,084,050,000,000,000,000,000,000,000 | 56 | Crash compiling stylesheet with DTD
* libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation
process could get seriously wrong |
static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){
int i;
int r= log2>=0 ? 1<<log2 : 1;
int v=0;
av_assert2(log2>=-4);
while(log2<28 && get_rac(c, state+4+log2)){
v+= r;
log2++;
if(log2>0) r+=r;
}
for(i=log2-1; i>=0; i--){
v+= get_rac(c... | 0 | [
"CWE-703"
] | FFmpeg | 61d59703c91869f4e5cdacd8d6be52f8b89d4ba4 | 308,685,191,209,027,050,000,000,000,000,000,000,000 | 19 | avcodec/snow: split block clipping checks
Fixes out of array read
Fixes: d4476f68ca1c1c57afbc45806f581963-asan_heap-oob_2266b27_8607_cov_4044577381_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static int fcn_print_detail(RCore *core, RAnalFunction *fcn) {
const char *defaultCC = r_anal_cc_default (core->anal);
char *name = r_core_anal_fcn_name (core, fcn);
char *paren = strchr (name, '(');
if (paren) {
*paren = '\0';
}
r_cons_printf ("\"f %s %"PFMT64u" 0x%08"PFMT64x"\"\n", name, r_anal_function_linea... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 131,509,640,918,285,000,000,000,000,000,000,000,000 | 65 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
static void clear_singlestep(struct task_struct *child)
{
/* Always clear TIF_SINGLESTEP... */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
/* But touch TF only if it was set by us.. */
if (child->ptrace & PT_DTRACE) {
struct pt_regs *regs = get_child_regs(child);
regs->eflags &= ~TRAP_FLAG;
child->ptrace &... | 0 | [
"CWE-20"
] | linux-2.6 | 29eb51101c02df517ca64ec472d7501127ad1da8 | 280,004,504,597,722,170,000,000,000,000,000,000,000 | 12 | Handle bogus %cs selector in single-step instruction decoding
The code for LDT segment selectors was not robust in the face of a bogus
selector set in %cs via ptrace before the single-step was done.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
void am_release_request_session(request_rec *r, am_cache_entry_t *session)
{
am_cache_unlock(r->server, session);
} | 0 | [
"CWE-79"
] | mod_auth_mellon | 7af21c53da7bb1de024274ee6da30bc22316a079 | 337,430,524,608,544,870,000,000,000,000,000,000,000 | 4 | Fix Cross-Site Session Transfer vulnerability
mod_auth_mellon did not verify that the site the session was created
for was the same site as the site the user accessed. This allows an
attacker with access to one web site on a server to use the same
session to get access to a different site running on the same server.
... |
int ha_savepoint(THD *thd, SAVEPOINT *sv)
{
#ifdef WITH_WSREP
/*
Register binlog hton for savepoint processing if wsrep binlog
emulation is on.
*/
if (WSREP_EMULATE_BINLOG(thd) && wsrep_thd_is_local(thd))
{
wsrep_register_binlog_handler(thd, thd->in_multi_stmt_transaction_mode());
}
#endif /* WIT... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 246,455,696,073,999,600,000,000,000,000,000,000,000 | 44 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
static void SFDGetSubrs(FILE *sfd) {
/* Obselete, parse it in case there are any old sfds */
int i, cnt, tot, len;
struct enc85 dec;
getint(sfd,&cnt);
tot = 0;
for ( i=0; i<cnt; ++i ) {
getint(sfd,&len);
tot += len;
}
memset(&dec,'\0', sizeof(dec)); dec.pos = -1;
dec.sfd = sfd;
... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 289,312,645,179,195,700,000,000,000,000,000,000,000 | 17 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
LZWSetupDecode(TIFF* tif)
{
static const char module[] = "LZWSetupDecode";
LZWCodecState* sp = DecoderState(tif);
int code;
if( sp == NULL )
{
/*
* Allocate state block so tag methods have storage to record
* values.
*/
tif->tif_data = (uint8*) _TIFFmalloc(sizeof(LZWCodecState));
if (tif->tif_data =... | 0 | [
"CWE-787"
] | libtiff | 58a898cb4459055bb488ca815c23b880c242a27d | 126,745,289,253,179,340,000,000,000,000,000,000,000 | 57 | LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905
The fix consists in using the similar code LZWDecode() to validate we
don't write outside of the output buffer. |
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long nr_running = READ_ONCE(rq->cfs.h_nr_running);
unsigned long load_avg = cpu_runnable_load(rq);
if (nr_running)
return load_avg / nr_running;
return 0;
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 263,150,570,841,459,100,000,000,000,000,000,000,000 | 11 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize)
{
return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8);
} | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 286,136,232,923,848,200,000,000,000,000,000,000,000 | 4 | Fixed #5645: realloc return handling |
dissect_kafka_inc_alter_config_request_resource(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, kafka_api_version_t api_version)
{
proto_item *subti, *subsubti;
proto_tree *subtree, *subsubtree;
subtree = proto_tree_add_subtree(tree, tvb, offset,... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 8,431,317,082,344,829,000,000,000,000,000,000,000 | 26 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
static void *mspack_fmap_alloc(struct mspack_system *self, size_t num)
{
return malloc(num);
} | 0 | [
"CWE-119",
"CWE-787"
] | clamav-devel | a83773682e856ad6529ba6db8d1792e6d515d7f1 | 242,752,281,590,251,250,000,000,000,000,000,000,000 | 4 | fixing potential OOB window write when unpacking chm files |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.