func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
_jpeg_color_space_name (const J_COLOR_SPACE jpeg_color_space) { switch (jpeg_color_space) { case JCS_UNKNOWN: return "UNKNOWN"; case JCS_GRAYSCALE: return "GRAYSCALE"; case JCS_RGB: return "RGB"; case JCS_YCbCr: return "YCbCr"; case JCS_CMYK: return "CMYK"; case JCS_YCCK: return "YCCK"; default: return "invalid...
0
[]
libgxps
123dd99c6a1ae2ef6fcb5547e51fa58e8c954b51
129,808,965,695,522,400,000,000,000,000,000,000,000
12
gxps-images: fix integer overflow in png decoder
get_lifetime(uint32_t v) { static char buf[20]; if (v == (uint32_t)~0UL) return "infinity"; else { snprintf(buf, sizeof(buf), "%us", v); return buf; } }
0
[ "CWE-125" ]
tcpdump
d7505276842e85bfd067fa21cdb32b8a2dc3c5e4
288,417,262,800,856,640,000,000,000,000,000,000,000
11
(for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check Moreover: Add and use *_tstr[] strings. Update four tests outputs accordingly. Fix a space. Wang Junjie of 360 ESG Codesafe Team had independently identified this vulnerability in 2018 by means of fuzzing and provided the packet capture file for the tes...
PHP_FUNCTION(imagetruecolortopalette) { zval *IM; zend_bool dither; zend_long ncolors; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rbl", &IM, &dither, &ncolors) == FAILURE) { return; } if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM), "Image", le_gd)) == NULL) { RETURN_FALSE; } if (...
1
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
92,448,176,728,786,380,000,000,000,000,000,000,000
23
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
hstore_from_arrays(PG_FUNCTION_ARGS) { int32 buflen; HStore *out; Pairs *pairs; Datum *key_datums; bool *key_nulls; int key_count; Datum *value_datums; bool *value_nulls; int value_count; ArrayType *key_array; ArrayType *value_array; int i; if (PG_ARGISNULL(0)) PG_RETURN_NULL(...
1
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
7,041,993,893,014,978,000,000,000,000,000,000,000
106
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, struct rtnl_link_stats64 *storage) { const struct net_device_ops *ops = dev->netdev_ops; if (ops->ndo_get_stats64) { memset(storage, 0, sizeof(*storage)); ops->ndo_get_stats64(dev, storage); } else if (ops->ndo_get_stats) { netdev_stats_to_s...
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
21,148,844,750,308,851,000,000,000,000,000,000,000
16
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are limited to /lib/modules/**. However, CAP_NET_ADMIN...
gsd_xrandr_manager_init (GsdXrandrManager *manager) { Display *dpy = gdk_x11_get_default_xdisplay (); guint keyval = gdk_keyval_from_name (VIDEO_KEYSYM); guint keycode = XKeysymToKeycode (dpy, keyval); manager->priv = GSD_XRANDR_MANAGER_GET_PRIVATE (manager); manager->priv->key...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
286,634,894,862,069,500,000,000,000,000,000,000,000
13
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
int tipc_sock_create_local(int type, struct socket **res) { int rc; struct sock *sk; rc = sock_create_lite(AF_TIPC, type, 0, res); if (rc < 0) { pr_err("Failed to create kernel socket\n"); return rc; } tipc_sk_create(&init_net, *res, 0, 1); sk = (*res)->sk; return 0; }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
110,931,644,097,659,120,000,000,000,000,000,000,000
16
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static inline const Inst *nextInstCall(const Inst *ip) { HERMES_SLOW_ASSERT(isCallType(ip->opCode) && "ip is not of call type"); // The following is written to elicit compares instead of table lookup. // The idea is to present code like so: // if (opcode <= 70) return ip + 4; // if (opcode <= 71) return ...
0
[ "CWE-670", "CWE-703" ]
hermes
b2021df620824627f5a8c96615edbd1eb7fdddfc
308,549,570,709,754,860,000,000,000,000,000,000,000
32
Fix CVE-2020-1914 by using NEXTINST for SaveGeneratorLong Summary: If `SaveGeneratorLong` was emitted, it would accidentally jump to the wrong next instruction, based on how long SaveGenerator was. Make a callout function to handle the common case, and handle the dispatch within each case of the interpreter loop. Fi...
NCURSES_SP_NAME(_nc_do_xmc_glitch) (NCURSES_SP_DCLx attr_t previous) { if (SP_PARM != 0) { attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP_PARM))); while (chg != 0) { if (chg & 1) { SP_PARM->_curscol += magic_cookie_glitch; if (SP_PARM->_curscol >= SP_PARM->_columns) wrap_cursor(NCURSES...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
23,957,427,860,871,237,000,000,000,000,000,000,000
17
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...
vte_sequence_handler_vs (VteTerminal *terminal, GValueArray *params) { terminal->pvt->cursor_visible = TRUE; /* FIXME: should be *more* visible. */ }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
138,704,182,677,908,650,000,000,000,000,000,000,000
5
fix bug #548272 svn path=/trunk/; revision=2365
process_principals(struct ssh *ssh, FILE *f, const char *file, const struct sshkey_cert *cert, struct sshauthopt **authoptsp) { char loc[256], *line = NULL, *cp, *ep; size_t linesize = 0; u_long linenum = 0; u_int found_principal = 0; if (authoptsp != NULL) *authoptsp = NULL; while (getline(&line, &linesi...
0
[ "CWE-200", "CWE-362", "CWE-703" ]
src
779974d35b4859c07bc3cb8a12c74b43b0a7d1e0
291,814,626,300,325,140,000,000,000,000,000,000,000
33
delay bailout for invalid authenticating user until after the packet containing the request has been fully parsed. Reported by Dariusz Tytko and Michał Sajdak; ok deraadt
string a() { return string("a\0c", 3); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
52,203,366,055,728,370,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
void CWebServer::DisplayLanguageCombo(std::string & content_part) { //return a sorted list std::map<std::string, std::string> _ltypes; char szTmp[200]; int ii = 0; while (guiLanguage[ii].szShort != NULL) { _ltypes[guiLanguage[ii].szLong] = guiLanguage[ii].szShort; ii++; } for (const ...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
95,866,580,069,779,200,000,000,000,000,000,000,000
17
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
int vm_brk_flags(unsigned long addr, unsigned long request, unsigned long flags) { struct mm_struct *mm = current->mm; unsigned long len; int ret; bool populate; LIST_HEAD(uf); len = PAGE_ALIGN(request); if (len < request) return -ENOMEM; if (!len) return 0; if (down_write_killable(&mm->mmap_sem)) retu...
0
[ "CWE-476" ]
linux
0a1d52994d440e21def1c2174932410b4f2a98a1
317,586,437,110,604,170,000,000,000,000,000,000,000
25
mm: enforce min addr even if capable() in expand_downwards() security_mmap_addr() does a capability check with current_cred(), but we can reach this code from contexts like a VFS write handler where current_cred() must not be used. This can be abused on systems without SMAP to make NULL pointer dereferences exploitab...
static ulong start_timer(void) { #if defined(__WIN__) return clock(); #else struct tms tms_tmp; return times(&tms_tmp); #endif }
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
223,504,666,656,736,350,000,000,000,000,000,000,000
9
WL#9072: Backport WL#8785 to 5.5
char *flags_string(char *buf, char *end, void *flags_ptr, const char *fmt) { unsigned long flags; const struct trace_print_flags *names; switch (fmt[1]) { case 'p': flags = *(unsigned long *)flags_ptr; /* Remove zone id */ flags &= (1UL << NR_PAGEFLAGS) - 1; names = pageflag_names; break; case 'v': fl...
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
316,478,681,404,563,150,000,000,000,000,000,000,000
27
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...
TEST_F(QueryPlannerTest, CannotIntersectBoundsOfTwoSeparateElemMatches) { MultikeyPaths multikeyPaths{{0U}, {0U}}; addIndex(BSON("a.b" << 1 << "a.c" << 1), multikeyPaths); runQuery( fromjson("{$and: [{a: {$elemMatch: {b: {$gte: 0}, c: {$lt: 20}}}}, " "{a: {$elemMatch: {b: {$lt: 10}...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
196,376,290,114,817,000,000,000,000,000,000,000,000
20
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
static bool fix_net_write_timeout(sys_var *self, THD *thd, enum_var_type type) { if (type != OPT_GLOBAL) my_net_set_write_timeout(&thd->net, thd->variables.net_write_timeout); return false; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
25,744,933,386,616,805,000,000,000,000,000,000,000
6
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...
filter_check_helo_table(struct filter *filter, enum table_service kind, const char *key) { int ret = 0; if (filter->config->helo_table == NULL) return 0; if (table_match(filter->config->helo_table, kind, key) > 0) ret = 1; return filter->config->not_helo_table < 0 ? !ret : ret; }
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
201,464,844,474,996,400,000,000,000,000,000,000,000
11
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
int sysctl_is_seen(struct ctl_table_header *p) { struct ctl_table_set *set = p->set; int res; spin_lock(&sysctl_lock); if (p->unregistering) res = 0; else if (!set->is_seen) res = 1; else res = set->is_seen(set); spin_unlock(&sysctl_lock); return res; }
0
[ "CWE-284", "CWE-264" ]
linux
bfdc0b497faa82a0ba2f9dddcf109231dd519fcc
107,863,151,602,341,230,000,000,000,000,000,000,000
14
sysctl: restrict write access to dmesg_restrict When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel ring buffer. But a root user without CAP_SYS_ADMIN is able to reset dmesg_restrict to 0. This is an issue when e.g. LXC (Linux Containers) are used and complete user space is running without CA...
redrawcmd(void) { int save_in_echowindow = in_echowindow; if (cmd_silent) return; // when 'incsearch' is set there may be no command line while redrawing if (ccline.cmdbuff == NULL) { windgoto(cmdline_row, 0); msg_clr_eos(); return; } // Do not put this in the message window. in_e...
0
[ "CWE-416" ]
vim
1c3dd8ddcba63c1af5112e567215b3cec2de11d0
161,324,002,432,148,420,000,000,000,000,000,000,000
44
patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd Problem: Using freed memory with cmdwin and BufEnter autocmd. Solution: Make sure pointer to b_p_iminsert is still valid.
static inline void hrtimer_force_reprogram(struct hrtimer_cpu_base *base) { }
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
46,858,020,652,481,560,000,000,000,000,000,000,000
1
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
cmsBool _cmsWriteProfileSequence(cmsHPROFILE hProfile, const cmsSEQ* seq) { if (!cmsWriteTag(hProfile, cmsSigProfileSequenceDescTag, seq)) return FALSE; if (cmsGetProfileVersion(hProfile) >= 4.0) { if (!cmsWriteTag(hProfile, cmsSigProfileSequenceIdTag, seq)) return FALSE; } return TRUE; }
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
698,478,489,432,979,600,000,000,000,000,000,000
11
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...
void visit(PrioritizedChoice &ope) override { std::vector<std::shared_ptr<Ope>> opes; for (auto o : ope.opes_) { o->accept(*this); opes.push_back(found_ope); } found_ope = std::make_shared<PrioritizedChoice>(opes); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
332,801,420,117,205,500,000,000,000,000,000,000,000
8
Fix #122
updateWindow(win_T *wp) { // return if already busy updating if (updating_screen) return; update_prepare(); #ifdef FEAT_CLIPBOARD // When Visual area changed, may have to update selection. if (clip_star.available && clip_isautosel_star()) clip_update_selection(&clip_star); if (clip_plus.avai...
0
[ "CWE-122" ]
vim
826bfe4bbd7594188e3d74d2539d9707b1c6a14b
18,861,362,730,030,540,000,000,000,000,000,000,000
39
patch 8.2.3487: illegal memory access if buffer name is very long Problem: Illegal memory access if buffer name is very long. Solution: Make sure not to go over the end of the buffer.
static int blackout_line_skip(int n, int x, int y, int rescan, int *tile_count) { if (tile_blackout[n].cover == 2) { tile_has_diff[n] = 0; return 1; /* skip it */ } else if (tile_blackout[n].cover == 1) { int w, x1, y1, x2, y2, b, hit = 0; if (x + NSCAN > dpy_x) { w = dpy_x - x; } else { w = NS...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
204,116,544,704,043,950,000,000,000,000,000,000,000
43
scan: limit access to shared memory segments to current user
pg_TZDIR(void) { #ifndef SYSTEMTZDIR /* normal case: timezone stuff is under our share dir */ static bool done_tzdir = false; static char tzdir[MAXPGPATH]; if (done_tzdir) return tzdir; get_share_path(my_exec_path, tzdir); strlcpy(tzdir + strlen(tzdir), "/timezone", MAXPGPATH - strlen(tzdir)); done_tzdir = ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
41,243,650,392,722,480,000,000,000,000,000,000,000
20
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
void gnra_del(GF_Box *s) { GF_GenericAudioSampleEntryBox *ptr = (GF_GenericAudioSampleEntryBox *)s; gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)ptr); if (ptr->data) gf_free(ptr->data); gf_free(ptr); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
323,073,652,064,356,000,000,000,000,000,000,000,000
7
prevent dref memleak on invalid input (#1183)
bool operator==(const DoubleVal& other) const { if (is_null && other.is_null) { return true; } if (is_null || other.is_null) { return false; } return val == other.val; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
240,591,416,608,835,950,000,000,000,000,000,000,000
11
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
void php_snmp_write_property(zval *object, zval *member, zval *value, void **cache_slot) { zval tmp_member; php_snmp_object *obj; php_snmp_prop_handler *hnd; if (Z_TYPE_P(member) != IS_STRING) { ZVAL_COPY(&tmp_member, member); convert_to_string(&tmp_member); member = &tmp_member; } obj = Z_SNMP_P(object);...
0
[ "CWE-20" ]
php-src
6e25966544fb1d2f3d7596e060ce9c9269bbdcf8
68,604,513,960,190,800,000,000,000,000,000,000,000
33
Fixed bug #71704 php_snmp_error() Format String Vulnerability
int SSL_set_session(SSL *s, SSL_SESSION *session) { int ret = 0; const SSL_METHOD *meth; if (session != NULL) { meth = s->ctx->method->get_ssl_method(session->ssl_version); if (meth == NULL) meth = s->method->get_ssl_method(session->ssl_version); if (meth == NULL) { ...
0
[ "CWE-362" ]
openssl
708cf593587e2fda67dae9782991ff9fccc781eb
120,407,773,372,319,160,000,000,000,000,000,000,000
38
More ssl_session_dup fixes Fix error handling in ssl_session_dup, as well as incorrect setting up of the session ticket. Follow on from CVE-2015-1791. Thanks to LibreSSL project for reporting these issues. Reviewed-by: Tim Hudson <tjh@openssl.org>
box_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); BOX *box = (BOX *) palloc(sizeof(BOX)); int isopen; char *s; double x, y; if ((!path_decode(FALSE, 2, str, &isopen, &s, &(box->high))) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
333,425,894,611,486,130,000,000,000,000,000,000,000
31
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static int add_recent_packed(const unsigned char *sha1, struct packed_git *p, uint32_t pos, void *data) { struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; add_recent_object(sha1, p->mtime, data); return 0; }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
96,153,962,451,203,550,000,000,000,000,000,000,000
11
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
vpeekc(void) { if (old_char != -1) return old_char; return vgetorpeek(FALSE); }
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
180,846,508,137,810,340,000,000,000,000,000,000,000
6
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
void perf_event_ksymbol(u16 ksym_type, u64 addr, u32 len, bool unregister, const char *sym) { struct perf_ksymbol_event ksymbol_event; char name[KSYM_NAME_LEN]; u16 flags = 0; int name_len; if (!atomic_read(&nr_ksymbol_events)) return; if (ksym_type >= PERF_RECORD_KSYMBOL_TYPE_MAX || ksym_type == PERF...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
156,218,829,567,908,680,000,000,000,000,000,000,000
45
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 MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { int c; ImageInfo *write_info; MagickBooleanType status; MagickOffsetType scene; RectangleInfo page; register ssize_t i; register unsigned char *q; size_t ...
0
[ "CWE-200" ]
ImageMagick
9fd10cf630832b36a588c1545d8736539b2f1fb5
321,776,244,920,413,800,000,000,000,000,000,000,000
433
https://github.com/ImageMagick/ImageMagick/issues/592
g_keyfile_settings_backend_reset (GSettingsBackend *backend, const gchar *key, gpointer origin_tag) { GKeyfileSettingsBackend *kfsb = G_KEYFILE_SETTINGS_BACKEND (backend); if (set_to_keyfile (kfsb, key, NULL)) g_keyfile_settings_...
0
[ "CWE-732" ]
glib
5e4da714f00f6bfb2ccd6d73d61329c6f3a08429
9,371,643,502,175,165,000,000,000,000,000,000,000
11
keyfile settings: Use tighter permissions When creating directories, create them with 700 permissions, instead of 777. Closes: #1658
QPDF::compute_encryption_parameters_V5( char const* user_password, char const* owner_password, int V, int R, int key_len, int P, bool encrypt_metadata, std::string const& id1, std::string& encryption_key, std::string& O, std::string& U, std::string& OE, std::string& UE, std::string& Perms) { ...
0
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
71,346,904,445,511,670,000,000,000,000,000,000,000
18
Pad keys to avoid memory errors (fixes #147)
OPJ_BOOL opj_j2k_write_sod( opj_j2k_t *p_j2k, opj_tcd_t * p_tile_coder, OPJ_BYTE * p_data, OPJ_UINT32 * p_data_written, ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
45,435,347,543,471,250,000,000,000,000,000,000,000
73
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
static int handle_one_recv_msg(struct ipmi_smi *intf, struct ipmi_smi_msg *msg) { int requeue; int chan; pr_debug("Recv: %*ph\n", msg->rsp_size, msg->rsp); if ((msg->data_size >= 2) && (msg->data[0] == (IPMI_NETFN_APP_REQUEST << 2)) && (msg->data[1] == IPMI_SEND_MSG_CMD) && (msg->user_dat...
0
[ "CWE-400", "CWE-401" ]
linux
4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab
156,502,943,046,804,600,000,000,000,000,000,000,000
196
ipmi: Fix memory leak in __ipmi_bmc_register In the impelementation of __ipmi_bmc_register() the allocated memory for bmc should be released in case ida_simple_get() fails. Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Message-Id...
int inode_init_always(struct super_block *sb, struct inode *inode) { static const struct inode_operations empty_iops; static const struct file_operations empty_fops; struct address_space *const mapping = &inode->i_data; inode->i_sb = sb; inode->i_blkbits = sb->s_blocksize_bits; inode->i_flags = 0; atomic_set(&i...
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
210,342,695,843,439,530,000,000,000,000,000,000,000
76
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
void st_select_lex_node::move_as_slave(st_select_lex_node *new_master) { exclude_from_tree(); if (new_master->slave) { st_select_lex_node *curr= new_master->slave; for ( ; curr->next ; curr= curr->next) ; prev= &curr->next; } else prev= &new_master->slave; *prev= this; next= 0; master= n...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
54,345,961,351,263,600,000,000,000,000,000,000,000
15
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
decompose_hangul (gunichar s, gunichar * r, gsize * result_len) { gint SIndex = s - SBase; gint TIndex = SIndex % TCount; if (r) { r[0] = LBase + SIndex / NCount; r[1] = VBase + (SIndex % NCount) / TCount; } if (TIndex) { if (r) r[2] = TBase + TIndex; *result_len = 3; ...
0
[]
libidn
2e97c2796581c27213962c77f5a8571a598f9a2e
318,183,994,601,285,580,000,000,000,000,000,000,000
20
libidn: stringprep_utf8_to_ucs4 now rejects invalid UTF-8. CVE-2015-2059
int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force) { struct inet_frag_queue *q; int work, evicted = 0; if (!force) { if (frag_mem_limit(nf) <= nf->high_thresh) return 0; } work = frag_mem_limit(nf) - nf->low_thresh; while (work > 0) { spin_lock(&nf->lru_lock); if (list_emp...
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
203,155,601,143,889,100,000,000,000,000,000,000,000
36
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
static void swap4(unsigned int *val) { #ifdef TINYGLTF_LITTLE_ENDIAN (void)val; #else unsigned int tmp = *val; unsigned char *dst = reinterpret_cast<unsigned char *>(val); unsigned char *src = reinterpret_cast<unsigned char *>(&tmp); dst[0] = src[3]; dst[1] = src[2]; dst[2] = src[1]; dst[3] = src[0]; #...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
137,435,152,577,165,200,000,000,000,000,000,000,000
14
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static void __init xen_write_gdt_entry_boot(struct desc_struct *dt, int entry, const void *desc, int type) { trace_xen_cpu_write_gdt_entry(dt, entry, desc, type); switch (type) { case DESC_LDT: case DESC_TSS: /* ignore */ break; default: { xmaddr_t maddr = virt_to_machine(&dt[entry]); if (HYPER...
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
51,466,714,106,586,330,000,000,000,000,000,000,000
20
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
std::string CommandHelpers::parseNsFullyQualified(const BSONObj& cmdObj) { BSONElement first = cmdObj.firstElement(); uassert(ErrorCodes::BadValue, str::stream() << "collection name has invalid type " << typeName(first.type()), first.canonicalType() == canonicalizeBSONType(mongo::String)...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
46,276,073,945,549,950,000,000,000,000,000,000,000
11
SERVER-38275 ban find explain with UUID
static int update_remove_entry(struct libmnt_update *upd, struct libmnt_lock *lc) { struct libmnt_table *tb; int rc = 0, u_lc = -1; assert(upd); assert(upd->target); DBG(UPDATE, mnt_debug_h(upd, "%s: remove entry", upd->filename)); if (lc) mnt_lock_file(lc); else if (upd->userspace_only) u_lc = utab_lock(...
1
[ "CWE-399" ]
util-linux
28594c9d4fc8a4108408c5749b62933b967ba23b
66,476,566,422,111,170,000,000,000,000,000,000,000
33
libmount: block signals when update utab Signed-off-by: Karel Zak <kzak@redhat.com>
DECtoASCII(unsigned ch) { if (xtermIsDecGraphic(ch)) { ch = CharOf("###########+++++##-##++++|######"[ch]); /* 01234567890123456789012345678901 */ } return ch; }
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
132,930,671,173,685,100,000,000,000,000,000,000,000
8
snapshot of project "xterm", label xterm-365d
void MonClient::_finish_command(MonCommand *r, int ret, string rs) { ldout(cct, 10) << __func__ << " " << r->tid << " = " << ret << " " << rs << dendl; if (r->prval) *(r->prval) = ret; if (r->prs) *(r->prs) = rs; if (r->onfinish) finisher.queue(r->onfinish, ret); mon_commands.erase(r->tid); dele...
0
[ "CWE-294" ]
ceph
2927fd91d41e505237cc73f9700e5c6a63e5cb4f
62,293,625,680,583,270,000,000,000,000,000,000,000
12
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
bool matches(const Http::RequestHeaderMap& headers) const override { if (Http::HeaderUtility::isConnect(headers) && BaseMatcherImpl::matchRoute(headers)) { ENVOY_LOG(debug, "CONNECT requirement matched."); return true; } return false; }
0
[ "CWE-476", "CWE-703" ]
envoy
9371333230b1a6e1be2eccf4868771e11af6253a
205,561,209,306,454,640,000,000,000,000,000,000,000
8
CVE-2021-43824 jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter configured with regex match. Signed-off-by: Yan Avlasov <yavlasov@google.com>
void CIRCSock::Timeout() { DEBUG(GetSockName() << " == Timeout()"); if (!m_pNetwork->GetUser()->IsBeingDeleted()) { m_pNetwork->PutStatus( t_s("IRC connection timed out. Reconnecting...")); } m_pNetwork->ClearRawBuffer(); m_pNetwork->ClearMotdBuffer(); ResetChans(); m_s...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
30,625,064,388,157,605,000,000,000,000,000,000,000
12
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
static int go7007_snd_hw_free(struct snd_pcm_substream *substream) { struct go7007 *go = snd_pcm_substream_chip(substream); go->audio_deliver = NULL; if (substream->runtime->dma_bytes > 0) vfree(substream->runtime->dma_area); substream->runtime->dma_bytes = 0; return 0; }
0
[ "CWE-401" ]
linux
9453264ef58638ce8976121ac44c07a3ef375983
224,073,932,340,857,000,000,000,000,000,000,000,000
10
media: go7007: fix a miss of snd_card_free go7007_snd_init() misses a snd_card_free() in an error path. Add the missed call to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
static inline void *f2fs_kvmalloc(struct f2fs_sb_info *sbi, size_t size, gfp_t flags) { if (time_to_inject(sbi, FAULT_KVMALLOC)) { f2fs_show_injection_info(FAULT_KVMALLOC); return NULL; } return kvmalloc(size, flags); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
60,623,475,593,631,570,000,000,000,000,000,000,000
10
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
shmem_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { struct inode *inode = mapping->host; pgoff_t index = pos >> PAGE_CACHE_SHIFT; return shmem_getpage(inode, index, pagep, SGP_WRITE, NULL); }
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
334,816,636,596,101,070,000,000,000,000,000,000,000
8
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
static void write_i2c_regvals(struct sd *sd, const struct ov_i2c_regvals *regvals, int n) { while (--n >= 0) { i2c_w(sd, regvals->reg, regvals->val); regvals++; } }
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
105,399,482,908,786,580,000,000,000,000,000,000,000
9
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
bool ValidateRC2() { std::cout << "\nRC2 validation suite running...\n\n"; FileSource valdata(CRYPTOPP_DATA_DIR "TestData/rc2val.dat", true, new HexDecoder); HexEncoder output(new FileSink(std::cout)); SecByteBlock plain(RC2Encryption::BLOCKSIZE), cipher(RC2Encryption::BLOCKSIZE), out(RC2Encryption::BLOCKSIZ...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
286,137,879,418,149,700,000,000,000,000,000,000,000
40
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
NOEXPORT void ntlm(CLI *c, SERVICE_OPTIONS *opt) { char *line, buf[BUFSIZ], *ntlm1_txt, *ntlm2_txt, *ntlm3_txt, *tmpstr; long content_length=0; /* no HTTP content */ /* send Proxy-Authorization (phase 1) */ fd_printf(c, c->remote_fd.fd, "Proxy-Connection: keep-alive"); ntlm1_txt=ntlm1(); if(!nt...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
201,630,416,539,402,480,000,000,000,000,000,000,000
70
stunnel-5.57
TEST_P(JSITest, ScopeDoesNotCrashTest) { Scope scope(rt); Object o(rt); }
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
234,727,554,228,083,340,000,000,000,000,000,000,000
4
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
static void fts3OffsetsFunc( sqlite3_context *pContext, /* SQLite function call context */ int nVal, /* Size of argument array */ sqlite3_value **apVal /* Array of arguments */ ){ Fts3Cursor *pCsr; /* Cursor handle passed through apVal[0] */ UNUSED_PARAMETER...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
276,533,099,963,675,060,000,000,000,000,000,000,000
16
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static inline void *nl80211hdr_put(struct sk_buff *skb, u32 pid, u32 seq, int flags, u8 cmd) { /* since there is no private header just add the generic one */ return genlmsg_put(skb, pid, seq, &nl80211_fam, flags, cmd); }
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
181,257,993,360,583,850,000,000,000,000,000,000,000
6
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
void blk_clear_preempt_only(struct request_queue *q) { blk_queue_flag_clear(QUEUE_FLAG_PREEMPT_ONLY, q); wake_up_all(&q->mq_freeze_wq); }
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
127,921,680,643,974,930,000,000,000,000,000,000,000
5
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
finished_read (void *vp, int *error) { struct command *command = vp; if (*error) { fprintf (stderr, "read at offset %" PRId64 " failed: %s\n", command->offset, strerror (*error)); exit (EXIT_FAILURE); } if (allocated || sparse_size == 0) { /* If sparseness detection (see below) is tur...
0
[ "CWE-252" ]
libnbd
8d444b41d09a700c7ee6f9182a649f3f2d325abb
185,293,507,190,936,900,000,000,000,000,000,000,000
115
copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails nbdcopy has a nasty bug when performing multi-threaded copies using asynchronous nbd calls - it was blindly treating the completion of an asynchronous command as successful, rather than checking the *error parameter. This can result in the silent creation o...
int WavpackFlushSamples (WavpackContext *wpc) { while (wpc->acc_samples) { uint32_t block_samples; if (wpc->acc_samples > wpc->block_samples) block_samples = wpc->acc_samples / 2; else block_samples = wpc->acc_samples; if (!pack_streams (wpc, block_samples))...
0
[ "CWE-703", "CWE-835" ]
WavPack
070ef6f138956d9ea9612e69586152339dbefe51
59,743,016,171,237,550,000,000,000,000,000,000,000
19
issue #53: error out on zero sample rate
GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen) { cairo_save (cairo); double *ctm; cairo_matrix_t matrix; ctm = state->getCTM(); matrix.xx = ctm[0]; matrix.yx = ctm[1]; matrix.xy = ctm[2]; matrix.y...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
60,748,083,725,522,790,000,000,000,000,000,000,000
29
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
CUser* FindUser(const CString& sUsername) { if (sUsername.Equals("$me") || sUsername.Equals("$user")) return GetUser(); CUser* pUser = CZNC::Get().FindUser(sUsername); if (!pUser) { PutModule(t_f("Error: User [{1}] does not exist!")(sUsername)); return nul...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
301,028,425,373,533,340,000,000,000,000,000,000,000
15
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static int tc_chain_notify(struct tcf_chain *chain, struct sk_buff *oskb, u32 seq, u16 flags, int event, bool unicast) { u32 portid = oskb ? NETLINK_CB(oskb).portid : 0; struct tcf_block *block = chain->block; struct net *net = block->net; struct sk_buff *skb; int err = 0; skb = alloc_skb(NLMSG_GOODSIZE, G...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
266,086,381,816,666,760,000,000,000,000,000,000,000
28
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
proxy_C_DecryptDigestUpdate (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR enc_part, CK_ULONG enc_part_len, CK_BYTE_PTR part, CK_ULONG_PTR part_len) { State...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
314,333,630,791,988,260,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
readconf_depends(driver_instance *d, uschar *s) { int count = *(d->info->options_count); optionlist *ol; uschar *ss; for (ol = d->info->options; ol < d->info->options + count; ol++) { void *options_block; uschar *value; int type = ol->type & opt_mask; if (type != opt_stringptr) continue; options_block = ((...
0
[ "CWE-264" ]
exim
e2f5dc151e2e79058e93924e6d35510557f0535d
333,959,737,944,281,400,000,000,000,000,000,000,000
27
Check configure file permissions even for non-default files if still privileged (Bug 1044, CVE-2010-4345)
static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, uint8_t *data_start, unsigned int data_size, int is_alpha_chunk) { WebPContext *s = avctx->priv_data; int w, h, ret, i, used; if (!is_alpha_chunk...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
285,020,712,509,657,000,000,000,000,000,000,000,000
112
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...
parser_parse_export_statement (parser_context_t *context_p) /**< context */ { JERRY_ASSERT (context_p->token.type == LEXER_KEYW_EXPORT); JERRY_ASSERT (context_p->module_names_p == NULL); parser_module_check_request_place (context_p); bool consume_last_statement = false; lexer_next_token (context_p); swit...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
315,864,247,364,083,960,000,000,000,000,000,000,000
171
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
void QPaintEngineEx::drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) { Q_ASSUME(pointCount >= 2); int count = pointCount<<1; QVarLengthArray<qreal> pts(count); for (int i=0; i<count; ++i) pts[i] = ((const int *) points)[i]; QVectorPath path(pts.data(), pointCount, n...
0
[ "CWE-787" ]
qtbase
6b400e3147dcfd8cc3a393ace1bd118c93762e0c
272,335,151,060,510,660,000,000,000,000,000,000,000
17
Improve fix for avoiding huge number of tiny dashes Some pathological cases were not caught by the previous fix. Fixes: QTBUG-95239 Pick-to: 6.2 6.1 5.15 Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
static long _perf_ioctl(struct perf_event *event, unsigned int cmd, unsigned long arg) { void (*func)(struct perf_event *); u32 flags = arg; switch (cmd) { case PERF_EVENT_IOC_ENABLE: func = _perf_event_enable; break; case PERF_EVENT_IOC_DISABLE: func = _perf_event_disable; break; case PERF_EVENT_IOC_RES...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
15,316,682,197,599,818,000,000,000,000,000,000,000
79
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
static void setup_DMA(void) { unsigned long f; if (raw_cmd->length == 0) { int i; pr_info("zero dma transfer size:"); for (i = 0; i < raw_cmd->cmd_count; i++) pr_cont("%x,", raw_cmd->cmd[i]); pr_cont("\n"); cont->done(0); FDCS->reset = 1; return; } if (((unsigned long)raw_cmd->kernel_data) % 512)...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
166,792,359,581,514,930,000,000,000,000,000,000,000
45
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
void Http2Session::Consume(Local<External> external) { StreamBase* stream = static_cast<StreamBase*>(external->Value()); stream->Consume(); stream_ = stream; prev_alloc_cb_ = stream->alloc_cb(); prev_read_cb_ = stream->read_cb(); stream->set_alloc_cb({ Http2Session::OnStreamAllocImpl, this }); stream->set...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
14,951,332,559,224,460,000,000,000,000,000,000,000
12
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 git_checkout_tree( git_repository *repo, const git_object *treeish, const git_checkout_options *opts) { int error; git_index *index; git_tree *tree = NULL; git_iterator *tree_i = NULL; git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT; if (!treeish && !repo) { git_error_set(GIT_ERROR_CHECKOUT, ...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
147,779,035,588,795,680,000,000,000,000,000,000,000
59
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
void CoreNetwork::removeChannelKey(const QString &channel) { _channelKeys.remove(channel.toLower()); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
110,528,045,199,490,330,000,000,000,000,000,000,000
4
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
dissect_kafka_update_metadata_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { gint32 controller_id; /* controller_id */ offset = dissect_kafka_int32(tree, hf_kafka_controller_id, tvb, pinfo, offset, &controlle...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
182,054,196,773,886,920,000,000,000,000,000,000,000
36
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input)); TfLiteTensor* output; TF_LITE_ENSURE_OK(...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
148,470,043,954,273,760,000,000,000,000,000,000,000
13
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
omap2_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len) { char *p = buf; pr_reg(REVISION); pr_reg(IRQSTATUS); pr_reg(IRQENABLE); pr_reg(WALKING_ST); pr_reg(CNTL); pr_reg(FAULT_AD); pr_reg(TTB); pr_reg(LOCK); pr_reg(LD_TLB); pr_reg(CAM); pr_reg(RAM); pr_reg(GFLUSH); pr_reg(FLUSH_ENTRY); pr_r...
0
[]
linux
e203db293863fa15b4b1917d4398fb5bd63c4e88
19,142,438,075,702,776,000,000,000,000,000,000,000
23
iommu/omap: Fix debug_read_tlb() to use seq_printf() The debug_read_tlb() uses the sprintf() functions directly on the buffer allocated by buf = kmalloc(count), without taking into account the size of the buffer, with the consequence corrupting the heap, depending on the count requested by the user. The patch fixes t...
_g_locale_charset_unalias (const char *codeset) { const char *aliases; if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = _g_locale_get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += st...
0
[]
glib
3529bb4450a519959a5d9cb787404296322618a1
270,053,240,139,104,500,000,000,000,000,000,000,000
27
libcharset: Drop a redundant environment variable It was used for running tests when we built with autotools, but is no longer used in the Meson build system. If we need something similar in future, it should be done by adding internal API to override the directory on a per-call basis, rather than loading a path from ...
Proto_EndElement(GMarkupParseContext *parseContext, const gchar *elementName, gpointer userData, GError **error) { ProtoRequest *req = (ProtoRequest *) userData; #if VGAUTH_PROTO_TRACE Debug("%s: elementName '%s'\n", __FUNCTION__, elementName); #endif switch...
0
[]
open-vm-tools
70a74758bfe0042c27f15ce590fb21a2bc54d745
327,351,585,885,695,600,000,000,000,000,000,000,000
83
Properly check authorization on incoming guestOps requests. Fix public pipe request checks. Only a SessionRequest type should be accepted on the public pipe.
unsigned char *skb_pull(struct sk_buff *skb, unsigned int len) { return skb_pull_inline(skb, len); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
330,970,915,219,349,100,000,000,000,000,000,000,000
4
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
_g_line_get_prev_field (const char *line, int start_from, int field_n) { const char *f_start, *f_end; f_start = line + start_from - 1; while ((*f_start == ' ') && (*f_start != *line)) f_start--; f_end = f_start; while ((field_n > 0) && (*f_start != *line)) { if (*f_start == ' ') { fi...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
50,576,119,198,409,230,000,000,000,000,000,000,000
26
libarchive: sanitize filenames before extracting
_Unpickler_MemoCleanup(UnpicklerObject *self) { Py_ssize_t i; PyObject **memo = self->memo; if (self->memo == NULL) return; self->memo = NULL; i = self->memo_size; while (--i >= 0) { Py_XDECREF(memo[i]); } PyMem_FREE(memo); }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
263,688,784,323,204,580,000,000,000,000,000,000,000
14
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
check_dirname(volatile VALUE *dir) { VALUE d = *dir; char *path, *pend; long len; rb_encoding *enc; rb_secure(2); FilePathValue(d); enc = rb_enc_get(d); RSTRING_GETMEM(d, path, len); pend = path + len; pend = rb_enc_path_end(rb_enc_path_skip_prefix(path, pend, enc), pend, enc); ...
0
[ "CWE-22" ]
ruby
143eb22f1877815dd802f7928959c5f93d4c7bb3
30,488,468,324,005,030,000,000,000,000,000,000,000
18
merge revision(s) 62989: dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c...
const Buffers::inputList& Buffers::getData() const { return dataList_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
304,841,771,850,337,260,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
Table_scope_and_contents_source_st::fix_period_fields(THD *thd, Alter_info *alter_info) { if (!period_info.name) return false; Table_period_info::start_end_t &period= period_info.period; List_iterator<Create_field> it(alter_info->create_list); while (Cr...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
141,518,328,538,475,700,000,000,000,000,000,000,000
18
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, ExceptionInfo *exception) { char page_geometry[MaxTextExtent]; Image *image; MagickBooleanType logging; volatile int first_mng_object, object_id, term_chunk_found, skip_to_iend; volatile ssize_t ...
0
[ "CWE-125" ]
ImageMagick6
34adc98afd5c7e7fb774d2ebdaea39e831c24dce
68,175,093,997,290,420,000,000,000,000,000,000,000
2,391
https://github.com/ImageMagick/ImageMagick/issues/1561
TEST_P(Http2MetadataIntegrationTest, ProxyLargeMetadataInRequest) { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(default_request_headers_); request_encoder_ = &encoder_decoder.first; auto response = std::move(encoder_decoder.second);...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
169,481,317,280,388,220,000,000,000,000,000,000,000
28
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
TPM2B_SENSITIVE_Unmarshal(TPM2B_SENSITIVE *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; INT32 startSize; if (rc == TPM_RC_SUCCESS) { rc = UINT16_Unmarshal(&target->size, buffer, size); } if (target->size != 0) { if (rc == TPM_RC_SUCCESS) { startSize = *size; } if (...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
305,652,057,191,096,050,000,000,000,000,000,000,000
24
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
rb_str_to_f(str) VALUE str; { return rb_float_new(rb_str_to_dbl(str, Qfalse)); }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
281,346,634,203,207,870,000,000,000,000,000,000,000
5
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
g_file_load_bytes (GFile *file, GCancellable *cancellable, gchar **etag_out, GError **error) { gchar *contents; gsize len; g_return_val_if_fail (G_IS_FILE (file), NULL); g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE ...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
218,564,769,611,761,430,000,000,000,000,000,000,000
36
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
status_print_idlist(stream * s, const ushort * idlist, int nid, const char *title) { int i; for (i = 0; i < nid; i++) { char idstr[6]; /* ddddL and a null */ int n, l; n = idlist[i] >> 6; l = (idlist[i] & 077) + 'A' - 1; gs_snprintf(idstr, s...
0
[ "CWE-787" ]
ghostpdl
e1134d375e2ca176068e19a2aa9b040baffe1c22
247,727,069,834,695,960,000,000,000,000,000,000,000
16
Bug 705156(1): Avoid double free of PCL error buffer
static int ssl3_get_record(SSL *s) { int ssl_major,ssl_minor,al; int enc_err,n,i,ret= -1; SSL3_RECORD *rr; SSL_SESSION *sess; unsigned char *p; unsigned char md[EVP_MAX_MD_SIZE]; short version; unsigned mac_size; size_t extra; unsigned empty_record_count = 0; rr= &(s->s3->rrec); sess=s->session; if (s->...
0
[]
openssl
94d1f4b0f3d262edf1cf7023a01d5404945035d5
287,007,511,328,860,700,000,000,000,000,000,000,000
289
Fix use after free.
static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_encrypt_change *ev = (void *) skb->data; struct hci_conn *conn; BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); hci_dev_lock(hdev); conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); if (!conn) ...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
9,787,503,066,801,235,000,000,000,000,000,000,000
117
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static int copy_msghdr_from_user(struct msghdr *kmsg, struct user_msghdr __user *umsg, struct sockaddr __user **save_addr, struct iovec **iov) { struct user_msghdr msg; ssize_t err; if (copy_from_user(&msg, umsg, sizeof(*umsg))) return -EFAULT; kmsg->msg_control = (void __force *)msg.msg_control;...
0
[]
linux
d69e07793f891524c6bbf1e75b9ae69db4450953
304,440,902,643,031,800,000,000,000,000,000,000,000
51
net: disallow ancillary data for __sys_{send,recv}msg_file() Only io_uring uses (and added) these, and we want to disallow the use of sendmsg/recvmsg for anything but regular data transfers. Use the newly added prep helper to split the msghdr copy out from the core function, to check for msg_control and msg_controllen...
isdn_net_newslave(char *parm) { char *p = strchr(parm, ','); isdn_net_dev *n; char newname[10]; if (p) { /* Slave-Name MUST not be empty */ if (!strlen(p + 1)) return NULL; strcpy(newname, p + 1); *p = 0; /* Master must already exist */ if (!(n = isdn_net_findif(parm))) return NULL; /* Master m...
1
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
224,858,443,958,411,800,000,000,000,000,000,000,000
25
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
bool OSD::_is_healthy() { if (!cct->get_heartbeat_map()->is_healthy()) { dout(1) << "is_healthy false -- internal heartbeat failed" << dendl; return false; } if (is_waiting_for_healthy()) { Mutex::Locker l(heartbeat_lock); utime_t cutoff = ceph_clock_now(); cutoff -= cct->_conf->osd_heartbeat...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
274,773,348,147,293,680,000,000,000,000,000,000,000
28
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static bool bnx2x_trylock_leader_lock(struct bnx2x *bp) { return bnx2x_trylock_hw_lock(bp, bnx2x_get_leader_lock_resource(bp)); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
331,751,004,611,724,630,000,000,000,000,000,000,000
4
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...