func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
drill_parse_header_is_ici(gerb_file_t *fd, drill_state_t *state,
gerbv_image_t *image, ssize_t file_line)
{
gerbv_drill_stats_t *stats = image->drill_stats;
switch (file_check_str(fd, "ICI,ON")) {
case -1:
gerbv_stats_printf(stats->error_list, GERBV_MESSAGE_ERROR, -1,
_("Unexpected EOF found while pa... | 0 | [
"CWE-787"
] | gerbv | 672214abb47a802fc000125996e6e0a46c623a4e | 150,286,456,647,612,780,000,000,000,000,000,000,000 | 31 | Add test to demonstrate buffer overrun |
int BN_bn2bin(const BIGNUM *a, unsigned char *to)
{
return bn2binpad(a, to, -1);
} | 0 | [
"CWE-310"
] | openssl | aab7c770353b1dc4ba045938c8fb446dd1c4531e | 86,188,004,496,562,570,000,000,000,000,000,000,000 | 4 | Elliptic curve scalar multiplication with timing attack defenses
Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com>
Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi>
Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt... |
GetTotalPacketsSent(struct upnphttp * h, const char * action, const char * ns)
{
int r;
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\">"
"<NewTotalPacketsSent>%lu</NewTotalPacketsSent>"
"</u:%sResponse>";
char body[512];
int bodylen;
struct ifdata data;
r = getifstats(ext_if_name, &data);
... | 0 | [
"CWE-476"
] | miniupnp | 13585f15c7f7dc28bbbba1661efb280d530d114c | 204,812,711,797,932,800,000,000,000,000,000,000,000 | 24 | GetOutboundPinholeTimeout: check args |
static noinline_for_stack int ethtool_get_drvinfo(struct net_device *dev,
void __user *useraddr)
{
struct ethtool_drvinfo info;
const struct ethtool_ops *ops = dev->ethtool_ops;
if (!ops->get_drvinfo)
return -EOPNOTSUPP;
memset(&info, 0, sizeof(info));
info.cmd = ETHTOOL_GDRVINFO;
ops->get_drvinfo(dev... | 0 | [
"CWE-190"
] | linux-2.6 | db048b69037e7fa6a7d9e95a1271a50dc08ae233 | 69,394,800,165,172,720,000,000,000,000,000,000,000 | 39 | ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer
overflow and the buffer may be smaller than needed. Since
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
least denial of service.
Signed-off-by: Ben Hutching... |
void FillAllocationDescription(AllocationDescription* proto) const override {
root_->FillAllocationDescription(proto);
} | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 307,105,548,259,646,800,000,000,000,000,000,000,000 | 3 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
void CLASS parseSonyMakernotes(unsigned tag, unsigned type, unsigned len, unsigned dng_writer, uchar *&table_buf_0x0116,
ushort &table_buf_0x0116_len, uchar *&table_buf_0x2010, ushort &table_buf_0x2010_len,
uchar *&table_buf_0x9050, ushort &table_buf_0x9050_... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 26,415,851,745,787,423,000,000,000,000,000,000,000 | 409 | parse_qt: possible integer overflow |
my_decimal *Item::val_decimal_from_date(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
MYSQL_TIME ltime;
if (get_temporal_with_sql_mode(<ime))
{
my_decimal_set_zero(decimal_value);
null_value= 1; // set NULL, stop processing
return 0;
}
return date2my_decim... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 84,571,735,267,334,630,000,000,000,000,000,000,000 | 12 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
is_identical_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 7,933,333,598,477,192,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static void __init cgroup_init_subsys(struct cgroup_subsys *ss, bool early)
{
struct cgroup_subsys_state *css;
pr_debug("Initializing cgroup subsys %s\n", ss->name);
mutex_lock(&cgroup_mutex);
idr_init(&ss->css_idr);
INIT_LIST_HEAD(&ss->cfts);
/* Create the root cgroup state for this subsystem */
ss->root = ... | 0 | [
"CWE-269"
] | linux | 1756d7994ad85c2479af6ae5a9750b92324685af | 312,551,708,207,075,530,000,000,000,000,000,000,000 | 52 | cgroup: Use open-time credentials for process migraton perm checks
cgroup process migration permission checks are performed at write time as
whether a given operation is allowed or not is dependent on the content of
the write - the PID. This currently uses current's credentials which is a
potential security weakness a... |
typename CustomInlineHeaderRegistry::Handle<type> handle() { return handle_; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 34,498,202,134,713,870,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static bool is_ineligible(const struct sk_buff *skb)
{
int ptr = (u8 *)(ipv6_hdr(skb) + 1) - skb->data;
int len = skb->len - ptr;
__u8 nexthdr = ipv6_hdr(skb)->nexthdr;
__be16 frag_off;
if (len < 0)
return true;
ptr = ipv6_skip_exthdr(skb, ptr, &nexthdr, &frag_off);
if (ptr < 0)
return false;
if (nexthdr ... | 0 | [
"CWE-20",
"CWE-200"
] | linux | 79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2 | 148,416,637,755,650,630,000,000,000,000,000,000,000 | 23 | net: handle no dst on skb in icmp6_send
Andrey reported the following while fuzzing the kernel with syzkaller:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked in:
CPU: 0 PID: 3859 Comm: a.out Not tainted... |
SPL_METHOD(Array, getIterator)
{
zval *object = getThis();
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
spl_array_object *iterator;
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (!ah... | 0 | [] | php-src | a374dfab567ff7f0ab0dc150f14cc891b0340b47 | 324,191,132,547,750,000,000,000,000,000,000,000,000 | 21 | Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion |
static void WriteBinaryGltfFile(const std::string &output,
const std::string &content,
const std::vector<unsigned char> &binBuffer) {
#ifdef _WIN32
#if defined(_MSC_VER)
std::ofstream gltfFile(UTF8ToWchar(output).c_str(), std::ios::binary);
#elif defined... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 274,592,548,397,844,830,000,000,000,000,000,000,000 | 20 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
uint64_t encoding_type() const { return encoding_type_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 132,704,401,139,124,830,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
StringMatching::StringMatching() {
// TODO Auto-generated constructor stub
} | 1 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 116,028,562,832,774,580,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... |
rsvg_entity_decl (void *data, const xmlChar * name, int type,
const xmlChar * publicId, const xmlChar * systemId, xmlChar * content)
{
RsvgHandle *ctx = (RsvgHandle *) data;
GHashTable *entities = ctx->priv->entities;
xmlEntityPtr entity;
#if LIBXML_VERSION >= 20700
xmlChar *resolvedSy... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 278,170,567,911,107,550,000,000,000,000,000,000,000 | 76 | 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... |
GF_Err gf_media_export_six(GF_MediaExporter *dumper)
{
GF_ESD *esd;
char szName[1000], szMedia[1000];
FILE *media, *six;
u32 track, i, di, count, pos, header_size;
//u32 mtype;
#if !defined(GPAC_DISABLE_TTXT) && !defined(GPAC_DISABLE_VTT)
u32 mstype;
#endif
const char *szRootName;
//Bool isText;
if (!(track =... | 0 | [
"CWE-476"
] | gpac | 00194f5fe462123f70b0bae7987317b52898b868 | 8,429,574,815,781,419,000,000,000,000,000,000,000 | 112 | fixed #1769 (fuzz) |
get_vrFilter( Operation *op, BerElement *ber,
ValuesReturnFilter **vrf,
const char **text )
{
/*
* A ValuesReturnFilter looks like this:
*
* ValuesReturnFilter ::= SEQUENCE OF SimpleFilterItem
* SimpleFilterItem ::= CHOICE {
* equalityMatch [3] AttributeValueAssertion,
* ... | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 217,218,540,026,734,560,000,000,000,000,000,000,000 | 68 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
static void FontViewSetTitles(SplineFont *sf) {
FontView *fv;
for ( fv = (FontView *) (sf->fv); fv!=NULL; fv=(FontView *) (fv->b.nextsame))
FontViewSetTitle(fv);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 56,611,894,711,845,870,000,000,000,000,000,000,000 | 6 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
png_get_fixed_point(png_structrp png_ptr, png_const_bytep buf)
{
png_uint_32 uval = png_get_uint_32(buf);
if (uval <= PNG_UINT_31_MAX)
return (png_fixed_point)uval; /* known to be in range */
/* The caller can turn off the warning by passing NULL. */
if (png_ptr != NULL)
png_warning(png_ptr, "... | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 295,150,957,399,125,740,000,000,000,000,000,000,000 | 13 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
Item_iterator_row(Item *base) : base_item(base), current(0) {} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 315,064,114,395,241,400,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int add_equal(File fptr)
{
return add_string(fptr, equal_str);
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 20,422,440,225,913,515,000,000,000,000,000,000,000 | 4 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file *m,
unsigned int flags)
{
bool tgid = flags & TRACE_ITER_RECORD_TGID;
const char tgid_space[] = " ";
const char space[] = " ";
print_event_info(buf, m);
seq_printf(m, "# %s _-----=> irq... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 44,575,677,086,117,280,000,000,000,000,000,000,000 | 24 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
MagickExport MagickBooleanType SetImageProperty(Image *image,
const char *property,const char *value,ExceptionInfo *exception)
{
MagickBooleanType
status;
MagickStatusType
flags;
size_t
property_length;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (im... | 0 | [
"CWE-703",
"CWE-704"
] | ImageMagick | eac8ce4d873f28bb6a46aa3a662fb196b49b95d0 | 339,123,699,647,072,800,000,000,000,000,000,000,000 | 488 | fix #5033: runtime error: load of misaligned address (#5034)
* fix Division by zero in XMenuWidget() of MagickCore/widget.c
* Fix memory leak in AnimateImageCommand() of MagickWand/animate.c and DisplayImageCommand() of MagickWand/display.c
* fix Division by zero in ReadEnhMetaFile() of coders/emf.c
* Resolve... |
dbcs_char2cells(int c)
{
// Number of cells is equal to number of bytes, except for euc-jp when
// the first byte is 0x8e.
if (enc_dbcs == DBCS_JPNU && ((unsigned)c >> 8) == 0x8e)
return 1;
// use the first byte
return MB_BYTE2LEN((unsigned)c >> 8);
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 143,249,191,129,135,430,000,000,000,000,000,000,000 | 9 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
pq_getkeepalivesinterval(Port *port)
{
#if defined(TCP_KEEPINTVL) || defined(SIO_KEEPALIVE_VALS)
if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
return 0;
if (port->keepalives_interval != 0)
return port->keepalives_interval;
if (port->default_keepalives_interval == 0)
{
#ifndef WIN32
ACCEPT_TYPE... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 101,244,413,524,938,770,000,000,000,000,000,000,000 | 32 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
static int get_relative_value(struct usb_mixer_elem_info *cval, int val)
{
if (!cval->res)
cval->res = 1;
if (val < cval->min)
return 0;
else if (val >= cval->max)
return (cval->max - cval->min + cval->res - 1) / cval->res;
else
return (val - cval->min) / cval->res;
} | 0 | [
"CWE-416",
"CWE-787"
] | linux | 124751d5e63c823092060074bd0abaae61aaa9c4 | 291,959,628,749,952,150,000,000,000,000,000,000,000 | 11 | ALSA: usb-audio: Kill stray URB at exiting
USB-audio driver may leave a stray URB for the mixer interrupt when it
exits by some error during probe. This leads to a use-after-free
error as spotted by syzkaller like:
==================================================================
BUG: KASAN: use-after-free in sn... |
static JSValue js_sys_rand64(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
u64 lrand = (u64) gf_rand();
lrand<<=32;
lrand |= gf_rand();
return JS_NewInt64(ctx, lrand);
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 101,062,630,783,566,960,000,000,000,000,000,000,000 | 7 | fixed #2138 |
gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
{
char *pos = inbuf;
char *lpos = NULL;
char *tline = NULL;
LOCAL_ARRAY(char, line, TEMP_BUF_SIZE);
LOCAL_ARRAY(char, tmpbuf, TEMP_BUF_SIZE);
char *name = NULL;
char *selector = NULL;
char *host = NULL;
char *port = NU... | 1 | [
"CWE-400"
] | squid | 780c4ea1b4c9d2fb41f6962aa6ed73ae57f74b2b | 45,378,845,076,609,950,000,000,000,000,000,000,000 | 338 | Improve handling of Gopher responses (#1022) |
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryEnableAccessNone_validation_ok_enable_discovery_enable_access_encrypt)
// *INDENT-ON*
{
PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME);
PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME);
std::string governance... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 225,798,532,508,544,220,000,000,000,000,000,000,000 | 9 | 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... |
GF_Err odkm_box_read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read(s, bs);
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 298,491,695,312,428,100,000,000,000,000,000,000,000 | 4 | fixed #1879 |
void helpf(FILE *errors, const char *fmt, ...)
{
if(fmt) {
va_list ap;
va_start(ap, fmt);
fputs("curl: ", errors); /* prefix it */
vfprintf(errors, fmt, ap);
va_end(ap);
}
fprintf(errors, "curl: try 'curl --help' "
#ifdef USE_MANUAL
"or 'curl --manual' "
#endif
"for more in... | 0 | [
"CWE-190",
"CWE-125"
] | curl | d530e92f59ae9bb2d47066c3c460b25d2ffeb211 | 246,565,407,518,348,950,000,000,000,000,000,000,000 | 15 | voutf: fix bad arethmetic when outputting warnings to stderr
CVE-2018-16842
Reported-by: Brian Carpenter
Bug: https://curl.haxx.se/docs/CVE-2018-16842.html |
asmlinkage __visible void __sched notrace preempt_schedule(void)
{
/*
* If there is a non-zero preempt_count or interrupts are disabled,
* we do not want to preempt the current task. Just return..
*/
if (likely(!preemptible()))
return;
preempt_schedule_common();
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 139,419,199,890,263,780,000,000,000,000,000,000,000 | 11 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
{
int r;
bool req_int_win = !irqchip_in_kernel(vcpu->kvm) &&
vcpu->run->request_interrupt_window;
bool req_immediate_exit = 0;
if (vcpu->requests) {
if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu))
kvm_mmu_unload(vcpu);
if (kvm_check_request(KVM_REQ_MIGRA... | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 63,148,659,401,511,070,000,000,000,000,000,000,000 | 164 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node,
xmlRelaxNGDefinePtr def)
{
xmlRelaxNGDefinePtr ret, tmp;
xmlChar *val;
ret = def;
if ((IS_RELAXNG(node, "name")) || (IS_RELAXNG(node, "anyName")) ||
(IS_RELAXNG(node, "nsName"))) {
if ((def-... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 228,936,393,877,292,900,000,000,000,000,000,000,000 | 130 | 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 |
static int vrend_draw_bind_samplers_shader(struct vrend_sub_context *sub_ctx,
int shader_type,
int next_sampler_id)
{
int sampler_index = 0;
int n_samplers = 0;
uint32_t dirty = sub_ctx->sampler_views_dirty[shader_type];
u... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 155,350,857,818,476,920,000,000,000,000,000,000,000 | 66 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
acl_fetch_shdr(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
if (!txn)
return 0;
if (txn->rsp.msg_state < HTTP_MSG_BODY)
return 0;
return acl_fetch_hdr(px, l4, txn, txn->rsp.sol, expr, test);
} | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 255,042,630,892,028,400,000,000,000,000,000,000,000 | 13 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
TEST(ExpressionStrLenCP, ComputesLengthOfEmptyString) {
assertExpectedResults("$strLenCP", {{{Value(StringData())}, Value(0)}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 178,181,125,092,337,570,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
struct razer_report razer_chroma_misc_set_scroll_smart_reel(bool smart_reel)
{
struct razer_report report = get_razer_report(0x02, 0x17, 0x02);
report.arguments[0] = VARSTORE;
report.arguments[1] = smart_reel;
return report;
} | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 251,513,827,058,814,640,000,000,000,000,000,000,000 | 9 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,
int idx)
{
OpenPICState *opp = opaque;
IRQDest *dst;
uint32_t retval;
DPRINTF("%s: cpu %d addr %#" HWADDR_PRIx "\n", __func__, idx, addr);
retval = 0xFFFFFFFF;
if (idx < 0) {
... | 0 | [
"CWE-119"
] | qemu | 73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e | 193,591,639,807,815,440,000,000,000,000,000,000,000 | 39 | openpic: avoid buffer overrun on incoming migration
CVE-2013-4534
opp->nb_cpus is read from the wire and used to determine how many
IRQDest elements to read into opp->dst[]. If the value exceeds the
length of opp->dst[], MAX_CPU, opp->dst[] can be overrun with arbitrary
data from the wire.
Fix this by failing migrat... |
int main(int argc, char **argv) {
int firstarg;
config.hostip = sdsnew("127.0.0.1");
config.hostport = 6379;
config.hostsocket = NULL;
config.repeat = 1;
config.interval = 0;
config.dbnum = 0;
config.interactive = 0;
config.shutdown = 0;
config.monitor_mode = 0;
config.pubsu... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 65,856,333,891,368,980,000,000,000,000,000,000,000 | 137 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
void html_link_close(void)
{
html("</a>");
} | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 67,657,680,442,870,150,000,000,000,000,000,000,000 | 4 | ui-shared: prevent malicious filename from injecting headers |
gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps)
{
NalReader nr;
GST_DEBUG ("parsing SPS");
nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes,
nalu->size - nalu->header_bytes);
if (!gst_h264_parse_sps_data (&nr, sps))
goto error;
sps->valid = TRUE;
return GST_H2... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 22,256,753,307,778,060,000,000,000,000,000,000,000 | 21 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
Admin& PerListenerFactoryContextImpl::admin() { return listener_factory_context_base_->admin(); } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 313,652,160,934,406,300,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static RList *strings(RBinFile *arch) {
struct r_bin_dex_obj_t *bin = NULL;
RBinString *ptr = NULL;
RList *ret = NULL;
int i, len;
ut8 buf[6];
ut64 off;
if (!arch || !arch->o) {
return NULL;
}
bin = (struct r_bin_dex_obj_t *) arch->o->bin_obj;
if (!bin || !bin->strings) {
return NULL;
}
if (bin->header.... | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 97,089,377,826,300,100,000,000,000,000,000,000,000 | 58 | fix #6857 |
asmlinkage long sys_unlink(const char __user *pathname)
{
return do_unlinkat(AT_FDCWD, pathname);
} | 0 | [
"CWE-120"
] | linux-2.6 | d70b67c8bc72ee23b55381bd6a884f4796692f77 | 200,963,465,463,911,760,000,000,000,000,000,000,000 | 4 | [patch] vfs: fix lookup on deleted directory
Lookup can install a child dentry for a deleted directory. This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.
This isn't a big problem normally, since memory pressure or umount
will clea... |
ScanLineInputFile::ScanLineInputFile(InputPartData* part)
{
if (part->header.type() != SCANLINEIMAGE)
throw IEX_NAMESPACE::ArgExc("Can't build a ScanLineInputFile from a type-mismatched part.");
_data = new Data(part->numThreads);
_streamData = part->mutex;
_data->memoryMapped = _streamData->is... | 1 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 225,200,101,075,963,500,000,000,000,000,000,000,000 | 22 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter,
clear_ip_bgp_external_ipv4_in_prefix_filter_cmd,
"clear ip bgp external ipv4 (unicast|multicast) in prefix-filter",
CLEAR_STR
IP_STR
BGP_STR
"Clear all external peers\n"
"Address family\n"
"Address Family modifie... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 240,511,686,605,183,600,000,000,000,000,000,000,000 | 20 | [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... |
void Http2Session::Http2Settings::Init() {
entries_.AllocateSufficientStorage(IDX_SETTINGS_COUNT);
AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
env()->http2_state()->settings_buffer;
uint32_t flags = buffer[IDX_SETTINGS_COUNT];
size_t n = 0;
if (flags & (1 << IDX_SETTINGS_HEADER_TABLE_SIZE)) {
... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 203,384,260,633,025,220,000,000,000,000,000,000,000 | 58 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
bool enabled, s32 timeout)
{
s32 pm;
s32 err = 0;
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
brcmf_dbg(TRACE, "Enter\n");
/*
* Powersave enable/disable request is coming from... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 80,358,766,717,333,510,000,000,000,000,000,000,000 | 43 | brcmfmac: assure SSID length from firmware is limited
The SSID length as received from firmware should not exceed
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by:... |
static void set_timer_rand_state(unsigned int irq,
struct timer_rand_state *state)
{
irq_timer_state[irq] = state;
} | 0 | [
"CWE-310"
] | linux-2.6 | 8a0a9bd4db63bc45e3017bedeafbd88d0eb84d02 | 56,524,698,000,136,270,000,000,000,000,000,000,000 | 5 | random: make get_random_int() more random
It's a really simple patch that basically just open-codes the current
"secure_ip_id()" call, but when open-coding it we now use a _static_
hashing area, so that it gets updated every time.
And to make sure somebody can't just start from the same original seed of
all-zeroes, a... |
int rpc_queue_empty(struct rpc_wait_queue *queue)
{
int res;
spin_lock_bh(&queue->lock);
res = queue->qlen;
spin_unlock_bh(&queue->lock);
return res == 0;
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 233,978,130,636,071,300,000,000,000,000,000,000,000 | 9 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
static int emsff_init(struct hid_device *hid)
{
struct emsff_device *emsff;
struct hid_report *report;
struct hid_input *hidinput;
struct list_head *report_list =
&hid->report_enum[HID_OUTPUT_REPORT].report_list;
struct input_dev *dev;
int error;
if (list_empty(&hid->inputs)) {
hid_err(hid, "no inputs foun... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 106,529,276,968,378,630,000,000,000,000,000,000,000 | 59 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
static int hw_atl_utils_mpi_create(struct aq_hw_s *self)
{
int err = 0;
err = hw_atl_utils_init_ucp(self, self->aq_nic_cfg->aq_hw_caps);
if (err < 0)
goto err_exit;
err = hw_atl_utils_fw_rpc_init(self);
if (err < 0)
goto err_exit;
err_exit:
return err;
} | 0 | [
"CWE-787"
] | net | b922f622592af76b57cbc566eaeccda0b31a3496 | 141,799,460,838,085,920,000,000,000,000,000,000,000 | 15 | atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait
This bug report shows up when running our research tools. The
reports is SOOB read, but it seems SOOB write is also possible
a few lines below.
In details, fw.len and sw.len are inputs coming from io. A len
over the size of self->rpc triggers SOOB. The patc... |
njs_vmcode_await(njs_vm_t *vm, njs_vmcode_await_t *await,
njs_promise_capability_t *pcap, njs_async_ctx_t *ctx)
{
size_t size;
njs_int_t ret;
njs_frame_t *frame;
njs_value_t ctor, val, on_fulfilled, on_rejected, *value;
njs_promise_t *promise;
njs... | 1 | [
"CWE-125"
] | njs | d09868bc71f9a990445959329ad8c1b10d3898f5 | 15,267,443,320,610,692,000,000,000,000,000,000,000 | 92 | Fixed njs_vmcode_interpreter() when await fails.
Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens in await instruction.
This is not correct because the current frame has to be unwound (or
exception caught) first.
The fix is to exit through only 5 ... |
static int tipc_nl_compat_link_set(struct tipc_nl_compat_cmd_doit *cmd,
struct sk_buff *skb,
struct tipc_nl_compat_msg *msg)
{
struct tipc_link_config *lc;
struct tipc_bearer *bearer;
struct tipc_media *media;
lc = (struct tipc_link_config *)TLV_DATA(msg->req);
media = tipc_media_find(lc->name);
i... | 0 | [
"CWE-200"
] | net | 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 | 247,894,194,712,233,750,000,000,000,000,000,000,000 | 24 | tipc: fix an infoleak in tipc_nl_compat_link_dump
link_info.str is a char array of size 60. Memory after the NULL
byte is not initialized. Sending the whole object out can cause
a leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
GF_Err gitn_Size(GF_Box *s)
{
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *)s;
ptr->size += 2;
for (i=0; i<ptr->nb_entries; i++) {
ptr->size += 5;
if (ptr->entries[i].name) ptr->size += strlen(ptr->entries[i].name);
}
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 238,768,083,524,786,100,000,000,000,000,000,000,000 | 12 | fixed 2 possible heap overflows (inc. #1088) |
cr_tknzr_unget_token (CRTknzr * a_this, CRToken * a_token)
{
g_return_val_if_fail (a_this && PRIVATE (a_this)
&& PRIVATE (a_this)->token_cache == NULL,
CR_BAD_PARAM_ERROR);
PRIVATE (a_this)->token_cache = a_token;
return CR_OK;
} | 0 | [
"CWE-119"
] | libcroco | 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 | 280,940,562,948,531,500,000,000,000,000,000,000,000 | 10 | tknzr: support only max long rgb values
This fixes a possible out of bound when reading rgbs which
are longer than the support MAXLONG |
_gnutls_compression_get_comp_level (gnutls_compression_method_t algorithm)
{
int ret = -1;
/* avoid prefix */
GNUTLS_COMPRESSION_ALG_LOOP (ret = p->comp_level);
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 173,240,681,816,348,040,000,000,000,000,000,000,000 | 7 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
static void cirrus_reset(void *opaque)
{
CirrusVGAState *s = opaque;
vga_common_reset(&s->vga);
unmap_linear_vram(s);
s->vga.sr[0x06] = 0x0f;
if (s->device_id == CIRRUS_ID_CLGD5446) {
/* 4MB 64 bit memory config, always PCI */
s->vga.sr[0x1F] = 0x2d; // MemClock
s->vga.gr[0... | 0 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 319,022,226,800,966,970,000,000,000,000,000,000,000 | 25 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
create_jwt_token_fields_kid(const char *algo, const char *kid, time_t exp, time_t iat,
time_t nbf, ARRAY_TYPE(oauth2_field) *fields)
{
const struct oauth2_field *field;
buffer_t *tokenbuf = t_buffer_create(64);
string_t *hdr = t_str_new(32);
str_printfa(hdr, "{\"alg\":\"%s\",\"typ\":\"JWT\"", algo);
if (kid... | 0 | [
"CWE-22"
] | core | 15682a20d5589ebf5496b31c55ecf9238ff2457b | 318,689,234,371,846,400,000,000,000,000,000,000,000 | 41 | lib-oauth2: Do not escape '.'
This is not really needed and just makes things difficult. |
LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx)
{
return ctx->sessions;
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 249,169,219,356,713,000,000,000,000,000,000,000,000 | 4 | Add Next Protocol Negotiation. |
Silence_log_table_errors::handle_condition(THD *,
uint,
const char*,
MYSQL_ERROR::enum_warning_level,
const char* msg,
... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 141,027,378,679,439,220,000,000,000,000,000,000,000 | 11 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
static int init_dumping(char *database, int init_func(char*))
{
if (mysql_select_db(mysql, database))
{
DB_error(mysql, "when selecting the database");
return 1; /* If --force */
}
if (!path && !opt_xml)
{
if (opt_databases || opt_alldbs)
{
/*
length of table na... | 0 | [] | server | 5a43a31ee81bc181eeb5ef2bf0704befa6e0594d | 2,335,162,723,503,355,000,000,000,000,000,000,000 | 30 | mysqldump: comments and identifiers with new lines
don't let identifiers with new lines to break a comment |
gerbv_gdk_draw_prim1(GdkPixmap *pixmap, GdkGC *gc, double *p,
double scale, gint x, gint y)
{
const int exposure_idx = 0;
const int diameter_idx = 1;
const int x_offset_idx = 2;
const int y_offset_idx = 3;
const gint full_circle = 23360;
GdkGC *local_gc = gdk_gc_new(pixmap);
gint dia... | 1 | [
"CWE-703"
] | gerbv | b2c2f8da851f2ac8079a91ce9d498d87ff96abcf | 245,805,413,935,151,600,000,000,000,000,000,000,000 | 41 | Avoid direct access on array of unknown size
Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array. |
inline void OutputLerp8x8x3(const InterpolationCache<int16>& xs,
const int64 x_start, const int16 ys_ilerp,
const float min, const float max,
const quint8* const ys_input_lower_ptr,
const quint8* const ys_inp... | 0 | [
"CWE-787"
] | tensorflow | f6c40f0c6cbf00d46c7717a26419f2062f2f8694 | 98,834,639,065,931,980,000,000,000,000,000,000,000 | 39 | Validate min and max arguments to `QuantizedResizeBilinear`.
PiperOrigin-RevId: 369765091
Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a |
void taocrypt_test(void* args)
{
((func_args*)args)->return_code = -1; // error state
msg = NEW_TC byte[24];
plain = NEW_TC byte[24];
cipher = NEW_TC byte[24];
memcpy(msg, msgTmp, 24);
int ret = 0;
if ( (ret = sha_test()) )
err_sys("SHA test failed!\n", ret);
else
... | 0 | [] | mysql-server | 5c6169fb309981b564a17bee31b367a18866d674 | 163,075,857,870,865,460,000,000,000,000,000,000,000 | 133 | Bug #24740291: YASSL UPDATE TO 2.4.2 |
void ip_rt_send_redirect(struct sk_buff *skb)
{
struct rtable *rt = skb_rtable(skb);
struct in_device *in_dev;
struct inet_peer *peer;
struct net *net;
int log_martians;
int vif;
rcu_read_lock();
in_dev = __in_dev_get_rcu(rt->dst.dev);
if (!in_dev || !IN_DEV_TX_REDIRECTS(in_dev)) {
rcu_read_unlock();
retu... | 0 | [
"CWE-476"
] | linux | bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205 | 227,288,080,055,497,750,000,000,000,000,000,000,000 | 64 | net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set
Syzkaller hit 'general protection fault in fib_dump_info' bug on
commit 4.13-rc5..
Guilty file: net/ipv4/fib_semantics.c
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked... |
asmlinkage void __sched schedule(void)
{
struct task_struct *tsk = current;
sched_submit_work(tsk);
__schedule();
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 98,173,744,664,948,500,000,000,000,000,000,000,000 | 7 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
static int fuse_create_open(struct inode *dir, struct dentry *entry,
struct file *file, unsigned flags,
umode_t mode)
{
int err;
struct inode *inode;
struct fuse_mount *fm = get_fuse_mount(dir);
FUSE_ARGS(args);
struct fuse_forget_link *forget;
struct fuse_create_in inarg;
struct fuse_open_out outo... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 318,651,719,475,874,950,000,000,000,000,000,000,000 | 97 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
bool sk_mc_loop(struct sock *sk)
{
if (dev_recursion_level())
return false;
if (!sk)
return true;
switch (sk->sk_family) {
case AF_INET:
return inet_sk(sk)->mc_loop;
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
return inet6_sk(sk)->mc_loop;
#endif
}
WARN_ON_ONCE(1);
return true;
} | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 27,639,258,608,333,727,000,000,000,000,000,000,000 | 17 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
StatusOr<DeviceMemory<uint8>> AllocateBytes(int64 byte_size) override {
Tensor temporary_memory;
const DataType tf_data_type = DataTypeToEnum<T>::v();
int64 allocate_count =
Eigen::divup(byte_size, static_cast<int64>(sizeof(T)));
Status allocation_status(context_->allocate_temp(
tf_dat... | 0 | [
"CWE-476",
"CWE-703"
] | tensorflow | 6972f9dfe325636b3db4e0bc517ee22a159365c0 | 187,069,670,003,036,200,000,000,000,000,000,000,000 | 18 | Add missing valuidation to FusedBatchNorm.
PiperOrigin-RevId: 372460336
Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126 |
static int ldb_val_equal_exact_for_qsort(const struct ldb_val *v1,
const struct ldb_val *v2)
{
if (v1->length > v2->length) {
return -1;
}
if (v1->length < v2->length) {
return 1;
}
return memcmp(v1->data, v2->data, v1->length);
} | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 132,082,486,656,471,200,000,000,000,000,000,000,000 | 11 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
read_EncodingInfo(
int count,
char **value)
{
FontData font_data,ret;
char *buf, *bufptr,*scp;
int len, i;
font_data = Xcalloc(count, sizeof(FontDataRec));
if (font_data == NULL)
return NULL;
ret = font_data;
for (i = 0; i < count; i++, font_data++) {
/*
strcpy(buf, ... | 0 | [
"CWE-190"
] | libx11 | acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d | 154,072,533,157,535,190,000,000,000,000,000,000,000 | 43 | Fix an integer overflow in init_om()
CVE-2020-14363
This can lead to a double free later, as reported by Jayden Rivers.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
set_thesaurusfunc_option(void)
{
int retval;
if (*curbuf->b_p_tsrfu != NUL)
{
// buffer-local option set
retval = option_set_callback_func(curbuf->b_p_tsrfu,
&curbuf->b_tsrfu_cb);
}
else
{
// global option set
retval = option_set_callback_func(p_tsrfu, &tsrfu_cb);
}
return r... | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 233,891,023,941,301,150,000,000,000,000,000,000,000 | 18 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
void tcp_twsk_destructor(struct sock *sk)
{
#ifdef CONFIG_TCP_MD5SIG
struct tcp_timewait_sock *twsk = tcp_twsk(sk);
if (twsk->tw_md5_key)
kfree_rcu(twsk->tw_md5_key, rcu);
#endif
} | 0 | [
"CWE-415"
] | linux | 8b485ce69876c65db12ed390e7f9c0d2a64eff2c | 36,139,556,847,115,056,000,000,000,000,000,000,000 | 9 | tcp: do not inherit fastopen_req from parent
Under fuzzer stress, it is possible that a child gets a non NULL
fastopen_req pointer from its parent at accept() time, when/if parent
morphs from listener to active session.
We need to make sure this can not happen, by clearing the field after
socket cloning.
BUG: Double... |
n_start_visual_mode(int c)
{
#ifdef FEAT_CONCEAL
int cursor_line_was_concealed = curwin->w_p_cole > 0
&& conceal_cursor_line(curwin);
#endif
VIsual_mode = c;
VIsual_active = TRUE;
VIsual_reselect = TRUE;
// Corner case: the 0 position in a tab may change when going into
// virtualedit. ... | 0 | [
"CWE-122"
] | vim | a062006b9de0b2947ab5fb376c6e67ef92a8cd69 | 20,740,878,718,650,170,000,000,000,000,000,000,000 | 47 | patch 8.2.3610: crash when ModeChanged triggered too early
Problem: Crash when ModeChanged triggered too early.
Solution: Trigger ModeChanged after setting VIsual. |
int CLASS foveon_apply_curve (short *curve, int i)
{
if (abs(i) >= curve[0]) return 0;
return i < 0 ? -curve[1-i] : curve[1+i];
} | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 31,949,859,447,806,197,000,000,000,000,000,000,000 | 5 | cumulated data checks patch |
static int get_route_and_out_devs(struct mlx5e_priv *priv,
struct net_device *dev,
struct net_device **route_dev,
struct net_device **out_dev)
{
struct net_device *uplink_dev, *uplink_upper, *real_dev;
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
bool dst_is_lag_dev;
real_dev = is_vlan_de... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 37,662,322,001,756,433,000,000,000,000,000,000,000 | 48 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
pixGetBackgroundGrayMapMorph(PIX *pixs,
PIX *pixim,
l_int32 reduction,
l_int32 size,
PIX **ppixm)
{
l_int32 nx, ny, empty, fgpixels;
l_float32 scale;
PIX *pixm, *pix1, *pix2, *pix3,... | 0 | [
"CWE-125"
] | leptonica | 3c18c43b6a3f753f0dfff99610d46ad46b8bfac4 | 93,129,900,114,367,430,000,000,000,000,000,000,000 | 75 | Fixing oss-fuzz issue 22512: Heap-buffer-overflow in rasteropGeneralLow()
* Simplified the hole-filling function
` |
bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq,
struct delayed_work *dwork, unsigned long delay)
{
unsigned long flags;
int ret;
do {
ret = try_to_grab_pending(&dwork->work, true, &flags);
} while (unlikely(ret == -EAGAIN));
if (likely(ret >= 0)) {
__queue_delayed_work(cpu, wq, dwork, dela... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 288,600,064,853,439,230,000,000,000,000,000,000,000 | 18 | 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... |
gnutls_server_name_get (gnutls_session_t session, void *data,
size_t * data_length,
unsigned int *type, unsigned int indx)
{
char *_data = data;
if (session->security_parameters.entity == GNUTLS_CLIENT)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
if (indx + 1 > session->secu... | 0 | [
"CWE-189"
] | gnutls | bc8102405fda11ea00ca3b42acc4f4bce9d6e97b | 208,926,496,845,343,570,000,000,000,000,000,000,000 | 43 | Fix GNUTLS-SA-2008-1 security vulnerabilities.
See http://www.gnu.org/software/gnutls/security.html for updates. |
int addrconf_del_ifaddr(struct net *net, void __user *arg)
{
struct in6_ifreq ireq;
int err;
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
return -EPERM;
if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq)))
return -EFAULT;
rtnl_lock();
err = inet6_addr_del(net, ireq.ifr6_ifindex, 0, &ireq.ifr6_addr,
... | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 20,834,382,836,890,985,000,000,000,000,000,000,000 | 17 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
xmlRelaxNGNewRelaxNG(xmlRelaxNGParserCtxtPtr ctxt)
{
xmlRelaxNGPtr ret;
ret = (xmlRelaxNGPtr) xmlMalloc(sizeof(xmlRelaxNG));
if (ret == NULL) {
xmlRngPErrMemory(ctxt, NULL);
return (NULL);
}
memset(ret, 0, sizeof(xmlRelaxNG));
return (ret);
} | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 322,050,533,387,965,420,000,000,000,000,000,000,000 | 13 | 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 |
get_tabpage_info(tabpage_T *tp, int tp_idx)
{
win_T *wp;
dict_T *dict;
list_T *l;
dict = dict_alloc();
if (dict == NULL)
return NULL;
dict_add_number(dict, "tabnr", tp_idx);
l = list_alloc();
if (l != NULL)
{
for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
wp; wp = wp->... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 4,135,999,177,746,878,000,000,000,000,000,000,000 | 26 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
void Compute(OpKernelContext* context) override {
const Tensor& tensor_in = context->input(0);
std::vector<int32> ksize = ksize_;
std::vector<int32> stride = stride_;
if (context->num_inputs() != 1) {
const Tensor& tensor_ksize = context->input(1);
auto value_ksize = tensor_ksize.flat<in... | 0 | [
"CWE-20"
] | tensorflow | 136b51f10903e044308cf77117c0ed9871350475 | 161,181,426,412,101,770,000,000,000,000,000,000,000 | 57 | Add missing validation to `maxpooling_op.cc`
PiperOrigin-RevId: 387932441
Change-Id: I43a0b24e6a12cc965611144ba035accd384594b9 |
static int fts3PutColNumber(char **pp, int iCol){
int n = 0; /* Number of bytes written */
if( iCol ){
char *p = *pp; /* Output pointer */
n = 1 + sqlite3Fts3PutVarint(&p[1], iCol);
*p = 0x01;
*pp = &p[n];
}
return n;
} | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 331,045,551,874,672,870,000,000,000,000,000,000,000 | 10 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
int ssl3_send_client_key_exchange(SSL *s)
{
unsigned char *p,*d;
int n;
unsigned long alg_k;
#ifndef OPENSSL_NO_RSA
unsigned char *q;
EVP_PKEY *pkey=NULL;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifndef OPENSSL_NO_ECDH
EC_KEY *clnt_ecdh = NULL;
const EC_POINT *srvr_ecpoin... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 281,858,266,235,061,700,000,000,000,000,000,000,000 | 707 | Add SRP support. |
static inline bool rt6_qualify_for_ecmp(struct rt6_info *rt)
{
return (rt->rt6i_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) ==
RTF_GATEWAY;
} | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 267,047,174,120,729,950,000,000,000,000,000,000,000 | 5 | 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... |
inline static int jas_fast32_asl(int_fast32_t x, int n)
{
assert(n >= 0);
// The behavior is undefined when x is negative. */
// We tacitly assume the behavior is equivalent to a signed
// arithmetic left shift.
return x << n;
} | 0 | [
"CWE-119"
] | jasper | 65536647d380571d1a9a6c91fa03775fb5bbd256 | 117,998,762,200,696,890,000,000,000,000,000,000,000 | 8 | A new experimental memory allocator has been introduced. The allocator
is experimental in the sense that its API is not considered stable and
the allocator may change or disappear entirely in future versions of
the code. This new allocator tracks how much memory is being used by
jas_malloc and friends. A maximum upp... |
void Display::slotSessionStarted(bool success) {
qDebug() << "Session started";
} | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 264,646,197,738,943,650,000,000,000,000,000,000,000 | 3 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
static int nr_create(struct net *net, struct socket *sock, int protocol)
{
struct sock *sk;
struct nr_sock *nr;
if (net != &init_net)
return -EAFNOSUPPORT;
if (sock->type != SOCK_SEQPACKET || protocol != 0)
return -ESOCKTNOSUPPORT;
sk = sk_alloc(net, PF_NETROM, GFP_ATOMIC, &nr_proto);
if (sk == NULL)
re... | 0 | [
"CWE-200"
] | linux-2.6 | f6b97b29513950bfbf621a83d85b6f86b39ec8db | 121,572,700,954,175,600,000,000,000,000,000,000,000 | 45 | netrom: Fix nr_getname() leak
nr_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
bool WebContents::SendIPCMessage(bool internal,
const std::string& channel,
v8::Local<v8::Value> args) {
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
blink::CloneableMessage message;
if (!gin::ConvertFromV8(isolate, args, &message)) ... | 0 | [
"CWE-200",
"CWE-668"
] | electron | 07a1c2a3e5845901f7e2eda9506695be58edc73c | 244,095,058,666,586,880,000,000,000,000,000,000,000 | 12 | fix: restrict sendToFrame to same-process frames by default (#26875) |
*/
int skb_splice_bits(struct sk_buff *skb, struct sock *sk, unsigned int offset,
struct pipe_inode_info *pipe, unsigned int tlen,
unsigned int flags)
{
struct partial_page partial[MAX_SKB_FRAGS];
struct page *pages[MAX_SKB_FRAGS];
struct splice_pipe_desc spd = {
.pages = pages,
.partial = partial,
... | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 203,905,135,230,721,960,000,000,000,000,000,000,000 | 23 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
ciphertext_to_compressed (gnutls_session_t session,
gnutls_datum_t *ciphertext,
gnutls_datum_t * compressed,
uint8_t type, record_parameters_st * params,
uint64* sequence)
{
uint8_t tag[MAX_HASH_SIZE];
unsigned... | 1 | [
"CWE-310"
] | gnutls | 328ee22c1b3951e060c7124c7cb1cee592c59bc0 | 155,674,645,102,851,910,000,000,000,000,000,000,000 | 180 | Fixes to avoid a timing attack in TLS CBC record parsing. |
static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, u8 sta_id)
{
/* Ucode must be active and driver must be non active */
if ((priv->stations[sta_id].used &
(IWL_STA_UCODE_ACTIVE | IWL_STA_DRIVER_ACTIVE)) !=
IWL_STA_UCODE_ACTIVE)
IWL_ERR(priv, "removed non active STA %u\n", sta_id);
priv->sta... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2da424b0773cea3db47e1e81db71eeebde8269d4 | 81,568,792,666,614,075,000,000,000,000,000,000,000 | 13 | iwlwifi: Sanity check for sta_id
On my testing, I saw some strange behavior
[ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00
[ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode
not sure how it happen, but ... |
int ssl_print_sigalgs(BIO *out, SSL *s)
{
int mdnid;
if (!SSL_is_server(s))
ssl_print_client_cert_types(out, s);
do_print_sigalgs(out, s, 0);
do_print_sigalgs(out, s, 1);
if (SSL_get_peer_signature_nid(s, &mdnid))
BIO_printf(out, "Peer signing digest: %s\n", OBJ_nid2sn(mdnid));
return 1;
} | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 267,528,648,439,637,420,000,000,000,000,000,000,000 | 11 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
FLAC_API uint32_t FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
FLAC__ASSERT(0 != encoder->protected_);
return encoder->protected_->bits_per_sample;
} | 0 | [
"CWE-787"
] | flac | e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be | 245,883,509,578,184,700,000,000,000,000,000,000,000 | 7 | libFlac: Exit at EOS in verify mode
When verify mode is enabled, once decoder flags end of stream,
encode processing is considered complete.
CVE-2021-0561
Signed-off-by: Ralph Giles <giles@thaumas.net> |
SCTP_STATIC int sctp_setsockopt_bindx(struct sock* sk,
struct sockaddr __user *addrs,
int addrs_size, int op)
{
struct sockaddr *kaddrs;
int err;
int addrcnt = 0;
int walk_size = 0;
struct sockaddr *sa_addr;
void *addr_buf;
struct sctp_af *af;
SCTP_DEBUG_PRINTK("sctp_setsocktopt_bindx: sk %... | 0 | [
"CWE-476"
] | linux | ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d | 288,917,690,228,971,700,000,000,000,000,000,000,000 | 76 | [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
In current implementation, LKSCTP does receive buffer accounting for
data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do
accounting for data in frag_list when data is fragmented. In addition,
LKSCTP doesn't do accounting for data in ... |
void setFilenumLimit(unsigned int lim)
{
struct rlimit rlim;
if(getrlimit(RLIMIT_NOFILE, &rlim) < 0)
unixDie("Requesting number of available file descriptors");
rlim.rlim_cur=lim;
if(setrlimit(RLIMIT_NOFILE, &rlim) < 0)
unixDie("Setting number of available file descriptors");
} | 0 | [
"CWE-399"
] | pdns | 881b5b03a590198d03008e4200dd00cc537712f3 | 26,974,854,896,943,494,000,000,000,000,000,000,000 | 10 | Reject qname's wirelength > 255, `chopOff()` handle dot inside labels |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.