func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
keyval_add_size(struct keyval *kv, const char *name, const char *value, size_t size)
{
struct onekeyval *okv;
const char *val;
if (!kv)
return -1;
/* Check for duplicate key names */
val = keyval_get(kv, name);
if (val)
{
/* Same value, fine */
if (strcmp(val, value) == 0)
retu... | 0 | [
"CWE-416"
] | owntone-server | 246d8ae0cef27377e5dfe9ee3ad87e864d6b6266 | 309,975,556,062,184,800,000,000,000,000,000,000,000 | 61 | [misc] Fix use-after-free in net_bind()
Thanks to Ba Jinsheng for reporting this bug |
R_API RList *r_bin_java_get_field_definitions(RBinJavaObj *bin) {
RBinJavaField *fm_type = NULL;
RList *the_list = r_list_new ();
if (!the_list) {
return NULL;
}
RListIter *iter = NULL;
if (!bin) {
return the_list;
}
r_list_foreach (bin->fields_list, iter, fm_type) {
char *field_def = r_bin_java_get_field... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 174,922,535,627,328,400,000,000,000,000,000,000,000 | 17 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
void CLASS kodak_65000_load_raw()
{
short buf[256];
int row, col, len, pred[2], ret, i;
for (row=0; row < height; row++)
for (col=0; col < width; col+=256) {
pred[0] = pred[1] = 0;
len = MIN (256, width-col);
ret = kodak_65000_decode (buf, len);
for (i=0; i < len; i++)
#ifndef LIBRAW_... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 261,280,825,101,034,900,000,000,000,000,000,000,000 | 24 | additional data checks backported from 0.15.4 |
R_API RBinJavaField *r_bin_java_read_next_method(RBinJavaObj *bin, const ut64 offset, const ut8 *buf, const ut64 len) {
ut32 i, idx;
const ut8 *f_buf = buf + offset;
ut64 adv = 0;
RBinJavaCPTypeObj *item = NULL;
if (!bin || offset + 8 >= len) {
return NULL;
}
RBinJavaField *method = (RBinJavaField *) R_NEW0 (R... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 262,505,016,039,358,330,000,000,000,000,000,000,000 | 96 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
static pyc_object *get_ref_object(RBuffer *buffer) {
bool error = false;
pyc_object *ret;
pyc_object *obj;
ut32 index;
index = get_ut32 (buffer, &error);
if (error) {
return NULL;
}
if (index >= r_list_length (refs)) {
return NULL;
}
obj = r_list_get_n (refs, index);
if (!obj) {
return NULL;
}
ret =... | 0 | [
"CWE-415"
] | radare2 | 049de62730f4954ef9a642f2eeebbca30a8eccdc | 217,227,320,859,623,330,000,000,000,000,000,000,000 | 20 | Fix #18679 - UAF when parsing corrupted pyc files ##bin |
int secure_check(void *data)
{
const at91_secure_header_t *header;
void *file;
if (secure_decrypt(data, sizeof(*header), 0))
return -1;
header = (const at91_secure_header_t *)data;
if (header->magic != AT91_SECURE_MAGIC)
return -1;
file = (unsigned char *)data + sizeof(*header);
return secure_decrypt(file... | 1 | [
"CWE-212",
"CWE-326",
"CWE-61"
] | at91bootstrap | 45419497309ffbf27c17ea7938499aca99168927 | 295,348,482,287,070,400,000,000,000,000,000,000,000 | 15 | driver: secure: move keys into static arrays
Move the keys into static arrays. This will avoid copying the keys
from the code section to the stack on the previous init_keys implementation.
Like this, the keys are hardcoded into data section at compile time,
and can be completely wiped after use.
Signed-off-by: Eugen ... |
add_entry (GtkWidget *grid1,
GtkWidget *grid2,
const gchar *text,
GtkWidget **out_entry)
{
GtkStyleContext *context;
GtkWidget *label;
GtkWidget *entry;
label = gtk_label_new_with_mnemonic (text);
context = gtk_widget_get_style_context (label);
gtk_style_contex... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 323,774,997,869,299,970,000,000,000,000,000,000,000 | 27 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
fn_recipients(void)
{
if (!enable_dollar_recipients) return NULL; else
{
int size = 128;
int ptr = 0;
int i;
uschar * s = store_get(size);
for (i = 0; i < recipients_count; i++)
{
if (i != 0) s = string_cat(s, &size, &ptr, US", ", 2);
s = string_cat(s, &size, &ptr, recipients_list[i].address,
... | 0 | [
"CWE-189"
] | exim | 7685ce68148a083d7759e78d01aa5198fc099c44 | 65,966,362,459,028,510,000,000,000,000,000,000,000 | 18 | Only expand integers for integer math once |
static int sm2_crypt_test(void)
{
int testresult = 0;
EC_GROUP *test_group =
create_EC_group
("8542D69E4C044F18E8B92435BF6FF7DE457283915C45517D722EDB8B08F1DFC3",
"787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E498",
"63E4C6D3B23B0C849CF84241484BFE48F61D59A5B16BA06... | 0 | [
"CWE-120"
] | openssl | 59f5e75f3bced8fc0e130d72a3f582cf7b480b46 | 194,802,208,973,061,070,000,000,000,000,000,000,000 | 51 | Correctly calculate the length of SM2 plaintext given the ciphertext
Previously the length of the SM2 plaintext could be incorrectly calculated.
The plaintext length was calculated by taking the ciphertext length and
taking off an "overhead" value.
The overhead value was assumed to have a "fixed" element of 10 bytes.... |
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
unsigned long long num;
char *str, *end;
struct printf_spec spec = {0};
/* Reject out-of-range values early. Large positive sizes are
used for unknown buffer sizes. */
if (WARN_ON_ONCE(size > INT_MAX))
return 0;
str = buf;
end = buf ... | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 153,296,862,579,256,170,000,000,000,000,000,000,000 | 152 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
static void guest_file_init(void)
{
QTAILQ_INIT(&guest_file_state.filehandles);
} | 0 | [
"CWE-264"
] | qemu | c689b4f1bac352dcfd6ecb9a1d45337de0f1de67 | 110,334,276,486,239,760,000,000,000,000,000,000,000 | 4 | qga: set umask 0077 when daemonizing (CVE-2013-2007)
The qemu guest agent creates a bunch of files with insecure permissions
when started in daemon mode. For example:
-rw-rw-rw- 1 root root /var/log/qemu-ga.log
-rw-rw-rw- 1 root root /var/run/qga.state
-rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log
In a... |
MonoReflectionModule *
mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *ab, MonoString *fileName)
{
g_assert_not_reached ();
return NULL; | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 19,313,588,219,116,000,000,000,000,000,000,000,000 | 5 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static void perf_event_init_userpage(struct perf_event *event)
{
struct perf_event_mmap_page *userpg;
struct perf_buffer *rb;
rcu_read_lock();
rb = rcu_dereference(event->rb);
if (!rb)
goto unlock;
userpg = rb->user_page;
/* Allow new userspace to detect that bit 0 is deprecated */
userpg->cap_bit0_is_depr... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 187,136,271,125,905,040,000,000,000,000,000,000,000 | 21 | 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 bool avrcp_event_registered(struct avrcp *session, uint8_t event)
{
return session->registered_events & (1 << event);
} | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 268,854,850,825,758,640,000,000,000,000,000,000,000 | 4 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
void lxc_delete_tty(struct lxc_tty_info *tty_info)
{
int i;
for (i = 0; i < tty_info->nbtty; i++) {
struct lxc_pty_info *pty_info = &tty_info->pty_info[i];
close(pty_info->master);
close(pty_info->slave);
}
free(tty_info->pty_info);
tty_info->nbtty = 0;
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 208,051,021,204,963,570,000,000,000,000,000,000,000 | 14 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static int ldb_wildcard_compare(struct ldb_context *ldb,
const struct ldb_parse_tree *tree,
const struct ldb_val value, bool *matched)
{
const struct ldb_schema_attribute *a;
struct ldb_val val;
struct ldb_val cnk;
struct ldb_val *chunk;
uint8_t *save_p = NULL;
unsigned int c = 0;
a = ldb_schema_attribu... | 1 | [
"CWE-125"
] | samba | 9427806f7298d71bd7edfbdda7506ec63f15dda1 | 120,187,007,971,663,750,000,000,000,000,000,000,000 | 124 | CVE-2019-3824 ldb: Improve code style and layout in wildcard processing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> |
void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb)
{
struct llc_addr laddr;
llc_pdu_decode_da(skb, laddr.mac);
llc_pdu_decode_dsap(skb, &laddr.lsap);
if (is_multicast_ether_addr(laddr.mac)) {
llc_sap_mcast(sap, &laddr, skb);
kfree_skb(skb);
} else {
struct sock *sk = llc_lookup_dgram(sap, &ladd... | 0 | [
"CWE-20",
"CWE-401"
] | linux | 8b74d439e1697110c5e5c600643e823eb1dd0762 | 285,287,519,630,567,370,000,000,000,000,000,000,000 | 19 | net/llc: avoid BUG_ON() in skb_orphan()
It seems nobody used LLC since linux-3.12.
Fortunately fuzzers like syzkaller still know how to run this code,
otherwise it would be no fun.
Setting skb->sk without skb->destructor leads to all kinds of
bugs, we now prefer to be very strict about it.
Ideally here we would use... |
static void fn_enter(struct vc_data *vc)
{
if (diacr) {
if (kbd->kbdmode == VC_UNICODE)
to_utf8(vc, diacr);
else {
int c = conv_uni_to_8bit(diacr);
if (c != -1)
put_queue(vc, c);
}
diacr = 0;
}
put_queue(vc, 13);
if (vc_kbd_mode(kbd, VC_CRLF))
put_queue(vc, 10);
} | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 20,258,523,297,523,945,000,000,000,000,000,000,000 | 17 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
TEST_F(RouterTest, UpstreamPerTryTimeoutDelayedPoolReady) {
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
Http::ConnectionPool::Callbacks* pool_callbacks;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Htt... | 0 | [
"CWE-703"
] | envoy | f0bb2219112d8cdb4c4e8b346834f962925362ca | 259,515,851,412,811,770,000,000,000,000,000,000,000 | 54 | [1.20] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
void qdisc_class_hash_grow(struct Qdisc *sch, struct Qdisc_class_hash *clhash)
{
struct Qdisc_class_common *cl;
struct hlist_node *next;
struct hlist_head *nhash, *ohash;
unsigned int nsize, nmask, osize;
unsigned int i, h;
/* Rehash when load factor exceeds 0.75 */
if (clhash->hashelems * 4 <= clhash->hashsize... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 323,465,840,190,850,080,000,000,000,000,000,000,000 | 34 | 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.
... |
static inline Quantum GetPixelRed(const Image *magick_restrict image,
const Quantum *magick_restrict pixel)
{
return(pixel[image->channel_map[RedPixelChannel].offset]);
} | 0 | [
"CWE-20",
"CWE-125"
] | ImageMagick | 8187d2d8fd010d2d6b1a3a8edd935beec404dddc | 122,235,501,479,233,830,000,000,000,000,000,000,000 | 5 | https://github.com/ImageMagick/ImageMagick/issues/1610 |
static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
{
MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv;
MYSQL *mysql= mpvio->mysql;
ulong pkt_len;
/* there are cached data left, feed it to a plugin */
if (mpvio->cached_server_reply.pkt)
{
*buf= mpvio->cached_server_reply.pkt;
mpvio->cac... | 0 | [] | server | 1d58d184c2c4ddd8a3b2be6f86d76c4e57bbe14f | 153,758,778,378,560,300,000,000,000,000,000,000,000 | 51 | protocol: verify that number of rows is correct |
const char *format, ...) _PRINTF_ATTRIBUTE(5,6)
{
va_list ap;
int count;
struct ldb_message **res;
const char *attrs[2] = { NULL, NULL };
struct dom_sid *sid;
attrs[0] = attr_name;
va_start(ap, format);
count = gendb_search_v(sam_ldb, mem_ctx, basedn, &res, attrs, format, ap);
va_end(ap);
if (count... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 129,464,777,849,447,430,000,000,000,000,000,000,000 | 25 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
ex_cd(exarg_T *eap)
{
char_u *new_dir;
new_dir = eap->arg;
#if !defined(UNIX) && !defined(VMS)
// for non-UNIX ":cd" means: print current directory unless 'cdhome' is set
if (*new_dir == NUL && !p_cdh)
ex_pwd(NULL);
else
#endif
{
cdscope_T scope = CDSCOPE_GLOBAL;
if (eap->cmdidx == CMD_lcd ... | 0 | [
"CWE-125"
] | vim | d3a117814d6acbf0dca3eff1a7626843b9b3734a | 224,976,113,734,276,440,000,000,000,000,000,000,000 | 27 | patch 8.2.4009: reading one byte beyond the end of the line
Problem: Reading one byte beyond the end of the line.
Solution: Check for NUL byte first. |
dwg_errstrings (int error)
{
if (error & 1)
HANDLER (OUTPUT, "WRONGCRC ");
if (error & 2)
HANDLER (OUTPUT, "NOTYETSUPPORTED ");
if (error & 4)
HANDLER (OUTPUT, "UNHANDLEDCLASS ");
if (error & 8)
HANDLER (OUTPUT, "INVALIDTYPE ");
if (error & 16)
HANDLER (OUTPUT, "INVALIDHANDLE ");
if (err... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 316,366,908,311,989,400,000,000,000,000,000,000,000 | 35 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
{
#undef DEBUG_READ_EXACT
#ifdef DEBUG_READ_EXACT
char* oout=out;
int nn=n;
rfbClientLog("ReadFromRFBServer %d bytes\n",n);
#endif
/* Handle attempts to write to NULL out buffer that might occur
when an outside malloc() fails. For instance, memc... | 0 | [
"CWE-120",
"CWE-787"
] | libvncserver | 3fd03977c9b35800d73a865f167338cb4d05b0c1 | 308,635,447,552,154,700,000,000,000,000,000,000,000 | 166 | libvncclient: bail out if unix socket name would overflow
Closes #291 |
static void do_utfpeakcharback(compiler_common *common)
{
/* Peak a character back. Does not modify STR_PTR. */
DEFINE_COMPILER;
struct sljit_jump *jump[2];
sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
... | 0 | [
"CWE-125"
] | pcre2 | 50a51cb7e67268e6ad417eb07c9de9bfea5cc55a | 214,762,221,130,506,000,000,000,000,000,000,000,000 | 36 | Fixed a unicode properrty matching issue in JIT |
napi_status napi_define_properties(napi_env env,
napi_value object,
size_t property_count,
const napi_property_descriptor* properties) {
NAPI_PREAMBLE(env);
if (property_count > 0) {
CHECK_ARG(env, propertie... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 108,238,339,704,276,170,000,000,000,000,000,000,000 | 110 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
static OPJ_BOOL opj_jp2_read_header_procedure(opj_jp2_t *jp2,
opj_stream_private_t *stream,
opj_event_mgr_t * p_manager
)
{
opj_jp2_box_t box;
OPJ_UINT32 l_nb_bytes_read;
const opj_jp2_header_handler_t * l_current_handler;
const opj_jp2_header... | 0 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 307,920,803,316,251,300,000,000,000,000,000,000,000 | 154 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
static void put_object_name(struct fsck_options *options, struct object *obj,
const char *fmt, ...)
{
va_list ap;
struct strbuf buf = STRBUF_INIT;
char *existing;
if (!options->object_names)
return;
existing = lookup_decoration(options->object_names, obj);
if (existing)
return;
va_start(ap, fmt);
strbuf_v... | 0 | [
"CWE-20",
"CWE-88",
"CWE-522"
] | git | a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46 | 314,916,962,289,527,300,000,000,000,000,000,000,000 | 17 | fsck: detect submodule urls starting with dash
Urls with leading dashes can cause mischief on older
versions of Git. We should detect them so that they can be
rejected by receive.fsckObjects, preventing modern versions
of git from being a vector by which attacks can spread.
Signed-off-by: Jeff King <peff@peff.net>
Si... |
static gint conv_sjistodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
{
return conv_sjistoutf8(outbuf, outlen, inbuf);
} | 0 | [
"CWE-119"
] | claws | d390fa07f5548f3173dd9cc13b233db5ce934c82 | 302,942,294,488,643,670,000,000,000,000,000,000,000 | 4 | Make sure we don't run out of the output buffer. Maybe fixes bug #3557 |
boost::intrusive_ptr<Expression> ExpressionSwitch::optimize() {
if (_default) {
_default = _default->optimize();
}
for (auto&& [switchCase, switchThen] : _branches) {
switchCase = switchCase->optimize();
switchThen = switchThen->optimize();
}
return this;
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 290,672,686,247,163,300,000,000,000,000,000,000,000 | 12 | SERVER-49404 Enforce additional checks in $arrayToObject |
dns_zone_setnotifysrc6dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->notifysrc6dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 115,335,825,359,232,150,000,000,000,000,000,000,000 | 9 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
parseuid(const char *s, uid_t *uid)
{
struct passwd *pw;
const char *errstr;
if ((pw = getpwnam(s)) != NULL) {
*uid = pw->pw_uid;
return 0;
}
#if !defined(__linux__) && !defined(__NetBSD__)
*uid = strtonum(s, 0, UID_MAX, &errstr);
#else
sscanf(s, "%d", uid);
#endif
if (errstr)
return -1;
return 0;
} | 1 | [
"CWE-1187",
"CWE-908"
] | doas | 2f83222829448e5bc4c9391d607ec265a1e06531 | 261,934,497,031,167,280,000,000,000,000,000,000,000 | 18 | Added optimization to Makefile (can be set/overruled using OPT).
Added flag to display all warnings during compiling.
Added status checks when parsing user/group IDs for Linux.
Make sure Linux drops original user's groups when running as another user. |
TileBuffer::TileBuffer (Compressor *comp):
uncompressedData (0),
buffer (0),
dataSize (0),
compressor (comp),
format (defaultFormat (compressor)),
dx (-1),
dy (-1),
lx (-1),
ly (-1),
hasException (false),
exception (),
_sem (1)
{
// empty
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 44,113,686,889,999,880,000,000,000,000,000,000,000 | 16 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
dirserv_router_get_status(const routerinfo_t *router, const char **msg)
{
char d[DIGEST_LEN];
if (crypto_pk_get_digest(router->identity_pkey, d)) {
log_warn(LD_BUG,"Error computing fingerprint");
if (msg)
*msg = "Bug: Error computing fingerprint";
return FP_REJECT;
}
return dirserv_get_statu... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 206,366,595,742,680,100,000,000,000,000,000,000,000 | 17 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
tiff_load_close (thandle_t context)
{
return 0;
} | 0 | [] | gdk-pixbuf | 31a6cff3dfc6944aad4612a9668b8ad39122e48b | 234,557,987,814,977,000,000,000,000,000,000,000,000 | 4 | tiff: Check for integer overflows in multiplication
The checks currently in use are not sufficient, because they depend on
undefined behaviour:
rowstride = width * 4;
if (rowstride / 4 != width) { /* overflow */
If the multiplication has already overflowed, the compiler may decide
to optimize the if out and ... |
mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
{
struct mlx5_rxq_data *rxq = dpdk_rxq;
const unsigned int wqe_cnt = (1 << rxq->elts_n) - 1;
const unsigned int cqe_cnt = (1 << rxq->cqe_n) - 1;
const unsigned int sges_n = rxq->sges_n;
struct rte_mbuf *pkt = NULL;
struct rte_mbuf *seg = NULL;... | 0 | [] | dpdk | 60b254e3923d007bcadbb8d410f95ad89a2f13fa | 62,566,664,834,465,130,000,000,000,000,000,000,000 | 124 | net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).
In MPRQ case, also the local cons... |
static void __http_protocol_init(void)
{
acl_register_keywords(&acl_kws);
pattern_register_fetches(&pattern_fetch_keywords);
} | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 79,850,814,230,232,530,000,000,000,000,000,000,000 | 5 | 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... |
int unit_kill_context(
Unit *u,
KillContext *c,
KillOperation k,
pid_t main_pid,
pid_t control_pid,
bool main_pid_alien) {
bool wait_for_exit = false, send_sighup;
cg_kill_log_func_t log_func = NULL;
... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 272,361,494,442,451,560,000,000,000,000,000,000,000 | 117 | 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... |
inline const char* basename(const char *const s, const char separator=cimg_file_separator) {
const char *p = 0, *np = s;
while (np>=s && (p=np)) np = std::strchr(np,separator) + 1;
return p;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 274,211,144,793,911,100,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
bool pb_decode_bool(pb_istream_t *stream, bool *dest)
{
return pb_dec_bool(stream, NULL, (void*)dest);
} | 0 | [
"CWE-20",
"CWE-119"
] | nanopb | 4fe23595732b6f1254cfc11a9b8d6da900b55b0c | 15,977,175,560,772,803,000,000,000,000,000,000,000 | 4 | Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)
Nanopb would leak memory when all of the following conditions were true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definitions contains an oneof field,
the oneof contains a static submessage, and
the static submessage contains a pointer fiel... |
static inline uint8_t flow_is_proto(struct ndpi_flow_struct *flow, u_int16_t p) {
return((flow->detected_protocol_stack[0] == p) || (flow->detected_protocol_stack[1] == p));
} | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 164,541,134,602,893,200,000,000,000,000,000,000,000 | 3 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
ms_escher_read_DeletedPspl (MSEscherState *state, MSEscherHeader *h)
{
return FALSE;
} | 0 | [
"CWE-119"
] | gnumeric | b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc | 243,696,531,258,621,200,000,000,000,000,000,000,000 | 4 | xls: fuzzed file crash. |
static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
__be16 loc_port, __be32 loc_addr,
__be16 rmt_port, __be32 rmt_addr,
int dif, unsigned short hnum)
{
struct inet_sock *inet = inet_sk(sk);
if (!net_eq(sock_net(sk), net) ||
udp_sk(sk)->udp_port_hash != hnum ... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 244,605,480,224,073,170,000,000,000,000,000,000,000 | 19 | 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... |
static inline int security_xfrm_state_delete(struct xfrm_state *x)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 58,958,434,696,068,570,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
void kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu)
{
bool activate;
if (!lapic_in_kernel(vcpu))
return;
down_read(&vcpu->kvm->arch.apicv_update_lock);
activate = kvm_vcpu_apicv_activated(vcpu);
if (vcpu->arch.apicv_active == activate)
goto out;
vcpu->arch.apicv_active = activate;
kvm_apic_update_apicv(vc... | 0 | [
"CWE-476"
] | linux | fee060cd52d69c114b62d1a2948ea9648b5131f9 | 197,029,221,180,289,880,000,000,000,000,000,000,000 | 30 | KVM: x86: avoid calling x86 emulator without a decoded instruction
Whenever x86_decode_emulated_instruction() detects a breakpoint, it
returns the value that kvm_vcpu_check_breakpoint() writes into its
pass-by-reference second argument. Unfortunately this is completely
bogus because the expected outcome of x86_decode... |
longlong val_datetime_packed(THD *thd)
{
return update_null() ? 0 : cached_time.valid_datetime_to_packed();
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 50,652,588,590,314,280,000,000,000,000,000,000,000 | 4 | 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 ... |
int hugetlb_reserve_pages(struct inode *inode,
long from, long to,
struct vm_area_struct *vma,
vm_flags_t vm_flags)
{
long ret, chg;
struct hstate *h = hstate_inode(inode);
struct hugepage_subpool *spool = subpool_inode(inode);
/*
* Only apply hugepage reservation if asked. At fault time, an
* a... | 0 | [
"CWE-399"
] | linux | c50ac050811d6485616a193eb0f37bfbd191cc89 | 138,190,408,318,209,500,000,000,000,000,000,000,000 | 75 | hugetlb: fix resv_map leak in error path
When called for anonymous (non-shared) mappings, hugetlb_reserve_pages()
does a resv_map_alloc(). It depends on code in hugetlbfs's
vm_ops->close() to release that allocation.
However, in the mmap() failure path, we do a plain unmap_region() without
the remove_vma() which act... |
fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
UChar** rname_end, ScanEnv* env, int* rback_num,
enum REF_NUM* num_type, int ref)
{
int r, sign;
int digit_count;
OnigCodePoint end_code;
OnigCodePoint c = 0;
OnigEncoding enc = env->enc;
UChar *name_end;
UChar *pnum_head;... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 97,633,865,834,510,750,000,000,000,000,000,000,000 | 131 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
xsltUninit (void) {
initialized = 0;
} | 0 | [] | libxslt | 7089a62b8f133b42a2981cf1f920a8b3fe9a8caa | 186,430,582,903,636,670,000,000,000,000,000,000,000 | 3 | Crash compiling stylesheet with DTD
* libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation
process could get seriously wrong |
normal_cmd(
oparg_T *oap,
int toplevel UNUSED) // TRUE when called from main()
{
cmdarg_T ca; // command arguments
int c;
int ctrl_w = FALSE; // got CTRL-W command
int old_col = curwin->w_curswant;
int need_flushbuf = FALSE; // need to call out_flush()
pos_T old_pos; // cursor p... | 1 | [
"CWE-787"
] | vim | 338f1fc0ee3ca929387448fe464579d6113fa76a | 83,253,993,706,076,220,000,000,000,000,000,000,000 | 393 | patch 8.2.5023: substitute overwrites allocated buffer
Problem: Substitute overwrites allocated buffer.
Solution: Disallow undo when in a substitute command. |
/* }}} */
static void php_date_isodate_set(zval *object, long y, long w, long d, zval *return_value TSRMLS_DC)
{
php_date_obj *dateobj;
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
dateobj->time->y = y;
dateobj->time->m = 1;
dateobj-... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 131,688,559,631,259,530,000,000,000,000,000,000,000 | 15 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
void CLASS parse_fuji (int offset)
{
unsigned entries, tag, len, save, c;
fseek (ifp, offset, SEEK_SET);
entries = get4();
if (entries > 255) return;
while (entries--) {
tag = get2();
len = get2();
save = ftell(ifp);
if (tag == 0x100) {
raw_height = get2();
raw_width = get2();
... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 124,789,940,388,163,880,000,000,000,000,000,000,000 | 35 | Avoid overflow in ljpeg_start(). |
void test_re()
{
assert_true_rule(
"rule test { strings: $a = /ssi/ condition: $a }",
"mississippi\tmississippi.mississippi\nmississippi");
assert_true_rule(
"rule test { strings: $a = /ssi(s|p)/ condition: $a }",
"mississippi\tmississippi.mississippi\nmississippi");
assert_true_rule(
... | 1 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 26,471,244,593,831,720,000,000,000,000,000,000,000 | 331 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
void ZipTest::testDecompressVuln()
{
std::string testFile = getTestFile("data", "vuln.zip");
std::ifstream inp(testFile.c_str(), std::ios::binary);
assert(inp.good());
Decompress dec(inp, Poco::Path::temp());
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(... | 0 | [
"CWE-22"
] | poco | bb7e5feece68ccfd8660caee93da25c5c39a4707 | 202,489,542,773,909,700,000,000,000,000,000,000,000 | 12 | merge zip entry absolute path vulnerability fix (#1968) from develop |
Status AuthorizationManager::checkAuthForGetMore(const std::string& ns) {
return checkAuthForQuery(ns);
} | 0 | [
"CWE-264"
] | mongo | 23344f8b7506df694f66999693ee3c00dfd6afae | 287,780,379,426,378,250,000,000,000,000,000,000,000 | 3 | SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user.
Uncorrected, this can cause replica set heartbeats to stall behind operations
that hold the read lock for a long time. |
SPL_METHOD(SplFileObject, fputcsv)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
char delimiter = intern->u.file.delimiter, enclosure = intern->u.file.enclosure, escape = intern->u.file.escape;
char *delim = NULL, *enclo = NULL, *esc = NULL;
int d_len =... | 1 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 111,618,564,870,602,480,000,000,000,000,000,000,000 | 40 | Fix bug #72262 - do not overflow int |
DEFUN (bgp_bestpath_aspath_confed,
bgp_bestpath_aspath_confed_cmd,
"bgp bestpath as-path confed",
"BGP specific commands\n"
"Change the default bestpath selection\n"
"AS-path attribute\n"
"Compare path lengths including confederation sets & sequences in selecting a route\n")
{
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 118,268,351,959,158,610,000,000,000,000,000,000,000 | 14 | [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... |
zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry,
struct zip *zip)
{
const char *p;
const void *h;
const wchar_t *wp;
const char *cp;
size_t len, filename_length, extra_length;
struct archive_string_conv *sconv;
struct zip_entry *zip_entry = zip->entry;
struct zip_entry zip_ent... | 0 | [
"CWE-399",
"CWE-401"
] | libarchive | ba641f73f3d758d9032b3f0e5597a9c6e593a505 | 133,273,798,383,710,330,000,000,000,000,000,000,000 | 330 | Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165 |
translate_ring_addresses(struct virtio_net *dev, int vq_index)
{
struct vhost_virtqueue *vq = dev->virtqueue[vq_index];
struct vhost_vring_addr *addr = &vq->ring_addrs;
uint64_t len, expected_len;
if (addr->flags & (1 << VHOST_VRING_F_LOG)) {
vq->log_guest_addr =
log_addr_to_gpa(dev, vq);
if (vq->log_guest_... | 0 | [
"CWE-190"
] | dpdk | 3ae4beb079ce242240c34376a066bbccd0c0b23e | 301,877,330,120,425,850,000,000,000,000,000,000,000 | 129 | vhost: check log mmap offset and size overflow
vhost_user_set_log_base() is a message handler that is
called to handle the VHOST_USER_SET_LOG_BASE message.
Its payload contains a 64 bit size and offset. Both are
added up and used as a size when calling mmap().
There is no integer overflow check. If an integer overflo... |
MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image,
const PixelInterpolateMethod method,ExceptionInfo *exception)
{
#define ClutImageTag "Clut/Image"
CacheView
*clut_view,
*image_view;
MagickBooleanType
status;
MagickOffsetType
progress;
PixelInfo
*clut_map;... | 0 | [
"CWE-125"
] | ImageMagick | 76401e172ea3a55182be2b8e2aca4d07270f6da6 | 177,138,216,963,523,670,000,000,000,000,000,000,000 | 135 | Evaluate lazy pixel cache morphology to prevent buffer overflow (bug report from Ibrahim M. El-Sayed) |
ofputil_decode_flow_stats_reply(struct ofputil_flow_stats *fs,
struct ofpbuf *msg,
bool flow_age_extension,
struct ofpbuf *ofpacts)
{
const struct ofp_header *oh;
size_t instructions_len;
enum ofperr error;
e... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 75,554,393,545,931,920,000,000,000,000,000,000,000 | 163 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
append_va (GString *string,
va_list va)
{
const gchar *name;
const gchar *value;
guint seen = 0;
for (;;)
{
name = va_arg (va, const gchar *);
if (!name)
break;
value = va_arg (va, const gchar *);
seen |= append_header (string, name, value);
}
return seen;
... | 0 | [
"CWE-1021"
] | cockpit | 8d9bc10d8128aae03dfde62fd00075fe492ead10 | 317,763,324,408,007,950,000,000,000,000,000,000,000 | 18 | common: Restrict frame embedding to same origin
Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can
only be embedded into pages coming from the same origin. This is similar
to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`,
`<img>`, etc.).
The main use case for embedding is to run ... |
TEST_F(ConnectionHandlerTest, ContinueOnListenerFilterTimeout) {
InSequence s;
TestListener* test_listener =
addListener(1, true, false, "test_listener", Network::Address::SocketType::Stream,
std::chrono::milliseconds(15000), true);
Network::MockListener* listener = new Network::MockListe... | 0 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 170,467,529,700,196,450,000,000,000,000,000,000,000 | 50 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
void conn_worker_readd(conn *c) {
c->ev_flags = EV_READ | EV_PERSIST;
event_set(&c->event, c->sfd, c->ev_flags, event_handler, (void *)c);
event_base_set(c->thread->base, &c->event);
// TODO: call conn_cleanup/fail/etc
if (event_add(&c->event, 0) == -1) {
perror("event_add");
}
// ... | 0 | [] | memcached | f249724cedcab6605ca8a0769ac4b356a8124f63 | 59,578,915,899,145,580,000,000,000,000,000,000,000 | 26 | crash fix: errstr wasn't initialized in metaget
if meta_flag_preparse bailed out early it would try to read
uninitialized memory. |
static void set_stdout(struct rzip_control *control)
{
control->flags |= FLAG_STDOUT;
control->outFILE = stdout;
control->msgout = stderr;
register_outputfile(control, control->msgout);
} | 0 | [
"CWE-703",
"CWE-787"
] | lrzip | 5faf80cd53ecfd16b636d653483144cd12004f46 | 273,270,347,988,273,200,000,000,000,000,000,000,000 | 7 | Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello. |
static inline void change_attr_size(struct MFT_REC *rec, struct ATTRIB *attr,
u32 nsize)
{
u32 asize = le32_to_cpu(attr->size);
int dsize = nsize - asize;
u8 *next = Add2Ptr(attr, asize);
u32 used = le32_to_cpu(rec->used);
memmove(Add2Ptr(attr, nsize), next, used - PtrOffset(rec, next));
rec->used = cpu... | 0 | [
"CWE-416"
] | linux | f26967b9f7a830e228bb13fb41bd516ddd9d789d | 248,517,418,196,062,550,000,000,000,000,000,000,000 | 13 | fs/ntfs3: Fix invalid free in log_replay
log_read_rst() returns ENOMEM error when there is not enough memory.
In this case, if info is returned without initialization,
it attempts to kfree the uninitialized info->r_page pointer. This patch
moves the memset initialization code to before log_read_rst() is called.
Repor... |
construct_filtered_key(const char *repos_name,
const char *user,
const svn_membuf_t *authz_id,
apr_pool_t *result_pool)
{
svn_membuf_t *result = apr_pcalloc(result_pool, sizeof(*result));
size_t repos_len = strlen(repos_name);
size_t user_len = ... | 0 | [
"CWE-703"
] | subversion | e1b615840932fb46aefe1cd90d2115720af4600e | 49,814,366,893,201,130,000,000,000,000,000,000,000 | 22 | Fix issue #4880 "Use-after-free of object-pools when used as httpd module"
Ensure that we initialize authz again if the pool which our authz
caches depend on is cleared. Apache HTTPD may run pre/post config
hooks multiple times and clear its global configuration pool which
our authz caching pools depend on.
Reported-... |
struct tty_struct *tty_pair_get_pty(struct tty_struct *tty)
{
if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
tty->driver->subtype == PTY_TYPE_MASTER)
return tty;
return tty->link;
} | 0 | [
"CWE-703"
] | linux | c290f8358acaeffd8e0c551ddcc24d1206143376 | 304,140,116,550,527,950,000,000,000,000,000,000,000 | 7 | TTY: drop driver reference in tty_open fail path
When tty_driver_lookup_tty fails in tty_open, we forget to drop a
reference to the tty driver. This was added by commit 4a2b5fddd5 (Move
tty lookup/reopen to caller).
Fix that by adding tty_driver_kref_put to the fail path.
I will refactor the code later. This is for ... |
zip_new_info_node(gx_device_xps *xps_dev, const char *filename)
{
gx_device *dev = (gx_device *)xps_dev;
gs_memory_t *mem = dev->memory;
int lenstr;
/* NB should use GC */
gx_device_xps_zinfo_t *info =
(gx_device_xps_zinfo_t *)gs_alloc_bytes(mem->non_gc_memory, sizeof(gx_device_xps_zinfo_t... | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 25,466,331,331,437,270,000,000,000,000,000,000,000 | 54 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
void AcceptRoutingHandler<Pipeline, R>::onRoutingData(
uint64_t connId,
typename RoutingDataHandler<R>::RoutingData& routingData) {
// Get the routing pipeline corresponding to this connection
auto routingPipelineIter = routingPipelines_.find(connId);
if (routingPipelineIter == routingPipelines_.end()) {
... | 0 | [
"CWE-241",
"CWE-19"
] | wangle | 3b17ba10a82c71e7808760e027ac6af687e06074 | 215,202,980,844,658,570,000,000,000,000,000,000,000 | 47 | AcceptRoutingHandler should not assume a folly::AsyncSocket
Summary:
There is no reason to perform a cast to folly::AsyncSocket, when all of the
required behavior is in folly::AsyncTransportWrapper.
CVE-2019-3554
Reviewed By: avasylev
Differential Revision: D13599212
fbshipit-source-id: 3bb5475fe464c04cf5c04115f34... |
gsicc_fill_srcgtag_item(gsicc_rendering_param_t *r_params, char **pstrlast, bool cmyk)
{
char *curr_ptr;
int blackptcomp;
int or_icc, preserve_k;
int ri;
/* Get the intent */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &ri) != 1)
return_error(gs_er... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 334,166,332,323,697,780,000,000,000,000,000,000,000 | 33 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
CImg<T>& maxabs(const char *const expression) {
return maxabs((+*this)._fill(expression,true,1,0,0,"maxabs",this));
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 200,698,160,879,869,800,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. |
enum Item_result result_type() const { return REAL_RESULT; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 146,804,482,518,818,240,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
stripsnug(p, g)
register struct parse *p;
register struct re_guts *g;
{
g->nstates = p->slen;
g->strip = (sop *)realloc((unsigned char *)p->strip, p->slen * sizeof(sop));
if (g->strip == NULL) {
SETERROR(REG_ESPACE);
g->strip = p->strip;
}
} | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 153,518,522,294,583,150,000,000,000,000,000,000,000 | 11 | Fixed bug #68739 #68740 #68741 |
static void __exit fsl_hypervisor_exit(void)
{
struct doorbell_isr *dbisr, *n;
list_for_each_entry_safe(dbisr, n, &isr_list, list) {
free_irq(dbisr->irq, dbisr);
list_del(&dbisr->list);
kfree(dbisr);
}
misc_deregister(&fsl_hv_misc_dev);
} | 0 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 277,747,181,796,669,770,000,000,000,000,000,000,000 | 12 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
static inline int vhost_put_used_idx(struct vhost_virtqueue *vq)
{
return vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),
&vq->used->idx);
} | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 138,538,774,655,926,080,000,000,000,000,000,000,000 | 6 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuAgentPtr agent = NULL;
virDomainChrDefPtr config = qemuFindAgentConfig(vm->def);
if (!config)
return 0;
if (priv->agent)
return 0;
if (virQEMUCapsGet(priv->qemuC... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 211,842,794,220,531,480,000,000,000,000,000,000,000 | 68 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
Http2Session::Http2Settings::Http2Settings(
Http2Session* session)
: AsyncWrap(session->env(),
session->env()->http2settings_constructor_template()
->NewInstance(session->env()->context())
.ToLocalChecked(),
AsyncWra... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 86,560,534,407,714,830,000,000,000,000,000,000,000 | 11 | 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> |
int __init ext4_init_mballoc(void)
{
ext4_pspace_cachep = KMEM_CACHE(ext4_prealloc_space,
SLAB_RECLAIM_ACCOUNT);
if (ext4_pspace_cachep == NULL)
goto out;
ext4_ac_cachep = KMEM_CACHE(ext4_allocation_context,
SLAB_RECLAIM_ACCOUNT);
if (ext4_ac_cachep == NULL)
goto out_pa_free;
ext4_free_data_cach... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 104,211,669,927,577,250,000,000,000,000,000,000,000 | 26 | 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... |
R_API RBinJavaCPTypeObj *r_bin_java_clone_cp_idx(RBinJavaObj *bin, ut32 idx) {
RBinJavaCPTypeObj *obj = NULL;
if (bin) {
obj = r_bin_java_get_item_from_bin_cp_list (bin, idx);
}
return r_bin_java_clone_cp_item (obj);
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 136,708,459,139,367,950,000,000,000,000,000,000,000 | 7 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static void __exit sony_exit(void)
{
dbg_hid("Sony:%s\n", __func__);
hid_unregister_driver(&sony_driver);
ida_destroy(&sony_device_id_allocator);
} | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 177,132,429,555,155,400,000,000,000,000,000,000,000 | 7 | 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... |
snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, int *dir)
{
if (hw_is_mask(var)) {
if (dir)
*dir = 0;
return snd_mask_max(hw_param_mask_c(params, var));
}
if (hw_is_interval(var)) {
const struct snd_interval *i = hw_param_interval_c(params, var);
if (dir)
... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 132,106,380,941,781,170,000,000,000,000,000,000,000 | 16 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
static void rfx_write_message_codec_versions(RFX_CONTEXT* context, wStream* s)
{
Stream_Write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType (2 bytes) */
Stream_Write_UINT32(s, 10); /* BlockT.blockLen (4 bytes) */
Stream_Write_UINT8(s, 1); /* numCodecs (1 byte) */
Stream_Write_... | 0 | [
"CWE-125"
] | FreeRDP | 3a06ce058f690b7fc1edad2f352c453376c2ebfe | 258,979,367,629,169,370,000,000,000,000,000,000,000 | 8 | Fixed oob read in rfx_process_message_tileset
Check input data length
Thanks to hac425 CVE-2020-11043 |
int unit_setup_exec_runtime(Unit *u) {
ExecRuntime **rt;
size_t offset;
Iterator i;
Unit *other;
offset = UNIT_VTABLE(u)->exec_runtime_offset;
assert(offset > 0);
/* Check if ther already is an ExecRuntime for this unit? */
rt = (ExecRuntime**) ((uint8_t... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 288,291,359,468,957,180,000,000,000,000,000,000,000 | 26 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
static void vmx_set_virtual_apic_mode(struct kvm_vcpu *vcpu)
{
u32 sec_exec_control;
if (!lapic_in_kernel(vcpu))
return;
/* Postpone execution until vmcs01 is the current VMCS. */
if (is_guest_mode(vcpu)) {
to_vmx(vcpu)->nested.change_vmcs01_virtual_apic_mode = true;
return;
}
if (!cpu_need_tpr_shadow(vc... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 122,709,442,094,163,000,000,000,000,000,000,000,000 | 42 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
u32 idt_vectoring_info,
int instr_len_field,
int error_code_field)
{
u8 vector;
int type;
bool idtv_info_valid;
idtv_info_valid = idt_vectoring_info & VECTORING_INFO_VALID_MASK;
vcpu->arch.nmi_injected = false;
kvm_clear_... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 66,549,500,151,394,040,000,000,000,000,000,000,000 | 53 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
static __init void intel_clovertown_quirk(void)
{
/*
* PEBS is unreliable due to:
*
* AJ67 - PEBS may experience CPL leaks
* AJ68 - PEBS PMI may be delayed by one event
* AJ69 - GLOBAL_STATUS[62] will only be set when DEBUGCTL[12]
* AJ106 - FREEZE_LBRS_ON_PMI doesn't work in combination with PEB... | 0 | [
"CWE-20",
"CWE-401"
] | linux | f1923820c447e986a9da0fc6bf60c1dccdf0408e | 119,430,179,086,288,470,000,000,000,000,000,000,000 | 25 | perf/x86: Fix offcore_rsp valid mask for SNB/IVB
The valid mask for both offcore_response_0 and
offcore_response_1 was wrong for SNB/SNB-EP,
IVB/IVB-EP. It was possible to write to
reserved bit and cause a GP fault crashing
the kernel.
This patch fixes the problem by correctly marking the
reserved bits in the valid m... |
static inline void update_cgrp_time_from_cpuctx(struct perf_cpu_context *cpuctx)
{
struct perf_cgroup *cgrp_out = cpuctx->cgrp;
if (cgrp_out)
__update_cgrp_time(cgrp_out);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 212,907,311,285,714,200,000,000,000,000,000,000,000 | 6 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
display_progress_dialog (gpointer data)
{
FrWindow *window = data;
if (window->priv->progress_timeout != 0)
g_source_remove (window->priv->progress_timeout);
if (window->priv->use_progress_dialog && (window->priv->progress_dialog != NULL)) {
gtk_dialog_set_response_sensitive (GTK_DIALOG (window->priv->progress... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 299,664,599,178,161,740,000,000,000,000,000,000,000 | 22 | libarchive: sanitize filenames before extracting |
static void virgl_destroy_context(void *opaque, virgl_renderer_gl_context ctx)
{
VirtIOGPU *g = opaque;
QEMUGLContext qctx = (QEMUGLContext)ctx;
dpy_gl_ctx_destroy(g->scanout[0].con, qctx);
} | 0 | [] | qemu | 2fe760554eb3769d70f608a158474f728ba45ba6 | 48,008,872,132,695,520,000,000,000,000,000,000,000 | 7 | virtio-gpu: check max_outputs only
The scanout id should not be above the configured num_scanouts.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
static CImg<T> row_vector(const T& a0, const T& a1, const T& a2, const T& a3, const T& a4) {
CImg<T> r(5,1);
r[0] = a0; r[1] = a1; r[2] = a2; r[3] = a3; r[4] = a4;
return r;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 262,084,150,800,419,200,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
_rl_release_sigint ()
{
if (sigint_blocked == 0)
return;
sigint_blocked = 0;
RL_CHECK_SIGNALS ();
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 50,842,216,031,124,490,000,000,000,000,000,000,000 | 8 | bash-4.4-rc2 release |
Output1bitPixel (
IN OUT EFI_IMAGE_INPUT *Image,
IN UINT8 *Data,
IN EFI_HII_IMAGE_PALETTE_INFO *PaletteInfo
)
{
UINT16 Xpos;
UINT16 Ypos;
UINTN OffsetY;
UINT8 ... | 0 | [
"CWE-787"
] | edk2 | ffe5f7a6b4e978dffbe1df228963adc914451106 | 43,801,594,747,434,550,000,000,000,000,000,000,000 | 72 | MdeModulePkg/HiiDatabase: Fix potential integer overflow (CVE-2018-12181)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Hao Wu ... |
ip_vs_trash_get_dest(struct ip_vs_service *svc, const union nf_inet_addr *daddr,
__be16 dport)
{
struct ip_vs_dest *dest, *nxt;
struct netns_ipvs *ipvs = net_ipvs(svc->net);
/*
* Find the destination in trash
*/
list_for_each_entry_safe(dest, nxt, &ipvs->dest_trash, n_list) {
IP_VS_DBG_BUF(3, "Destina... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 20,189,634,682,888,279,000,000,000,000,000,000,000 | 47 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
static int ext4_key_prefix(struct inode *inode, u8 **key)
{
*key = EXT4_SB(inode->i_sb)->key_prefix;
return EXT4_SB(inode->i_sb)->key_prefix_size;
} | 0 | [
"CWE-125"
] | linux | 3a4b77cd47bb837b8557595ec7425f281f2ca1fe | 69,720,986,802,510,790,000,000,000,000,000,000,000 | 5 | ext4: validate s_first_meta_bg at mount time
Ralf Spenneberg reported that he hit a kernel crash when mounting a
modified ext4 image. And it turns out that kernel crashed when
calculating fs overhead (ext4_calculate_overhead()), this is because
the image has very large s_first_meta_bg (debug code shows it's
842150400)... |
void dccp_hash(struct sock *sk)
{
inet_hash(&dccp_hashinfo, sk);
} | 0 | [] | linux-2.6 | 39ebc0276bada8bb70e067cb6d0eb71839c0fb08 | 205,689,728,517,582,800,000,000,000,000,000,000,000 | 4 | [DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV
We were only checking if there was enough space to put the int, but
left len as specified by the (malicious) user, sigh, fix it by setting
len to sizeof(val) and transfering just one int worth of data, the one
asked for.
Also check for negative len values.
Signed... |
mysql_hex_string(char *to, const char *from, ulong length)
{
char *to0= to;
const char *end;
for (end= from + length; from < end; from++)
{
*to++= _dig_vec_upper[((unsigned char) *from) >> 4];
*to++= _dig_vec_upper[((unsigned char) *from) & 0x0F];
}
*to= '\0';
return (ulong) (to-to0);... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 242,963,780,596,668,200,000,000,000,000,000,000,000 | 13 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
static inline void set_system_gate_ist(int n, void *addr, unsigned ist)
{
BUG_ON((unsigned)n > 0xFF);
_set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
} | 0 | [
"CWE-119"
] | linux-2.6 | 5ac37f87ff18843aabab84cf75b2f8504c2d81fe | 218,586,957,227,307,060,000,000,000,000,000,000,000 | 5 | x86: fix ldt limit for 64 bit
Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.