func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
isdn_net_force_dial_lp(isdn_net_local *lp)
{
if ((!(lp->flags & ISDN_NET_CONNECTED)) && !lp->dialstate) {
int chi;
if (lp->phone[1]) {
ulong flags;
/* Grab a free ISDN-Channel */
spin_lock_irqsave(&dev->lock, flags);
if ((chi = isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
... | 0 | [
"CWE-119"
] | linux | 9f5af546e6acc30f075828cb58c7f09665033967 | 219,649,050,294,618,420,000,000,000,000,000,000,000 | 41 | isdn/i4l: fix buffer overflow
This fixes a potential buffer overflow in isdn_net.c caused by an
unbounded strcpy.
[ ISDN seems to be effectively unmaintained, and the I4L driver in
particular is long deprecated, but in case somebody uses this..
- Linus ]
Signed-off-by: Jiten Thakkar <jitenmt@gmail.com>
Signed-... |
static struct smi_info *find_dup_si(struct smi_info *info)
{
struct smi_info *e;
list_for_each_entry(e, &smi_infos, link) {
if (e->io.addr_type != info->io.addr_type)
continue;
if (e->io.addr_data == info->io.addr_data) {
/*
* This is a cheap hack, ACPI doesn't have a defined
* slave address but SM... | 0 | [
"CWE-416"
] | linux | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | 69,709,149,274,140,710,000,000,000,000,000,000,000 | 21 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class =... |
QPDFTokenizer::allowEOF()
{
this->m->allow_eof = true;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 289,668,746,166,762,120,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
int handleClientsWithPendingWritesUsingThreads(void) {
int processed = listLength(server.clients_pending_write);
if (processed == 0) return 0; /* Return ASAP if there are no clients. */
/* If I/O threads are disabled or we have few clients to serve, don't
* use I/O threads, but thejboring synchronous ... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 57,497,148,026,661,180,000,000,000,000,000,000,000 | 82 | 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... |
mrb_proc_arity(const struct RProc *p)
{
const mrb_irep *irep;
const mrb_code *pc;
mrb_aspec aspec;
int ma, op, ra, pa, arity;
if (MRB_PROC_CFUNC_P(p)) {
/* TODO cfunc aspec not implemented yet */
return -1;
}
irep = p->body.irep;
if (!irep) {
return 0;
}
pc = irep->iseq;
/* arity is... | 0 | [
"CWE-476",
"CWE-190"
] | mruby | f5e10c5a79a17939af763b1dcf5232ce47e24a34 | 60,063,582,095,468,630,000,000,000,000,000,000,000 | 32 | proc.c: add `mrb_state` argument to `mrb_proc_copy()`.
The function may invoke the garbage collection and it requires
`mrb_state` to run. |
free_macro(const Macro *macro) {
if (macro) {
free((char *)macro->name);
free((char *)macro->definition);
free((int *)macro->substitutions);
free((Macro *)macro);
}
} | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 211,107,846,322,999,460,000,000,000,000,000,000,000 | 8 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
static void hidp_input_report(struct hidp_session *session, struct sk_buff *skb)
{
struct input_dev *dev = session->input;
unsigned char *keys = session->keys;
unsigned char *udata = skb->data + 1;
signed char *sdata = skb->data + 1;
int i, size = skb->len - 1;
switch (skb->data[0]) {
case 0x01: /* Keyboard rep... | 0 | [
"CWE-843"
] | linux | 51bda2bca53b265715ca1852528f38dc67429d9a | 29,842,999,626,041,560,000,000,000,000,000,000,000 | 54 | Bluetooth: hidp_connection_add() unsafe use of l2cap_pi()
it's OK after we'd verified the sockets, but not before that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
bool can_push(size_t count)
{
return static_cast<size_t>(to_end - to_next) > count;
} | 0 | [
"CWE-200"
] | wesnoth | f8914468182e8d0a1551b430c0879ba236fe4d6d | 229,111,444,695,962,040,000,000,000,000,000,000,000 | 4 | Disallow inclusion of .pbl files from WML (bug #23504)
Note that this will also cause Lua wesnoth.have_file() to return false
on .pbl files. |
static void __io_req_task_submit(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
/* ctx stays valid until unlock, even if we drop all ours ctx->refs */
mutex_lock(&ctx->uring_lock);
if (!ctx->sqo_dead && !(current->flags & PF_EXITING) && !current->in_execve)
__io_queue_sqe(req);
else
__io_req_task... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 184,959,040,047,527,200,000,000,000,000,000,000,000 | 12 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
onig_reg_init(regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag,
OnigEncoding enc, OnigSyntaxType* syntax)
{
int r;
xmemset(reg, 0, sizeof(*reg));
if (onig_inited == 0) {
#if 0
return ONIGERR_LIBRARY_IS_NOT_INITIALIZED;
#else
r = onig_initialize(&enc, 1);
if (r != 0)... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 250,689,307,104,144,940,000,000,000,000,000,000,000 | 53 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
static void push_ssh_options(struct argv_array *args, struct argv_array *env,
enum ssh_variant variant, const char *port,
enum protocol_version version, int flags)
{
if (variant == VARIANT_SSH &&
version > 0) {
argv_array_push(args, "-o");
argv_array_push(args, "SendEnv=" GIT_PROTOCOL_ENVIRONM... | 0 | [] | git | a02ea577174ab8ed18f847cf1693f213e0b9c473 | 269,221,189,774,889,400,000,000,000,000,000,000,000 | 59 | git_connect_git(): forbid newlines in host and path
When we connect to a git:// server, we send an initial request that
looks something like:
002dgit-upload-pack repo.git\0host=example.com
If the repo path contains a newline, then it's included literally, and
we get:
002egit-upload-pack repo
.git\0host=exampl... |
pages_destroy (r2007_page *page)
{
r2007_page *next;
while (page != 0)
{
next = page->next;
free (page);
page = next;
}
} | 0 | [
"CWE-787"
] | libredwg | 45d2a290c65ed691be0901ba2b2ef51044e07a16 | 24,177,358,876,115,040,000,000,000,000,000,000,000 | 11 | decode_r2007: fix for invalid section size
See GH #350. With fuzzing section->data_size might not fit
section_page->uncomp_size. |
static int cipso_v4_map_cat_enum_hton(const struct cipso_v4_doi *doi_def,
const struct netlbl_lsm_secattr *secattr,
unsigned char *net_cat,
u32 net_cat_len)
{
int cat = -1;
u32 cat_iter = 0;
for (;;) {
cat = netlbl_secattr_catmap_walk(secattr->attr.mls.cat,
cat + 1);
if (cat... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 227,750,270,062,697,400,000,000,000,000,000,000,000 | 22 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
static void map_ensure_capacity(wfClipboard* clipboard)
{
if (!clipboard)
return;
if (clipboard->map_size >= clipboard->map_capacity)
{
size_t new_size;
formatMapping* new_map;
new_size = clipboard->map_capacity * 2;
new_map =
(formatMapping*)realloc(clipboard->format_mappings, sizeof(formatMapping)... | 0 | [
"CWE-20"
] | FreeRDP | 0d79670a28c0ab049af08613621aa0c267f977e9 | 168,602,457,898,499,370,000,000,000,000,000,000,000 | 20 | Fixed missing input checks for file contents request
reported by Valentino Ricotta (Thalium) |
tstflags(
u_long val
)
{
register char *cp, *s;
size_t cb;
register int i;
register const char *sep;
sep = "";
s = cp = circ_buf[nextcb];
if (++nextcb >= NUMCB)
nextcb = 0;
cb = sizeof(circ_buf[0]);
snprintf(cp, cb, "%02lx", val);
cp += strlen(cp);
cb -= strlen(cp);
if (!val) {
strlcat(cp, " ok", cb... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 23,460,161,203,133,810,000,000,000,000,000,000,000 | 43 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
static ssize_t lbs_rdbbp_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
struct lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
if (!buf)
return -ENOMEM;
buf_size = min(... | 0 | [
"CWE-703",
"CWE-189"
] | linux | a497e47d4aec37aaf8f13509f3ef3d1f6a717d88 | 52,434,877,445,736,210,000,000,000,000,000,000,000 | 22 | libertas: potential oops in debugfs
If we do a zero size allocation then it will oops. Also we can't be
sure the user passes us a NUL terminated string so I've added a
terminator.
This code can only be triggered by root.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-... |
int ipmi_request_settime(struct ipmi_user *user,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
void *user_msg_data,
int priority,
int retries,
unsigned int retry_time_ms)
{
unsigned char saddr = 0, lun = 0;
int rv, i... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 289,397,878,625,927,700,000,000,000,000,000,000,000 | 37 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
void bio_advance(struct bio *bio, unsigned bytes)
{
if (bio_integrity(bio))
bio_integrity_advance(bio, bytes);
bio_advance_iter(bio, &bio->bi_iter, bytes);
} | 0 | [
"CWE-772",
"CWE-787"
] | linux | 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 | 172,591,195,425,815,800,000,000,000,000,000,000,000 | 7 | fix unbalanced page refcounting in bio_map_user_iov
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if
IO vector has small consecutive buffers belonging to the same page.
bio_add_pc_page merges them into one, but the page reference is never
dropped.
Cc: stable@vger.kernel.org
Signed-off-by: Vitaly... |
static uint8_t sdhci_slotint(SDHCIState *s)
{
return (s->norintsts & s->norintsigen) || (s->errintsts & s->errintsigen) ||
((s->norintsts & SDHC_NIS_INSERT) && (s->wakcon & SDHC_WKUP_ON_INS)) ||
((s->norintsts & SDHC_NIS_REMOVE) && (s->wakcon & SDHC_WKUP_ON_RMV));
} | 0 | [
"CWE-119"
] | qemu | dfba99f17feb6d4a129da19d38df1bcd8579d1c3 | 54,001,873,430,662,640,000,000,000,000,000,000,000 | 6 | hw/sd/sdhci: Fix DMA Transfer Block Size field
The 'Transfer Block Size' field is 12-bit wide.
See section '2.2.2. Block Size Register (Offset 004h)' in datasheet.
Two different bug reproducer available:
- https://bugs.launchpad.net/qemu/+bug/1892960
- https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc... |
static void multi_freetimeout(void *user, void *entryptr)
{
(void)user;
/* the entry was plain malloc()'ed */
free(entryptr);
} | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 246,959,885,181,984,380,000,000,000,000,000,000,000 | 7 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
static void test_bug21726()
{
const char *create_table[]=
{
"DROP TABLE IF EXISTS t1",
"CREATE TABLE t1 (i INT)",
"INSERT INTO t1 VALUES (1)",
};
const char *update_query= "UPDATE t1 SET i= LAST_INSERT_ID(i + 1)";
int rc;
my_ulonglong insert_id;
const char *select_query= "SELECT * FROM t1";
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 33,054,246,470,232,896,000,000,000,000,000,000,000 | 38 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static int tcm_loop_check_demo_mode(struct se_portal_group *se_tpg)
{
return 1;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 226,343,454,986,312,620,000,000,000,000,000,000,000 | 4 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
static void r_bin_dwarf_free_debug_info (RBinDwarfDebugInfo *inf) {
size_t i;
if (!inf) {
return;
}
for (i = 0; i < inf->length; i++) {
r_bin_dwarf_free_comp_unit (&inf->comp_units[i]);
}
R_FREE (inf->comp_units);
} | 0 | [
"CWE-119",
"CWE-125"
] | radare2 | d37d2b858ac47f2f108034be0bcecadaddfbc8b3 | 76,556,615,196,750,270,000,000,000,000,000,000,000 | 10 | Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478) |
void ff_mpeg4_pred_ac(MpegEncContext *s, int16_t *block, int n, int dir)
{
int i;
int16_t *ac_val, *ac_val1;
int8_t *const qscale_table = s->current_picture.qscale_table;
/* find prediction */
ac_val = s->ac_val[0][0] + s->block_index[n] * 16;
ac_val1 = ac_val;
if (s->ac_pred) {
if... | 0 | [
"CWE-703"
] | FFmpeg | 3edc3b159503d512c919b3d5902f7026e961823a | 317,521,447,470,532,940,000,000,000,000,000,000,000 | 50 | avcodec/mpeg4videodec: Check for bitstream overread in decode_vol_header()
Fixes out of array read
Fixes: 08e48e9daae7d8f8ab6dbe3919e797e5-asan_heap-oob_157461c_5295_cov_1266798650_firefing.mpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void CSteamNetworkConnectionBase::SNP_InitializeConnection( SteamNetworkingMicroseconds usecNow )
{
m_senderState.TokenBucket_Init( usecNow );
SteamNetworkingMicroseconds usecPing = GetUsecPingWithFallback( this );
/*
* Compute the initial sending rate X_init in the manner of RFC 3390:
*
* X_init = min(4 * s,... | 0 | [
"CWE-787"
] | GameNetworkingSockets | e0c86dcb9139771db3db0cfdb1fb8bef0af19c43 | 139,298,017,600,488,660,000,000,000,000,000,000,000 | 21 | Drop unreliable segments with weird offset/size.
And be more deliberate about limits of unreliable message/segment sizes. |
static void csi_J(struct vc_data *vc, int vpar)
{
unsigned int count;
unsigned short * start;
switch (vpar) {
case 0: /* erase from cursor to end of display */
vc_uniscr_clear_line(vc, vc->vc_x,
vc->vc_cols - vc->vc_x);
vc_uniscr_clear_lines(vc, vc->vc_y + 1,
vc->vc_rows - vc->vc_y - 1)... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 96,697,707,772,971,700,000,000,000,000,000,000,000 | 36 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
void zmq::stream_engine_t::error (error_reason_t reason)
{
if (options.raw_sock) {
// For raw sockets, send a final 0-length message to the application
// so that it knows the peer has been disconnected.
msg_t terminator;
terminator.init();
(this->*process_msg) (&terminator... | 0 | [] | libzmq | 77f14aad95cdf0d2a244ae9b4a025e5ba0adf01a | 324,919,776,647,833,070,000,000,000,000,000,000,000 | 17 | Problem: stream_engine.cpp security can be downgraded
Solution: accept only the mechanism defined by the socket options.
I've not tested this yet, so it's a speculative fix. |
bool subselect_uniquesubquery_engine::fix_length_and_dec(Item_cache **row)
{
//this never should be called
DBUG_ASSERT(0);
return FALSE;
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 227,062,981,034,484,000,000,000,000,000,000,000,000 | 6 | 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... |
static int rfc4106_init(struct crypto_tfm *tfm)
{
struct cryptd_aead *cryptd_tfm;
struct aesni_rfc4106_gcm_ctx *ctx = (struct aesni_rfc4106_gcm_ctx *)
PTR_ALIGN((u8 *)crypto_tfm_ctx(tfm), AESNI_ALIGN);
struct crypto_aead *cryptd_child;
struct aesni_rfc4106_gcm_ctx *child_ctx;
cryptd_tfm = cryptd_alloc_aead("__dr... | 0 | [
"CWE-119",
"CWE-787"
] | linux | ccfe8c3f7e52ae83155cb038753f4c75b774ca8a | 168,113,318,987,927,910,000,000,000,000,000,000,000 | 19 | crypto: aesni - fix memory usage in GCM decryption
The kernel crypto API logic requires the caller to provide the
length of (ciphertext || authentication tag) as cryptlen for the
AEAD decryption operation. Thus, the cipher implementation must
calculate the size of the plaintext output itself and cannot simply use
cryp... |
uint_t aubio_onset_set_minioi_ms(aubio_onset_t * o, smpl_t minioi) {
return aubio_onset_set_minioi_s (o, minioi / 1000.);
} | 0 | [] | aubio | e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 | 162,518,199,138,142,550,000,000,000,000,000,000,000 | 3 | [onset] safer deletion method |
int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
{
unsigned long onlined_pages = 0;
struct zone *zone;
int need_zonelists_rebuild = 0;
int nid;
int ret;
struct memory_notify arg;
lock_memory_hotplug();
arg.start_pfn = pfn;
arg.nr_pages = nr_pages;
arg.status_change_nid = -1;
nid = page_to_... | 0 | [] | linux-2.6 | 08dff7b7d629807dbb1f398c68dd9cd58dd657a1 | 55,598,069,286,208,040,000,000,000,000,000,000,000 | 80 | mm/hotplug: correctly add new zone to all other nodes' zone lists
When online_pages() is called to add new memory to an empty zone, it
rebuilds all zone lists by calling build_all_zonelists(). But there's a
bug which prevents the new zone to be added to other nodes' zone lists.
online_pages() {
build_all_zonelists(... |
static Vector_3 convert(Vector_3 v){return v;} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 9,765,325,924,789,921,000,000,000,000,000,000,000 | 1 | Fix Nef_3 |
CommandReplyBuilder::CommandReplyBuilder(BSONObjBuilder bodyObj)
: _bodyBuf(&bodyObj.bb()), _bodyOffset(bodyObj.offset()) {
// CommandReplyBuilder requires that bodyObj build into an externally-owned buffer.
invariant(!bodyObj.owned());
bodyObj.doneFast();
} | 0 | [
"CWE-20"
] | mongo | d315547544d7146b93a8e6e94cc4b88cd0d19c95 | 270,687,382,728,280,270,000,000,000,000,000,000,000 | 6 | SERVER-38275 ban explain with UUID |
static void entropy_init_mutex(mbedtls_entropy_context *ctx)
{
/* lock 0 = entropy_init_mutex() */
Curl_polarsslthreadlock_lock_function(0);
if(entropy_init_initialized == 0) {
mbedtls_entropy_init(ctx);
entropy_init_initialized = 1;
}
Curl_polarsslthreadlock_unlock_function(0);
} | 0 | [
"CWE-20"
] | curl | 6efd2fa529a189bf41736a610f6184cd8ad94b4d | 153,712,386,122,495,660,000,000,000,000,000,000,000 | 10 | mbedtls/polarssl: set "hostname" unconditionally
...as otherwise the TLS libs will skip the CN/SAN check and just allow
connection to any server. curl previously skipped this function when SNI
wasn't used or when connecting to an IP address specified host.
CVE-2016-3739
Bug: https://curl.haxx.se/docs/adv_20160518A.h... |
int gg_image_reply(struct gg_session *sess, uin_t recipient, const char *filename, const char *image, int size)
{
struct gg_msg_image_reply *r;
struct gg_send_msg s;
const char *tmp;
char buf[1910];
int res = -1;
gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_image_reply(%p, %d, \"%s\", %p, %d);\n", sess, reci... | 0 | [
"CWE-310"
] | libgadu | 23644f1fb8219031b3cac93289a588b05f90226b | 302,054,686,320,350,840,000,000,000,000,000,000,000 | 73 | Poprawka ograniczania długości opisu. |
int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled)
{
/* do nothing if flag is already set */
if (!!(tr->trace_flags & mask) == !!enabled)
return 0;
/* Give the tracer a chance to approve the change */
if (tr->current_trace->flag_changed)
if (tr->current_trace->flag_changed(tr, mask, !!... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 44,054,588,271,864,160,000,000,000,000,000,000,000 | 51 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static void mark_commit(struct commit *c, void *data)
{
mark_object(&c->object, NULL, NULL, data);
} | 1 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 143,747,452,685,647,100,000,000,000,000,000,000,000 | 4 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_res;
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *property = &opline->op2.u.constant;
if (IS_VAR == IS_CV) {
i... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 175,735,717,742,101,100,000,000,000,000,000,000,000 | 42 | - 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 |
bool is_bulk_op() const { return MY_TEST(bulk_param); } | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 77,950,919,799,392,765,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 int follow_dotdot_rcu(struct nameidata *nd)
{
struct inode *inode = nd->inode;
if (!nd->root.mnt)
set_root_rcu(nd);
while (1) {
if (nd->path.dentry == nd->root.dentry &&
nd->path.mnt == nd->root.mnt) {
break;
}
if (nd->path.dentry != nd->path.mnt->mnt_root) {
struct dentry *old = nd->path... | 0 | [
"CWE-416"
] | linux | f15133df088ecadd141ea1907f2c96df67c729f0 | 72,803,931,860,296,490,000,000,000,000,000,000,000 | 51 | path_openat(): fix double fput()
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static unsigned long dtls1_max_handshake_message_len(const SSL *s)
{
unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH;
if (max_len < (unsigned long)s->max_cert_list)
return s->max_cert_list;
return max_len;
} | 0 | [
"CWE-399"
] | openssl | 1250f12613b61758675848f6600ebd914ccd7636 | 121,726,945,101,656,880,000,000,000,000,000,000,000 | 7 | Fix DTLS handshake message size checks.
In |dtls1_reassemble_fragment|, the value of
|msg_hdr->frag_off+frag_len| was being checked against the maximum
handshake message size, but then |msg_len| bytes were allocated for the
fragment buffer. This means that so long as the fragment was within the
allowed size, the pendi... |
static int set_psv_wr(struct ib_sig_domain *domain,
u32 psv_idx, void **seg, int *size)
{
struct mlx5_seg_set_psv *psv_seg = *seg;
memset(psv_seg, 0, sizeof(*psv_seg));
psv_seg->psv_num = cpu_to_be32(psv_idx);
switch (domain->sig_type) {
case IB_SIG_TYPE_NONE:
break;
case IB_SIG_TYPE_T10_DIF:
psv_seg... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 13,127,012,872,873,608,000,000,000,000,000,000,000 | 26 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
static void print_version(void)
{
printf("%s Ver 2.7 for %s at %s\n", my_progname, SYSTEM_TYPE,
MACHINE_TYPE);
} | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 53,521,203,905,560,390,000,000,000,000,000,000,000 | 5 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
pango_ot_buffer_new (PangoFcFont *font)
{
PangoOTBuffer *buffer = g_slice_new (PangoOTBuffer);
buffer->buffer = acquire_buffer (&buffer->should_free_hb_buffer);
buffer->font = g_object_ref (font);
buffer->applied_gpos = FALSE;
buffer->rtl = FALSE;
buffer->zero_width_marks = FALSE;
return buffer;
} | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 229,134,068,323,192,000,000,000,000,000,000,000,000 | 12 | [HB] Remove all references to the old code! |
static int synthesize_user_creds(
const char **username,
uid_t *uid, gid_t *gid,
const char **home,
const char **shell,
UserCredsFlags flags) {
/* We enforce some special rules for uid=0 and uid=65534: in order to avoid NSS lookups... | 0 | [
"CWE-269"
] | systemd | 156a5fd297b61bce31630d7a52c15614bf784843 | 237,728,513,170,181,660,000,000,000,000,000,000,000 | 47 | basic/user-util: always use base 10 for user/group numbers
We would parse numbers with base prefixes as user identifiers. For example,
"0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be
interpreted as UID==1000. This parsing was used also in cases where either a
user/group name or number may be spe... |
attlist_attach_file (mu_list_t *attlist_ptr,
int fd,
const char *realname,
const char *content_filename, const char *content_name,
const char *content_type, const char *encoding)
{
int rc;
struct stat st;
mu_list_t list;
mu_stream_t stream = NULL;
char *id = NULL;
mu_list_t attli... | 0 | [] | mailutils | 4befcfd015256c568121653038accbd84820198f | 162,527,656,575,522,320,000,000,000,000,000,000,000 | 100 | mail: disable compose escapes in non-interctive mode.
* NEWS: Document changes.
* doc/texinfo/programs/mail.texi: Document changes.
* mail/send.c (mail_compose_send): Recognize escapes only in
interactive mode. |
static struct gfxinfo *php_handle_wbmp(php_stream * stream TSRMLS_DC)
{
struct gfxinfo *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo));
if (!php_get_wbmp(stream, &result, 0 TSRMLS_CC)) {
efree(result);
return NULL;
}
return result;
} | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 221,015,570,508,852,930,000,000,000,000,000,000,000 | 11 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
longlong val_int() { return decimal_value.to_longlong(unsigned_flag); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 175,341,270,951,999,950,000,000,000,000,000,000,000 | 1 | 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 ... |
struct sk_buff *__ip_make_skb(struct sock *sk,
struct flowi4 *fl4,
struct sk_buff_head *queue,
struct inet_cork *cork)
{
struct sk_buff *skb, *tmp_skb;
struct sk_buff **tail_skb;
struct inet_sock *inet = inet_sk(sk);
struct net *net = sock_net(sk);
struct ip_options *opt = NULL;
struct ... | 0 | [
"CWE-362"
] | net | 85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa | 96,269,460,237,440,300,000,000,000,000,000,000,000 | 91 | udp: consistently apply ufo or fragmentation
When iteratively building a UDP datagram with MSG_MORE and that
datagram exceeds MTU, consistently choose UFO or fragmentation.
Once skb_is_gso, always apply ufo. Conversely, once a datagram is
split across multiple skbs, do not consider ufo.
Sendpage already maintains th... |
GetTypeBufSize(matvar_t *matvar, size_t *size)
{
int err;
size_t nBytes, data_bytes;
size_t tag_size = 8;
size_t nelems = 1;
size_t rank_size;
*size = 0;
err = SafeMulDims(matvar, &nelems);
if ( err )
return 1;
/* Add rank and dimensions, padded to an 8 byte block */
e... | 0 | [
"CWE-190",
"CWE-401"
] | matio | 5fa49ef9fc4368fe3d19b5fdaa36d8fa5e7f4606 | 263,869,772,131,774,420,000,000,000,000,000,000,000 | 160 | Fix integer addition overflow
As reported by https://github.com/tbeu/matio/issues/121 |
win_alloc(win_T *after UNUSED, int hidden UNUSED)
{
win_T *new_wp;
/*
* allocate window structure and linesizes arrays
*/
new_wp = ALLOC_CLEAR_ONE(win_T);
if (new_wp == NULL)
return NULL;
if (win_alloc_lines(new_wp) == FAIL)
{
vim_free(new_wp);
return NULL;
}
new_wp->w_id... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 310,837,011,506,792,200,000,000,000,000,000,000,000 | 80 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
void Tag::SimpleTag::Clear() {
StrCpy(NULL, &tag_name_);
StrCpy(NULL, &tag_string_);
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 71,550,712,238,717,590,000,000,000,000,000,000,000 | 4 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
digest_hex(unsigned char *p)
{
char *h = "0123456789abcdef";
Str tmp = Strnew_size(MD5_DIGEST_LENGTH * 2 + 1);
int i;
for (i = 0; i < MD5_DIGEST_LENGTH; i++, p++) {
Strcat_char(tmp, h[(*p >> 4) & 0x0f]);
Strcat_char(tmp, h[*p & 0x0f]);
}
return tmp;
} | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 248,978,404,107,647,960,000,000,000,000,000,000,000 | 11 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
static void link_print(struct tipc_link *l, const char *str)
{
struct sk_buff *hskb = skb_peek(&l->transmq);
u16 head = hskb ? msg_seqno(buf_msg(hskb)) : l->snd_nxt - 1;
u16 tail = l->snd_nxt - 1;
pr_info("%s Link <%s> state %x\n", str, l->name, l->state);
pr_info("XMTQ: %u [%u-%u], BKLGQ: %u, SNDNX: %u, RCVNX: %... | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 193,657,120,276,441,300,000,000,000,000,000,000,000 | 11 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
void sftp_handle_remove(sftp_session sftp, void *handle) {
int i;
for (i = 0; i < SFTP_HANDLES; i++) {
if (sftp->handles[i] == handle) {
sftp->handles[i] = NULL;
break;
}
}
} | 0 | [
"CWE-476"
] | libssh-mirror | 533d881b0f4b24c72b35ecc97fa35d295d063e53 | 338,567,606,560,054,380,000,000,000,000,000,000,000 | 10 | sftpserver: Add missing NULL check for ssh_buffer_new()
Thanks to Ramin Farajpour Cami for spotting this.
Fixes T232
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com> |
static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
char *name = ERR_PTR(-ENOENT);
if (tgid) {
name = __getname();
if (!name)
name = ERR_PTR(-ENOMEM);
else
sprintf(name, "%d", tgi... | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 146,304,830,732,228,460,000,000,000,000,000,000,000 | 15 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
static void nf_conntrack_standalone_init_tcp_sysctl(struct net *net,
struct ctl_table *table)
{
struct nf_tcp_net *tn = nf_tcp_pernet(net);
#define XASSIGN(XNAME, tn) \
table[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_ ## XNAME].data = \
&(tn)->timeouts[TCP_CONNTRACK_ ## XNAME]
XASSIGN(SYN_SENT, tn);
XASSIGN(SYN... | 0 | [
"CWE-203"
] | linux | 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 | 186,853,685,801,667,100,000,000,000,000,000,000,000 | 28 | netfilter: conntrack: Make global sysctls readonly in non-init netns
These sysctls point to global variables:
- NF_SYSCTL_CT_MAX (&nf_conntrack_max)
- NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
- NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)
Because their data pointers are not updated to point to per-netns
s... |
int snd_pcm_new_internal(struct snd_card *card, const char *id, int device,
int playback_count, int capture_count,
struct snd_pcm **rpcm)
{
return _snd_pcm_new(card, id, device, playback_count, capture_count,
true, rpcm);
} | 0 | [
"CWE-416"
] | linux | 362bca57f5d78220f8b5907b875961af9436e229 | 237,351,173,941,697,900,000,000,000,000,000,000,000 | 7 | ALSA: pcm: prevent UAF in snd_pcm_info
When the device descriptor is closed, the `substream->runtime` pointer
is freed. But another thread may be in the ioctl handler, case
SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
calls snd_pcm_info() which accesses the now freed `substream->runtime`.
Note:... |
static guint32 WINAPI start_wrapper_internal(void *data)
{
struct StartInfo *start_info=(struct StartInfo *)data;
guint32 (*start_func)(void *);
void *start_arg;
gsize tid;
/*
* We don't create a local to hold start_info->obj, so hopefully it won't get pinned during a
* GC stack walk.
*/
MonoInternalThread... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 310,854,788,657,631,970,000,000,000,000,000,000,000 | 129 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
pkinit_decode_data(krb5_context context,
pkinit_identity_crypto_context id_cryptoctx,
unsigned char *data,
unsigned int data_len,
unsigned char **decoded_data,
unsigned int *decoded_data_len)
{
krb5_error_code retval = KR... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 209,307,547,425,658,600,000,000,000,000,000,000,000 | 20 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
static int check_max_stack_depth(struct bpf_verifier_env *env)
{
int depth = 0, frame = 0, idx = 0, i = 0, subprog_end;
struct bpf_subprog_info *subprog = env->subprog_info;
struct bpf_insn *insn = env->prog->insnsi;
bool tail_call_reachable = false;
int ret_insn[MAX_CALL_FRAMES];
int ret_prog[MAX_CALL_FRAMES];
... | 0 | [] | linux | 9b00f1b78809309163dda2d044d9e94a3c0248a3 | 321,425,832,395,113,900,000,000,000,000,000,000,000 | 96 | bpf: Fix truncation handling for mod32 dst reg wrt zero
Recently noticed that when mod32 with a known src reg of 0 is performed,
then the dst register is 32-bit truncated in verifier:
0: R1=ctx(id=0,off=0,imm=0) R10=fp0
0: (b7) r0 = 0
1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0
1: (b7) r1 = -1
2: R0_w=inv... |
int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
{
int ret=0;
int nostrict = 1;
unsigned long alg_k, alg_a = 0;
/* If we have custom certificate types set, use them */
if (s->cert->ctypes)
{
memcpy(p, s->cert->ctypes, s->cert->ctype_num);
return (int)s->cert->ctype_num;
}
/* Get mask of algorithms d... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 275,677,797,955,844,700,000,000,000,000,000,000,000 | 87 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
int link_initialized(Link *link, struct udev_device *device) {
_cleanup_netlink_message_unref_ sd_netlink_message *req = NULL;
int r;
assert(link);
assert(link->manager);
assert(link->manager->rtnl);
assert(device);
if (link->state != LINK_STATE_PENDING)
... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 327,476,957,088,598,350,000,000,000,000,000,000,000 | 38 | networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRout... |
static bool ok_jpg_read_dri(ok_jpg_decoder *decoder) {
// JPEG spec: Table B.7
uint8_t buffer[4];
if (!ok_read(decoder, buffer, sizeof(buffer))) {
return false;
}
int length = readBE16(buffer) - 2;
if (length != 2) {
ok_jpg_error(decoder->jpg, OK_JPG_ERROR_INVALID, "Invalid DRI s... | 0 | [
"CWE-787"
] | ok-file-formats | a9cc1711dd4ed6a215038f1c5c03af0ef52c3211 | 170,682,984,769,105,120,000,000,000,000,000,000,000 | 15 | ok_jpg: Fix invalid DHT (#11) |
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
{
int command_length;
int dir_length, extra = 0;
char *command_line;
char *ptr, *dir;
FILE *retval;
command_length = strlen(command);
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
while (dir_length > 0) {
if (*... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 279,388,584,739,785,050,000,000,000,000,000,000,000 | 57 | Fix for bug #72513 |
static enum test_return test_binary_add_impl(const char *key, uint8_t cmd) {
uint64_t value = 0xdeadbeefdeadcafe;
union {
protocol_binary_request_no_extras request;
protocol_binary_response_no_extras response;
char bytes[1024];
} send, receive;
size_t len = storage_command(send.b... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 226,887,092,201,580,880,000,000,000,000,000,000,000 | 30 | Issue 102: Piping null to the server will crash it |
bool bio_attempt_back_merge(struct request_queue *q, struct request *req,
struct bio *bio)
{
const int ff = bio->bi_opf & REQ_FAILFAST_MASK;
if (!ll_back_merge_fn(q, req, bio))
return false;
trace_block_bio_backmerge(q, req, bio);
if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff)
blk_rq_set_mixed_merge(... | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 24,699,992,100,530,080,000,000,000,000,000,000,000 | 21 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
int main(void)
{
int fd, len, sock_opt;
int error;
struct cn_msg *message;
struct pollfd pfd;
struct nlmsghdr *incoming_msg;
struct cn_msg *incoming_cn_msg;
struct hv_kvp_msg *hv_msg;
char *p;
char *key_value;
char *key_name;
daemon(1, 0);
openlog("KVP", 0, LOG_USER);
syslog(LOG_INFO, "KVP starting; pid i... | 0 | [
"CWE-20"
] | linux-2.6 | bcc2c9c3fff859e0eb019fe6fec26f9b8eba795c | 207,863,369,893,788,500,000,000,000,000,000,000,000 | 234 | Tools: hv: verify origin of netlink connector message
The SuSE security team suggested to use recvfrom instead of recv to be
certain that the connector message is originated from kernel.
CVE-2012-2669
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Sebasti... |
static int smtp_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
} | 0 | [
"CWE-89"
] | curl | 75ca568fa1c19de4c5358fed246686de8467c238 | 85,835,528,270,765,520,000,000,000,000,000,000,000 | 6 | URL sanitize: reject URLs containing bad data
Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a
decoded manner now use the new Curl_urldecode() function to reject URLs
with embedded control codes (anything that is or decodes to a byte value
less than 32).
URLs containing such codes could easily oth... |
void Compute(OpKernelContext* context) override {
const auto& input = context->input(0);
auto flat_in = input.flat<tstring>();
int fixed_length;
const auto& length_input = context->input(1);
OP_REQUIRES(context, TensorShapeUtils::IsScalar(length_input.shape()),
errors::InvalidArgu... | 0 | [
"CWE-787"
] | tensorflow | 698e01511f62a3c185754db78ebce0eee1f0184d | 126,932,864,429,790,550,000,000,000,000,000,000,000 | 74 | Fix `tf.io.decode_raw` bugs and update documentation.
Fixes cases where specifying `fixed_length` resulted in data loss and even segfault and corruption of the Python interpreter. The fix is subtle but needed due to pointer arithmetic rules.
Makes sure that `fixed_length` does not change the output when present but n... |
ex_syncbind(exarg_T *eap UNUSED)
{
win_T *wp;
win_T *save_curwin = curwin;
buf_T *save_curbuf = curbuf;
long topline;
long y;
linenr_T old_linenr = curwin->w_cursor.lnum;
setpcmark();
/*
* determine max topline
*/
if (curwin->w_p_scb)
{
topline = curwin->w_topline;
... | 0 | [
"CWE-416"
] | vim | 35d21c6830fc2d68aca838424a0e786821c5891c | 92,682,878,535,699,700,000,000,000,000,000,000,000 | 70 | patch 9.0.0360: crash when invalid line number on :for is ignored
Problem: Crash when invalid line number on :for is ignored.
Solution: Do not check breakpoint for non-existing line. |
const char *SSL_alert_desc_string(int value)
{
const char *str;
switch (value & 0xff)
{
case SSL3_AD_CLOSE_NOTIFY: str="CN"; break;
case SSL3_AD_UNEXPECTED_MESSAGE: str="UM"; break;
case SSL3_AD_BAD_RECORD_MAC: str="BM"; break;
case SSL3_AD_DECOMPRESSION_FAILURE: str="DF"; break;
case SSL3_AD_HANDSHAKE_FAI... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 32,267,225,876,213,660,000,000,000,000,000,000,000 | 40 | Add SRP support. |
void bdrv_swap(BlockDriverState *bs_new, BlockDriverState *bs_old)
{
BlockDriverState tmp;
/* The code needs to swap the node_name but simply swapping node_list won't
* work so first remove the nodes from the graph list, do the swap then
* insert them back if needed.
*/
if (bs_new->node_name... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 91,695,300,313,926,500,000,000,000,000,000,000,000 | 54 | 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 acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
int cport, cfd, max = MAX_ACCEPTS_PER_CALL;
char cip[NET_IP_STR_LEN];
UNUSED(el);
UNUSED(mask);
UNUSED(privdata);
while(max--) {
cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
if (cfd =... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 297,627,372,384,456,000,000,000,000,000,000,000,000 | 19 | 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... |
static void uwbd_event_handle(struct uwb_event *evt)
{
struct uwb_rc *rc;
int should_keep;
rc = evt->rc;
if (rc->ready) {
switch (evt->type) {
case UWB_EVT_TYPE_NOTIF:
should_keep = uwbd_event_handle_urc(evt);
if (should_keep <= 0)
kfree(evt->notif.rceb);
break;
case UWB_EVT_TYPE_MSG:
uwbd_e... | 0 | [
"CWE-119",
"CWE-787"
] | linux | bbf26183b7a6236ba602f4d6a2f7cade35bba043 | 206,282,156,863,990,300,000,000,000,000,000,000,000 | 25 | uwb: properly check kthread_run return value
uwbd_start() calls kthread_run() and checks that the return value is
not NULL. But the return value is not NULL in case kthread_run() fails,
it takes the form of ERR_PTR(-EINTR).
Use IS_ERR() instead.
Also add a check to uwbd_stop().
Signed-off-by: Andrey Konovalov <andr... |
static void bdrv_move_feature_fields(BlockDriverState *bs_dest,
BlockDriverState *bs_src)
{
/* move some fields that need to stay attached to the device */
bs_dest->open_flags = bs_src->open_flags;
/* dev info */
bs_dest->dev_ops = bs_src->dev_ops... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 180,890,804,037,130,200,000,000,000,000,000,000,000 | 46 | 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 void hidp_session_terminate(struct hidp_session *session)
{
atomic_inc(&session->terminate);
wake_up_interruptible(&hidp_session_wq);
} | 0 | [
"CWE-787"
] | linux | 7992c18810e568b95c869b227137a2215702a805 | 56,741,747,151,073,450,000,000,000,000,000,000,000 | 5 | Bluetooth: hidp: buffer overflow in hidp_process_report
CVE-2018-9363
The buffer length is unsigned at all layers, but gets cast to int and
checked in hidp_process_report and can lead to a buffer overflow.
Switch len parameter to unsigned int to resolve issue.
This affects 3.18 and newer kernels.
Signed-off-by: Mar... |
DECLAREcpFunc(cpContig2SeparateByRow)
{
tsize_t scanlinesizein = TIFFScanlineSize(in);
tsize_t scanlinesizeout = TIFFScanlineSize(out);
tdata_t inbuf;
tdata_t outbuf;
register uint8 *inp, *outp;
register uint32 n;
uint32 row;
tsample_t s;
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesize... | 1 | [
"CWE-119",
"CWE-787"
] | libtiff | 5c080298d59efa53264d7248bbe3a04660db6ef7 | 125,983,744,713,426,330,000,000,000,000,000,000,000 | 49 | * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and
cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and
http://bugzilla.maptools.org/show_bug.cgi?id=2657 |
util_curl_unsetopt(CurlObject *self, int option)
{
int res;
#define SETOPT2(o,x) \
if ((res = curl_easy_setopt(self->handle, (o), (x))) != CURLE_OK) goto error
#define SETOPT(x) SETOPT2((CURLoption)option, (x))
/* FIXME: implement more options. Have to carefully check lib/url.c in the
* libcurl s... | 0 | [] | pycurl | 2a743674dcf152beaaf6adaddb1ef51b18d1fffe | 225,939,141,086,793,500,000,000,000,000,000,000,000 | 80 | 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... |
zipx_lzma_alone_init(struct archive_read *a, struct zip *zip)
{
lzma_ret r;
const uint8_t* p;
#pragma pack(push)
#pragma pack(1)
struct _alone_header {
uint8_t bytes[5];
uint64_t uncompressed_size;
} alone_header;
#pragma pack(pop)
/* To unpack ZIPX's "LZMA" (id 14) stream we can use standard liblzma t... | 0 | [
"CWE-399",
"CWE-401"
] | libarchive | ba641f73f3d758d9032b3f0e5597a9c6e593a505 | 139,613,200,421,433,000,000,000,000,000,000,000,000 | 127 | Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165 |
template<typename t>
CImg<_cimg_Tt> operator*(const t value) const {
return CImg<_cimg_Tt>(*this,false)*=value; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 140,121,716,097,411,140,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int skcipher_sendmsg(struct socket *sock, struct msghdr *msg,
size_t size)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(&ctx->req);
unsigned ivsize = crypto_skcipher_ivsize(tfm);
struct ... | 0 | [] | linux | 4f0414e54e4d1893c6f08260693f8ef84c929293 | 316,396,468,634,463,800,000,000,000,000,000,000,000 | 133 | crypto: algif_skcipher - Load TX SG list after waiting
We need to load the TX SG list in sendmsg(2) after waiting for
incoming data, not before.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.c... |
_compare_vote_rs(const void **_a, const void **_b)
{
const vote_routerstatus_t *a = *_a, *b = *_b;
return compare_vote_rs(a,b);
} | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 67,019,847,146,575,080,000,000,000,000,000,000,000 | 5 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
int child_main(int argc, char *argv[])
{
start_server(STDIN_FILENO, STDOUT_FILENO, argc, argv);
return 0;
} | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 279,901,128,446,047,050,000,000,000,000,000,000,000 | 5 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
static int init_thread_environment()
{
mysql_mutex_init(key_LOCK_thread_count, &LOCK_thread_count, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_status, &LOCK_status, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_delayed_insert,
&LOCK_delayed_insert, MY_MUTEX_INIT_FAST);
mysql_mutex_init(ke... | 0 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 245,916,728,147,240,700,000,000,000,000,000,000,000 | 82 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
static ssize_t queue_write_same_max_show(struct request_queue *q, char *page)
{
return sprintf(page, "%llu\n",
(unsigned long long)q->limits.max_write_same_sectors << 9);
} | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 20,356,808,964,641,668,000,000,000,000,000,000,000 | 5 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
static void recomputeCharacterWidths(const UChar32* text, char* widths, int charCount) {
for (int i = 0; i < charCount; ++i) {
widths[i] = mk_wcwidth(text[i]);
}
} | 0 | [
"CWE-200"
] | mongo | 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0 | 98,675,552,866,978,250,000,000,000,000,000,000,000 | 5 | SERVER-25335 avoid group and other permissions when creating .dbshell history file |
static int de_thread(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
struct sighand_struct *oldsighand = tsk->sighand;
spinlock_t *lock = &oldsighand->siglock;
if (thread_group_empty(tsk))
goto no_thread_group;
/*
* Kill all other threads in the thread group.
*/
spin_lock_irq(lock);
i... | 0 | [
"CWE-416"
] | linux | 16d51a590a8ce3befb1308e0e7ab77f3b661af33 | 259,865,970,462,798,950,000,000,000,000,000,000,000 | 167 | sched/fair: Don't free p->numa_faults with concurrent readers
When going through execve(), zero out the NUMA fault statistics instead of
freeing them.
During execve, the task is reachable through procfs and the scheduler. A
concurrent /proc/*/sched reader can read data from a freed ->numa_faults
allocation (confirmed... |
DEFUN (clear_bgp_all_soft_out,
clear_bgp_all_soft_out_cmd,
"clear bgp * soft out",
CLEAR_STR
BGP_STR
"Clear all peers\n"
"Soft reconfig\n"
"Soft reconfig outbound update\n")
{
if (argc == 1)
return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 208,165,235,344,190,230,000,000,000,000,000,000,000 | 16 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct)
{
pb_istream_t substream;
bool status;
if (!pb_make_string_substream(stream, &substream))
return false;
status = pb_decode(&substream, fields, dest_struct);
if (!pb_close_string_substream(... | 0 | [
"CWE-20",
"CWE-119"
] | nanopb | 4fe23595732b6f1254cfc11a9b8d6da900b55b0c | 203,318,096,790,203,630,000,000,000,000,000,000,000 | 14 | Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)
Nanopb would leak memory when all of the following conditions were true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definitions contains an oneof field,
the oneof contains a static submessage, and
the static submessage contains a pointer fiel... |
T& operator()(const unsigned int x, const unsigned int y, const unsigned int z) {
return _data[x + y*(ulongT)_width + z*(ulongT)_width*_height]; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 302,369,223,907,508,000,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
EnvInitializer::~EnvInitializer ()
{
if( --counter == 0 ) XrdCl::DefaultEnv::Finalize();
} | 0 | [
"CWE-78"
] | xrootd | befa2e627a5a33a38c92db3e57c07d8246a24acf | 322,571,757,366,429,780,000,000,000,000,000,000,000 | 4 | secgsi: do not build/package libXrdSecgsiGMAPLDAP-4.so
The way the LDAP query is implemented may represent a security threat.
Any related building and packaging reference is removed.
The code is left in place (for the time being) to remind its functionality
in the case a sanitized version is required. |
datetime_s_parse(int argc, VALUE *argv, VALUE klass)
{
VALUE str, comp, sg;
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
switch (argc) {
case 0:
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
case 1:
comp = Qtrue;
case 2:
sg = INT2FIX(DEFAULT_SG);
}
{
VALUE argv2[2], ... | 1 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 78,576,429,965,822,820,000,000,000,000,000,000,000 | 24 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static void n_tty_flush_buffer(struct tty_struct *tty)
{
down_write(&tty->termios_rwsem);
reset_buffer_flags(tty->disc_data);
n_tty_kick_worker(tty);
if (tty->link)
n_tty_packet_mode_flush(tty);
up_write(&tty->termios_rwsem);
} | 0 | [
"CWE-704"
] | linux | 966031f340185eddd05affcf72b740549f056348 | 182,512,011,116,398,530,000,000,000,000,000,000,000 | 10 | n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty:
Add EXTPROC support for LINEMODE") and the intent was to allow it to
override some (all?) ICANON behavior. Quoting from that original commit
message:
There is a new bi... |
static void __netif_reschedule(struct Qdisc *q)
{
struct softnet_data *sd;
unsigned long flags;
local_irq_save(flags);
sd = this_cpu_ptr(&softnet_data);
q->next_sched = NULL;
*sd->output_queue_tailp = q;
sd->output_queue_tailp = &q->next_sched;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags); | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 99,733,965,874,223,840,000,000,000,000,000,000,000 | 13 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
static void fm10k_assign_rings(struct fm10k_intfc *interface)
{
if (fm10k_cache_ring_qos(interface))
return;
fm10k_cache_ring_rss(interface);
} | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 206,748,897,643,655,320,000,000,000,000,000,000,000 | 7 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
static void sctp_transport_destroy(struct sctp_transport *transport)
{
SCTP_ASSERT(transport->dead, "Transport is not dead", return);
if (transport->asoc)
sctp_association_put(transport->asoc);
sctp_packet_free(&transport->packet);
dst_release(transport->dst);
kfree(transport);
SCTP_DBG_OBJCNT_DEC(transport)... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 253,054,412,593,686,330,000,000,000,000,000,000,000 | 13 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
recordDependencyOnCurrentExtension(const ObjectAddress *object,
bool isReplace)
{
/* Only whole objects can be extension members */
Assert(object->objectSubId == 0);
if (creating_extension)
{
ObjectAddress extension;
/* Only need to check for existing membership if isReplace */
if (isReplace)
{... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 121,958,109,637,658,940,000,000,000,000,000,000,000 | 51 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static void lsr_read_string_attribute(GF_LASeRCodec *lsr, GF_Node *elt, u32 tag, char *name)
{
u32 val;
GF_LSR_READ_INT(lsr, val, 1, name);
if (val) {
GF_FieldInfo info;
lsr->last_error = gf_node_get_attribute_by_tag(elt, tag, GF_TRUE, GF_FALSE, &info);
lsr_read_byte_align_string(lsr, info.far_ptr, name);
}
} | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 189,766,332,594,556,200,000,000,000,000,000,000,000 | 10 | fixed #2213 |
int main() {
Suite suite;
suite.add(auto_ptr<Suite>(new UriSuite()));
suite.add(auto_ptr<Suite>(new FourSuite()));
suite.add(auto_ptr<Suite>(new VersionSuite()));
TextOutput output(TextOutput::Verbose);
return suite.run(output, false) ? 0 : 1;
} | 0 | [
"CWE-787"
] | uriparser | 864f5d4c127def386dd5cc926ad96934b297f04e | 4,403,475,194,354,420,000,000,000,000,000,000,000 | 8 | UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex
Reported by Google Autofuzz team |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.