func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
save_function_name(
char_u **name,
int *is_global,
int skip,
int flags,
funcdict_T *fudi)
{
char_u *p = *name;
char_u *saved;
if (STRNCMP(p, "<lambda>", 8) == 0)
{
p += 8;
(void)getdigits(&p);
saved = vim_strnsave(*name, p - *name);
if (fudi != NULL)
CLEAR_POINTER(fudi);
... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 179,107,317,246,072,970,000,000,000,000,000,000,000 | 24 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
void ComputeAsync(OpKernelContext* context, DoneCallback done) override {
// The shape of 'grads' is [num_boxes, crop_height, crop_width, depth].
const Tensor& grads = context->input(0);
// The shape of 'boxes' is [num_boxes, 4].
const Tensor& boxes = context->input(1);
// The shape of 'box_index'... | 0 | [
"CWE-119",
"CWE-787"
] | tensorflow | 3ade2efec2e90c6237de32a19680caaa3ebc2845 | 311,835,133,148,979,960,000,000,000,000,000,000,000 | 75 | Fix segmentation fault in tf.image.crop_and_resize when boxes is inf or nan
This fix tries to address the issue raised in 42129 where segmentation fault
happened in tf.image.crop_and_resize when boxes is inf or nan.
This fix adds the check to make sure boxes is not inf or nan (isfinite)
This fix fixes 42129.
Signed... |
const GlyphFace * GlyphCache::Loader::read_glyph(unsigned short glyphid, GlyphFace & glyph, int *numsubs) const throw()
{
Rect bbox;
Position advance;
if (glyphid < _num_glyphs_graphics)
{
int nLsb;
unsigned int nAdvWid;
if (_glyf)
{
int xMin, yMin,... | 0 | [
"CWE-476"
] | graphite | db132b4731a9b4c9534144ba3a18e65b390e9ff6 | 130,489,197,702,735,230,000,000,000,000,000,000,000 | 87 | Deprecate and make ineffective gr_face_dumbRendering |
gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const unsigned int new_width, const unsigned int new_height)
{
gdImagePtr tmp_im;
gdImagePtr dst;
if (new_width == 0 || new_height == 0) {
return NULL;
}
/* Convert to truecolor if it isn't; this c... | 0 | [
"CWE-119"
] | php-src | 8fa9d1ce28f3a894b104979df30d0b65e0f21107 | 157,104,745,068,981,600,000,000,000,000,000,000,000 | 32 | improve fix #72558, while (u>=0) with unsigned int will always be true |
static int qeth_flush_buffers_on_no_pci(struct qeth_qdio_out_q *queue)
{
struct qeth_qdio_out_buffer *buffer;
buffer = queue->bufs[queue->next_buf_to_fill];
if ((atomic_read(&buffer->state) == QETH_QDIO_BUF_EMPTY) &&
(buffer->next_element_to_fill > 0)) {
/* it's a packing buffer */
atomic_set(&buffer->state... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 78,984,787,506,260,020,000,000,000,000,000,000,000 | 15 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static int piv_general_io(sc_card_t *card, int ins, int p1, int p2,
const u8 * sendbuf, size_t sendbuflen, u8 *recvbuf,
size_t recvbuflen)
{
int r;
sc_apdu_t apdu;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
r = sc_lock(card);
if (r != SC_SUCCESS)
LOG_FUNC_RETURN(card->ctx, r);
sc_format_apdu(card, &a... | 0 | [] | OpenSC | 456ac566938a1da774db06126a2fa6c0cba514b3 | 151,104,736,927,187,130,000,000,000,000,000,000,000 | 51 | PIV Improved parsing of data from the card
Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced
with sc_asn1_read_tag. The input is also tested that the
expected tag is the first byte. Additional tests are also add.
sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs
do not ... |
static void tokenadd(struct jv_parser* p, char c) {
assert(p->tokenpos <= p->tokenlen);
if (p->tokenpos >= (p->tokenlen - 1)) {
p->tokenlen = p->tokenlen*2 + 256;
p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen);
}
assert(p->tokenpos < p->tokenlen);
p->tokenbuf[p->tokenpos++] = c;
} | 0 | [
"CWE-119",
"CWE-787"
] | jq | 8eb1367ca44e772963e704a700ef72ae2e12babd | 43,311,215,703,918,190,000,000,000,000,000,000,000 | 9 | Heap buffer overflow in tokenadd() (fix #105)
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes. |
MirrorJob::~MirrorJob()
{
if(script && script_needs_closing)
fclose(script);
} | 0 | [
"CWE-20",
"CWE-401"
] | lftp | a27e07d90a4608ceaf928b1babb27d4d803e1992 | 319,048,241,395,773,870,000,000,000,000,000,000,000 | 5 | mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452) |
static void con_start(struct tty_struct *tty)
{
int console_num;
if (!tty)
return;
console_num = tty->index;
if (!vc_cons_allocated(console_num))
return;
vt_kbd_con_start(console_num);
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 264,049,596,195,666,550,000,000,000,000,000,000,000 | 10 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
static int __cpuinit slab_cpuup_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
long cpu = (long)hcpu;
struct kmem_cache *s;
unsigned long flags;
switch (action) {
case CPU_UP_PREPARE:
case CPU_UP_PREPARE_FROZEN:
init_alloc_cpu_cpu(cpu);
down_read(&slub_lock);
list_for_each_entry... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 154,960,282,592,429,260,000,000,000,000,000,000,000 | 39 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
cupsdStopServer(void)
{
if (!started)
return;
/*
* Stop color management (as needed)...
*/
cupsdStopColor();
/*
* Close all network clients...
*/
cupsdCloseAllClients();
cupsdStopListening();
cupsdStopBrowsing();
cupsdStopAllNotifiers();
cupsdDeleteAllCerts();
if (Clients)
{
cup... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 215,033,230,292,521,560,000,000,000,000,000,000,000 | 86 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
parse_objectid(FILE * fp, char *name)
{
register int count;
register struct subid_s *op, *nop;
int length;
struct subid_s loid[32];
struct node *np, *root = NULL, *oldnp = NULL;
struct tree *tp;
if ((length = getoid(fp, loid, 32)) == 0) {
print_error("Bad objec... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 238,800,119,611,989,270,000,000,000,000,000,000,000 | 114 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
static void handle_unused(int i)
{
handles[i].use = HANDLE_UNUSED;
handles[i].next_unused = first_unused_handle;
first_unused_handle = i;
} | 0 | [
"CWE-732",
"CWE-703",
"CWE-269"
] | src | a6981567e8e215acc1ef690c8dbb30f2d9b00a19 | 269,306,744,625,979,100,000,000,000,000,000,000,000 | 6 | disallow creation (of empty files) in read-only mode; reported by
Michal Zalewski, feedback & ok deraadt@ |
int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){
return sqlite3VdbeAddOp3(p, op, p1, 0, 0);
} | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 202,745,363,475,134,730,000,000,000,000,000,000,000 | 3 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
std::string ReplaceStringInPlace(std::string subject, const std::string& search,
const std::string& replace) {
size_t pos = 0;
while((pos = subject.find(search, pos)) != std::string::npos) {
subject.replace(pos, search.length(), replace);
pos += re... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 286,037,844,067,487,900,000,000,000,000,000,000,000 | 9 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static bool is_finite(const float val) {
#ifdef isfinite
return (bool)isfinite(val);
#else
return !is_nan(val) && !is_inf(val);
#endif
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 211,142,881,608,012,960,000,000,000,000,000,000,000 | 7 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
HttpConnectionManagerImplTest::HttpConnectionManagerImplTest()
: http_context_(fake_stats_.symbolTable()), access_log_path_("dummy_path"),
access_logs_{AccessLog::InstanceSharedPtr{new Extensions::AccessLoggers::File::FileAccessLog(
Filesystem::FilePathAndType{Filesystem::DestinationType::File, acce... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 20,355,474,851,963,880,000,000,000,000,000,000,000 | 23 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int ssl_decrypt_buf( ssl_context *ssl )
{
size_t i, padlen = 0, correct = 1;
unsigned char tmp[POLARSSL_SSL_MAX_MAC_SIZE];
SSL_DEBUG_MSG( 2, ( "=> decrypt buf" ) );
if( ssl->in_msglen < ssl->transform_in->minlen )
{
SSL_DEBUG_MSG( 1, ( "in_msglen (%d) < minlen (%d)",
... | 0 | [
"CWE-310"
] | polarssl | d66f070d492ef75405baad9f0d018b1bd06862c8 | 336,452,954,351,661,600,000,000,000,000,000,000,000 | 362 | Disable debug messages that can introduce a timing side channel.
Introduced the POLARSSL_SSL_DEBUG_ALL flag to enable all these debug
messages in case somebody does want to see the reason checks fail. |
bool StringMatching::matchPattern(
const char* pattern,
const char* str)
{
if (PathMatchSpec(str, pattern))
{
return true;
}
return false;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 220,899,219,789,251,750,000,000,000,000,000,000,000 | 10 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static void to_words52(BN_ULONG *out, int out_len,
const BN_ULONG *in, int in_bitsize)
{
uint8_t *in_str = NULL;
assert(out != NULL);
assert(in != NULL);
/* Check destination buffer capacity */
assert(out_len >= number_of_digits(in_bitsize, DIGIT_SIZE));
in_str = (uint8_... | 0 | [
"CWE-787"
] | openssl | a1f7034bbd8f0730d360211f5ba0feeaef0b7b2c | 196,796,164,762,749,570,000,000,000,000,000,000,000 | 42 | rsa: fix bn_reduce_once_in_place call for rsaz_mod_exp_avx512_x2
bn_reduce_once_in_place expects the number of BN_ULONG, but factor_size
is moduli bit size.
Fixes #18625.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from... |
ews_backend_folders_contains (EEwsBackend *backend,
const gchar *folder_id)
{
gboolean contains;
g_return_val_if_fail (folder_id != NULL, FALSE);
g_mutex_lock (&backend->priv->folders_lock);
contains = g_hash_table_contains (backend->priv->folders, folder_id);
g_mutex_unlock (&bac... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 231,254,225,339,682,700,000,000,000,000,000,000,000 | 15 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref,
bool merge)
{
List_iterator<Item> li(list);
Item *item;
used_tables_and_const_cache_init();
and_tables_cache= ~(table_map) 0; // Here and below we do as fix_fields does
not_null_tables_cache= 0;
whi... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 267,763,501,252,266,380,000,000,000,000,000,000,000 | 29 | 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 ... |
apdu_get_atr (int slot, size_t *atrlen)
{
unsigned char *buf;
if (DBG_READER)
log_debug ("enter: apdu_get_atr: slot=%d\n", slot);
if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used )
{
if (DBG_READER)
log_debug ("leave: apdu_get_atr => NULL (bad slot)\n");
return NULL;
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 196,117,347,710,212,040,000,000,000,000,000,000,000 | 33 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static OPJ_BOOL opj_pi_check_next_level(OPJ_INT32 pos,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
const OPJ_CHAR *prog)
{
OPJ_INT32 i;
opj_tcp_t ... | 0 | [
"CWE-369"
] | openjpeg | d27ccf01c68a31ad62b33d2dc1ba2bb1eeaafe7b | 326,636,051,227,443,280,000,000,000,000,000,000,000 | 82 | Avoid division by zero in opj_pi_next_rpcl, opj_pi_next_pcrl and opj_pi_next_cprl (#938)
Fixes issues with id:000026,sig:08,src:002419,op:int32,pos:60,val:+32 and
id:000019,sig:08,src:001098,op:flip1,pos:49 |
static bool will_write_block(struct port *port)
{
bool ret;
if (!port->guest_connected) {
/* Port got hot-unplugged. Let's exit. */
return false;
}
if (!port->host_connected)
return true;
spin_lock_irq(&port->outvq_lock);
/*
* Check if the Host has consumed any buffers since we last
* sent data (this ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c4baad50297d84bde1a7ad45e50c73adae4a2192 | 7,125,853,168,057,033,000,000,000,000,000,000,000 | 22 | virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat... |
htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
xmlNodePtr cur, const char *encoding) {
htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
} | 0 | [
"CWE-79"
] | libxml2 | c1ba6f54d32b707ca6d91cb3257ce9de82876b6f | 184,660,788,935,862,270,000,000,000,000,000,000,000 | 4 | Revert "Do not URI escape in server side includes"
This reverts commit 960f0e275616cadc29671a218d7fb9b69eb35588.
This commit introduced
- an infinite loop, found by OSS-Fuzz, which could be easily fixed.
- an algorithm with quadratic runtime
- a security issue, see
https://bugzilla.gnome.org/show_bug.cgi?id=769760... |
static void ati_cursor_draw_line(VGACommonState *vga, uint8_t *d, int scr_y)
{
ATIVGAState *s = container_of(vga, ATIVGAState, vga);
uint8_t *src;
uint32_t *dp = (uint32_t *)d;
int i, j, h;
if (!(s->regs.crtc_gen_cntl & CRTC2_CUR_EN) ||
scr_y < vga->hw_cursor_y || scr_y >= vga->hw_cursor_y ... | 1 | [
"CWE-125"
] | qemu | aab0e2a661b2b6bf7915c0aefe807fb60d6d9d13 | 43,958,476,191,686,790,000,000,000,000,000,000,000 | 38 | ati: use vga_read_byte in ati_cursor_define
This makes sure reads are confined to vga video memory.
v3: use uint32_t, fix cut+paste bug.
v2: fix ati_cursor_draw_line too.
Reported-by: xu hang <flier_m@outlook.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Revie... |
static int ip_vs_genl_dump_daemon(struct sk_buff *skb, __be32 state,
const char *mcast_ifn, __be32 syncid,
struct netlink_callback *cb)
{
void *hdr;
hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
&ip_vs_genl_family, NLM_F_MULTI,
IPVS_CMD_NEW_DAEMON);
if (!hdr)
return -EMS... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 04bcef2a83f40c6db24222b27a52892cba39dffb | 15,624,549,605,165,880,000,000,000,000,000,000,000 | 20 | ipvs: Add boundary check on ioctl arguments
The ipvs code has a nifty system for doing the size of ioctl command
copies; it defines an array with values into which it indexes the cmd
to find the right length.
Unfortunately, the ipvs code forgot to check if the cmd was in the
range that the array provides, allowing fo... |
void __cpuinit init_idle_bootup_task(struct task_struct *idle)
{
idle->sched_class = &idle_sched_class;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 70,593,479,633,530,860,000,000,000,000,000,000,000 | 4 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static void posix_cpu_timer_rearm(struct k_itimer *timer)
{
struct sighand_struct *sighand;
unsigned long flags;
struct task_struct *p = timer->it.cpu.task;
u64 now;
WARN_ON_ONCE(p == NULL);
/*
* Fetch the current sample and update the timer's expiry time.
*/
if (CPUCLOCK_PERTHREAD(timer->it_clock)) {
cp... | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 47,713,759,214,359,880,000,000,000,000,000,000,000 | 52 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
_gnutls_x509_set_time(ASN1_TYPE c2, const char *where, time_t tim,
int nochoice)
{
char str_time[MAX_TIME];
char name[128];
int result, len;
if (nochoice != 0) {
result =
gtime2generalTime(tim, str_time, sizeof(str_time));
if (result < 0)
return gnutls_assert_val(result);
len = strlen(str_ti... | 0 | [] | gnutls | 272854367efc130fbd4f1a51840d80c630214e12 | 282,219,950,220,624,430,000,000,000,000,000,000,000 | 44 | Reset the output value on error in _gnutls_x509_dn_to_string()
Reported by Kurt Roeckx. |
static void v9fs_mknod(void *opaque)
{
int mode;
gid_t gid;
int32_t fid;
V9fsQID qid;
int err = 0;
int major, minor;
size_t offset = 7;
V9fsString name;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, o... | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 78,321,154,608,516,330,000,000,000,000,000,000,000 | 57 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq)
{
struct xfrm_state *x;
spin_lock_bh(&net->xfrm.xfrm_state_lock);
x = __xfrm_find_acq_byseq(net, mark, seq);
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
return x;
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 191,494,649,840,894,460,000,000,000,000,000,000,000 | 9 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
dvi_document_save (EvDocument *document,
const char *uri,
GError **error)
{
DviDocument *dvi_document = DVI_DOCUMENT (document);
return ev_xfer_uri_simple (dvi_document->uri, uri, error);
} | 0 | [
"CWE-78"
] | evince | 350404c76dc8601e2cdd2636490e2afc83d3090e | 295,712,933,322,312,630,000,000,000,000,000,000,000 | 8 | dvi: Mitigate command injection attacks by quoting filename
With commit 1fcca0b8041de0d6074d7e17fba174da36c65f99 came a DVI backend.
It exports to PDF via the dvipdfm tool.
It calls that tool with the filename of the currently loaded document.
If that filename is cleverly crafted, it can escape the currently
used manu... |
TEST_F(QueryPlannerTest, MultikeyDoubleDottedUnhelpfulElemMatch) {
// true means multikey
addIndex(BSON("a.b.x" << 1 << "a.b.y" << 1), true);
runQuery(fromjson("{a: {$elemMatch: {'b.x': 1, 'b.y': 1}}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 282,748,847,252,821,120,000,000,000,000,000,000,000 | 12 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
sec_process_crypt_info(STREAM s)
{
uint8 *server_random = NULL;
uint8 modulus[SEC_MAX_MODULUS_SIZE];
uint8 exponent[SEC_EXPONENT_SIZE];
uint32 rc4_key_size;
memset(modulus, 0, sizeof(modulus));
memset(exponent, 0, sizeof(exponent));
if (!sec_parse_crypt_info(s, &rc4_key_size, &server_random, modulus, exponent))... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 10,800,219,749,707,170,000,000,000,000,000,000,000 | 20 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
struct nl_info *info)
{
struct fib6_walker_t *w;
struct rt6_info *rt = *rtp;
struct net *net = info->nl_net;
RT6_TRACE("fib6_del_route\n");
/* Unlink it */
*rtp = rt->dst.rt6_next;
rt->rt6i_node = NULL;
net->ipv6.rt6_stats->fib_rt_e... | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 258,712,205,666,381,860,000,000,000,000,000,000,000 | 73 | ipv6: only static routes qualify for equal cost multipathing
Static routes in this case are non-expiring routes which did not get
configured by autoconf or by icmpv6 redirects.
To make sure we actually get an ecmp route while searching for the first
one in this fib6_node's leafs, also make sure it matches the ecmp ro... |
int copyonwrite_prepare(CLIENT* client)
{
off_t i;
if ((client->difffilename = malloc(1024))==NULL)
err("Failed to allocate string for diff file name");
snprintf(client->difffilename, 1024, "%s-%s-%d.diff",client->exportname,client->clientname,
(int)getpid()) ;
client->difffilename[1023]='\0';
msg3(LOG_INFO,"A... | 0 | [
"CWE-119"
] | nbd | 4ed24fe0d64c7cc9963c57b52cad1555ad7c6b60 | 82,224,721,095,982,350,000,000,000,000,000,000,000 | 17 | r134: CVE-2005-3534 |
int wc_SetKeyUsage(Cert *cert, const char *value)
{
int ret = 0;
char *token, *str, *ptr;
word32 len;
if (cert == NULL || value == NULL)
return BAD_FUNC_ARG;
cert->keyUsage = 0;
/* duplicate string (including terminator) */
len = (word32)XSTRLEN(value);
str = (char*)XMALLOC(le... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 258,309,558,211,292,100,000,000,000,000,000,000,000 | 57 | OCSP: improve handling of OCSP no check extension |
HTTP_Copy(struct http *to, const struct http * const fm)
{
to->conds = fm->conds;
to->logtag = fm->logtag;
to->status = fm->status;
to->protover = fm->protover;
to->nhd = fm->nhd;
assert(fm->nhd <= to->shd);
memcpy(to->hd, fm->hd, fm->nhd * sizeof *to->hd);
memcpy(to->hdf, fm->hdf, fm->nhd * sizeof *to->hdf);
... | 0 | [] | Varnish-Cache | 29870c8fe95e4e8a672f6f28c5fbe692bea09e9c | 172,732,039,626,265,550,000,000,000,000,000,000,000 | 12 | Check for duplicate Content-Length headers in requests
If a duplicate CL header is in the request, we fail the request with a
400 (Bad Request)
Fix a test case that was sending duplicate CL by misstake and would
not fail because of that. |
unmount_data_free (UnmountData *data)
{
if (data->parent_window)
{
g_object_remove_weak_pointer (G_OBJECT (data->parent_window),
(gpointer *) &data->parent_window);
}
g_clear_object (&data->mount_operation);
g_object_unref (data->mount);
g_free (dat... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 112,734,235,937,967,360,000,000,000,000,000,000,000 | 12 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
process_fontcache(STREAM s)
{
RD_HGLYPH bitmap;
uint8 font, nglyphs;
uint16 character, offset, baseline, width, height;
int i, datasize;
uint8 *data;
in_uint8(s, font);
in_uint8(s, nglyphs);
DEBUG(("FONTCACHE(font=%d,n=%d)\n", font, nglyphs));
for (i = 0; i < nglyphs; i++)
{
in_uint16_le(s, character);
... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 2,692,248,548,702,047,000,000,000,000,000,000,000 | 28 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
struct inode *inode,
block_t count)
{
blkcnt_t sectors = count << F2FS_LOG_SECTORS_PER_BLOCK;
spin_lock(&sbi->stat_lock);
f2fs_bug_on(sbi, sbi->total_valid_block_count < (block_t) count);
sbi->total_valid_block_count -= (block_t)count;
... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 43,040,931,668,166,360,000,000,000,000,000,000,000 | 24 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
perf_event_ctx_lock_nested(struct perf_event *event, int nesting)
{
struct perf_event_context *ctx;
again:
rcu_read_lock();
ctx = READ_ONCE(event->ctx);
if (!refcount_inc_not_zero(&ctx->refcount)) {
rcu_read_unlock();
goto again;
}
rcu_read_unlock();
mutex_lock_nested(&ctx->mutex, nesting);
if (event->ctx... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 330,238,608,893,638,000,000,000,000,000,000,000,000 | 22 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
static char *get_default_chdir(pool *p, xaset_t *conf) {
config_rec *c;
char *dir = NULL;
int ret;
c = find_config(conf, CONF_PARAM, "DefaultChdir", FALSE);
while (c) {
/* Check the groups acl */
if (c->argc < 2) {
dir = c->argv[0];
break;
}
ret = pr_expr_eval_group_and(((char *... | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 76,623,698,119,580,940,000,000,000,000,000,000,000 | 34 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
static int tcp4_seq_show(struct seq_file *seq, void *v)
{
struct tcp_iter_state *st;
struct sock *sk = v;
seq_setwidth(seq, TMPSZ - 1);
if (v == SEQ_START_TOKEN) {
seq_puts(seq, " sl local_address rem_address st tx_queue "
"rx_queue tr tm->when retrnsmt uid timeout "
"inode");
goto out;
}
... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 119,401,960,626,470,500,000,000,000,000,000,000,000 | 24 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config)
{
VirtIONet *n = VIRTIO_NET(vdev);
struct virtio_net_config netcfg = {};
memcpy(&netcfg, config, n->config_size);
if (!(vdev->guest_features >> VIRTIO_NET_F_CTRL_MAC_ADDR & 1) &&
memcmp(netcfg.mac, n->mac, ETH_ALEN)) ... | 0 | [
"CWE-119"
] | qemu | 98f93ddd84800f207889491e0b5d851386b459cf | 21,920,337,548,481,450,000,000,000,000,000,000,000 | 13 | virtio-net: out-of-bounds buffer write on load
CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in
virtio_net_load()@hw/net/virtio-net.c
> } else if (n->mac_table.in_use) {
> uint8_t *buf = g_malloc0(n->mac_table.in_use);
We are allocating buffer of size n->mac_table.in_use
> qemu... |
static int neigh_del_timer(struct neighbour *n)
{
if ((n->nud_state & NUD_IN_TIMER) &&
del_timer(&n->timer)) {
neigh_release(n);
return 1;
}
return 0;
} | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 293,761,208,012,541,800,000,000,000,000,000,000,000 | 9 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
bool operator!=(const char *const expression) const {
return !((*this)==expression);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 198,630,008,523,831,300,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static double* _mp_memcopy_double(_cimg_math_parser& mp, const unsigned int ind, const ulongT *const p_ref,
const longT siz, const long inc) {
const longT
off = *p_ref?p_ref[1] + (longT)mp.mem[(longT)p_ref[2]] + 1:ind,
eoff = off + (siz - 1)*inc;... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 133,512,651,744,436,580,000,000,000,000,000,000,000 | 13 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk,
__be16 loc_port, __be32 loc_addr,
__be16 rmt_port, __be32 rmt_addr,
int dif)
{
struct hlist_nulls_node *node;
struct sock *s = sk;
unsigned short hnum = ntohs(loc_port);
sk_nulls_for_each_from(s, node) {
... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 285,586,920,837,333,180,000,000,000,000,000,000,000 | 20 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
{
int index;
struct seq_oss_synth *rec = dev->driver_data;
unsigned long flags;
spin_lock_irqsave(®ister_lock, flags);
for (index = 0; index < max_synth_devs; index++) {
if (synth_devs[index] == rec)
break;
}
if (index >= max_synth_devs) {
spin_... | 0 | [
"CWE-200"
] | linux-2.6 | 82e68f7ffec3800425f2391c8c86277606860442 | 94,155,107,213,430,000,000,000,000,000,000,000,000 | 35 | sound: ensure device number is valid in snd_seq_oss_synth_make_info
snd_seq_oss_synth_make_info() incorrectly reports information
to userspace without first checking for the validity of the
device number, leading to possible information leak (CVE-2008-3272).
Reported-By: Tobias Klein <tk@trapkit.de>
Acked-and-tested-... |
struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
netdev_features_t features)
{
struct sock *sk = gso_skb->sk;
unsigned int sum_truesize = 0;
struct sk_buff *segs, *seg;
struct udphdr *uh;
unsigned int mss;
bool copy_dtor;
__sum16 check;
__be16 newlen;
mss = skb_shinfo(gso_skb)->gso_size;
if (... | 0 | [
"CWE-787"
] | net | 4dd2b82d5adfbe0b1587ccad7a8f76d826120f37 | 215,528,753,318,602,220,000,000,000,000,000,000,000 | 94 | udp: fix GRO packet of death
syzbot was able to crash host by sending UDP packets with a 0 payload.
TCP does not have this issue since we do not aggregate packets without
payload.
Since dev_gro_receive() sets gso_size based on skb_gro_len(skb)
it seems not worth trying to cope with padded packets.
BUG: KASAN: slab-... |
rsvg_filter_primitive_blend_free (RsvgNode * self)
{
RsvgFilterPrimitiveBlend *upself;
upself = (RsvgFilterPrimitiveBlend *) self;
g_string_free (upself->super.result, TRUE);
g_string_free (upself->super.in, TRUE);
g_string_free (upself->in2, TRUE);
_rsvg_node_free (self);
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 304,772,145,202,934,400,000,000,000,000,000,000,000 | 9 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void ProcessMakerNote(unsigned char * ValuePtr, int ByteCount,
unsigned char * OffsetBase, unsigned ExifLength)
{
if (strstr(ImageInfo.CameraMake, "Canon")){
// So it turns out that some canons cameras use big endian, others use little
// endian in the main exif header. But the maker note ... | 0 | [
"CWE-703"
] | jhead | a50953a266583981b51a181c2fce73dad2ac5d7d | 113,420,551,023,628,750,000,000,000,000,000,000,000 | 17 | Make pointer range checks more consistent.
Also twiddle the unused floating point print code (not used in real exif files),
but fuzz testing hits it. New code is equivalent but doesn't cause bus error (don't understand why, but this is all a very bogus thing anyway, just trying to avoid fuzz testing hits. |
static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, zval * dn, zval * attribs TSRMLS_DC)
{
STACK_OF(CONF_VALUE) * dn_sk, *attr_sk = NULL;
char * str, *dn_sect, *attr_sect;
dn_sect = CONF_get_string(req->req_config, req->section_name, "distinguished_name");
if (dn_sect == NULL) {
return... | 0 | [
"CWE-754"
] | php-src | 89637c6b41b510c20d262c17483f582f115c66d6 | 165,485,249,025,224,430,000,000,000,000,000,000,000 | 160 | Fix bug #74651 - check EVP_SealInit as it can return -1 |
void __init hugetlb_add_hstate(unsigned order)
{
struct hstate *h;
unsigned long i;
if (size_to_hstate(PAGE_SIZE << order)) {
printk(KERN_WARNING "hugepagesz= specified twice, ignoring\n");
return;
}
BUG_ON(max_hstate >= HUGE_MAX_HSTATE);
BUG_ON(order == 0);
h = &hstates[max_hstate++];
h->order = order;
h... | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 111,983,060,780,784,760,000,000,000,000,000,000,000 | 25 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
bool testToStringCharsRequiredHelper(const wchar_t * text) {
// Parse
UriParserStateW state;
UriUriW uri;
state.uri = &uri;
int res = uriParseUriW(&state, text);
if (res != 0) {
uriFreeUriMembersW(&uri);
return false;
}
// Required space?
int charsRequired;
if (uriToStringCharsRequiredW(&uri... | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 30,918,587,345,127,710,000,000,000,000,000,000,000 | 39 | Fix uriParse*Ex* out-of-bounds read |
int del_timer(struct timer_list *timer)
{
struct timer_base *base;
unsigned long flags;
int ret = 0;
debug_assert_init(timer);
if (timer_pending(timer)) {
base = lock_timer_base(timer, &flags);
ret = detach_if_pending(timer, base, true);
spin_unlock_irqrestore(&base->lock, flags);
}
return ret;
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 173,605,601,914,349,600,000,000,000,000,000,000,000 | 16 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static int tftp_session_allocate(Slirp *slirp, struct sockaddr_storage *srcsas,
struct tftp_t *tp)
{
struct tftp_session *spt;
int k;
for (k = 0; k < TFTP_SESSIONS_MAX; k++) {
spt = &slirp->tftp_sessions[k];
if (!tftp_session_in_use(spt))
goto f... | 1 | [] | libslirp | 990163cf3ac86b7875559f49602c4d76f46f6f30 | 125,272,003,685,676,750,000,000,000,000,000,000,000 | 33 | tftp: introduce a header structure
Instead of using a composed structure and potentially reading past the
incoming buffer, use a different structure for the header.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> |
wrap_nettle_hkdf_expand (gnutls_mac_algorithm_t mac,
const void *key, size_t keysize,
const void *info, size_t infosize,
void *output, size_t length)
{
struct nettle_mac_ctx ctx;
int ret;
ret = _mac_ctx_init(mac, &ctx);
if (ret < 0)
return gnutls_assert_val(ret);
ctx.set_key(&ctx, keysize, key);
h... | 0 | [
"CWE-476"
] | gnutls | 3db352734472d851318944db13be73da61300568 | 148,118,686,079,141,300,000,000,000,000,000,000,000 | 18 | wrap_nettle_hash_fast: avoid calling _update with zero-length input
As Nettle's hash update functions internally call memcpy, providing
zero-length input may cause undefined behavior.
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
Perl_warn(pTHX_ const char *pat, ...)
{
va_list args;
PERL_ARGS_ASSERT_WARN;
va_start(args, pat);
vwarn(pat, &args);
va_end(args);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 174,523,107,022,299,770,000,000,000,000,000,000,000 | 8 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
nautilus_application_get_existing_spatial_window (GFile *location)
{
GList *l;
NautilusWindowSlot *slot;
for (l = nautilus_application_get_spatial_window_list ();
l != NULL; l = l->next) {
GFile *window_location;
slot = NAUTILUS_WINDOW (l->data)->details->active_slot;
window_location = slot->location;
... | 0 | [] | nautilus | 1e1c916f5537eb5e4144950f291f4a3962fc2395 | 315,099,087,541,839,900,000,000,000,000,000,000,000 | 19 | Add "interactive" argument to nautilus_file_mark_desktop_file_trusted.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
* libnautilus-private/nautilus-mime-actions.c:
Add "interactive" ... |
xmlRelaxNGInitTypes(void)
{
if (xmlRelaxNGTypeInitialized != 0)
return (0);
xmlRelaxNGRegisteredTypes = xmlHashCreate(10);
if (xmlRelaxNGRegisteredTypes == NULL) {
xmlGenericError(xmlGenericErrorContext,
"Failed to allocate sh table for Relax-NG types\n");
ret... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 248,953,713,274,566,970,000,000,000,000,000,000,000 | 25 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
void ClientDiffieHellmanPublic::build(SSL& ssl)
{
DiffieHellman& dhServer = ssl.useCrypto().use_dh();
DiffieHellman dhClient(dhServer);
uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same
alloc(keyLength, true);
dhClient.makeAgreement(dhServer.get_publicKey(), keyLength);
c... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 310,254,424,826,047,200,000,000,000,000,000,000,000 | 18 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int jp2_ftyp_getdata(jp2_box_t *box, jas_stream_t *in)
{
jp2_ftyp_t *ftyp = &box->data.ftyp;
unsigned int i;
if (jp2_getuint32(in, &ftyp->majver) || jp2_getuint32(in, &ftyp->minver)) {
return -1;
}
ftyp->numcompatcodes = (box->datalen - 8) / 4;
if (ftyp->numcompatcodes > JP2_FTYP_MAXCOMPATCODES) {
retu... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 321,346,036,816,154,430,000,000,000,000,000,000,000 | 18 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static ZIPARCHIVE_METHOD(setCompressionName)
{
struct zip *intern;
zval *this = getThis();
size_t name_len;
char *name;
zip_int64_t idx;
zend_long comp_method, comp_flags = 0;
if (!this) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, this);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l",
&name, &name_l... | 0 | [
"CWE-190"
] | php-src | 3b8d4de300854b3517c7acb239b84f7726c1353c | 49,502,425,630,628,860,000,000,000,000,000,000,000 | 35 | Fix bug #71923 - integer overflow in ZipArchive::getFrom* |
nvmet_fc_register_targetport(struct nvmet_fc_port_info *pinfo,
struct nvmet_fc_target_template *template,
struct device *dev,
struct nvmet_fc_target_port **portptr)
{
struct nvmet_fc_tgtport *newrec;
unsigned long flags;
int ret, idx;
if (!template->xmt_ls_rsp || !template->fcp_op ||
!template->fcp_a... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0c319d3a144d4b8f1ea2047fd614d2149b68f889 | 266,498,587,213,185,800,000,000,000,000,000,000,000 | 76 | 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> |
nv_put(cmdarg_T *cap)
{
nv_put_opt(cap, FALSE);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 10,751,569,715,131,912,000,000,000,000,000,000,000 | 4 | 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(). |
static int build_report(struct sk_buff *skb, u8 proto,
struct xfrm_selector *sel, xfrm_address_t *addr)
{
struct xfrm_user_report *ur;
struct nlmsghdr *nlh;
nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_REPORT, sizeof(*ur), 0);
if (nlh == NULL)
return -EMSGSIZE;
ur = nlmsg_data(nlh);
ur->proto = proto;
memcpy(&ur->... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 193,986,781,979,787,400,000,000,000,000,000,000,000 | 23 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
void myseek(int handle,off_t a) {
if (lseek(handle, a, SEEK_SET) < 0) {
err("Can not seek locally!\n");
}
} | 0 | [
"CWE-119"
] | nbd | 4ed24fe0d64c7cc9963c57b52cad1555ad7c6b60 | 101,813,692,063,050,450,000,000,000,000,000,000,000 | 5 | r134: CVE-2005-3534 |
static bool hva_to_pfn_fast(unsigned long addr, bool atomic, bool *async,
bool write_fault, bool *writable, kvm_pfn_t *pfn)
{
struct page *page[1];
int npages;
if (!(async || atomic))
return false;
/*
* Fast pin a writable pfn only if it is a write fault request
* or the caller allows to map a writab... | 0 | [
"CWE-416",
"CWE-284"
] | linux | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | 290,419,082,030,035,640,000,000,000,000,000,000,000 | 28 | KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: ... |
void strbuf_git_path(struct strbuf *sb, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
do_git_path(the_repository, NULL, sb, fmt, args);
va_end(args);
} | 0 | [
"CWE-20"
] | git | 7c3745fc6185495d5765628b4dfe1bd2c25a2981 | 206,686,150,364,210,370,000,000,000,000,000,000,000 | 7 | path: safeguard `.git` against NTFS Alternate Streams Accesses
Probably inspired by HFS' resource streams, NTFS supports "Alternate
Data Streams": by appending `:<stream-name>` to the file name,
information in addition to the file contents can be written and read,
information that is copied together with the file (unl... |
void oom_killer_enable(void)
{
oom_killer_disabled = false;
pr_info("OOM killer enabled.\n");
} | 0 | [
"CWE-416"
] | linux | 687cb0884a714ff484d038e9190edc874edcf146 | 276,314,699,872,324,870,000,000,000,000,000,000,000 | 5 | mm, oom_reaper: gather each vma to prevent leaking TLB entry
tlb_gather_mmu(&tlb, mm, 0, -1) means gathering the whole virtual memory
space. In this case, tlb->fullmm is true. Some archs like arm64
doesn't flush TLB when tlb->fullmm is true:
commit 5a7862e83000 ("arm64: tlbflush: avoid flushing when fullmm == 1")... |
static void skcipher_module_exit(void)
{
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 93,759,036,272,115,380,000,000,000,000,000,000,000 | 3 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
TEST(HttpStatusChecker, ExpectedAbove599) {
const std::string yaml = R"EOF(
timeout: 1s
interval: 1s
unhealthy_threshold: 2
healthy_threshold: 2
http_health_check:
service_name_matcher:
prefix: locations
path: /healthchecka
expected_statuses:
- start: 600
end: 601
)EOF";
... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 308,061,653,653,874,420,000,000,000,000,000,000,000 | 23 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
void revive_home_server(void *ctx)
{
home_server *home = ctx;
char buffer[128];
home->state = HOME_STATE_ALIVE;
home->currently_outstanding = 0;
home->revive_time = now;
/*
* Delete any outstanding events.
*/
if (home->ev) fr_event_delete(el, &home->ev);
radlog(L_PROXY, "Marking home server %s port %d al... | 0 | [
"CWE-399"
] | freeradius-server | ff94dd35673bba1476594299d31ce8293b8bd223 | 296,050,955,234,315,100,000,000,000,000,000,000,000 | 20 | Do not delete "old" requests until they are free.
If the request is in the queue for 30+ seconds, do NOT delete it.
Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die",
which waits for a child thread to pick it up, and acknowledge that it's
done. Once it's marked done, we can finally clean it up.
T... |
static uint64_t pauth_original_ptr(uint64_t ptr, ARMVAParameters param)
{
uint64_t extfield = -param.select;
int bot_pac_bit = 64 - param.tsz;
int top_pac_bit = 64 - 8 * param.tbi;
return deposit64(ptr, bot_pac_bit, top_pac_bit - bot_pac_bit, extfield);
} | 0 | [] | qemu | de0b1bae6461f67243282555475f88b2384a1eb9 | 319,319,156,727,134,440,000,000,000,000,000,000,000 | 8 | target/arm: Fix PAuth sbox functions
In the PAC computation, sbox was applied over wrong bits.
As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16.
Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was
used to verify one computation of the pauth_computepac() function which
us... |
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
ptrdiff_t line_size)
{
int i;
/* read the pixels */
for (i = 0; i < 8; i++) {
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
... | 0 | [
"CWE-476"
] | FFmpeg | b3332a182f8ba33a34542e4a0370f38b914ccf7d | 200,140,882,623,394,980,000,000,000,000,000,000,000 | 19 | avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile
These 2 fields are not always the same, it is simpler to always use the same field
for detecting studio profile
Fixes: null pointer dereference
Fixes: ffmpeg_crash_3.avi
Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böh... |
inode_val_hasher (const void *val, size_t n_buckets)
{
const struct inode_val *ival = val;
return ival->inode % n_buckets;
} | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 131,793,640,871,454,980,000,000,000,000,000,000,000 | 5 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
copy_plats_to_inter (class ipcp_param_lattices *plats, HOST_WIDE_INT offset)
{
vec<ipa_agg_value> res = vNULL;
if (!plats->aggs || plats->aggs_contain_variable || plats->aggs_bottom)
return vNULL;
for (struct ipcp_agg_lattice *aglat = plats->aggs; aglat; aglat = aglat->next)
if (aglat->is_single_const (... | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 326,631,812,083,453,430,000,000,000,000,000,000,000 | 17 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
{
struct ethhdr *eh = (void *) skb->data;
struct socket *sock = s->sock;
struct kvec iv[3];
int len = 0, il = 0;
u8 type = 0;
BT_DBG("skb %p dev %p type %d", skb, skb->dev, skb->pkt_type);
if (!skb->dev) {
/* Control frame sent by us */
... | 0 | [
"CWE-20",
"CWE-284"
] | linux | 71bb99a02b32b4cc4265118e85f6035ca72923f0 | 333,135,016,503,359,400,000,000,000,000,000,000,000 | 58 | Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket
same story as cmtp
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
megasas_disable_intr_ppc(struct megasas_instance *instance)
{
struct megasas_register_set __iomem *regs;
u32 mask = 0xFFFFFFFF;
regs = instance->reg_set;
writel(mask, ®s->outbound_intr_mask);
/* Dummy readl to force pci flush */
readl(®s->outbound_intr_mask);
} | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 161,662,217,839,002,930,000,000,000,000,000,000,000 | 10 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
int ssl3_get_client_key_exchange(SSL *s)
{
int i, al, ok;
long n;
unsigned long alg_k;
unsigned char *p;
#ifndef OPENSSL_NO_RSA
RSA *rsa = NULL;
EVP_PKEY *pkey = NULL;
#endif
#ifndef OPENSSL_NO_DH
BIGNUM *pub = NULL;
DH *dh_srvr, *dh_clnt = NULL;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_E... | 1 | [
"CWE-20"
] | openssl | b19d8143212ae5fbc9cebfd51c01f802fabccd33 | 258,303,163,023,392,000,000,000,000,000,000,000,000 | 796 | Fix DHE Null CKE vulnerability
If client auth is used then a server can seg fault in the event of a DHE
cipher being used and a zero length ClientKeyExchange message being sent
by the client. This could be exploited in a DoS attack.
CVE-2015-1787
Reviewed-by: Richard Levitte <levitte@openssl.org> |
bool Field::sp_prepare_and_store_item(THD *thd, Item **value)
{
DBUG_ENTER("Field::sp_prepare_and_store_item");
DBUG_ASSERT(value);
Item *expr_item;
if (!(expr_item= thd->sp_prepare_func_item(value, 1)))
goto error;
/*
expr_item is now fixed, it's safe to call cmp_type()
*/
if (expr_item->cmp_t... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 259,979,334,515,838,500,000,000,000,000,000,000,000 | 37 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static void ext4_free_branches(handle_t *handle, struct inode *inode,
struct buffer_head *parent_bh,
__le32 *first, __le32 *last, int depth)
{
ext4_fsblk_t nr;
__le32 *p;
if (ext4_handle_is_aborted(handle))
return;
if (depth--) {
struct buffer_head *bh;
int addr_per_block = EXT4_ADDR_PER... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 86,250,019,997,070,510,000,000,000,000,000,000,000 | 110 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
void manager_unref_uid(Manager *m, uid_t uid, bool destroy_now) {
manager_unref_uid_internal(m, &m->uid_refs, uid, destroy_now, clean_ipc_by_uid);
} | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 323,149,192,710,796,500,000,000,000,000,000,000,000 | 3 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
TEST_F(DocumentSourceMatchTest, ShouldAddCorrectDependenciesForClausesWithInternalSchemaType) {
auto query = fromjson("{a: {$_internalSchemaType: 1}}");
auto match = DocumentSourceMatch::create(query, getExpCtx());
DepsTracker dependencies;
ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, match->getDependenc... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 298,540,311,432,885,270,000,000,000,000,000,000,000 | 10 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
VOID ParaNdis_ResetRxClassification(PARANDIS_ADAPTER *pContext)
{
ULONG i;
PPARANDIS_RECEIVE_QUEUE pUnclassified = &pContext->ReceiveQueues[PARANDIS_RECEIVE_QUEUE_UNCLASSIFIED];
NdisAcquireSpinLock(&pUnclassified->Lock);
for(i = PARANDIS_RECEIVE_QUEUE_UNCLASSIFIED + 1; i < ARRAYSIZE(pContext->ReceiveQ... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 278,479,378,816,694,540,000,000,000,000,000,000,000 | 23 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
static void update_handled_vectors(struct kvm_ioapic *ioapic)
{
DECLARE_BITMAP(handled_vectors, 256);
int i;
memset(handled_vectors, 0, sizeof(handled_vectors));
for (i = 0; i < IOAPIC_NUM_PINS; ++i)
__set_bit(ioapic->redirtbl[i].fields.vector, handled_vectors);
memcpy(ioapic->handled_vectors, handled_vectors,
... | 0 | [
"CWE-20"
] | kvm | a2c118bfab8bc6b8bb213abfc35201e441693d55 | 182,481,402,558,145,250,000,000,000,000,000,000,000 | 12 | KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)
If the guest specifies a IOAPIC_REG_SELECT with an invalid value and follows
that with a read of the IOAPIC_REG_WINDOW KVM does not properly validate
that request. ioapic_read_indirect contains an
ASSERT(redir_index < IOAPIC_NUM_PINS), but the... |
InstanceHandle_t key() const
{
return m_key;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 76,178,586,367,550,660,000,000,000,000,000,000,000 | 4 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static int packet_mc_drop(struct sock *sk, struct packet_mreq_max *mreq)
{
struct packet_mclist *ml, **mlp;
rtnl_lock();
for (mlp = &pkt_sk(sk)->mclist; (ml = *mlp) != NULL; mlp = &ml->next) {
if (ml->ifindex == mreq->mr_ifindex &&
ml->type == mreq->mr_type &&
ml->alen == mreq->mr_alen &&
memcm... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 155,398,100,716,021,200,000,000,000,000,000,000,000 | 25 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
get_content (xmlNodePtr node_ptr)
{
xmlChar *xml_s;
gchar *s;
xml_s = xmlNodeGetContent (node_ptr);
s = g_strdup ((gchar *) xml_s);
xmlFree (xml_s);
return s;
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 235,760,918,241,478,660,000,000,000,000,000,000,000 | 11 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
jas_stream_t *jas_stream_tmpfile()
{
jas_stream_t *stream;
jas_stream_fileobj_t *obj;
if (!(stream = jas_stream_create())) {
return 0;
}
/* A temporary file stream is always opened for both reading and
writing in binary mode. */
stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_WRITE | JAS_STREAM_BINARY;
/*... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 182,450,725,575,295,400,000,000,000,000,000,000,000 | 51 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
const char *unit_slice_name(Unit *u) {
assert(u);
if (!UNIT_ISSET(u->slice))
return NULL;
return UNIT_DEREF(u->slice)->id;
} | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 102,087,925,472,419,550,000,000,000,000,000,000,000 | 8 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
mode_in(struct cpio *cpio)
{
struct archive *a;
struct archive_entry *entry;
struct archive *ext;
const char *destpath;
int r;
ext = archive_write_disk_new();
if (ext == NULL)
lafe_errc(1, 0, "Couldn't allocate restore object");
r = archive_write_disk_set_options(ext, cpio->extract_flags);
if (r != ARCHIVE_... | 0 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 280,874,159,306,565,120,000,000,000,000,000,000,000 | 86 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
close_pcsc_reader_direct (int slot)
{
pcsc_release_context (reader_table[slot].pcsc.context);
xfree (reader_table[slot].rdrname);
reader_table[slot].rdrname = NULL;
reader_table[slot].used = 0;
return 0;
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 135,541,387,860,446,140,000,000,000,000,000,000,000 | 8 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
std::unique_ptr<routing_handle_result> handle_initial(request& req, response& res)
{
return router_.handle_initial(req, res);
} | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 16,962,925,187,413,100,000,000,000,000,000,000,000 | 4 | Prevent HTTP pipelining which Crow doesn't support. |
bool t_go_generator::omit_initialization(t_field* tfield) {
t_const_value* value = tfield->get_value();
if (!value) {
return true;
}
t_type* type = tfield->get_type()->get_true_type();
if (type->is_base_type()) {
t_base_type::t_base tbase = ((t_base_type*)type)->get_base();
switch (tbase) {
c... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 74,793,750,399,143,680,000,000,000,000,000,000,000 | 37 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
Date_t timestampTime() const {
unsigned long long t = ConstDataView(value() + 4).read<LittleEndian<unsigned int>>();
return Date_t::fromMillisSinceEpoch(t * 1000);
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 256,573,824,278,083,240,000,000,000,000,000,000,000 | 4 | SERVER-38984 Validate unique User ID on UserCache hit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.