func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
Bool gf_isom_cenc_has_saiz_saio_traf(GF_TrackFragmentBox *traf, u32 scheme_type) { return gf_isom_cenc_has_saiz_saio_full(NULL, traf, scheme_type); }
0
[ "CWE-476" ]
gpac
3b84ffcbacf144ce35650df958432f472b6483f8
166,188,374,588,391,660,000,000,000,000,000,000,000
4
fixed #1735
isdn_minor2chan(int minor) { return (dev->chanmap[minor]); }
0
[ "CWE-119" ]
linux-2.6
eafe1aa37e6ec2d56f14732b5240c4dd09f0613a
82,874,095,553,178,830,000,000,000,000,000,000,000
4
I4L: fix isdn_ioctl memory overrun vulnerability Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB <adlab@venustech.com.cn> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: ADLAB <adlab@venustech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
static int srp_Verify_N_and_g(BIGNUM *N, BIGNUM *g) { BN_CTX *bn_ctx = BN_CTX_new(); BIGNUM *p = BN_new(); BIGNUM *r = BN_new(); int ret = g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) && BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) && p != NULL && BN_rshift1(p, N) && /* p =...
0
[ "CWE-310" ]
openssl
6bfe55380abbf7528e04e59f18921bd6c896af1c
172,247,252,068,083,100,000,000,000,000,000,000,000
27
Support TLS_FALLBACK_SCSV. Reviewed-by: Rich Salz <rsalz@openssl.org>
static int ntop_queue_alert(lua_State* vm) { Redis *redis = ntop->getRedis(); int alert_level; int alert_type; char *alert_msg; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR); alert_level = (int)lua_tonu...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
53,445,967,690,962,260,000,000,000,000,000,000,000
20
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static int io_get_ext_arg(unsigned flags, const void __user *argp, size_t *argsz, struct __kernel_timespec __user **ts, const sigset_t __user **sig) { struct io_uring_getevents_arg arg; /* * If EXT_ARG isn't set, then we have no timespec and the argp pointer * is just a pointer to the sigset_t. */ ...
0
[ "CWE-909", "CWE-94" ]
linux
32452a3eb8b64e01e2be717f518c0be046975b9d
274,197,588,064,522,420,000,000,000,000,000,000,000
31
io_uring: fix uninitialized field in rw io_kiocb io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll reads kiocb->private it can contain uninitialized data. Fixes: 3e08773c3841 ("block: switch polling to be bio based") Signed-off-by: Joseph Ravichandran <jravi@mit.edu> Signed-off-by: Jens Axbo...
inline int Http2Session::OnNghttpError(nghttp2_session* handle, const char* message, size_t len, void* user_data) { // Unfortunately, this is currently the only way for us to know if // the session e...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
172,490,982,746,884,770,000,000,000,000,000,000,000
22
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>
_copyArrayExpr(const ArrayExpr *from) { ArrayExpr *newnode = makeNode(ArrayExpr); COPY_SCALAR_FIELD(array_typeid); COPY_SCALAR_FIELD(array_collid); COPY_SCALAR_FIELD(element_typeid); COPY_NODE_FIELD(elements); COPY_SCALAR_FIELD(multidims); COPY_LOCATION_FIELD(location); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
223,044,737,478,389,570,000,000,000,000,000,000,000
13
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
doset_add_menu(win, option, indexoffset) winid win; /* window to add to */ const char *option; /* option name */ int indexoffset; /* value to add to index in compopt[], or zero if option cannot be changed */ { const char *value = "unknown"; /* current value */ char buf[BUFSZ], buf2[BUFSZ...
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
1,604,853,445,709,250,800,000,000,000,000,000,000
36
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
static int _nfs41_test_stateid(struct nfs_server *server, struct nfs4_state *state) { int status; struct nfs41_test_stateid_args args = { .stateid = &state->stateid, }; struct nfs41_test_stateid_res res; struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_TEST_STATEID], .rpc_argp = &args, ...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
195,102,908,419,039,640,000,000,000,000,000,000,000
16
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
ImagingJpeg2KDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t bytes) { if (bytes) { state->errcode = IMAGING_CODEC_BROKEN; state->state = J2K_STATE_FAILED; return -1; } if (state->state == J2K_STATE_DONE || state->state == J2K_STATE_FAILED) { return -1; ...
0
[ "CWE-125" ]
Pillow
3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87
228,424,019,752,837,140,000,000,000,000,000,000,000
24
Fix OOB Read in Jpeg2KDecode CVE-2021-25287,CVE-2021-25288 * For J2k images with multiple bands, it's legal in to have different widths for each band, e.g. 1 byte for L, 4 bytes for A * This dates to Pillow 2.4.0
int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_exception *exception) { struct nfs_client *clp = server->nfs_client; int ret; ret = nfs4_do_handle_exception(server, errorcode, exception); if (exception->delay) { ret = nfs4_delay(&exception->timeout, exception->interruptible); ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
137,362,231,547,358,050,000,000,000,000,000,000,000
23
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
int ima_match_policy(struct inode *inode, enum ima_hooks func, int mask) { struct ima_measure_rule_entry *entry; list_for_each_entry(entry, ima_measure, list) { bool rc; rc = ima_match_rules(entry, inode, func, mask); if (rc) return entry->action; } return 0; }
0
[ "CWE-284", "CWE-264" ]
linux
867c20265459d30a01b021a9c1e81fb4c5832aa9
289,587,895,874,605,600,000,000,000,000,000,000,000
13
ima: fix add LSM rule bug If security_filter_rule_init() doesn't return a rule, then not everything is as fine as the return code implies. This bug only occurs when the LSM (eg. SELinux) is disabled at runtime. Adding an empty LSM rule causes ima_match_rules() to always succeed, ignoring any remaining rules. defau...
int sb_prepare_remount_readonly(struct super_block *sb) { struct mount *mnt; int err = 0; /* Racy optimization. Recheck the counter under MNT_WRITE_HOLD */ if (atomic_long_read(&sb->s_remove_count)) return -EBUSY; br_write_lock(&vfsmount_lock); list_for_each_entry(mnt, &sb->s_mounts, mnt_instance) { if (!(...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
99,856,035,720,687,650,000,000,000,000,000,000,000
35
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) { QBrush brush(state()->pen.color(), pixmap); QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y()); if (!qFuzzyCompare(pixmap.devicePixelRatio(), qreal(1.0))) xform.scale(1.0/pixmap.d...
0
[ "CWE-787" ]
qtbase
6b400e3147dcfd8cc3a393ace1bd118c93762e0c
224,350,447,246,596,570,000,000,000,000,000,000,000
16
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>
is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { int v; const UChar* p = *pp; if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { (*pp)++; return TRUE; } (*pp)++; v = (EncISO_8859_16_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); if ((v |...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
214,745,339,739,981,000,000,000,000,000,000,000,000
18
onig-5.9.2
char *get_devname_from_sysfs(unsigned int major, unsigned int minor) { static char link[256], target[PATH_MAX]; char *devname; ssize_t r; snprintf(link, 256, "%s/%u:%u", SYSFS_DEV_BLOCK, major, minor); /* Get full path to device knowing its major and minor numbers */ r = readlink(link, target, PATH_MAX); if (r...
0
[ "CWE-787" ]
sysstat
edbf507678bf10914e9804ff8a06737fdcb2e781
92,263,531,128,373,080,000,000,000,000,000,000,000
24
Fix #230: Memory corruption bug due to Integer Overflow in remap_struct() (See problem description in issue #230.) Check that the number of fields (long long integers, long integers or integers) as read from a system activity binary datafile multiplied by its alignment width doesn't overflow, i.e. the result must not ...
void uprobe_clear_state(struct mm_struct *mm) { struct xol_area *area = mm->uprobes_state.xol_area; if (!area) return; put_page(area->pages[0]); kfree(area->bitmap); kfree(area); }
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
188,787,790,390,660,740,000,000,000,000,000,000,000
11
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
static inline unsigned php_unicode_tofold_simple(unsigned code, enum mbfl_no_encoding enc) { code = php_unicode_tofold_raw(code, enc); if (UNEXPECTED(code > 0xffffff)) { return _uccase_extra_table[code & 0xffffff]; } return code; }
0
[ "CWE-787" ]
php-src
69155120e68d2e614d5c300974a1a5610cfa2e8b
254,335,029,646,970,300,000,000,000,000,000,000,000
7
Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow We make sure that negative values are properly compared.
SECURITY_STATUS SEC_ENTRY QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void* pBuffer) { SEC_CHAR* Name; SECURITY_STATUS status; SecurityFunctionTableW* table; Name = (SEC_CHAR*) sspi_SecureHandleGetUpperPointer(phContext); if (!Name) return SEC_E_SECPKG_NOT_FOUND; table = sspi_GetSecurit...
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
47,257,003,805,349,350,000,000,000,000,000,000,000
23
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
_nc_find_type_entry(const char *string, int type, bool termcap) { struct name_table_entry const *ptr = NULL; const HashData *data = _nc_get_hash_info(termcap); int hashvalue = data->hash_of(string); if (hashvalue >= 0 && (unsigned) hashvalue < data->table_size && data->table_data[hashvalu...
0
[ "CWE-125" ]
ncurses
b025434573f466efe27862656a6a9d41dd2bd609
307,850,354,177,565,900,000,000,000,000,000,000,000
26
ncurses 6.1 - patch 20191012 + amend recent changes to ncurses*-config and pc-files to filter out Debian linker-flags (report by Sven Joachim, cf: 20150516). + clarify relationship between tic, infocmp and captoinfo in manpage. + check for invalid hashcode in _nc_find_type_entry and _nc_find_name_entry. > fix seve...
cons_macro(const Macro *head, const MacroList *tail) { MacroList *list = malloc(sizeof(MacroList)); list->head = head; list->tail = tail; return list; }
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
141,201,445,854,651,650,000,000,000,000,000,000,000
6
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
static int yam_close(struct net_device *dev) { struct sk_buff *skb; struct yam_port *yp = netdev_priv(dev); if (!dev) return -EINVAL; /* * disable interrupts */ outb(0, IER(dev->base_addr)); outb(1, MCR(dev->base_addr)); /* Remove IRQ handler if last */ free_irq(dev->irq,dev); release_region(dev->base_...
0
[ "CWE-401" ]
linux
29eb31542787e1019208a2e1047bb7c76c069536
183,445,091,052,973,620,000,000,000,000,000,000,000
24
yam: fix a memory leak in yam_siocdevprivate() ym needs to be free when ym->cmd != SIOCYAMSMCS. Fixes: 0781168e23a2 ("yam: fix a missing-check bug") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static bool checkreturn pb_dec_fixed64(pb_istream_t *stream, const pb_field_t *field, void *dest) { PB_UNUSED(field); #ifndef PB_WITHOUT_64BIT return pb_decode_fixed64(stream, dest); #else PB_UNUSED(dest); PB_RETURN_ERROR(stream, "no 64bit support"); #endif }
0
[ "CWE-20", "CWE-119" ]
nanopb
4fe23595732b6f1254cfc11a9b8d6da900b55b0c
140,038,457,641,135,730,000,000,000,000,000,000,000
10
Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615) Nanopb would leak memory when all of the following conditions were true: - PB_ENABLE_MALLOC is defined at the compile time - Message definitions contains an oneof field, the oneof contains a static submessage, and the static submessage contains a pointer fiel...
static int dev_get_valid_name(struct net *net, const char *name, char *buf, bool fmt) { if (!dev_valid_name(name)) return -EINVAL; if (fmt && strchr(name, '%')) return __dev_alloc_name(net, name, buf); else if (__dev_get_by_name(net, name)) return -EEXIST; else if (buf != name) strlcpy(buf, name, ...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
88,257,946,764,829,000,000,000,000,000,000,000,000
15
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static int init_cache_random_seq(struct kmem_cache *s) { unsigned int count = oo_objects(s->oo); int err; /* Bailout if already initialised */ if (s->random_seq) return 0; err = cache_random_seq_create(s, count, GFP_KERNEL); if (err) { pr_err("SLUB: Unable to initialize free list for %s\n", s->name); r...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
6,075,266,951,060,646,000,000,000,000,000,000,000
25
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
void setupServiceNameHC(const absl::optional<std::string>& authority) { auto config = createGrpcHealthCheckConfig(); config.mutable_grpc_health_check()->set_service_name("service"); if (authority.has_value()) { config.mutable_grpc_health_check()->set_authority(authority.value()); } allocHeal...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
167,937,275,072,537,900,000,000,000,000,000,000,000
9
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb) { sb->mem_base = rtems_get_stack_bottom(); return GC_SUCCESS; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
148,318,665,699,903,620,000,000,000,000,000,000,000
5
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static ssize_t mon_text_read_t(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { struct mon_reader_text *rp = file->private_data; struct mon_event_text *ep; struct mon_text_ptr ptr; ep = mon_text_read_wait(rp, file); if (IS_ERR(ep)) return PTR_ERR(ep); mutex_lock(&rp->printf_lock); ptr.c...
1
[ "CWE-787" ]
linux
a5f596830e27e15f7a0ecd6be55e433d776986d8
81,841,425,082,915,090,000,000,000,000,000,000,000
27
usb: usbmon: Read text within supplied buffer size This change fixes buffer overflows and silent data corruption with the usbmon device driver text file read operations. Signed-off-by: Fredrik Noring <noring@nocrew.org> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by...
hstore_hash(PG_FUNCTION_ARGS) { HStore *hs = PG_GETARG_HS(0); Datum hval = hash_any((unsigned char *) VARDATA(hs), VARSIZE(hs) - VARHDRSZ); /* * this is the only place in the code that cares whether the overall * varlena size exactly matches the true data size; this assertion should * be maintaine...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
95,586,508,714,687,960,000,000,000,000,000,000,000
20
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...
xml_check_first_element_from_data (const guint8 * data, guint length, const gchar * element, guint elen, gboolean strict) { gboolean got_xmldec; guint pos = 0; g_return_val_if_fail (data != NULL, FALSE); if (length <= 5) return FALSE; /* look for the XMLDec * see XML spec 2.8, Prolog and Documen...
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
293,757,056,029,933,200,000,000,000,000,000,000,000
48
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
static void __init sun6i_pll1_clk_setup(struct device_node *node) { sunxi_factors_clk_setup(node, &sun6i_a31_pll1_data); }
0
[ "CWE-476" ]
linux
fcdf445ff42f036d22178b49cf64e92d527c1330
106,680,719,508,389,000,000,000,000,000,000,000,000
4
clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup(). It returns NULL when fails. 'derived_name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
next_can_trim (void *nxdata) { struct b_conn *b_conn = nxdata; return backend_can_trim (b_conn->b, b_conn->conn); }
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
254,568,340,168,438,750,000,000,000,000,000,000,000
5
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
void sock_unregister(int family) { BUG_ON(family < 0 || family >= NPROTO); spin_lock(&net_family_lock); RCU_INIT_POINTER(net_families[family], NULL); spin_unlock(&net_family_lock); synchronize_rcu(); pr_info("NET: Unregistered protocol family %d\n", family); }
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
282,622,627,338,122,030,000,000,000,000,000,000,000
12
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
bool operator>(const const_iterator &rhs) const { if (charPtr_) { return charPtr_ > rhs.charPtr_; } return char16Ptr_ > rhs.char16Ptr_; }
0
[ "CWE-416", "CWE-703" ]
hermes
d86e185e485b6330216dee8e854455c694e3a36e
147,029,003,752,545,060,000,000,000,000,000,000,000
6
Fix a bug in transient object property assignment and getUTF16Ref Summary: The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by appending more contents to the same allocator. This case was encountered in `transientObjectPutErrorMessage`, resulting in using free'd memory. Reviewed By: tmikov D...
static void sllistcheck(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); fv = fv; }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
19,007,906,170,975,964,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen=0; unsigned char *ret = p; /* don't add extensions for SSLv3 unless doing secure renegotiation */ if (s->client_version == SSL3_VERSION && !s->s3->send_connection_binding) return p; ret+=2; if (re...
1
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
139,580,221,793,583,100,000,000,000,000,000,000,000
296
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
cd_device_db_finalize (GObject *object) { CdDeviceDb *ddb = CD_DEVICE_DB (object); CdDeviceDbPrivate *priv = GET_PRIVATE (ddb); /* close the database */ sqlite3_close (priv->db); G_OBJECT_CLASS (cd_device_db_parent_class)->finalize (object); }
0
[ "CWE-200" ]
colord
adf41f36cf7214d7d6fa8d528b74eba47c377405
235,083,093,563,487,130,000,000,000,000,000,000,000
10
Fix a small memory leak in sqlite3_exec() Fixes https://github.com/hughsie/colord/issues/110
is_valid_bool_arg (ILStackDesc *arg) { if (stack_slot_is_managed_pointer (arg) || stack_slot_is_boxed_value (arg) || stack_slot_is_null_literal (arg)) return TRUE; switch (stack_slot_get_underlying_type (arg)) { case TYPE_I4: case TYPE_I8: case TYPE_NATIVE_INT: case TYPE_PTR: return TRUE; case TYPE_COMPLEX...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
208,094,386,968,440,550,000,000,000,000,000,000,000
34
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int reset_config_defines(void *dummy) { ap_server_config_defines = saved_server_config_defines; saved_server_config_defines = NULL; server_config_defined_vars = NULL; ap_runtime_dir = NULL; return OK; }
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
46,317,195,212,778,630,000,000,000,000,000,000,000
8
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx, int fd, const char *remote_name, enum smb_signing_setting signing_state, uint32_t smb1_capabilities, struct GUID *client_guid, uint32_t smb2_capabilities) { struct smbXcli_conn *conn = NULL; void *ss = NULL; struct sock...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
63,824,530,352,539,050,000,000,000,000,000,000,000
123
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static ssize_t _hostfs_pwrite( oe_fd_t* desc, const void* buf, size_t count, oe_off_t offset) { ssize_t ret = -1; file_t* file = _cast_file(desc); if (!file) OE_RAISE_ERRNO(OE_EINVAL); if (oe_syscall_pwrite_ocall(&ret, file->host_fd, buf, count, offset) != OE_OK) ...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
109,808,504,435,848,380,000,000,000,000,000,000,000
19
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
char *CLASS fgets(char *s, int size, FILE *stream) { char *str = ::fgets(s, size, stream); if (str == NULL) { if (eofCount < 10) // Maybe this should be a DCRAW_WARNING dcraw_message(DCRAW_VERBOSE, "%s: fgets returned NULL\n", ifname_display); if (eofC...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
94,531,475,124,678,690,000,000,000,000,000,000,000
15
Avoid overflow in ljpeg_start().
std::string ZRtp::getSasType() { std::string sasT(sasType->getName()); return sasT; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
166,592,627,960,945,070,000,000,000,000,000,000,000
4
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr, int *sockaddr_len, int peer) { struct sockaddr_atmpvc *addr; struct atm_vcc *vcc = ATM_SD(sock); if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) return -ENOTCONN; *sockaddr_len = sizeof(struct sockaddr_atmpvc); addr = (struct ...
0
[ "CWE-200" ]
linux
3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a
335,805,835,484,482,100,000,000,000,000,000,000,000
17
atm: fix info leak via getsockname() The ATM code fails to initialize the two padding bytes of struct sockaddr_atmpvc inserted for alignment. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@dave...
tagstack_shift(win_T *wp) { taggy_T *tagstack = wp->w_tagstack; int i; tagstack_clear_entry(&tagstack[0]); for (i = 1; i < wp->w_tagstacklen; ++i) tagstack[i - 1] = tagstack[i]; wp->w_tagstacklen--; }
0
[ "CWE-416" ]
vim
adce965162dd89bf29ee0e5baf53652e7515762c
293,555,670,543,062,270,000,000,000,000,000,000,000
10
patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer Problem: Using freed memory when 'tagfunc' deletes the buffer. Solution: Make a copy of the tag name.
Item_empty_string(THD *thd, const char *header,uint length, CHARSET_INFO *cs= NULL): Item_partition_func_safe_string(thd, "", 0, cs ? cs : &my_charset_utf8_general_ci) { name.str= header; name.length= strlen(name.str); max_length= le...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
107,971,907,936,530,290,000,000,000,000,000,000,000
9
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
void _process( const list<PG *> &pgs, ThreadPool::TPHandle &handle) override { assert(!pgs.empty()); osd->process_peering_events(pgs, handle); for (list<PG *>::const_iterator i = pgs.begin(); i != pgs.end(); ++i) { (*i)->put("PeeringWQ"); } }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
279,453,843,814,482,040,000,000,000,000,000,000,000
11
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 ...
_equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b) { COMPARE_SCALAR_FIELD(tleSortGroupRef); COMPARE_SCALAR_FIELD(eqop); COMPARE_SCALAR_FIELD(sortop); COMPARE_SCALAR_FIELD(nulls_first); COMPARE_SCALAR_FIELD(hashable); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
97,869,142,956,817,110,000,000,000,000,000,000,000
10
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
_outBooleanTest(StringInfo str, const BooleanTest *node) { WRITE_NODE_TYPE("BOOLEANTEST"); WRITE_NODE_FIELD(arg); WRITE_ENUM_FIELD(booltesttype, BoolTestType); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
101,872,073,664,582,790,000,000,000,000,000,000,000
7
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static int core_analysis_graph_construct_edges(RzCore *core, RzAnalysisFunction *fcn, int opts, PJ *pj, Sdb *DB) { RzAnalysisBlock *bbi; RzListIter *iter; int is_keva = opts & RZ_CORE_ANALYSIS_KEYVALUE; int is_star = opts & RZ_CORE_ANALYSIS_STAR; int is_json = opts & RZ_CORE_ANALYSIS_JSON; int is_html = rz_cons_s...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
312,768,457,252,222,700,000,000,000,000,000,000,000
128
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
int bdev_del_partition(struct gendisk *disk, int partno) { struct block_device *part = NULL; int ret = -ENXIO; mutex_lock(&disk->open_mutex); part = xa_load(&disk->part_tbl, partno); if (!part) goto out_unlock; ret = -EBUSY; if (part->bd_openers) goto out_unlock; delete_partition(part); ret = 0; out_unl...
0
[ "CWE-416" ]
linux
9fbfabfda25d8774c5a08634fdd2da000a924890
137,218,672,110,289,100,000,000,000,000,000,000,000
20
block: fix incorrect references to disk objects When adding partitions to the disk, the reference count of the disk object is increased. then alloc partition device and called device_add(), if the device_add() return error, the reference count of the disk object will be reduced twice, at put_device(pdev) and put_disk(...
f_term_dumpdiff(typval_T *argvars, typval_T *rettv) { term_load_dump(argvars, rettv, TRUE); }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
165,431,634,609,153,180,000,000,000,000,000,000,000
4
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index) { struct address_space *mapping = inode->i_mapping; struct page *page; page = find_get_page(mapping, index); if (page && PageUptodate(page)) return page; f2fs_put_page(page, 0); page = f2fs_get_read_data_page(inode, index, 0, false); if (IS...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
120,793,729,256,535,040,000,000,000,000,000,000,000
24
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
get_next_reel (int tape_des) { static int reel_number = 1; FILE *tty_in; /* File for interacting with user. */ FILE *tty_out; /* File for interacting with user. */ int old_tape_des; char *next_archive_name; dynamic_string new_name = DYNAMIC_STRING_INITIALIZER; char *str_res; /* Open files for inte...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
95,849,403,385,425,000,000,000,000,000,000,000,000
88
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
lsquic_qeh_settings (struct qpack_enc_hdl *qeh, unsigned max_table_size, unsigned dyn_table_size, unsigned max_risked_streams, int server) { enum lsqpack_enc_opts enc_opts; assert(qeh->qeh_flags & QEH_INITIALIZED); if (qeh->qeh_flags & QEH_HAVE_SETTINGS) { LSQ_WARN("settings alrea...
1
[ "CWE-476", "CWE-269" ]
lsquic
a74702c630e108125e71898398737baec8f02238
288,925,027,585,735,250,000,000,000,000,000,000,000
33
Release 3.1.0
BlockGroup::BlockGroup(Cluster* pCluster, long idx, long long block_start, long long block_size, long long prev, long long next, long long duration, long long discard_padding) : BlockEntry(pCluster, idx), m_block(block_start, block_size, discard_padding), m_...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
127,434,011,286,492,000,000,000,000,000,000,000,000
8
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
void mobi_buffer_copy(MOBIBuffer *dest, MOBIBuffer *source, const size_t len) { if (source->offset + len > source->maxlen) { debug_print("%s", "End of buffer\n"); source->error = MOBI_BUFFER_END; return; } if (dest->offset + len > dest->maxlen) { debug_print("%s", "End of buf...
0
[ "CWE-787" ]
libmobi
ab5bf0e37e540eac682a14e628853b918626e72b
293,025,109,376,915,930,000,000,000,000,000,000,000
15
fix oob write bug inside libmobi
bool __fastcall TNullConsole::LimitedOutput() { return false; }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
38,515,833,586,599,604,000,000,000,000,000,000,000
4
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
load_msg(RES* ssl, sldns_buffer* buf, struct worker* worker) { struct regional* region = worker->scratchpad; struct query_info qinf; struct reply_info rep; char* s = (char*)sldns_buffer_begin(buf); unsigned int flags, qdcount, security, an, ns, ar; long long ttl; size_t i; int go_on = 1; regional_free_all(reg...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
2,476,838,711,494,242,000,000,000,000,000,000,000
64
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
uint16_t Image::byteSwap2(const DataBuf& buf,size_t offset,bool bSwap) const { uint16_t v; char* p = (char*) &v; p[0] = buf.pData_[offset]; p[1] = buf.pData_[offset+1]; return Image::byteSwap(v,bSwap); }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
339,678,129,241,857,040,000,000,000,000,000,000,000
8
Fix https://github.com/Exiv2/exiv2/issues/55
_gdScaleOneAxis(gdImagePtr pSrc, gdImagePtr dst, unsigned int dst_len, unsigned int row, LineContribType *contrib, gdAxis axis) { unsigned int ndx; for (ndx = 0; ndx < dst_len; ndx++) { double r = 0, g = 0, b = 0, a = 0; const int left = contrib->ContribRow[ndx].Left; const int right = contrib->Contrib...
0
[ "CWE-399" ]
libgd
4751b606fa38edc456d627140898a7ec679fcc24
109,753,009,759,019,250,000,000,000,000,000,000,000
38
gdImageScaleTwoPass memory leak fix Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and confirmed by @vapier. This bug actually bit me in production and I'm very thankful that it was reported with an easy fix. Fixes #173.
static size_t trailers_read(char *buffer, size_t size, size_t nitems, void *raw) { struct Curl_easy *data = (struct Curl_easy *)raw; struct dynbuf *trailers_buf = &data->state.trailers_buf; size_t bytes_left = Curl_dyn_len(trailers_buf) - data->state.trailers_bytes_sent; size_t t...
0
[ "CWE-200" ]
curl
7214288898f5625a6cc196e22a74232eada7861c
148,700,509,727,933,300,000,000,000,000,000,000,000
16
transfer: strip credentials from the auto-referer header field Added test 2081 to verify. CVE-2021-22876 Bug: https://curl.se/docs/CVE-2021-22876.html
static int __net_init ipip_init_net(struct net *net) { struct ipip_net *ipn = net_generic(net, ipip_net_id); int err; ipn->tunnels[0] = ipn->tunnels_wc; ipn->tunnels[1] = ipn->tunnels_l; ipn->tunnels[2] = ipn->tunnels_r; ipn->tunnels[3] = ipn->tunnels_r_l; ipn->fb_tunnel_dev = alloc_netdev(sizeof(struct ip_tun...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
190,506,203,780,537,700,000,000,000,000,000,000,000
32
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
avdtp_state_t avdtp_sep_get_state(struct avdtp_local_sep *sep) { return sep->state; }
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
238,520,755,536,641,740,000,000,000,000,000,000,000
4
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
Pl_ASCII85Decoder::finish() { flush(); getNext()->finish(); }
0
[ "CWE-787" ]
qpdf
dc92574c10f3e2516ec6445b88c5d584f40df4e5
22,928,313,455,915,120,000,000,000,000,000,000,000
5
Fix some pipelines to be safe if downstream write fails (fuzz issue 28262)
TRIO_PUBLIC_STRING void trio_xstring_set TRIO_ARGS2((self, buffer), trio_string_t* self, char* buffer) { assert(self); trio_destroy(self->content); self->content = trio_duplicate(buffer); }
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
254,903,499,943,022,100,000,000,000,000,000,000,000
8
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) { assert(cstr_index != 00); /* expand the list? */ if ((cstr_index->marknum + 1) > cstr_index->maxmarknum) { opj_marker_info_t *new_marker; cs...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
230,129,901,532,516,600,000,000,000,000,000,000,000
27
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static int __poke_user_compat(struct task_struct *child, addr_t addr, addr_t data) { struct compat_user *dummy32 = NULL; __u32 tmp = (__u32) data; addr_t offset; if (addr < (addr_t) &dummy32->regs.acrs) { struct pt_regs *regs = task_pt_regs(child); /* * psw, gprs, acrs and orig_gpr2 are stored on t...
1
[ "CWE-264", "CWE-269" ]
linux
dab6cf55f81a6e16b8147aed9a843e1691dcd318
184,749,865,572,114,230,000,000,000,000,000,000,000
73
s390/ptrace: fix PSW mask check The PSW mask check of the PTRACE_POKEUSR_AREA command is incorrect. The PSW_MASK_USER define contains the PSW_MASK_ASC bits, the ptrace interface accepts all combinations for the address-space-control bits. To protect the kernel space the PSW mask check in ptrace needs to reject the add...
irc_server_search (const char *server_name) { struct t_irc_server *ptr_server; if (!server_name) return NULL; for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) { if (strcmp (ptr_server->name, server_name) == 0) return ptr_server; ...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
282,645,671,844,683,460,000,000,000,000,000,000,000
17
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
static int oidc_handle_post_authorization_response(request_rec *r, oidc_cfg *c, oidc_session_t *session) { oidc_debug(r, "enter"); /* initialize local variables */ char *response_mode = NULL; /* read the parameters that are POST-ed to us */ apr_table_t *params = apr_table_make(r->pool, 8); if (oidc_util_read...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
80,369,412,890,759,450,000,000,000,000,000,000,000
35
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
static long vhost_net_ioctl(struct file *f, unsigned int ioctl, unsigned long arg) { struct vhost_net *n = f->private_data; void __user *argp = (void __user *)arg; u64 __user *featurep = argp; struct vhost_vring_file backend; u64 features; int r; switch (ioctl) { case VHOST_NET_SET_BACKEND: if (copy_f...
0
[ "CWE-787" ]
linux
42d84c8490f9f0931786f1623191fcab397c3d64
36,466,110,329,718,530,000,000,000,000,000,000,000
52
vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax2...
static int test_int64(void) { return test_intern(&int64_test_package); }
0
[ "CWE-476" ]
openssl
22b88fc9c0e22545401c0b34d24843883ea73fec
183,543,737,636,540,800,000,000,000,000,000,000,000
4
Add a test for encoding/decoding using an invalid ASN.1 Template If you have a CHOICE type that it must use explicit tagging - otherwise the template is invalid. We add tests for this. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
static int edge_resume(struct usb_serial *serial) { struct edgeport_serial *edge_serial = usb_get_serial_data(serial); edge_heartbeat_schedule(edge_serial); return 0; }
0
[ "CWE-191" ]
linux
654b404f2a222f918af9b0cd18ad469d0c941a8e
338,033,106,499,377,400,000,000,000,000,000,000,000
8
USB: serial: io_ti: fix information leak in completion handler Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that can be triggered by a malicious device. This avoids leaking 128 kB of memory content from after the URB transfer buffer to user space. Fixes: 8c209e6782ca ("USB...
static int StreamTcpTest43 (void) { int ret = 0; Flow f; ThreadVars tv; StreamTcpThread stt; TCPHdr tcph; PacketQueue pq; Packet *p = SCMalloc(SIZE_OF_PACKET); TcpSession *ssn; if (unlikely(p == NULL)) return 0; memset(p, 0, SIZE_OF_PACKET); memset(&pq,0,sizeof(Pack...
0
[]
suricata
843d0b7a10bb45627f94764a6c5d468a24143345
176,619,206,459,509,500,000,000,000,000,000,000,000
90
stream: support RST getting lost/ignored In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'. However, the target of the RST may not have received it, or may not have accepted it. Also, the RST may have been injected, so the supposed sender may not actually be aware of the RST that was sent in it's ...
static inline void ncp_init_request(struct ncp_server *server) { ncp_lock_server(server); server->current_size = sizeof(struct ncp_request_header); server->has_subfunction = 0; }
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
237,662,461,060,569,160,000,000,000,000,000,000,000
7
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
void StreamBase::GetBytesRead(const FunctionCallbackInfo<Value>& args) { Base* handle; ASSIGN_OR_RETURN_UNWRAP(&handle, args.This(), args.GetReturnValue().Set(0)); StreamBase* wrap = static_cast<StreamBase*>(handle); // uint64_t -> double. 53bits is enough fo...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
106,829,953,442,360,390,000,000,000,000,000,000,000
10
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
pch_mode (bool which) { return p_mode[which]; }
0
[ "CWE-59" ]
patch
44a987e02f04b9d81a0db4a611145cad1093a2d3
189,345,040,773,808,700,000,000,000,000,000,000,000
4
Add line number overflow checking * bootstrap.conf: use intprops module. * src/common.h: Define LINENUM_MIN and LINENUM_MAX macros. * src/pch.c (another_hunk): Add line number overflow checking. Based on Robert C. Seacord's INT32-C document for integer overflow checking and Tobias Stoeckmann's "integer overflows and ...
void PSOutputDev::updateRender(GfxState *state) { int rm; rm = state->getRender(); writePSFmt("{0:d} Tr\n", rm); rm &= 3; if (rm != 0 && rm != 3) { t3Cacheable = gFalse; } }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
116,925,627,885,584,590,000,000,000,000,000,000,000
10
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int RGWGetACLs::verify_permission() { bool perm; if (!s->object.empty()) { auto iam_action = s->object.instance.empty() ? rgw::IAM::s3GetObjectAcl : rgw::IAM::s3GetObjectVersionAcl; if (s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG)){ rgw_obj obj = rgw_obj(s->...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
25,563,110,911,748,500,000,000,000,000,000,000,000
22
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 <...
static void pwq_dec_nr_in_flight(struct pool_workqueue *pwq, int color) { /* uncolored work items don't participate in flushing or nr_active */ if (color == WORK_NO_COLOR) goto out_put; pwq->nr_in_flight[color]--; pwq->nr_active--; if (!list_empty(&pwq->delayed_works)) { /* one down, submit a delayed one */ ...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
226,433,632,730,976,570,000,000,000,000,000,000,000
35
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, int64_t ent_len) { assert(cr && ent_len >= 0); cr->spec = spec; cr->elength = ent_len; }
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
337,697,758,480,917,140,000,000,000,000,000,000,000
6
Handle more partial responses (#791)
PHP_FUNCTION(imageaffine) { zval *IM; gdImagePtr src; gdImagePtr dst; gdRect rect; gdRectPtr pRect = NULL; zval *z_rect = NULL; zval *z_affine; zval **tmp; double affine[6]; int i, nelems; zval **zval_affine_elem = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|a", &IM, &z_affine, &z_rect) ...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
285,835,387,350,271,670,000,000,000,000,000,000,000
131
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
int RGWDeleteMultiObj_ObjStore::get_params() { if (s->bucket_name.empty()) { op_ret = -EINVAL; return op_ret; } // everything is probably fine, set the bucket bucket = s->bucket; const auto max_size = s->cct->_conf->rgw_max_put_param_size; op_ret = rgw_rest_read_all_input(s, &data, &len, max_size...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
290,464,922,651,832,440,000,000,000,000,000,000,000
15
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 <...
static int kvm_vcpu_mmap(struct file *file, struct vm_area_struct *vma) { struct kvm_vcpu *vcpu = file->private_data; unsigned long pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; if ((kvm_page_in_dirty_ring(vcpu->kvm, vma->vm_pgoff) || kvm_page_in_dirty_ring(vcpu->kvm, vma->vm_pgoff + pages - 1)) && ...
0
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
150,933,960,273,765,740,000,000,000,000,000,000,000
13
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...
void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req) { if (refcount_dec_and_test(&req->count)) { if (test_bit(FR_BACKGROUND, &req->flags)) { /* * We get here in the unlikely case that a background * request was allocated but not sent */ spin_lock(&fc->bg_lock); if (!fc->blocked) ...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
252,748,644,546,361,600,000,000,000,000,000,000,000
25
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
bool array_start() { if (w->arrayable && !arraying) { arraying = true; return true; } return false; }
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
213,996,207,697,776,180,000,000,000,000,000,000,000
7
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
struct ldb_dn *ldb_dn_copy(TALLOC_CTX *mem_ctx, struct ldb_dn *dn) { struct ldb_dn *new_dn; if (!dn || dn->invalid) { return NULL; } new_dn = talloc_zero(mem_ctx, struct ldb_dn); if ( !new_dn) { return NULL; } *new_dn = *dn; if (dn->components) { unsigned int i; new_dn->components = talloc_zero_...
0
[ "CWE-200" ]
samba
7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72
178,177,637,708,469,360,000,000,000,000,000,000,000
89
CVE-2015-5330: ldb_dn: simplify and fix ldb_dn_escape_internal() Previously we relied on NUL terminated strings and jumped back and forth between copying escaped bytes and memcpy()ing un-escaped chunks. This simple version is easier to reason about and works with unterminated strings. It may also be faster as it avoid...
static int smacker_decode_tree(BitstreamContext *bc, HuffContext *hc, uint32_t prefix, int length) { if (!bitstream_read_bit(bc)) { // Leaf if(hc->current >= 256){ av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n"); return AVERROR_INVALIDDATA; ...
1
[ "CWE-119", "CWE-787" ]
libav
cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
271,663,383,205,263,300,000,000,000,000,000,000,000
29
smacker: add sanity check for length in smacker_decode_tree() Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Bug-Id: 1098 Cc: libav-stable@libav.org Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
static ssize_t red_stream_sasl_write(RedStream *s, const void *buf, size_t nbyte) { ssize_t ret; if (!s->priv->sasl.encoded) { int err; err = sasl_encode(s->priv->sasl.conn, (char *)buf, nbyte, (const char **)&s->priv->sasl.encoded, &s->priv->...
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
125,018,110,667,333,460,000,000,000,000,000,000,000
45
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static void str_term_source(j_decompress_ptr cinfo) { }
0
[ "CWE-787" ]
poppler
ae614bf8ab42c9d0c7ac57ecdfdcbcfc4ff6c639
254,294,267,896,148,740,000,000,000,000,000,000,000
1
Fix DCTStream::getChars we're reading past the buffer check I wonder how this had never crashed before :S Fixes #1011
static int ahash_def_finup(struct ahash_request *req) { struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); unsigned long alignmask = crypto_ahash_alignmask(tfm); unsigned int ds = crypto_ahash_digestsize(tfm); struct ahash_request_priv *priv; priv = kmalloc(sizeof(*priv) + ahash_align_buffer_size(ds, alignmask)...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
239,785,588,474,370,080,000,000,000,000,000,000,000
24
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
FileInputSource::setFilename(char const* filename) { destroy(); this->filename = filename; this->close_file = true; this->file = QUtil::safe_fopen(this->filename.c_str(), "rb"); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
127,574,278,000,969,960,000,000,000,000,000,000,000
7
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
unix_expandpath( garray_T *gap, char_u *path, int wildoff, int flags, // EW_* flags int didstar) // expanded "**" once already { char_u *buf; char_u *path_end; char_u *p, *s, *e; int start_len = gap->ga_len; char_u *pat; regmatch_T regmatch; int starts_with_dot; ...
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
329,401,374,397,734,560,000,000,000,000,000,000,000
211
patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.
static void connect_failed_callback(uint16_t index, uint16_t length, const void *param, void *user_data) { const struct mgmt_ev_connect_failed *ev = param; struct btd_adapter *adapter = user_data; struct btd_device *device; char addr[18]; if (length < sizeof(*ev)) { btd_error(adapter->dev_id, "Too small co...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
214,607,951,417,483,100,000,000,000,000,000,000,000
48
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
const CString& CUser::GetNick(bool bAllowDefault) const { return (bAllowDefault && m_sNick.empty()) ? GetCleanUserName() : m_sNick; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
5,606,778,028,508,097,000,000,000,000,000,000,000
3
Don't crash if user specified invalid encoding. This is CVE-2019-9917
TEST_F(ExpressionNaryTest, FlattenInnerOperandsOptimizationOnAssociativeOnlyBackOperandAndGroup) { BSONArrayBuilder specBuilder; addOperandArrayToExpr(_associativeOnly, BSON_ARRAY(200 << "$path3" << 201)); specBuilder << 200 << "$path3" << 201; intrusive_ptr<Testable> innerOperand = Testable::create(t...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
234,261,091,614,243,460,000,000,000,000,000,000,000
20
SERVER-38070 fix infinite loop in agg expression
interval_to_char(PG_FUNCTION_ARGS) { Interval *it = PG_GETARG_INTERVAL_P(0); text *fmt = PG_GETARG_TEXT_P(1), *res; TmToChar tmtc; struct pg_tm *tm; if ((VARSIZE(fmt) - VARHDRSZ) <= 0) PG_RETURN_NULL(); ZERO_tmtc(&tmtc); tm = tmtcTm(&tmtc); if (interval2tm(*it, tm, &tmtcFsec(&tmtc)) != 0) PG_R...
0
[ "CWE-120" ]
postgres
0150ab567bcf5e5913e2b62a1678f84cc272441f
108,993,622,607,834,700,000,000,000,000,000,000,000
25
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
static void extract_unique_uuids(gpointer data, gpointer user_data) { char *uuid_str = data; GSList **uuids = user_data; if (!g_slist_find_custom(*uuids, uuid_str, g_strcmp)) *uuids = g_slist_insert_sorted(*uuids, uuid_str, g_strcmp); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
320,321,820,717,698,200,000,000,000,000,000,000,000
8
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void print_error(char *s, int col) { if (col >= 0) fprintf(stderr, "%s:%d:%d: error: %s\n", abc_fn, linenum, col, s); else fprintf(stderr, "%s:%d: error: %s\n", abc_fn, linenum, s); }
0
[ "CWE-125", "CWE-787" ]
abcm2ps
3169ace6d63f6f517a64e8df0298f44a490c4a15
79,380,241,763,797,240,000,000,000,000,000,000,000
7
fix: crash when accidental without a note at start of line after K: Issue #84.
ldns_rr_print_fmt(FILE *output, const ldns_output_format *fmt, const ldns_rr *rr) { char *str = ldns_rr2str_fmt(fmt, rr); if (str) { fprintf(output, "%s", str); } else { fprintf(output, ";Unable to convert rr to string\n"); } LDNS_FREE(str); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
275,999,437,283,914,300,000,000,000,000,000,000,000
11
CAA and URI