func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack) { unsigned long ret; unsigned long stack_shift; struct mm_struct *mm = current->mm; struct vm_area_struct *vma = bprm->vma; struct vm_area_struct *prev = NULL; unsigned long vm_flags; unsigned long stack_bas...
0
[ "CWE-362" ]
linux
8b01fc86b9f425899f8a3a8fc1c47d73c2c20543
153,439,735,361,273,650,000,000,000,000,000,000,000
106
fs: take i_mutex during prepare_binprm for set[ug]id executables This prevents a race between chown() and execve(), where chowning a setuid-user binary to root would momentarily make the binary setuid root. This patch was mostly written by Linus Torvalds. Signed-off-by: Jann Horn <jann@thejh.net> Signed-off-by: Linu...
static inline bool __l2cap_ews_supported(struct l2cap_conn *conn) { return ((conn->local_fixed_chan & L2CAP_FC_A2MP) && (conn->feat_mask & L2CAP_FEAT_EXT_WINDOW)); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
220,452,467,266,312,000,000,000,000,000,000,000,000
5
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
PyImaging_GifEncoderNew(PyObject* self, PyObject* args) { ImagingEncoderObject* encoder; char *mode; char *rawmode; int bits = 8; int interlace = 0; if (!PyArg_ParseTuple(args, "ss|ii", &mode, &rawmode, &bits, &interlace)) return NULL; encoder = PyImaging_EncoderNew(sizeof(GIFENCODERSTATE...
0
[ "CWE-119" ]
Pillow
a130c45990578a1bb0a6a000ed1b110e27324910
239,440,652,603,613,470,000,000,000,000,000,000,000
25
add several TIFF decoders and encoders
copy_vnet_hdr_from_desc(struct virtio_net_hdr *hdr, struct buf_vector *buf_vec) { uint64_t len; uint64_t remain = sizeof(struct virtio_net_hdr); uint64_t src; uint64_t dst = (uint64_t)(uintptr_t)hdr; while (remain) { len = RTE_MIN(remain, buf_vec->buf_len); src = buf_vec->buf_addr; rte_memcpy((void *)(uin...
0
[ "CWE-665" ]
dpdk
97ecc1c85c95c13bc66a87435758e93406c35c48
161,617,026,310,535,100,000,000,000,000,000,000,000
19
vhost: fix translated address not checked Malicious guest can construct desc with invalid address and zero buffer length. That will request vhost to check both translated address and translated data length. This patch will add missed address check. CVE-2020-10725 Fixes: 75ed51697820 ("vhost: add packed ring batch deq...
reverse_symbol_list (symbol *sym) { symbol *result; symbol *next; result = NULL; while (sym) { next = SYMBOL_NEXT (sym); SYMBOL_NEXT (sym) = result; result = sym; sym = next; } return result; }
0
[]
m4
035998112737e52cb229e342913ef404e5a51040
185,767,544,657,189,700,000,000,000,000,000,000,000
15
Security fix: avoid arbitrary code execution with 'm4 -F'. * src/freeze.c (produce_frozen_state): Never pass raw file name as printf format. * NEWS: Document this fix. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 031a71a80442ed2ad3c2ee14d5811c786a12c51b)
int jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno, jas_stream_t *stream) { jas_stream_t **newstreams; int newmaxstreams; int i; /* Grow the array of streams if necessary. */ if (streamlist->numstreams >= streamlist->maxstreams) { newmaxstreams = streamlist->maxstreams + 1024; if (!(newstre...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
61,848,836,332,420,660,000,000,000,000,000,000,000
27
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
imapx_refresh_info_uid_cmp (gconstpointer ap, gconstpointer bp, gboolean ascending) { guint av, bv; av = g_ascii_strtoull ((const gchar *) ap, NULL, 10); bv = g_ascii_strtoull ((const gchar *) bp, NULL, 10); if (av < bv) return ascending ? -1 : 1; else if...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
117,410,527,939,713,100,000,000,000,000,000,000,000
16
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
cmsHPROFILE CMSEXPORT cmsCreateLinearizationDeviceLinkTHR(cmsContext ContextID, cmsColorSpaceSignature ColorSpace, cmsToneCurve* const TransferFunctions[]) { cmsHPROFILE hICC; cmsPipeline* Pipelin...
1
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
208,646,178,604,134,970,000,000,000,000,000,000,000
53
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
emit_end_element (GMarkupParseContext *context, GError **error) { /* We need to pop the tag stack and call the end_element * function, since this is the close tag */ GError *tmp_error = NULL; g_assert (context->tag_stack != NULL); possibly_finish_subparser (context); /...
0
[ "CWE-476" ]
glib
fccef3cc822af74699cca84cd202719ae61ca3b9
285,271,509,145,409,840,000,000,000,000,000,000,000
37
gmarkup: Fix crash in error handling path for closing elements If something which looks like a closing tag is left unfinished, but isn’t paired to an opening tag in the document, the error handling code would do a null pointer dereference. Avoid that, at the cost of introducing a new translatable error message. Inclu...
explicit GetResult(NonConstGetResult&& result) : result_(std::move(result)) {}
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
278,075,170,385,131,320,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 void perf_free_event(struct perf_event *event, struct perf_event_context *ctx) { struct perf_event *parent = event->parent; if (WARN_ON_ONCE(!parent)) return; mutex_lock(&parent->child_mutex); list_del_init(&event->child_list); mutex_unlock(&parent->child_mutex); put_event(parent); perf_group...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
179,283,399,282,360,050,000,000,000,000,000,000,000
18
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...
CodeConverter *conv_code_converter_new(const gchar *src_charset) { CodeConverter *conv; src_charset = conv_get_fallback_for_private_encoding(src_charset); conv = g_new0(CodeConverter, 1); conv->code_conv_func = conv_get_code_conv_func(src_charset, NULL); conv->charset_str = g_strdup(src_charset); conv->charset ...
0
[ "CWE-119" ]
claws
d390fa07f5548f3173dd9cc13b233db5ce934c82
43,469,349,815,598,660,000,000,000,000,000,000,000
13
Make sure we don't run out of the output buffer. Maybe fixes bug #3557
static void sctp_hash(struct sock *sk) { /* STUB */ }
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
135,202,380,176,795,700,000,000,000,000,000,000,000
4
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static int srpt_shutdown_session(struct se_session *se_sess) { struct srpt_rdma_ch *ch = se_sess->fabric_sess_ptr; unsigned long flags; spin_lock_irqsave(&ch->spinlock, flags); if (ch->in_shutdown) { spin_unlock_irqrestore(&ch->spinlock, flags); return true; } ch->in_shutdown = true; target_sess_cmd_list_s...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
331,855,796,732,593,600,000,000,000,000,000,000,000
17
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
INLINE void gdi_RectToRgn(HGDI_RECT rect, HGDI_RGN rgn) { rgn->x = rect->left; rgn->y = rect->top; rgn->w = rect->right - rect->left + 1; rgn->h = rect->bottom - rect->top + 1; }
0
[ "CWE-190" ]
FreeRDP
ce21b9d7ecd967e0bc98ed31a6b3757848aa6c9e
282,322,436,390,722,430,000,000,000,000,000,000,000
7
Fix CVE-2020-11523: clamp invalid rectangles to size 0 Thanks to Sunglin and HuanGMz from Knownsec 404
soup_cookie_jar_class_init (SoupCookieJarClass *jar_class) { GObjectClass *object_class = G_OBJECT_CLASS (jar_class); object_class->constructed = soup_cookie_jar_constructed; object_class->finalize = soup_cookie_jar_finalize; object_class->set_property = soup_cookie_jar_set_property; object_class->get_property = ...
0
[ "CWE-125" ]
libsoup
db2b0d5809d5f8226d47312b40992cadbcde439f
261,418,863,128,844,100,000,000,000,000,000,000,000
73
cookie-jar: bail if hostname is an empty string There are several other ways to fix the problem with this function, but skipping over all of the code is probably the simplest. Fixes #3
find_referral_tgs(kdc_realm_t *kdc_active_realm, krb5_kdc_req *request, krb5_principal *krbtgt_princ) { krb5_error_code retval = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN; char **realms = NULL, *hostname = NULL; krb5_data srealm = request->server->realm; if (!is_referral_req(kdc_active_realm, r...
1
[ "CWE-20" ]
krb5
4c023ba43c16396f0d199e2df1cfa59b88b62acc
56,492,955,444,416,440,000,000,000,000,000,000,000
40
KDC null deref due to referrals [CVE-2013-1417] An authenticated remote client can cause a KDC to crash by making a valid TGS-REQ to a KDC serving a realm with a single-component name. The process_tgs_req() function dereferences a null pointer because an unusual failure condition causes a helper function to return suc...
SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, Uint32 * Gmask, Uint32 * Bmask, Uint32 * Amask) { Uint32 masks[4]; /* This function doesn't work with FourCC pixel formats */ if (SDL_ISPIXELFORMAT_FOURCC(format)) { SDL_SetError("FOURCC pixel formats are...
0
[ "CWE-703", "CWE-787" ]
SDL
8c91cf7dba5193f5ce12d06db1336515851c9ee9
160,728,428,898,674,630,000,000,000,000,000,000,000
157
Always create a full 256-entry map in case color values are out of range Fixes https://github.com/libsdl-org/SDL/issues/5042
bool val_bool() { if (check_null_ref()) return 0; else return Item_direct_ref::val_bool(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
136,288,418,024,296,500,000,000,000,000,000,000,000
7
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....
NTSTATUS smb_vfs_call_durable_disconnect(struct vfs_handle_struct *handle, struct files_struct *fsp, const DATA_BLOB old_cookie, TALLOC_CTX *mem_ctx, DATA_BLOB *new_cookie) { VFS_FIND(durable_disconnect); return handle->fns->durable_disconnect_fn(handle, fsp, old_cookie, mem_ctx...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
264,804,122,678,343,260,000,000,000,000,000,000,000
10
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
void evalGenericCommand(client *c, int evalsha) { lua_State *lua = server.lua; char funcname[43]; long long numkeys; long long initial_server_dirty = server.dirty; int delhook = 0, err; /* When we replicate whole scripts, we want the same PRNG sequence at * every call so that our PRNG is n...
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
209,731,599,528,553,630,000,000,000,000,000,000,000
204
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
T& atX(const int x, const int y, const int z, const int c, const T& out_value) { return (x<0 || x>=width())?(cimg::temporary(out_value)=out_value):(*this)(x,y,z,c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
290,618,781,373,124,200,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.
ok_png ok_png_read_with_allocator(FILE *file, ok_png_decode_flags decode_flags, ok_png_allocator allocator, void *allocator_user_data) { ok_png png = { 0 }; if (file) { ok_png_decode(&png, decode_flags, OK_PNG_FILE_INPUT, file, allocator, allocator_user_data); } els...
0
[ "CWE-787" ]
ok-file-formats
e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e
70,738,845,961,077,760,000,000,000,000,000,000,000
10
ok_png: Disallow multiple IHDR chunks (#15)
do_curl_getinfo(CurlObject *self, PyObject *args) { int option; int res; if (!PyArg_ParseTuple(args, "i:getinfo", &option)) { return NULL; } if (check_curl_state(self, 1 | 2, "getinfo") != 0) { return NULL; } switch (option) { case CURLINFO_FILETIME: case CURLINFO_H...
0
[]
pycurl
2a743674dcf152beaaf6adaddb1ef51b18d1fffe
112,971,807,812,270,930,000,000,000,000,000,000,000
124
Fix use after free in Curl object's HTTPPOST setopt with unicode FORM_BUFFERPTR. Fixes use after free in the Curl object's HTTPPOST setopt when a unicode value is passed as a value with a FORM_BUFFERPTR. The str object created from the passed in unicode object would have its buffer used but the unicode object would be...
static pair_t *hashtable_find_pair(hashtable_t *hashtable, bucket_t *bucket, const char *key, size_t hash) { list_t *list; pair_t *pair; if(bucket_is_empty(hashtable, bucket)) return NULL; list = bucket->first; while(1) { pair = list_to_pair(l...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
196,166,450,820,054,160,000,000,000,000,000,000,000
24
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
static bool shortible(F&& f, X& x, const std::string& c, const std::vector<std::string>& v) { auto xc = std::forward<X>(x)(c); if (!xc) { return false; } for (const auto& d : v) { auto xd = std::forward<X>(x)(d); if (!xd) { continue; } if (std::forward<F>(f)(*xc, *x...
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
17,183,925,934,884,358,000,000,000,000,000,000,000
19
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
CImg<T>& draw_image(const CImg<ti>& sprite, const CImg<tm>& mask, const float opacity=1, const float mask_max_value=1) { return draw_image(0,sprite,mask,opacity,mask_max_value); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
284,148,493,685,935,170,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int smb_vfs_call_setxattr(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags) { VFS_FIND(setxattr); return handle->fns->setxattr(handle, path, name, value, size, flags); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
270,008,506,382,994,460,000,000,000,000,000,000,000
7
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
static inline uint32_t gic_apr_ns_view(GICState *s, int cpu, int regno) { /* Return the Nonsecure view of GICC_APR<regno>. This is the * second half of GICC_NSAPR. */ switch (GIC_MIN_BPR) { case 0: if (regno < 2) { return s->nsapr[regno + 2][cpu]; } break; c...
0
[ "CWE-787" ]
qemu
edfe2eb4360cde4ed5d95bda7777edcb3510f76a
242,211,462,545,886,700,000,000,000,000,000,000,000
31
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register Per the ARM Generic Interrupt Controller Architecture specification (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, not 10: - 4.3 Distributor register descriptions - 4.3.15 Software Generated Interrupt Register, GICD_SG - Table 4-2...
GF_ISOSample *gf_isom_sample_new() { GF_ISOSample *tmp; GF_SAFEALLOC(tmp, GF_ISOSample); return tmp; }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
315,375,499,524,269,440,000,000,000,000,000,000,000
6
fixed #1706
int snd_rawmidi_kernel_open(struct snd_card *card, int device, int subdevice, int mode, struct snd_rawmidi_file *rfile) { struct snd_rawmidi *rmidi; int err = 0; if (snd_BUG_ON(!rfile)) return -EINVAL; mutex_lock(&register_mutex); rmidi = snd_rawmidi_search(card, device); if (!rmidi) err = -ENODEV; ...
0
[ "CWE-416" ]
linux
c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d
192,758,266,119,303,550,000,000,000,000,000,000,000
26
ALSA: rawmidi: Fix racy buffer resize under concurrent accesses The rawmidi core allows user to resize the runtime buffer via ioctl, and this may lead to UAF when performed during concurrent reads or writes: the read/write functions unlock the runtime lock temporarily during copying form/to user-space, and that's the ...
static void ZSTD_freeCCtxContent(ZSTD_CCtx* cctx) { assert(cctx != NULL); assert(cctx->staticSize == 0); ZSTD_free(cctx->workSpace, cctx->customMem); cctx->workSpace = NULL; ZSTD_freeCDict(cctx->cdictLocal); cctx->cdictLocal = NULL; #ifdef ZSTD_MULTITHREAD ZSTDMT_freeCCtx(cctx->mtctx); cctx->mtctx =...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
38,614,622,913,958,350,000,000,000,000,000,000,000
10
fixed T36302429
void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds, const char *str, int len __attribute__((unused))) { reg1 REPLACE *rep_pos; reg2 REPLACE_STRING *rep_str; const char *start, *from; DBUG_ENTER("replace_strings_append"); start= from= str; re...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
305,458,946,393,692,900,000,000,000,000,000,000,000
50
mysqltest: don't eat new lines in --exec pass them through as is
void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], ThreadFrame *ref_frame, int x_off, int y_off, int bx_off, int by_off, int block_w, int block_h, int width, int height, VP56mv *mv) { VP56mv uvmv = *mv; /* Y */ vp8_mc_luma(s, td, dst[0] + ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
312,406,557,268,072,640,000,000,000,000,000,000,000
34
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
GF_Err saiz_dump(GF_Box *a, FILE * trace) { u32 i; GF_SampleAuxiliaryInfoSizeBox *ptr = (GF_SampleAuxiliaryInfoSizeBox*) a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "SampleAuxiliaryInfoSizeBox", trace); fprintf(trace, "default_sample_info_size=\"%d\" sample_count=\"%d\"", ptr->default_sample_info_s...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
194,008,149,600,468,470,000,000,000,000,000,000,000
28
fixed 2 possible heap overflows (inc. #1088)
void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) { BN_ULONG t1,t2; BN_ULONG c1,c2,c3; c1=0; c2=0; c3=0; mul_add_c(a[0],b[0],c1,c2,c3); r[0]=c1; c1=0; mul_add_c(a[0],b[1],c2,c3,c1); mul_add_c(a[1],b[0],c2,c3,c1); r[1]=c2; c2=0; mul_add_c(a[2],b[0],c3,c1,c2); mul_add_c(a[1],b[1],c3,c1,c2); mul_a...
1
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
27,102,966,483,264,250,000,000,000,000,000,000,000
39
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
mb_fix_col(int col, int row) { int off; col = check_col(col); row = check_row(row); off = LineOffset[row] + col; if (has_mbyte && ScreenLines != NULL && col > 0 && ((enc_dbcs && ScreenLines[off] != NUL && dbcs_screen_head_off(ScreenLines + LineOffset[row], ScreenLines + off))...
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
71,984,993,713,443,610,000,000,000,000,000,000,000
17
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.
asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) { mm_segment_t old_fs; struct flock f; long ret; switch (cmd) { case F_GETLK: case F_SETLK: case F_SETLKW: ret = get_compat_flock(&f, compat_ptr(arg)); if (ret != 0) break; old_fs = get_fs(); set_fs(KERNEL_DS);...
0
[]
linux-2.6
822191a2fa1584a29c3224ab328507adcaeac1ab
121,189,765,396,114,340,000,000,000,000,000,000,000
68
[PATCH] skip data conversion in compat_sys_mount when data_page is NULL OpenVZ Linux kernel team has found a problem with mounting in compat mode. Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode leads to oops: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp...
u32 get_size_by_code(u32 code) { if (code==0) return 4; if (code==1) return 8; if (code==2) return 16; return 32; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
309,539,116,253,811,100,000,000,000,000,000,000,000
7
fixed #2255
static void aio_kick_handler(struct work_struct *work) { struct kioctx *ctx = container_of(work, struct kioctx, wq.work); mm_segment_t oldfs = get_fs(); struct mm_struct *mm; int requeue; set_fs(USER_DS); use_mm(ctx->mm); spin_lock_irq(&ctx->ctx_lock); requeue =__aio_run_iocbs(ctx); mm = ctx->mm; spin_unlock...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
135,323,650,385,226,870,000,000,000,000,000,000,000
21
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
free_cntype(const struct cntype_info *c, void *val, size_t count) { switch (c->type) { case cntype_string: case cntype_der: free(*(char **)val); *(char **)val = NULL; break; case cntype_seqof: { const struct atype_info *a = c->tinfo; const struct ptr_info *ptrinfo...
0
[ "CWE-674", "CWE-787" ]
krb5
57415dda6cf04e73ffc3723be518eddfae599bfd
119,585,394,852,381,970,000,000,000,000,000,000,000
29
Add recursion limit for ASN.1 indefinite lengths The libkrb5 ASN.1 decoder supports BER indefinite lengths. It computes the tag length using recursion; the lack of a recursion limit allows an attacker to overrun the stack and cause the process to crash. Reported by Demi Obenour. CVE-2020-28196: In MIT krb5 release...
void HBasicBlock::DetachLoopInformation() { ASSERT(IsLoopHeader()); loop_information_ = NULL; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
57,039,033,837,758,640,000,000,000,000,000,000,000
4
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
ofputil_port_stats_from_ofp13(struct ofputil_port_stats *ops, const struct ofp13_port_stats *ps13) { enum ofperr error = ofputil_port_stats_from_ofp11(ops, &ps13->ps); if (!error) { ops->duration_sec = ntohl(ps13->duration_sec); ops->duration_nsec = ntohl(ps13->dura...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
40,269,896,984,419,346,000,000,000,000,000,000,000
10
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>
static uint16_t nvme_check_dulbe(NvmeNamespace *ns, uint64_t slba, uint32_t nlb) { int ret; Error *err = NULL; ret = nvme_block_status_all(ns, slba, nlb, BDRV_BLOCK_DATA); if (ret) { if (ret < 0) { error_setg_errno(&err, -ret, "unable to get block st...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
214,517,444,801,455,450,000,000,000,000,000,000,000
20
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static uint64_t ati_i2c(bitbang_i2c_interface *i2c, uint64_t data, int base) { bool c = (data & BIT(base + 17) ? !!(data & BIT(base + 1)) : 1); bool d = (data & BIT(base + 16) ? !!(data & BIT(base)) : 1); bitbang_i2c_set(i2c, BITBANG_I2C_SCL, c); d = bitbang_i2c_set(i2c, BITBANG_I2C_SDA, d); data ...
0
[ "CWE-125" ]
qemu
aab0e2a661b2b6bf7915c0aefe807fb60d6d9d13
150,564,722,999,827,840,000,000,000,000,000,000,000
17
ati: use vga_read_byte in ati_cursor_define This makes sure reads are confined to vga video memory. v3: use uint32_t, fix cut+paste bug. v2: fix ati_cursor_draw_line too. Reported-by: xu hang <flier_m@outlook.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Revie...
irc_server_remove_away (struct t_irc_server *server) { struct t_irc_channel *ptr_channel; if (server->is_connected) { for (ptr_channel = server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel) { if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) ...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
75,739,804,748,307,010,000,000,000,000,000,000,000
15
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
struct tevent_req *smb_vfs_call_pread_send(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct files_struct *fsp, void *data, size_t n, off_t offset) { struct tevent_req *req, *subreq; struct smb_vfs_call_pread_state *state; req = tevent_r...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
246,874,908,325,348,030,000,000,000,000,000,000,000
26
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
static int binlog_prepare(handlerton *hton, THD *thd, bool all) { /* do nothing. just pretend we can do 2pc, so that MySQL won't switch to 1pc. real work will be done in MYSQL_BIN_LOG::log_xid() */ return 0; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
305,951,220,348,637,160,000,000,000,000,000,000,000
10
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...
int ff_h264_alloc_tables(H264Context *h) { const int big_mb_num = h->mb_stride * (h->mb_height + 1); const int row_mb_num = h->mb_stride * 2 * h->avctx->thread_count; int x, y, i; FF_ALLOCZ_OR_GOTO(h->avctx, h->intra4x4_pred_mode, row_mb_num * 8 * sizeof(uint8_t), fail) FF_ALL...
0
[ "CWE-787" ]
FFmpeg
1f097d168d9cad473dd44010a337c1413a9cd198
103,051,896,056,318,040,000,000,000,000,000,000,000
60
h264: reset data partitioning at the beginning of each decode call Prevents using GetBitContexts with data from previous calls. Fixes access to freed memory. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
readtup_cluster(Tuplesortstate *state, SortTuple *stup, int tapenum, unsigned int tuplen) { unsigned int t_len = tuplen - sizeof(ItemPointerData) - sizeof(int); HeapTuple tuple = (HeapTuple) palloc(t_len + HEAPTUPLESIZE); USEMEM(state, GetMemoryChunkSpace(tuple)); /* Reconstruct the HeapTupleData header */ tu...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
143,928,581,851,815,310,000,000,000,000,000,000,000
28
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = XML_ERR_INTERNAL_ERROR; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL,...
0
[ "CWE-119" ]
libxml2
23f05e0c33987d6605387b300c4be5da2120a7ab
331,930,808,509,188,550,000,000,000,000,000,000,000
17
Detect excessive entities expansion upon replacement If entities expansion in the XML parser is asked for, it is possble to craft relatively small input document leading to excessive on-the-fly content generation. This patch accounts for those replacement and stop parsing after a given threshold. it can be bypassed as...
WandExport void DrawSetTextInterlineSpacing(DrawingWand *wand, const double interline_spacing) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off ...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
87,597,361,163,141,000,000,000,000,000,000,000,000
16
https://github.com/ImageMagick/ImageMagick/issues/716
R_API int r_sys_signal(int sig, void (*handler) (int)) { int s[2] = { sig, 0 }; return r_sys_sigaction (s, handler); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
227,777,612,556,975,260,000,000,000,000,000,000,000
4
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
int ssh_buffer_validate_length(struct ssh_buffer_struct *buffer, size_t len) { if (buffer->pos + len < len || buffer->pos + len > buffer->used) { return SSH_ERROR; } return SSH_OK; }
0
[ "CWE-476" ]
libssh-mirror
10b3ebbe61a7031a3dae97f05834442220447181
288,019,464,236,335,760,000,000,000,000,000,000,000
8
buffer: Reformat ssh_buffer_add_data() Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
void Magick::Image::backgroundTexture(const std::string &backgroundTexture_) { modifyImage(); options()->backgroundTexture(backgroundTexture_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
339,216,742,668,665,970,000,000,000,000,000,000,000
5
Added missing return to avoid use after free.
static unsigned long super_cache_scan(struct shrinker *shrink, struct shrink_control *sc) { struct super_block *sb; long fs_objects = 0; long total_objects; long freed = 0; long dentries; long inodes; sb = container_of(shrink, struct super_block, s_shrink); /* * Deadlock avoidance. We may hold va...
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
239,448,450,129,178,460,000,000,000,000,000,000,000
50
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, u32 *entry_failure_code) { struct vcpu_vmx *vmx = to_vmx(vcpu); u32 exec_control, vmcs12_exec_ctrl; if (vmx->nested.dirty_vmcs12) { prepare_vmcs02_full(vcpu, vmcs12); vmx->nested.dirty_vmcs12 = false; } /* * First, the fields that...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
265,353,682,009,649,270,000,000,000,000,000,000,000
267
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 OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager) { OPJ_UINT32 i, l_ppt_data_size; /* preconditions */ assert(p_tcp != 00); assert(p_manager != 00); assert(p_tcp->ppt_buffer == NULL); if (p_tcp->ppt == 0U) { return OPJ_TRUE; } l_ppt_data_size = 0U...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
88,544,820,188,227,430,000,000,000,000,000,000,000
47
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
mypair(int fg, int bg) { int result; #if HAVE_ALLOC_PAIR if (x_option) { result = alloc_pair(fg, bg); } else #endif { int pair = (fg * COLORS) + bg; result = (pair >= COLOR_PAIRS) ? -1 : pair; } return result; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
301,793,954,660,325,100,000,000,000,000,000,000,000
14
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
pipe_fclose(gx_io_device * iodev, gp_file * file) { #ifdef GS_NO_FILESYSTEM return 0; #else return gp_fclose(file); #endif }
0
[ "CWE-20" ]
ghostpdl
a9bd3dec9fde03327a4a2c69dad1036bf9632e20
264,738,975,967,828,470,000,000,000,000,000,000,000
8
Bug 704342: Include device specifier strings in access validation for the "%pipe%", %handle%" and %printer% io devices. We previously validated only the part after the "%pipe%" Postscript device specifier, but this proved insufficient. This rebuilds the original file name string, and validates it complete. The sligh...
my_decimal *Field_temporal::val_decimal(my_decimal *d) { MYSQL_TIME ltime; if (get_date(&ltime, 0)) { bzero(&ltime, sizeof(ltime)); ltime.time_type= type_handler()->mysql_timestamp_type(); } return TIME_to_my_decimal(&ltime, d); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
233,023,656,027,498,300,000,000,000,000,000,000,000
10
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static void atl2_tx_timeout(struct net_device *netdev) { struct atl2_adapter *adapter = netdev_priv(netdev); /* Do the reset outside of interrupt context */ schedule_work(&adapter->reset_task); }
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
282,111,292,888,202,700,000,000,000,000,000,000,000
7
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
Item **addr(uint i) { return (Item **) (values + i); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
59,675,855,908,069,810,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...
static int page_trans_compound_anon_split(struct page *page) { int ret = 0; struct page *transhuge_head = page_trans_compound_anon(page); if (transhuge_head) { /* Get the reference on the head to split it. */ if (get_page_unless_zero(transhuge_head)) { /* * Recheck we got the reference while the head ...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
275,750,043,392,713,580,000,000,000,000,000,000,000
26
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static struct sock *__l2tp_ip6_bind_lookup(struct net *net, struct in6_addr *laddr, int dif, u32 tunnel_id) { struct hlist_node *node; struct sock *sk; sk_for_each_bound(sk, node, &l2tp_ip6_bind_table) { struct in6_addr *addr = inet6_rcv_saddr(sk); struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk); ...
0
[ "CWE-200" ]
linux
04d4fbca1017c11381e7d82acea21dd741e748bc
280,182,574,485,398,630,000,000,000,000,000,000,000
25
l2tp: fix info leak via getsockname() The L2TP code for IPv6 fails to initialize the l2tp_unused member of struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: J...
static int brcmf_cfg80211_request_ap_if(struct brcmf_if *ifp) { struct brcmf_mbss_ssid_le mbss_ssid_le; int bsscfgidx; int err; memset(&mbss_ssid_le, 0, sizeof(mbss_ssid_le)); bsscfgidx = brcmf_get_first_free_bsscfgidx(ifp->drvr); if (bsscfgidx < 0) return bsscfgidx; mbss_ssid_le.bsscfgidx = cpu_to_le32(bssc...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
10,839,958,044,471,008,000,000,000,000,000,000,000
22
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op) { if (pathname[0] != '/' || rule->listnr != AUDIT_FILTER_EXIT || op & ~AUDIT_EQUAL || rule->inode_f || rule->watch || rule->tree) return -EINVAL; rule->tree = alloc_tree(pathname); if (!rule->tree) return -ENOMEM; return 0; }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
21,911,749,286,920,603,000,000,000,000,000,000,000
13
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
libssh2_userauth_hostbased_fromfile_ex(LIBSSH2_SESSION *session, const char *user, unsigned int user_len, const char *publickey, const char *privatekey, ...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
218,494,124,923,085,500,000,000,000,000,000,000,000
19
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static int decode_open_confirm(struct xdr_stream *xdr, struct nfs_open_confirmres *res) { __be32 *p; int status; status = decode_op_hdr(xdr, OP_OPEN_CONFIRM); if (status != -EIO) nfs_increment_open_seqid(status, res->seqid); if (status) return status; READ_BUF(NFS4_S...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
308,298,616,847,029,230,000,000,000,000,000,000,000
14
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int fuse_getlk(struct file *file, struct file_lock *fl) { struct inode *inode = file->f_path.dentry->d_inode; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_req *req; struct fuse_lk_out outarg; int err; req = fuse_get_req(fc); if (IS_ERR(req)) return PTR_ERR(req); fuse_lk_fill(req, file, fl...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
59,717,648,089,803,070,000,000,000,000,000,000,000
24
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
static uint16 TIFFClampDoubleToUInt16( double val ) { if( val < 0 ) return 0; if( val > 65535 || val != val ) return 65535; return (uint16)val; }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
109,861,620,938,932,630,000,000,000,000,000,000,000
8
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
XMLRPC_VALUE_TYPE get_zval_xmlrpc_type(zval* value, zval* newvalue) /* {{{ */ { XMLRPC_VALUE_TYPE type = xmlrpc_none; if (value) { switch (Z_TYPE_P(value)) { case IS_NULL: type = xmlrpc_base64; break; #ifndef BOOL_AS_LONG /* Right thing to do, but it breaks some legacy code. */ case IS_TRUE: c...
1
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
316,918,093,332,321,640,000,000,000,000,000,000,000
65
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
virtual const MYSQL_TIME *const_ptr_mysql_time() const { return NULL; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
54,422,094,776,225,165,000,000,000,000,000,000,000
1
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu) { }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
52,523,342,262,041,560,000,000,000,000,000,000,000
3
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
static ssize_t vfs_pwrite_fn(void *file, const void *buf, size_t len, off_t offset) { struct files_struct *fsp = (struct files_struct *)file; return SMB_VFS_PWRITE(fsp, buf, len, offset); }
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
112,713,175,200,180,180,000,000,000,000,000,000,000
6
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
const UrlQuery::Parameter& UrlQuery::Get(std::size_t index) const { assert(index < Size()); return parameters_[index]; }
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
307,564,283,140,524,660,000,000,000,000,000,000,000
4
fix static file serving security issue; fix url path encoding issue
static int trace_set_options(struct trace_array *tr, char *option) { char *cmp; int neg = 0; int ret = -ENODEV; int i; size_t orig_len = strlen(option); cmp = strstrip(option); if (strncmp(cmp, "no", 2) == 0) { neg = 1; cmp += 2; } mutex_lock(&trace_types_lock); for (i = 0; trace_options[i]; i++) { ...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
158,664,963,126,932,100,000,000,000,000,000,000,000
39
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
void Item_func_mod::result_precision() { unsigned_flag= args[0]->unsigned_flag; decimals= MY_MAX(args[0]->decimal_scale(), args[1]->decimal_scale()); uint prec= MY_MAX(args[0]->decimal_precision(), args[1]->decimal_precision()); fix_char_length(my_decimal_precision_to_length_no_truncation(prec, decimals, ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
34,561,070,167,084,720,000,000,000,000,000,000,000
8
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
CImg<Tlong> get_cumulate(const char axis=0) const { return CImg<Tlong>(*this,false).cumulate(axis); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
28,359,366,812,178,200,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.
void reds_on_vm_start(RedsState *reds) { FOREACH_QXL_INSTANCE(reds, qxl) { red_qxl_start(qxl); } }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
85,785,275,866,055,880,000,000,000,000,000,000,000
6
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
_outScan(StringInfo str, const Scan *node) { WRITE_NODE_TYPE("SCAN"); _outScanInfo(str, node); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
241,758,499,675,725,730,000,000,000,000,000,000,000
6
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
//! Resize 3d object to unit size. CImg<T> resize_object3d() { if (_height!=3 || _depth>1 || _spectrum>1) throw CImgInstanceException(_cimg_instance "resize_object3d(): Instance is not a set of 3d vertices.", cimg_instance); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
194,471,130,873,050,970,000,000,000,000,000,000,000
15
Fix other issues in 'CImg<T>::load_bmp()'.
futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) { struct futex_hash_bucket *hb; struct futex_q *this, *next; union futex_key key = FUTEX_KEY_INIT; int ret; WAKE_Q(wake_q); if (!bitset) return -EINVAL; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_READ); if (unlikel...
0
[ "CWE-416" ]
linux
65d8fc777f6dcfee12785c057a6b57f679641c90
35,171,847,313,215,422,000,000,000,000,000,000,000
47
futex: Remove requirement for lock_page() in get_futex_key() When dealing with key handling for shared futexes, we can drastically reduce the usage/need of the page lock. 1) For anonymous pages, the associated futex object is the mm_struct which does not require the page lock. 2) For inode based, keys, we can check un...
static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */ { zend_object_value retval; spl_SplObjectStorage *intern; zend_class_entry *parent = class_type; intern = emalloc(sizeof(spl_SplObjectStorage)); memset(intern, 0, si...
0
[]
php-src
950d3d6e9b94b75b266c67bf9e3a85ae9c31905d
313,561,212,879,820,260,000,000,000,000,000,000,000
42
Fix bug #69227 and #65967 This patch fixes a use (in zend_gc.c) after free (in spl_observer.c). See https://bugs.php.net/bug.php?id=69227
static int tw5864_s_parm(struct file *file, void *priv, struct v4l2_streamparm *sp) { struct tw5864_input *input = video_drvdata(file); struct v4l2_fract *t = &sp->parm.capture.timeperframe; struct v4l2_fract time_base; int ret; ret = tw5864_frameinterval_get(input, &time_base); if (ret) return ret; if (...
0
[ "CWE-476" ]
linux
2e7682ebfc750177a4944eeb56e97a3f05734528
62,197,210,342,402,210,000,000,000,000,000,000,000
27
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame 'vb' null check should be done before dereferencing it in tw5864_handle_frame, otherwise a NULL pointer dereference may occur. Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-of...
static void nested_vmx_vmexit(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); int cpu; struct vmcs12 *vmcs12 = get_vmcs12(vcpu); /* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE(vmx->nested.nested_run_pending); leave_guest_mode(vcpu); prepare_vmcs12(vcpu, vmcs12); cpu = get_cpu();...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
217,947,043,111,157,560,000,000,000,000,000,000,000
52
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
static void snd_usbmidi_out_endpoint_clear(struct snd_usb_midi_out_endpoint *ep) { unsigned int i; for (i = 0; i < OUTPUT_URBS; ++i) if (ep->urbs[i].urb) { free_urb_and_buffer(ep->umidi, ep->urbs[i].urb, ep->max_transfer); ep->urbs[i].urb = NULL; } }
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
81,007,369,695,166,370,000,000,000,000,000,000,000
11
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
static int handle_tpr_below_threshold(struct kvm_vcpu *vcpu) { kvm_apic_update_ppr(vcpu); return 1; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
310,758,334,149,419,580,000,000,000,000,000,000,000
5
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...
gif_init (GifContext *context) { unsigned char buf[16]; char version[4]; if (!gif_read (context, buf, 6)) { /* Unable to read magic number, * gif_read() should have set error */ return -1; } if (strncmp ((char *) buf, "GIF", 3) != 0) { /* Not a GIF file */ ...
0
[]
gdk-pixbuf
0012e066ba37439d402ce46afbc1311530a4ec61
313,008,996,144,834,370,000,000,000,000,000,000,000
94
io-gif: Fail quickly when image dimensions are too big Fail quickly when the dimensions would create an image that's bigger than MAXINT bytes long. See https://bugzilla.gnome.org/show_bug.cgi?id=765094 https://bugzilla.gnome.org/show_bug.cgi?id=785973
MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { const char *option; GeometryInfo geometry_info; MagickStatusType flags; ResolutionType units; /* Sync image options. */ assert(image_info != (const ImageInfo *) ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
111,308,637,658,644,000,000,000,000,000,000,000,000
234
Set pixel cache to undefined if any resource limit is exceeded
bool CModules::OnPrivAction(CNick& Nick, CString& sMessage) { MODHALTCHK(OnPrivAction(Nick, sMessage)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
319,644,798,771,174,300,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
int TLSWrap::DoWrite(std::unique_ptr<WriteWrap>& w, uv_buf_t* bufs, size_t count, uv_stream_t* send_handle) { CHECK_NULL(send_handle); Debug(this, "DoWrite()"); if (ssl_ == nullptr) { ClearError(); error_ = "Write after DestroySSL"; retur...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
308,454,721,744,692,530,000,000,000,000,000,000,000
105
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
inline void StridedSlice(const tflite::StridedSliceParams& op_params, const RuntimeShape& unextended_input_shape, const TfLiteTensor* input, const RuntimeShape& unextended_output_shape, TfLiteTensor* output) { Sequenti...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
239,075,323,839,432,670,000,000,000,000,000,000,000
9
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
bool LEX::only_view_structure() { switch (sql_command) { case SQLCOM_SHOW_CREATE: case SQLCOM_CHECKSUM: case SQLCOM_SHOW_TABLES: case SQLCOM_SHOW_FIELDS: case SQLCOM_REVOKE_ALL: case SQLCOM_REVOKE: case SQLCOM_GRANT: case SQLCOM_CREATE_VIEW: return TRUE; case SQLCOM_CREATE_TABLE: return crea...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
211,529,041,215,931,800,000,000,000,000,000,000,000
18
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
int hci_req_sync(struct hci_dev *hdev, int (*req)(struct hci_request *req, unsigned long opt), unsigned long opt, u32 timeout, u8 *hci_status) { int ret; if (!test_bit(HCI_UP, &hdev->flags)) return -ENETDOWN; /* Serialize all requests */ hci_req_sync_lock(hdev); ret = __hci_req_sync(hdev, req, opt, ...
1
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
119,058,947,373,563,100,000,000,000,000,000,000,000
16
bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | th...
static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, struct sctp_association *asoc, struct sctp_transport *t, struct sctp_chunk *chunk) { sctp_sender_hb_info_t *hbinfo; int was_unconfirmed = 0; /* 8.3 Upon the receipt of the HEARTBEAT ACK, the sender of the * HEARTBEAT should clear the error ...
0
[ "CWE-362" ]
linux
635682a14427d241bab7bbdeebb48a7d7b91638e
16,705,978,392,749,690,000,000,000,000,000,000,000
69
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() ...
node_detect_can_be_slow(Node* node, SlowElementCount* ct) { int r; r = 0; switch (NODE_TYPE(node)) { case NODE_LIST: case NODE_ALT: do { r = node_detect_can_be_slow(NODE_CAR(node), ct); if (r != 0) return r; } while (IS_NOT_NULL(node = NODE_CDR(node))); break; case NODE_QUANT: ...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
156,321,218,273,122,820,000,000,000,000,000,000,000
75
#207: Out-of-bounds write
static int fsmRemove(int dirfd, const char *path, mode_t mode) { return S_ISDIR(mode) ? fsmRmdir(dirfd, path) : fsmUnlink(dirfd, path); }
0
[]
rpm
25a435e90844ea98fe5eb7bef22c1aecf3a9c033
265,727,379,233,689,050,000,000,000,000,000,000,000
4
Set file metadata via fd-based ops for everything but symlinks Regular file ops are fd-based already, for the rest we need to open them manually. Files with temporary suffix must never be followed, for directories (and pre-existing FA_TOUCHed files) use the rpm symlink "root or target owner allowed" rule wrt following...
static int emit_jump(u8 **pprog, void *func, void *ip) { return emit_patch(pprog, func, ip, 0xE9); }
0
[ "CWE-77" ]
linux
e4d4d456436bfb2fe412ee2cd489f7658449b098
189,750,112,754,180,800,000,000,000,000,000,000,000
4
bpf, x86: Validate computation of branch displacements for x86-64 The branch displacement logic in the BPF JIT compilers for x86 assumes that, for any generated branch instruction, the distance cannot increase between optimization passes. But this assumption can be violated due to how the distances are computed. Spec...
buf_to_sig (const byte * buf, size_t len) { PKT_signature *sig = xmalloc_clear (sizeof (PKT_signature)); IOBUF iobuf = iobuf_temp_with_content (buf, len); int save_mode = set_packet_list_mode (0); if (parse_signature (iobuf, PKT_SIGNATURE, len, sig) != 0) { xfree (sig); sig = NULL; } set...
0
[ "CWE-310" ]
gnupg
4bde12206c5bf199dc6e12a74af8da4558ba41bf
319,332,423,826,255,800,000,000,000,000,000,000,000
17
gpg: Distinguish between missing and cleared key flags. * include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the def...