func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) { int error= 0; uint count= 0; Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; DBUG_ENTER("commit_one_phase_2"); if (is_real_trans) DEBUG_SYNC(thd, "commit_one_phase_2"); if (ha_info) { for (; ha_info; ha_info= ha_i...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
73,326,996,944,434,730,000,000,000,000,000,000,000
49
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
entityDeclSplit(void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx; if ((ctxt != NULL) && (ctxt->user_sax != NULL) && (ctxt->user_sax->entityDecl != NULL)) ctxt->user_sax->entityD...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
24,046,399,177,876,920,000,000,000,000,000,000,000
9
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
Tfloat _cubic_atX_p(const float fx, const int y=0, const int z=0, const int c=0) const { const float nfx = cimg::type<float>::is_nan(fx)?0:cimg::mod(fx,(float)_width); const int x = (int)nfx; const float dx = nfx - x; const int px = cimg::mod(x - 1,width()), ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
142,746,777,420,479,400,000,000,000,000,000,000,000
14
.
static int queue_pages_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk) { struct vm_area_struct *vma = walk->vma; struct page *page; struct queue_pages *qp = walk->private; unsigned long flags = qp->flags; int nid, ret; pte_t *pte; spinlock_t *ptl; if (pmd_trans_huge(*pmd))...
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
273,069,325,830,568,860,000,000,000,000,000,000,000
74
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
CheckKeyBehaviors(XkbDescPtr xkb, xkbSetMapReq * req, xkbBehaviorWireDesc ** wireRtrn, int *errorRtrn) { register xkbBehaviorWireDesc *wire = *wireRtrn; register XkbServerMapPtr server = xkb->server; register unsigned i; unsigned first, last; if (((req->present &...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
33,797,466,290,672,923,000,000,000,000,000,000,000
49
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
reset_peer_stats(peer_t *p, double offset) { int i; bool small_ofs = fabs(offset) < STEP_THRESHOLD; /* Used to set p->filter_datapoint[i].d_dispersion = MAXDISP * and clear reachable bits, but this proved to be too agressive: * after step (tested with suspending laptop for ~30 secs), * this caused all previou...
0
[ "CWE-399" ]
busybox
150dc7a2b483b8338a3e185c478b4b23ee884e71
77,144,039,874,289,940,000,000,000,000,000,000,000
42
ntpd: respond only to client and symmetric active packets The busybox NTP implementation doesn't check the NTP mode of packets received on the server port and responds to any packet with the right size. This includes responses from another NTP server. An attacker can send a packet with a spoofed source address in orde...
static inline void __set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) { unsigned int ckpt_flags; ckpt_flags = le32_to_cpu(cp->ckpt_flags); ckpt_flags |= f; cp->ckpt_flags = cpu_to_le32(ckpt_flags); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
41,833,137,233,740,270,000,000,000,000,000,000,000
8
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static void blk_mq_rq_timer(unsigned long priv) { struct request_queue *q = (struct request_queue *)priv; struct blk_mq_timeout_data data = { .next = 0, .next_set = 0, }; struct blk_mq_hw_ctx *hctx; int i; queue_for_each_hw_ctx(q, hctx, i) { /* * If not software queues are currently mapped to this *...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
134,070,352,119,754,950,000,000,000,000,000,000,000
32
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
TPUTS_PROTO(outc, c) { int rc = c; if (interrupted) { char tmp = (char) c; if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1) rc = EOF; } else { rc = putc(c, stdout); } TPUTS_RETURN(rc); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
78,130,408,004,716,880,000,000,000,000,000,000,000
13
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...
mptctl_readtest (unsigned long arg) { struct mpt_ioctl_test __user *uarg = (void __user *) arg; struct mpt_ioctl_test karg; MPT_ADAPTER *ioc; int iocnum; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) { printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - " "Unable to read in mpt_ioctl_test stru...
1
[ "CWE-362", "CWE-369" ]
linux
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
21,406,778,798,702,830,000,000,000,000,000,000,000
48
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 ...
static void vnc_async_encoding_start(VncState *orig, VncState *local) { local->vnc_encoding = orig->vnc_encoding; local->features = orig->features; local->ds = orig->ds; local->vd = orig->vd; local->lossy_rect = orig->lossy_rect; local->write_pixels = orig->write_pixels; local->client_pf = o...
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
273,649,180,270,712,780,000,000,000,000,000,000,000
19
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
int32_t DecimalQuantity::getLowerDisplayMagnitude() const { // If this assertion fails, you need to call roundToInfinity() or some other rounding method. // See the comment in the header file explaining the "isApproximate" field. U_ASSERT(!isApproximate); int32_t magnitude = scale; int32_t result =...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
326,280,293,232,287,230,000,000,000,000,000,000,000
9
ICU-20246 Fixing another integer overflow in number parsing.
xfs_bmap_add_attrfork_btree( xfs_trans_t *tp, /* transaction pointer */ xfs_inode_t *ip, /* incore inode pointer */ xfs_fsblock_t *firstblock, /* first block allocated */ struct xfs_defer_ops *dfops, /* blocks to free at commit */ int *flags) /* inode logging flags */ { xfs_btree_cur_t *cur; /* btree c...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
76,367,538,082,041,950,000,000,000,000,000,000,000
39
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
static bool is_nan(const T) { return false; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
213,227,344,877,845,400,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
GF_Box *lsrc_box_new() { ISOM_DECL_BOX_ALLOC(GF_LASERConfigurationBox, GF_ISOM_BOX_TYPE_LSRC); return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
327,271,889,849,913,100,000,000,000,000,000,000,000
5
fixed #1587
flow_push_mpls(struct flow *flow, int n, ovs_be16 mpls_eth_type, struct flow_wildcards *wc, bool clear_flow_L3) { ovs_assert(eth_type_mpls(mpls_eth_type)); ovs_assert(n < FLOW_MAX_MPLS_LABELS); if (n) { int i; if (wc) { memset(&wc->masks.mpls_lse, 0xff, sizeof *w...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
183,244,551,892,005,400,000,000,000,000,000,000,000
49
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
int wake_up_state(struct task_struct *p, unsigned int state) { return try_to_wake_up(p, state, 0); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
19,151,082,011,988,773,000,000,000,000,000,000,000
4
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
void DDGifSlurp(GifInfo *info, bool decode, bool exitAfterFrame) { GifRecordType RecordType; GifByteType *ExtData; int ExtFunction; GifFileType *gifFilePtr; gifFilePtr = info->gifFilePtr; uint_fast32_t lastAllocatedGCBIndex = 0; do { if (DGifGetRecordType(gifFilePtr, &RecordType) == GIF_ERROR) { break; } ...
1
[ "CWE-415" ]
android-gif-drawable
cc5b4f8e43463995a84efd594f89a21f906c2d20
53,588,151,014,222,600,000,000,000,000,000,000,000
134
Do not realloc array if new raster size is 0. if realloc() is called with 0 size it may return NULL and this will be incorrectly handled as not enough memory and (also) rasterBits will be freed by realloc but we will not update it.
static void jas_icclut16_destroy(jas_iccattrval_t *attrval) { jas_icclut16_t *lut16 = &attrval->data.lut16; if (lut16->clut) { jas_free(lut16->clut); lut16->clut = 0; } if (lut16->intabs) { jas_free(lut16->intabs); lut16->intabs = 0; } if (lut16->intabsbuf) { jas_free(lut16->intabsbuf); lut16->intabsb...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
301,211,177,238,304,060,000,000,000,000,000,000,000
24
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...
ut64 MACH0_(get_main)(struct MACH0_(obj_t)* bin) { ut64 addr = 0LL; struct symbol_t *symbols; int i; if (!(symbols = MACH0_(get_symbols) (bin))) { return 0; } for (i = 0; !symbols[i].last; i++) { if (!strcmp (symbols[i].name, "_main")) { addr = symbols[i].addr; break; } } free (symbols); if (!add...
0
[ "CWE-416" ]
radare2
d1e8ac62c6d978d4662f69116e30230d43033c92
181,347,900,879,325,500,000,000,000,000,000,000,000
41
Fix null deref and uaf in mach0 parser
virtual GBool fillMaskCSPattern(GfxState * state) { return state->getFillColorSpace()->getMode() == csPattern; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
330,899,141,685,462,700,000,000,000,000,000,000,000
2
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void cleanup_mnt(struct mount *mnt) { /* * This probably indicates that somebody messed * up a mnt_want/drop_write() pair. If this * happens, the filesystem was probably unable * to make r/w->r/o transitions. */ /* * The locking used to deal with mnt_count decrement provides barriers, * so mnt_g...
0
[ "CWE-703" ]
linux
cd4a40174b71acd021877341684d8bb1dc8ea4ae
196,258,105,723,834,200,000,000,000,000,000,000,000
21
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_...
int slirp_fmt0(char *str, size_t size, const char *format, ...) { va_list args; int rv; va_start(args, format); rv = slirp_vsnprintf(str, size, format, args); va_end(args); if (rv >= size) { g_critical("vsnprintf() truncation"); if (size > 0) str[size - 1] = '\0'; ...
0
[ "CWE-120" ]
libslirp
30648c03b27fb8d9611b723184216cd3174b6775
323,796,864,093,991,050,000,000,000,000,000,000,000
20
util: add slirp_fmt() helpers Various calls to snprintf() in libslirp assume that snprintf() returns "only" the number of bytes written (excluding terminating NUL). https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04 "Upon successful completion, the snprintf() function shall return...
static inline MagickBooleanType Magick_png_color_equal(const Image *image, const Quantum *p, const PixelInfo *q) { MagickRealType value; value=(MagickRealType) p[image->channel_map[RedPixelChannel].offset]; if (AbsolutePixelValue(value-q->red) >= MagickEpsilon) return(MagickFalse); value=(MagickRealT...
0
[ "CWE-476" ]
ImageMagick
816ecab6c532ae086ff4186b3eaf4aa7092d536f
108,271,722,120,626,890,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/58
load(const char *magicfile, int flags) { struct magic_set *magic = magic_open(flags); if (magic == NULL) { (void)fprintf(stderr, "%s: %s\n", progname, strerror(errno)); return NULL; } if (magic_load(magic, magicfile) == -1) { (void)fprintf(stderr, "%s: %s\n", progname, magic_error(magic)); magic_close...
0
[ "CWE-399" ]
file
90018fe22ff8b74a22fcd142225b0a00f3f12677
78,369,719,330,489,530,000,000,000,000,000,000,000
15
bump recursion to 15, and allow it to be set from the command line.
isdn_close(struct inode *ino, struct file *filep) { uint minor = iminor(ino); mutex_lock(&isdn_mutex); if (minor == ISDN_MINOR_STATUS) { infostruct *p = dev->infochain; infostruct *q = NULL; while (p) { if (p->private == (char *) &(filep->private_data)) { if (q) q->next = p->next; else d...
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
52,210,061,436,803,450,000,000,000,000,000,000,000
41
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-...
int security_msg_queue_msgsnd(struct msg_queue *msq, struct msg_msg *msg, int msqflg) { return security_ops->msg_queue_msgsnd(msq, msg, msqflg); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
147,219,066,970,572,340,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static JSValue js_sys_prompt_input(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { char in_char[2]; if (!gf_prompt_has_input()) return JS_NULL; in_char[0] = gf_prompt_get_char(); in_char[1] = 0; return JS_NewString(ctx, in_char); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
49,847,033,256,628,855,000,000,000,000,000,000,000
10
fixed #2138
static void ProcessCanonMakerNoteDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength) { int de; int a; int NumDirEntries; NumDirEntries = Get16u(DirStart); #define DIR_ENTRY_ADDR(Start, Entry) (Start+2+12*(Entry)) { unsigned char * DirEnd; Dir...
1
[ "CWE-703" ]
jhead
a50953a266583981b51a181c2fce73dad2ac5d7d
93,395,757,012,979,120,000,000,000,000,000,000,000
147
Make pointer range checks more consistent. Also twiddle the unused floating point print code (not used in real exif files), but fuzz testing hits it. New code is equivalent but doesn't cause bus error (don't understand why, but this is all a very bogus thing anyway, just trying to avoid fuzz testing hits.
PyTokenizer_FromString(const char *str, int exec_input) { struct tok_state *tok = tok_new(); if (tok == NULL) return NULL; str = decode_str(str, exec_input, tok); if (str == NULL) { PyTokenizer_Free(tok); return NULL; } /* XXX: constify members. */ tok->buf = tok->cu...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
289,663,072,687,241,100,000,000,000,000,000,000,000
15
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static double mp_gt(_cimg_math_parser& mp) { return (double)(_mp_arg(2)>_mp_arg(3));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
285,759,884,130,290,650,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file) { if (new_exe_file) get_file(new_exe_file); if (mm->exe_file) fput(mm->exe_file); mm->exe_file = new_exe_file; }
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
35,445,809,497,521,940,000,000,000,000,000,000,000
8
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
xpathExprTest(const char *filename, const char *result, const char *err ATTRIBUTE_UNUSED, int options ATTRIBUTE_UNUSED) { return(xpathCommonTest(filename, result, 0, 1)); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
65,779,819,192,835,110,000,000,000,000,000,000,000
5
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
/* kex_agree_crypt * Agree on a cipher algo */ static int kex_agree_crypt(LIBSSH2_SESSION * session, libssh2_endpoint_data *endpoint, unsigned char *crypt, unsigned long crypt_len) { const LIBSSH2_CRYPT_METHOD **cryptp = libssh2_cryp...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
112,387,774,484,930,690,000,000,000,000,000,000,000
51
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...
bool preserveExternalRequestId() const override { return preserve_external_request_id_; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
155,283,812,203,864,390,000,000,000,000,000,000,000
1
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
xmlRelaxNGValidateDocument(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc) { int ret; xmlRelaxNGPtr schema; xmlRelaxNGGrammarPtr grammar; xmlRelaxNGValidStatePtr state; xmlNodePtr node; if ((ctxt == NULL) || (ctxt->schema == NULL) || (doc == NULL)) return (-1); ctxt->errNo = XML_RELAXN...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
221,288,883,394,011,830,000,000,000,000,000,000,000
83
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
static void i40e_disable_pf_switch_lb(struct i40e_pf *pf) { struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; struct i40e_vsi_context ctxt; int ret; ctxt.seid = pf->main_vsi_seid; ctxt.pf_num = pf->hw.pf_id; ctxt.vf_num = 0; ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); if (ret) { dev_info(&pf->pdev->dev, ...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
299,039,662,006,310,920,000,000,000,000,000,000,000
29
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
void key_put(struct key *key) { if (key) { key_check(key); if (refcount_dec_and_test(&key->usage)) schedule_work(&key_gc_work); } }
0
[ "CWE-476" ]
linux
60ff5b2f547af3828aebafd54daded44cfb0807a
205,845,179,343,696,550,000,000,000,000,000,000,000
9
KEYS: don't let add_key() update an uninstantiated key Currently, when passed a key that already exists, add_key() will call the key's ->update() method if such exists. But this is heavily broken in the case where the key is uninstantiated because it doesn't call __key_instantiate_and_link(). Consequently, it doesn'...
follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) { unsigned long start = address; int length = 1; int nr; struct page *page; struct vm_area_struct *vma; vma = find_vma(mm, addr); if (!vma || !is_vm_hugetlb_page(vma)) return ERR_PTR(-EINVAL); pte = huge_pte_offset(mm, address); /* h...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
196,298,849,688,752,270,000,000,000,000,000,000,000
23
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static inline void skb_reset_inner_headers(struct sk_buff *skb) { skb->inner_mac_header = skb->mac_header; skb->inner_network_header = skb->network_header; skb->inner_transport_header = skb->transport_header;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
313,679,321,848,357,370,000,000,000,000,000,000,000
6
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
void mbedtls_x509_crt_init( mbedtls_x509_crt *crt ) { memset( crt, 0, sizeof(mbedtls_x509_crt) ); }
0
[ "CWE-287", "CWE-284" ]
mbedtls
d15795acd5074e0b44e71f7ede8bdfe1b48591fc
122,172,324,213,351,030,000,000,000,000,000,000,000
4
Improve behaviour on fatal errors If we didn't walk the whole chain, then there may be any kind of errors in the part of the chain we didn't check, so setting all flags looks like the safe thing to do.
static void truncate_node(struct dnode_of_data *dn) { struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode); struct node_info ni; get_node_info(sbi, dn->nid, &ni); if (dn->inode->i_blocks == 0) { f2fs_bug_on(sbi, ni.blk_addr != NULL_ADDR); goto invalidate; } f2fs_bug_on(sbi, ni.blk_addr == NULL_ADDR); /* Dealloc...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
182,004,999,615,425,820,000,000,000,000,000,000,000
34
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
int Monitor::load_metadata() { bufferlist bl; int r = store->get(MONITOR_STORE_PREFIX, "last_metadata", bl); if (r) return r; bufferlist::iterator it = bl.begin(); ::decode(mon_metadata, it); pending_metadata = mon_metadata; return 0; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
195,368,177,046,032,430,000,000,000,000,000,000,000
12
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 ...
fix_opts_string (int flags, const char *extra_opts, const char *user) { const struct opt_map *om; const struct string_opt_map *m; char *new_opts; new_opts = append_opt(NULL, (flags & MS_RDONLY) ? "ro" : "rw", NULL); for (om = opt_map; om->opt != NULL; om++) { if (om->skip) continue; if (om->inv || !om->mas...
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
285,838,779,278,419,400,000,000,000,000,000,000,000
26
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
directory_load_one (NautilusDirectory *directory, GFileInfo *info) { if (info == NULL) { return; } if (g_file_info_get_name (info) == NULL) { char *uri; uri = nautilus_directory_get_uri (directory); g_warning ("Got GFileInfo with NULL name in %s, ignoring. This shouldn't happen unless the gvfs backen...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
121,954,542,247,645,200,000,000,000,000,000,000,000
23
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
InitialiseRFBConnection(rfbClient* client) { rfbProtocolVersionMsg pv; int major,minor; uint32_t authScheme; uint32_t subAuthScheme; rfbClientInitMsg ci; /* if the connection is immediately closed, don't report anything, so that pmw's monitor can make test connections */ if (client->listenSpecifi...
1
[ "CWE-787" ]
libvncserver
c2c4b81e6cb3b485fb1ec7ba9e7defeb889f6ba7
2,987,326,569,664,820,700,000,000,000,000,000,000
254
LibVNCClient: fail on server-sent desktop name lengths longer than 1MB re #273
TPM_HANDLE_Unmarshal(TPM_HANDLE *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = UINT32_Unmarshal(target, buffer, size); } return rc; }
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
285,662,346,674,901,800,000,000,000,000,000,000,000
9
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>
static ssize_t rbd_client_addr_show(struct device *dev, struct device_attribute *attr, char *buf) { struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); struct ceph_entity_addr *client_addr = ceph_client_addr(rbd_dev->rbd_client->client); return sprintf(buf, "%pISpc/%u\n", &client_addr->in_addr, ...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
309,667,162,272,723,300,000,000,000,000,000,000,000
10
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b, int first, int count) { int left_is_free = 0; int right_is_free = 0; int block; int last = first + count - 1; struct super_block *sb = e4b->bd_sb; if (WARN_ON(count == 0)) return; BUG_ON(last >= (sb->s_blocksize << 3)); assert_spin...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
312,423,109,113,185,650,000,000,000,000,000,000,000
80
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
CodecStats& stats() { return stats_; }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
125,123,292,383,982,110,000,000,000,000,000,000,000
1
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
bool OSD::project_pg_history(spg_t pgid, pg_history_t& h, epoch_t from, const vector<int>& currentup, int currentupprimary, const vector<int>& currentacting, int currentactingprimary) { dout(15) << "project_pg_history " << pgid << " from " << from << " to " << osdmap->get_ep...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
157,944,298,291,134,530,000,000,000,000,000,000,000
89
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 decode_server_sort_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB attr; DATA_BLOB rule; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_server_sort_control **lssc; int num; if (!data) return false; if (!asn1_load(data, in)) { return false; } i...
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
299,591,545,763,618,270,000,000,000,000,000,000,000
79
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
void expectHealthcheckStart(size_t index) { expectStreamCreate(index); EXPECT_CALL(*test_sessions_[index]->timeout_timer_, enableTimer(_, _)); }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
326,156,427,761,379,580,000,000,000,000,000,000,000
4
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, void *callback_arg) { u8_t i; u8_t lseq, lseqi; struct dns_table_entry *entry = NULL; size_t namelen; struct dns_req_entry* req; #if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) u8_t r; /* check ...
0
[]
lwip
9fb46e120655ac481b2af8f865d5ae56c39b831a
209,207,447,876,814,920,000,000,000,000,000,000,000
113
added source port randomization to make the DNS client more robust (see bug #43144)
static void process_command(conn *c, char *command) { token_t tokens[MAX_TOKENS]; size_t ntokens; int comm; assert(c != NULL); MEMCACHED_PROCESS_COMMAND_START(c->sfd, c->rcurr, c->rbytes); if (settings.verbose > 1) fprintf(stderr, "<%d %s\n", c->sfd, command); /* * for comm...
0
[ "CWE-190", "CWE-667" ]
memcached
a8c4a82787b8b6c256d61bd5c42fb7f92d1bae00
295,583,458,599,742,400,000,000,000,000,000,000,000
290
Don't overflow item refcount on get Counts as a miss if the refcount is too high. ASCII multigets are the only time refcounts can be held for so long. doing a dirty read of refcount. is aligned. trying to avoid adding an extra refcount branch for all calls of item_get due to performance. might be able to move it in ...
filter_free (Filter *filter) { g_free (filter->path); g_free (filter->interface); g_free (filter->member); g_free (filter); }
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
270,179,780,544,100,440,000,000,000,000,000,000,000
7
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
ip_create_slave_core(interp, argc, argv) VALUE interp; int argc; VALUE *argv; { struct tcltkip *master = get_ip(interp); struct tcltkip *slave; /* struct tcltkip *slave = RbTk_ALLOC_N(struct tcltkip, 1); */ VALUE safemode; VALUE name; VALUE new_ip; int safe; int thr_crit_bu...
0
[]
tk
d098136e3f62a4879a7d7cd34bbd50f482ba3331
67,034,094,026,796,800,000,000,000,000,000,000,000
112
tcltklib.c: use StringValueCStr [ci skip] * ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core, ip_init, ip_create_slave_core, get_obj_from_str, ip_cancel_eval_core, lib_set_system_encoding, alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr instead of StringValuePtr for values to be passed to...
static const char * fileActionString(rpmFileAction a) { switch (a) { case FA_UNKNOWN: return "unknown"; case FA_CREATE: return "create"; case FA_BACKUP: return "backup"; case FA_SAVE: return "save"; case FA_SKIP: return "skip"; case FA_ALTNAME: return "altname"; case FA_ERASE: return "er...
0
[ "CWE-59", "CWE-61" ]
rpm
f2d3be2a8741234faaa96f5fd05fdfdc75779a79
73,434,687,786,539,500,000,000,000,000,000,000,000
17
Restrict following symlinks to directories by ownership (CVE-2017-7500) Only follow directory symlinks owned by target directory owner or root. This prevents privilege escalation from user-writable directories via directory symlinks to privileged directories on package upgrade, while still allowing admin to arrange di...
HttpTransact::service_transaction_in_proxy_only_mode(State* /* s ATS_UNUSED */) { return false; }
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
243,846,819,263,186,700,000,000,000,000,000,000,000
4
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static avifDecoderData * avifDecoderDataCreate() { avifDecoderData * data = (avifDecoderData *)avifAlloc(sizeof(avifDecoderData)); memset(data, 0, sizeof(avifDecoderData)); data->meta = avifMetaCreate(); avifArrayCreate(&data->tracks, sizeof(avifTrack), 2); avifArrayCreate(&data->tiles, sizeof(avifT...
0
[ "CWE-703", "CWE-787" ]
libavif
0a8e7244d494ae98e9756355dfbfb6697ded2ff9
8,353,252,372,448,553,000,000,000,000,000,000,000
9
Set max image size to 16384 * 16384 Fix https://crbug.com/oss-fuzz/24728 and https://crbug.com/oss-fuzz/24734.
static void clone_update_extent_map(struct btrfs_inode *inode, const struct btrfs_trans_handle *trans, const struct btrfs_path *path, const u64 hole_offset, const u64 hole_len) { struct extent_map_tree *em_tree = &inode->extent_tree; struct extent_map *em; int ret; em = alloc_extent...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
101,657,905,719,116,990,000,000,000,000,000,000,000
54
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { struct trace_option_dentry *topt = filp->private_data; unsigned long val; int ret; ret = kstrtoul_from_user(ubuf, cnt, 10, &val); if (ret) return ret; if (val != 0 && val != 1) return -EINVAL; if (!!(topt->flag...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
261,642,286,075,292,070,000,000,000,000,000,000,000
27
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 Http2FloodMitigationTest::floodServer(absl::string_view host, absl::string_view path, Http2Frame::ResponseStatus expected_http_status, const std::string& flood_stat) { uint32_t request_idx = 0; auto request = Http2Frame::make...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
138,299,721,568,009,550,000,000,000,000,000,000,000
23
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...
static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi) { struct list_head *l; ext4_msg(sb, KERN_ERR, "sb orphan head is %d", le32_to_cpu(sbi->s_es->s_last_orphan)); printk(KERN_ERR "sb_info orphan list:\n"); list_for_each(l, &sbi->s_orphan) { struct inode *inode = orphan_list_entry(l)...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
171,851,820,401,148,100,000,000,000,000,000,000,000
17
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
bool HierarchicalBitmapRequester::isImageComplete(void) const { #if ACCUSOFT_CODE for(UBYTE i = 0;i < m_ucCount;i++) { if (m_pulReadyLines[i] < m_ulPixelHeight) return false; } return true; #else return false; #endif }
0
[ "CWE-125", "CWE-787" ]
libjpeg
187035b9726710b4fe11d565c7808975c930895d
44,777,172,530,967,860,000,000,000,000,000,000,000
12
The code now checks for consistency of the MCU sizes across hierarchical levels, and fails in case they are different.
static void compat_standard_from_user(void *dst, void *src) { int v = *(compat_int_t *)src; if (v > 0) v += compat_calc_jump(v); memcpy(dst, &v, sizeof(v)); }
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
261,698,596,974,338,000,000,000,000,000,000,000,000
8
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
str_toupper_z(const char *buff, Oid collid) { return str_toupper(buff, strlen(buff), collid); }
0
[ "CWE-120" ]
postgres
0150ab567bcf5e5913e2b62a1678f84cc272441f
91,092,135,100,582,570,000,000,000,000,000,000,000
4
to_char(): prevent accesses beyond the allocated buffer Previously very long field masks for floats could access memory beyond the existing buffer allocated to hold the result. Reported by Andres Freund and Peter Geoghegan. Backpatch to all supported versions. Security: CVE-2015-0241
void CascadeClassifierImpl::detectMultiScale( InputArray _image, std::vector<Rect>& objects, double scaleFactor, int minNeighbors, int flags, Size minObjectSize, Size maxObjectSize) { CV_INSTRUMENT_REGION(); std::vector<int> fa...
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
171,716,191,211,115,040,000,000,000,000,000,000,000
11
objdetect: validate feature rectangle on reading
SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) { struct file * file; int error = -EBADF; struct dentry * dentry; file = fget(fd); if (!file) goto out; error = mnt_want_write_file(file); if (error) goto out_fput; dentry = file->f_path.dentry; audit_inode(NULL, dentry); error = chown...
0
[ "CWE-732" ]
linux-stable
e57712ebebbb9db7d8dcef216437b3171ddcf115
263,833,234,292,486,980,000,000,000,000,000,000,000
22
merge fchmod() and fchmodat() guts, kill ancient broken kludge The kludge in question is undocumented and doesn't work for 32bit binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as mode had (since 0.99.14v and contrary to behaviour of any other Unix, prescriptions of POSIX, SuS and our own manpages) was kinda-...
SSL_CTX::GetCA_List() const { return caList_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
306,272,469,143,848,280,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
int nghttp2_session_update_recv_stream_window_size(nghttp2_session *session, nghttp2_stream *stream, size_t delta_size, int send_window_update) { int rv; rv = adju...
0
[ "CWE-707" ]
nghttp2
f8da73bd042f810f34d19f9eae02b46d870af394
187,450,973,271,722,260,000,000,000,000,000,000,000
31
Earlier check for settings flood
uint16 KaxBlockGroup::TrackNumber() const { KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock))); return MyBlock.TrackNum(); }
0
[ "CWE-200", "CWE-399", "CWE-119" ]
libmatroska
0a2d3e3644a7453b6513db2f9bc270f77943573f
31,080,542,937,106,080,000,000,000,000,000,000,000
5
KaxBlockInternal: check EBML lace sizes against available buffer space
int iscsi_eh_recover_target(struct scsi_cmnd *sc) { int rc; rc = iscsi_eh_target_reset(sc); if (rc == FAILED) rc = iscsi_eh_session_reset(sc); return rc; }
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
313,053,201,822,812,480,000,000,000,000,000,000,000
9
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
new_context (void) { GifContext *context; context = g_try_malloc (sizeof (GifContext)); if (context == NULL) return NULL; memset (context, 0, sizeof (GifContext)); context->animation = g_object_new (GDK_TYPE_PIXBUF_GIF_ANIM, NULL); context->frame = NULL; context->f...
0
[]
gdk-pixbuf
f8569bb13e2aa1584dde61ca545144750f7a7c98
166,133,145,342,233,000,000,000,000,000,000,000,000
29
GIF: Don't return a partially initialized pixbuf structure It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load() routine did not properly handle certain return values from their subroutines. A remote attacker could provide a specially-crafted GIF image, which once opened in an application, linked ...
bool Segment::AddGenericFrame(const Frame* frame) { if (!frame) return false; if (!CheckHeaderInfo()) return false; // Check for non-monotonically increasing timestamps. if (frame->timestamp() < last_timestamp_) return false; // Check if the track number is valid. if (!tracks_.GetTrackByNumbe...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
221,735,297,805,928,940,000,000,000,000,000,000,000
94
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
ZSTD_compressSequences(seqStore_t* seqStorePtr, const ZSTD_entropyCTables_t* prevEntropy, ZSTD_entropyCTables_t* nextEntropy, const ZSTD_CCtx_params* cctxParams, void* dst, size_t dstCapacity, ...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
173,017,413,725,939,870,000,000,000,000,000,000,000
28
fixed T36302429
compatible_set(void) { int opt_idx; for (opt_idx = 0; !istermoption(&options[opt_idx]); opt_idx++) if ( ((options[opt_idx].flags & P_VIM) && p_cp) || (!(options[opt_idx].flags & P_VI_DEF) && !p_cp)) set_option_default(opt_idx, OPT_FREE, p_cp); didset_options(); didset_options2(); }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
325,099,029,491,136,530,000,000,000,000,000,000,000
11
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
MagickPrivate Cache ClonePixelCache(const Cache cache) { CacheInfo *magick_restrict clone_info; const CacheInfo *magick_restrict cache_info; assert(cache != NULL); cache_info=(const CacheInfo *) cache; assert(cache_info->signature == MagickCoreSignature); if (cache_info->debug != MagickFalse) ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
29,185,515,904,947,470,000,000,000,000,000,000,000
20
Set pixel cache to undefined if any resource limit is exceeded
static port::StatusOr<CudnnRnnSequenceTensorDescriptor> Create( GpuExecutor* parent, int max_seq_length, int batch_size, int data_size, cudnnDataType_t data_type) { CHECK_GT(max_seq_length, 0); int dims[] = {batch_size, data_size, 1}; int strides[] = {dims[1] * dims[2], dims[2], 1}; Tensor...
1
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
46,237,882,241,428,010,000,000,000,000,000,000,000
16
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
static void abort_arp_failure(struct t3cdev *dev, struct sk_buff *skb) { struct cpl_abort_req *req = cplhdr(skb); PDBG("%s t3cdev %p\n", __func__, dev); req->cmd = CPL_ABORT_NO_RST; iwch_cxgb3_ofld_send(dev, skb); }
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
151,143,409,019,336,200,000,000,000,000,000,000,000
8
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *prog) { struct bpf_insn insn_buff[16], aux[2]; struct bpf_prog *clone, *tmp; int insn_delta, insn_cnt; struct bpf_insn *insn; int i, rewritten; if (!bpf_jit_blinding_enabled(prog) || prog->blinded) return prog; clone = bpf_prog_clone_create(prog, GFP_...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
76,494,240,572,780,790,000,000,000,000,000,000,000
53
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
replace_single_character(PyStringObject *self, char from_c, const char *to_s, Py_ssize_t to_len, Py_ssize_t maxcount) { char *self_s, *result_s; char *start, *next, *end; Py_ssize_t self_len, result_len; Py_ssize_t count; PyS...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
190,070,675,282,735,400,000,000,000,000,000,000,000
60
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static inline void flag_error_on_conn(struct rtrs_clt_con *con, int cm_err) { if (con->cm_err == 1) { struct rtrs_clt_path *clt_path; clt_path = to_clt_path(con->c.path); if (atomic_dec_and_test(&clt_path->connected_cnt)) wake_up(&clt_path->state_wq); } con->cm_err = cm_err; }
0
[ "CWE-415" ]
linux
8700af2cc18c919b2a83e74e0479038fd113c15d
201,296,530,819,270,060,000,000,000,000,000,000,000
12
RDMA/rtrs-clt: Fix possible double free in error case Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt) to free memory. We shouldn't call kfree(clt) again, and we can't use the clt after kfree too. Replace device_register() with device_initialize() and device_add() so that dev_set_name can() ...
l_int32 main(int argc, char **argv) { L_DEWARP *dew1, *dew2; L_DEWARPA *dewa; PIX *pixs, *pixn, *pixg, *pixb, *pixd, *pixt1, *pixt2; PIX *pixs2, *pixn2, *pixg2, *pixb2, *pixd2; setLeptDebugOK(1); lept_mkdir("lept/model"); lept_rmdir("lept/dewmod"); lept_mkdir("lept/dewm...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
88,282,334,964,305,970,000,000,000,000,000,000,000
132
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
int mp_mul (mp_int * a, mp_int * b, mp_int * c) #endif { return fp_mul(a, b, c); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
213,557,731,256,385,980,000,000,000,000,000,000,000
5
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
virtual const string name() { return "delete_obj_tags"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
98,281,279,572,548,100,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
char* php_get_windows_name() { OSVERSIONINFOEX osvi; SYSTEM_INFO si; PGNSI pGNSI; PGPI pGPI; BOOL bOsVersionInfoEx; DWORD dwType; char *major = NULL, *sub = NULL, *retval; ZeroMemory(&si, sizeof(SYSTEM_INFO)); ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); ...
0
[ "CWE-200" ]
php-src
3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9
84,141,965,373,466,060,000,000,000,000,000,000,000
186
Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
void stbl_box_del(GF_Box *s) { GF_SampleTableBox *ptr = (GF_SampleTableBox *)s; if (ptr == NULL) return; if (ptr->sub_samples) gf_list_del(ptr->sub_samples); if (ptr->sampleGroups) gf_list_del(ptr->sampleGroups); if (ptr->sampleGroupsDescription) gf_list_del(ptr->sampleGroupsDescription); if (ptr->sai_sizes) gf_...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
252,006,146,590,018,730,000,000,000,000,000,000,000
23
fixed #1587
static void flush_requests(struct server_data *server) { GSList *list; list = request_list; while (list) { struct request_data *req = list->data; list = list->next; if (ns_resolv(server, req, req->request, req->name)) { /* * A cached result was sent, * so the request can be released */ req...
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
108,958,314,709,920,320,000,000,000,000,000,000,000
27
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
process_cmd_maxupdateskew(CMD_Request *msg, char *line) { int ok; double new_max_update_skew; if (sscanf(line, "%lf", &new_max_update_skew) == 1) { msg->data.modify_maxupdateskew.new_max_update_skew = UTI_FloatHostToNetwork(new_max_update_skew); msg->command = htons(REQ_MODIFY_MAXUPDATESKEW); ok = ...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
157,066,570,824,963,690,000,000,000,000,000,000,000
16
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static void nfs_set_pageerror(struct page *page) { nfs_zap_mapping(page_file_mapping(page)->host, page_file_mapping(page)); }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
175,642,796,237,811,400,000,000,000,000,000,000,000
4
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
static int x509_get_alg( unsigned char **p, const unsigned char *end, x509_buf *alg ) { int ret; size_t len; if( ( ret = asn1_get_tag( p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ) != 0 ) return( POLARSSL_ERR_X509_CERT_INVALID_ALG +...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
240,961,977,683,483,550,000,000,000,000,000,000,000
35
RSA blinding on CRT operations to counter timing attacks
static void mark_map_regs(struct bpf_verifier_state *vstate, u32 regno, bool is_null) { struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *regs = state->regs; u32 id = regs[regno].id; int i, j; for (i = 0; i < MAX_BPF_REG; i++) mark_map_reg(regs, i, id, is_null); for (j...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
250,967,916,958,416,000,000,000,000,000,000,000,000
20
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
static int defer_packet_queue( struct sdma_engine *sde, struct iowait_work *wait, struct sdma_txreq *txreq, uint seq, bool pkts_sent) { struct hfi1_user_sdma_pkt_q *pq = container_of(wait->iow, struct hfi1_user_sdma_pkt_q, busy); write_seqlock(&sde->waitlock); if (sdma_progress(sde, seq, txreq)) goto eagai...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
326,292,830,635,728,500,000,000,000,000,000,000,000
30
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
int megasas_alloc_cmds(struct megasas_instance *instance) { int i; int j; u16 max_cmd; struct megasas_cmd *cmd; max_cmd = instance->max_mfi_cmds; /* * instance->cmd_list is an array of struct megasas_cmd pointers. * Allocate the dynamic array first and then allocate individual * commands. */ instance->...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
169,228,235,231,824,350,000,000,000,000,000,000,000
60
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
check_unique_ts(struct timeval *ts, struct timeval *now) { TimestampCell *last_valid, *cell, *next; int ok; ok = 1; last_valid = &(seen_ts_list); cell = last_valid->next; while (cell) { next = cell->next; /* Check if stale */ if ((now->tv_sec - cell->ts.tv_sec) > TS_MARGIN) { release_ts_...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
209,944,545,500,365,830,000,000,000,000,000,000,000
36
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
bool smtp_server_connection_pending_command_data( struct smtp_server_connection *conn) { if (conn->smtp_parser == NULL) return FALSE; return smtp_command_parser_pending_data(conn->smtp_parser); }
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
47,047,051,592,284,820,000,000,000,000,000,000,000
7
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
static u64 svm_read_tsc_offset(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); return svm->vmcb->control.tsc_offset; }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
146,286,473,763,994,100,000,000,000,000,000,000,000
6
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...
void parser(void) { char *arg; #ifndef MINIMAL char *sitearg; #endif #ifdef WITH_RFC2640 char *narg = NULL; #endif size_t n; #ifdef IMPLICIT_TLS (void) tls_init_new_session(); data_protection_level = CPL_PRIVATE; #endif for (;;) { xferfd = -1; if (state_needs_update != 0) { ...
1
[ "CWE-399" ]
pure-ftpd
65c4d4ad331e94661de763e9b5304d28698999c4
118,381,650,892,386,160,000,000,000,000,000,000,000
590
Flush the command buffer after switching to TLS. Fixes a flaw similar to CVE-2011-0411.
RawTile OpenJPEGImage::getTile( int seq, int ang, unsigned int res, int layers, unsigned int tile ) { // Scale up our output bit depth to the nearest factor of 8 unsigned obpc = bpc; if( bpc <= 16 && bpc > 8 ) obpc = 16; else if( bpc <= 8 ) obpc = 8; #ifdef DEBUG Timer timer; timer.start(); #endif if( ...
0
[ "CWE-190" ]
iipsrv
882925b295a80ec992063deffc2a3b0d803c3195
269,665,748,135,628,600,000,000,000,000,000,000,000
77
- Modified TileManager.cc to verify that malloc() has correctly allocated memory. - Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve...