func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline void ConvertLCHuvToXYZ(const double luma,const double chroma, const double hue,double *X,double *Y,double *Z) { ConvertLuvToXYZ(luma,chroma*cos(hue*MagickPI/180.0),chroma* sin(hue*MagickPI/180.0),X,Y,Z); }
0
[ "CWE-369" ]
ImageMagick
fbd9a963db1ae5551c45dc8af57db0abd7695774
144,839,054,662,349,900,000,000,000,000,000,000,000
6
https://github.com/ImageMagick/ImageMagick/issues/3077
static enum hrtimer_restart perf_cpu_hrtimer_handler(struct hrtimer *hr) { struct perf_cpu_context *cpuctx; enum hrtimer_restart ret = HRTIMER_NORESTART; int rotations = 0; WARN_ON(!irqs_disabled()); cpuctx = container_of(hr, struct perf_cpu_context, hrtimer); rotations = perf_rotate_context(cpuctx); /* * ...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
12,509,734,825,756,650,000,000,000,000,000,000,000
22
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
s_trunc(VALUE s, VALUE *fr) { VALUE rs; if (wholenum_p(s)) { rs = to_integer(s); *fr = INT2FIX(0); } else { rs = f_idiv(s, INT2FIX(1)); *fr = f_mod(s, INT2FIX(1)); *fr = f_quo(*fr, INT2FIX(86400)); } return rs; }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
150,201,661,214,258,300,000,000,000,000,000,000,000
15
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { char path[BUFLEN], subdir[BUFLEN], *text, *p; void *mac; size_t maclen; time_t now; int fd, i, debug = 0; /* Parse arguments. */ for (i = 0; i < argc; i++) { if (strcmp(argv[i], "debug") == 0) { debug = 1; } } /* ...
0
[ "CWE-22" ]
linux-pam
9dcead87e6d7f66d34e7a56d11a30daca367dffb
207,470,611,981,049,440,000,000,000,000,000,000,000
115
pam_timestamp: fix potential directory traversal issue (ticket #27) pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of the timestamp pathname it creates, so extra care should be taken to avoid potential directory traversal issues. * modules/pam_timestamp/pam_timestamp.c (check_tty): Treat "." and ".....
cancel_directory_count_for_file (NautilusDirectory *directory, NautilusFile *file) { if (directory->details->count_in_progress != NULL && directory->details->count_in_progress->count_file == file) { directory_count_cancel (directory); } }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
325,453,845,488,472,750,000,000,000,000,000,000,000
9
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
virtual longlong val_time_packed(THD *thd) { return Time(thd, this, Time::Options_cmp(thd)).to_packed(); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
102,986,995,040,678,300,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_read *read) { unsigned long maxcount; struct xdr_stream *xdr = &resp->xdr; struct file *file = read->rd_filp; int starting_len = xdr->buf->len; struct raparms *ra = NULL; __be32 *p; if (nfserr) goto out; p = xdr_reserve_space(...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
68,554,245,925,967,290,000,000,000,000,000,000,000
52
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
static int sqfs_count_metablks(void *table, u32 offset, int table_size) { int count = 0, cur_size = 0, ret; u32 data_size; bool comp; do { ret = sqfs_read_metablock(table, offset + cur_size, &comp, &data_size); if (ret) return -EINVAL; cur_size += data_size + SQFS_HEADER_SIZE; count++; } while (...
0
[ "CWE-787" ]
u-boot
2ac0baab4aff1a0b45067d0b62f00c15f4e86856
258,433,938,181,631,220,000,000,000,000,000,000,000
17
fs/squashfs: sqfs_read: Prevent arbitrary code execution Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent...
static inline unsigned short netdev_lock_pos(unsigned short dev_type) { int i; for (i = 0; i < ARRAY_SIZE(netdev_lock_type); i++) if (netdev_lock_type[i] == dev_type) return i; /* the last key is used by default */ return ARRAY_SIZE(netdev_lock_type) - 1; }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
15,305,856,740,951,007,000,000,000,000,000,000,000
10
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...
ZEND_METHOD(Generator, __wakeup) { /* Just specifying the zend_class_unserialize_deny handler is not enough, * because it is only invoked for C unserialization. For O the error has * to be thrown in __wakeup. */ if (zend_parse_parameters_none() == FAILURE) { return; } zend_throw_exception(NULL, "Unserializa...
0
[]
php-src
83e2b9e2202da6cc25bdaac67a58022b90be88e7
252,593,999,729,299,700,000,000,000,000,000,000,000
12
Fixed bug #76946
static rfbBool CheckRect(rfbClient* client, int x, int y, int w, int h) { return x + w <= client->width && y + h <= client->height; }
0
[ "CWE-703", "CWE-835" ]
libvncserver
57433015f856cc12753378254ce4f1c78f5d9c7b
323,880,907,468,699,560,000,000,000,000,000,000,000
3
libvncclient: handle half-open TCP connections When a connection is not reset properly at the TCP level (e.g. sudden power loss or process crash) the TCP connection becomes half-open and read() always returns -1 with errno = EAGAIN while select() always returns 0. This leads to an infinite loop and can be fixed by clo...
void resume_iommu(void) { do_action_for_iommus(resume_dmar); }
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
85,576,182,772,771,070,000,000,000,000,000,000,000
4
hv: validate input for dmar_free_irte function Malicious input 'index' may trigger buffer overflow on array 'irte_alloc_bitmap[]'. This patch validate that 'index' shall be less than 'CONFIG_MAX_IR_ENTRIES' and also remove unnecessary check on 'index' in 'ptirq_free_irte()' function with this fix. Tracked-On: ...
plperl_spi_query(char *query) { SV *cursor; /* * Execute the query inside a sub-transaction, so we can cope with errors * sanely */ MemoryContext oldcontext = CurrentMemoryContext; ResourceOwner oldowner = CurrentResourceOwner; check_spi_usage_allowed(); BeginInternalSubTransaction(NULL); /* Want to...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
263,093,082,353,190,600,000,000,000,000,000,000,000
80
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
void kvm_arch_hardware_enable(void *garbage) { kvm_x86_ops->hardware_enable(garbage); }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
151,842,107,599,344,740,000,000,000,000,000,000,000
4
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
ecma_snapshot_resolve_serializable_values (const ecma_compiled_code_t *compiled_code_p, /**< compiled code */ uint8_t *bytecode_end_p) /**< end of the bytecode */ { ecma_value_t *base_p = (ecma_value_t *) bytecode_end_p; if (compiled_code_p->status_flags & CBC_CODE_FLAGS_...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
286,553,738,033,763,100,000,000,000,000,000,000,000
30
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void unlock_rtas(unsigned long flags) { arch_spin_unlock(&rtas.lock); local_irq_restore(flags); preempt_enable(); }
0
[ "CWE-862" ]
linux
bd59380c5ba4147dcbaad3e582b55ccfd120b764
45,379,308,582,018,910,000,000,000,000,000,000,000
6
powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which al...
template<typename tc, typename tl> CImg<T>& draw_triangle(int x0, int y0, const float z0, int x1, int y1, const float z1, int x2, int y2, const float z2, const CImg<tc>& texture, int tx0, int ty0, ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
109,544,985,120,784,400,000,000,000,000,000,000,000
112
.
static int get_hstate_idx(int page_size_log) { struct hstate *h = hstate_sizelog(page_size_log); if (!h) return -1; return h - hstates; }
0
[]
linux
1bfad99ab42569807d0ca1698449cae5e8c0334a
62,969,982,965,086,460,000,000,000,000,000,000,000
8
hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete fallocate hole punch will want to unmap a specific range of pages. Modify the existing hugetlb_vmtruncate_list() routine to take a start/end range. If end is 0, this indicates all pages after start should be unmapped. This is the same as the existi...
void RemoteDevicePropertiesWidget::update(const RemoteFsDevice::Details &d, bool create, bool isConnected) { int t=d.isLocalFile() ? Type_File : Type_SshFs; setEnabled(d.isLocalFile() || !isConnected); infoLabel->setVisible(create); orig=d; name->setText(d.name); sshPort->setValue(22); conn...
0
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
192,334,013,936,157,900,000,000,000,000,000,000,000
52
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
psutil_net_if_stats(PyObject* self, PyObject* args) { kstat_ctl_t *kc = NULL; kstat_t *ksp; kstat_named_t *knp; int ret; int sock = -1; int duplex; int speed; PyObject *py_retdict = PyDict_New(); PyObject *py_ifc_info = NULL; PyObject *py_is_up = NULL; if (py_retdict == NUL...
1
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
35,757,547,513,002,700,000,000,000,000,000,000,000
102
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
static ssize_t remove_single_major_store(struct bus_type *bus, const char *buf, size_t count) { return do_rbd_remove(bus, buf, count); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
334,260,038,220,462,330,000,000,000,000,000,000,000
5
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...
SProcXkbSetNamedIndicator(ClientPtr client) { REQUEST(xkbSetNamedIndicatorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq); swaps(&stuff->deviceSpec); swaps(&stuff->ledClass); swaps(&stuff->ledID); swapl(&stuff->indicator); swaps(&stuff->virtualMods); swapl(&...
0
[ "CWE-191" ]
xserver
144849ea27230962227e62a943b399e2ab304787
181,554,512,610,914,800,000,000,000,000,000,000,000
14
Fix XkbSelectEvents() integer underflow CVE-2020-14361 ZDI-CAN 11573 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
static int local_ioc_getversion(FsContext *ctx, V9fsPath *path, mode_t st_mode, uint64_t *st_gen) { #ifdef FS_IOC_GETVERSION int err; V9fsFidOpenState fid_open; /* * Do not try to open special files like device nodes, fifos etc * We can get fd for regular files and...
0
[ "CWE-732" ]
qemu
9c6b899f7a46893ab3b671e341a2234e9c0c060e
17,604,346,608,900,998,000,000,000,000,000,000,000
27
9pfs: local: set the path of the export root to "." The local backend was recently converted to using "at*()" syscalls in order to ensure all accesses happen below the shared directory. This requires that we only pass relative paths, otherwise the dirfd argument to the "at*()" syscalls is ignored and the path is treat...
static int ieee80211_join_ocb(struct wiphy *wiphy, struct net_device *dev, struct ocb_setup *setup) { return ieee80211_ocb_join(IEEE80211_DEV_TO_SUB_IF(dev), setup); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
243,650,861,695,963,600,000,000,000,000,000,000,000
5
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static int crypto_init_blkcipher_ops_sync(struct crypto_tfm *tfm) { struct blkcipher_tfm *crt = &tfm->crt_blkcipher; struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; unsigned long align = crypto_tfm_alg_alignmask(tfm) + 1; unsigned long addr; crt->setkey = setkey; crt->encrypt = alg->encrypt; crt->de...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
143,566,030,578,780,100,000,000,000,000,000,000,000
18
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...
static void doDropPrivUid(int iUid) { int res; uchar szBuf[1024]; res = setuid(iUid); if(res) { /* if we can not set the userid, this is fatal, so let's unconditionally abort */ perror("could not set requested userid"); exit(1); } DBGPRINTF("setuid(%d): %d\n", iUid, res); snprintf((char*)szBuf, sizeof(szB...
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
198,264,505,304,016,880,000,000,000,000,000,000,000
15
bugfix: off-by-one(two) bug in legacy syslog parser
unsigned long round_jiffies_relative(unsigned long j) { return __round_jiffies_relative(j, raw_smp_processor_id()); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
224,206,875,272,256,600,000,000,000,000,000,000,000
4
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...
static BOOL nsc_rle_decompress_data(NSC_CONTEXT* context) { UINT16 i; BYTE* rle; UINT32 planeSize; UINT32 originalSize; if (!context) return FALSE; rle = context->Planes; for (i = 0; i < 4; i++) { originalSize = context->OrgByteCount[i]; planeSize = context->PlaneByteCount[i]; if (planeSize == 0) ...
0
[ "CWE-200", "CWE-787" ]
FreeRDP
d1112c279bd1a327e8e4d0b5f371458bf2579659
110,562,115,674,397,300,000,000,000,000,000,000,000
43
Fixed CVE-2018-8788 Thanks to Eyal Itkin from Check Point Software Technologies.
static int check_cert_time(X509_STORE_CTX *ctx, X509 *x) { time_t *ptime; int i; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i=X509_cmp_time(X509_get_notBefore(x), ptime); if (i == 0) { ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD; c...
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
51,981,055,330,664,090,000,000,000,000,000,000,000
46
Backport OCSP fixes.
static void bond_setup(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); /* initialize rwlocks */ rwlock_init(&bond->lock); rwlock_init(&bond->curr_slave_lock); bond->params = bonding_defaults; /* Initialize pointers */ bond->dev = bond_dev; INIT_LIST_HEAD(&bond->vlan_list); /* I...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
330,058,640,843,359,200,000,000,000,000,000,000,000
54
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int hns_rcb_get_ring_sset_count(int stringset) { if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS) return HNS_RING_STATIC_REG_NUM; return 0; }
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
86,603,648,123,159,000,000,000,000,000,000,000,000
7
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
write_properties_valuehash (gpointer key, gpointer val, gpointer user_data) { GValue *value = (GValue *) val; WritePropertiesInfo *info = (WritePropertiesInfo *) user_data; char *esc_key; char *full_key; esc_key = gconf_escape_key ((char *) key, -1); full_key = g_strconcat (info->path, "/", esc_key, NULL); g_fr...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
300,340,372,751,124,400,000,000,000,000,000,000,000
22
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
ldbm_config_backend_opt_level_set(void *arg, void *value, char *errorbuf __attribute__((unused)), int phase __attribute__((unused)), int apply) { struct ldbminfo *li = (struct ldbminfo *)arg; int retval = LDAP_SUCCESS; int val = (int)((uintptr_t)value); /* Do whatever we can to make sure the data is ok...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
311,567,955,310,198,650,000,000,000,000,000,000,000
14
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) { static u32 ip_idents_hashrnd __read_mostly; u32 hash, id; net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd)); hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net)...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
283,444,030,864,403,800,000,000,000,000,000,000,000
14
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
static int FIPS_aes_gcm_test(void) { int ret = 0; unsigned char pltmp[16]; unsigned char citmp[16]; unsigned char tagtmp[16]; unsigned char key[16] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; unsigned char iv[16] = {21,22,23,24,25,26,27,28,29,30,31,32}; unsigned char aad[] = "Some text AAD"; unsigned char plai...
0
[]
openssl
200f249b8c3b6439e0200d01caadc24806f1a983
84,549,848,942,441,570,000,000,000,000,000,000,000
40
Remove Dual EC DRBG from FIPS module.
static void super_written(struct bio *bio, int error) { struct md_rdev *rdev = bio->bi_private; struct mddev *mddev = rdev->mddev; if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) { printk("md: super_written gets error=%d, uptodate=%d\n", error, test_bit(BIO_UPTODATE, &bio->bi_flags)); WARN_ON(tes...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
71,034,319,487,049,230,000,000,000,000,000,000,000
16
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static int island_try(int x, int y, int u, int v, int *run) { int n, m, ct; n = x + y * ntiles_x; m = u + v * ntiles_x; if (tile_has_diff[n]) { (*run)++; } else { *run = 0; } if (tile_has_diff[n] && ! tile_has_diff[m]) { /* found a discontinuity */ if (tile_tried[m]) { return 0; } else if (*run ...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
28,907,144,647,543,430,000,000,000,000,000,000,000
26
scan: limit access to shared memory segments to current user
GF_Err hvcc_box_read(GF_Box *s, GF_BitStream *bs) { u64 consumed; GF_HEVCConfigurationBox *ptr = (GF_HEVCConfigurationBox *)s; if (ptr->config) gf_odf_hevc_cfg_del(ptr->config); consumed = gf_bs_get_position(bs); switch (s->type) { case GF_ISOM_BOX_TYPE_HVCC: case GF_ISOM_BOX_TYPE_HVCE: ptr->config = gf_odf_...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
93,895,092,558,732,880,000,000,000,000,000,000,000
22
fixed #2165
is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset) { struct mntentchn *mnt = NULL; char *node; int res = 0; node = canonicalize(node0); /* Search for mountpoint node in mtab, * procceed if any of these has the loop option set or * the device is a loop device */ mn...
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
124,168,079,695,647,160,000,000,000,000,000,000,000
36
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...
raw_unicode_escape(PyObject *obj) { char *p; Py_ssize_t i, size; void *data; unsigned int kind; _PyBytesWriter writer; if (PyUnicode_READY(obj)) return NULL; _PyBytesWriter_Init(&writer); size = PyUnicode_GET_LENGTH(obj); data = PyUnicode_DATA(obj); kind = PyUnicode_KI...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
223,548,666,398,181,740,000,000,000,000,000,000,000
67
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
SMB2_set_info_free(struct smb_rqst *rqst) { if (rqst && rqst->rq_iov) cifs_buf_release(rqst->rq_iov[0].iov_base); /* request */ }
0
[ "CWE-416", "CWE-200" ]
linux
6a3eb3360667170988f8a6477f6686242061488a
10,434,513,692,348,216,000,000,000,000,000,000,000
5
cifs: Fix use-after-free in SMB2_write There is a KASAN use-after-free: BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580 Read of size 8 at addr ffff8880b6a8e450 by task ln/4196 Should not release the 'req' because it will use in the trace. Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de...
int on_body(const char* at, size_t length) { EscapableHandleScope scope(env()->isolate()); Local<Object> obj = object(); Local<Value> cb = obj->Get(env()->context(), kOnBody).ToLocalChecked(); if (!cb->IsFunction()) return 0; // We came from consumed stream if (current_buffer_.IsEmpty...
0
[ "CWE-400" ]
node
753f3b247ae2d24fee0b3f48b9ec3a5c308f0650
171,649,615,899,242,670,000,000,000,000,000,000,000
36
http: add requestTimeout This commits introduces a new http.Server option called requestTimeout with a default value in milliseconds of 0. If requestTimeout is set to a positive value, the server will start a new timer set to expire in requestTimeout milliseconds when a new connection is established. The timer is als...
long RemoteIo::write(const byte* /* unused data*/, long /* unused wcount*/) { return 0; // means failure }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
332,006,230,387,008,640,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
bool ping_rcv(struct sk_buff *skb) { struct sock *sk; struct net *net = dev_net(skb->dev); struct icmphdr *icmph = icmp_hdr(skb); /* We assume the packet has already been checked by icmp_rcv */ pr_debug("ping_rcv(skb=%p,id=%04x,seq=%04x)\n", skb, ntohs(icmph->un.echo.id), ntohs(icmph->un.echo.sequence)); /*...
0
[ "CWE-703" ]
linux
a134f083e79fb4c3d0a925691e732c56911b4326
316,769,784,824,564,950,000,000,000,000,000,000,000
28
ipv4: Missing sk_nulls_node_init() in ping_unhash(). If we don't do that, then the poison value is left in the ->pprev backlink. This can cause crashes if we do a disconnect, followed by a connect(). Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Wen Xu <hotdog3645@gmail.com> Signed-off-by: D...
static void __exit bcm_module_exit(void) { can_proto_unregister(&bcm_can_proto); unregister_netdevice_notifier(&canbcm_notifier); unregister_pernet_subsys(&canbcm_pernet_ops); }
0
[ "CWE-362" ]
linux
d5f9023fa61ee8b94f37a93f08e94b136cf1e463
37,668,258,193,681,806,000,000,000,000,000,000,000
6
can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, mean...
circ_state_has_higher_priority(origin_circuit_t *a, const entry_guard_restriction_t *rst, origin_circuit_t *b) { circuit_guard_state_t *state_a = origin_circuit_get_guard_state(a); circuit_guard_state_t *state_b = origin_circuit_get_guard_state(b); to...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
110,399,067,801,341,130,000,000,000,000,000,000,000
27
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
size_t vterm_output_get_buffer_size(const VTerm *vt) { return vt->outbuffer_len; }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
74,518,485,621,269,040,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.
get_dn(gnutls_x509_crt_t cert, const char *whom, gnutls_x509_dn_t * dn) { *dn = asn1_find_node(cert->cert, whom); if (!*dn) return GNUTLS_E_ASN1_ELEMENT_NOT_FOUND; return 0; }
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
39,239,599,013,295,590,000,000,000,000,000,000,000
7
on certificate import check whether the two signature algorithms match
hb_buffer_ensure( HB_Buffer buffer, HB_UInt size ) { HB_UInt new_allocated = buffer->allocated; if (size > new_allocated) { HB_Error error; while (size > new_allocated) new_allocated += (new_allocated >> 1) + 8; if ( buffer->positions ) { if ( REALLOC_ARRAY( buffer->posit...
1
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
128,240,973,658,443,860,000,000,000,000,000,000,000
44
[HB] Remove all references to the old code!
int rom_check_and_register_reset(void) { hwaddr addr = 0; MemoryRegionSection section; Rom *rom; AddressSpace *as = NULL; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (!rom->mr) { if ((addr > rom->addr) && (as == rom->as)) { ...
0
[ "CWE-787" ]
qemu
e423455c4f23a1a828901c78fe6d03b7dde79319
89,185,482,518,096,960,000,000,000,000,000,000,000
32
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
Get the full unfiltered header for a message */ PHP_FUNCTION(imap_fetchheader) { zval *streamind; zend_long msgno, flags = 0L; pils *imap_le_struct; int msgindex, argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) { return; } if (flags && ((flags & ~(FT...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
193,593,054,041,767,600,000,000,000,000,000,000,000
33
Disable rsh/ssh functionality in imap by default (bug #77153)
static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC) { spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter; if (iterator->intern.data) { zval *object = iterator->intern.data; zval_ptr_dtor(&object); } /* Otherwise we were called from the owning object free storage handl...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
83,732,432,337,793,280,000,000,000,000,000,000,000
14
Fix bug #72262 - do not overflow int
static int tls12_find_id(int nid, tls12_lookup *table, size_t tlen) { size_t i; for (i = 0; i < tlen; i++) { if (table[i].nid == nid) return table[i].id; } return -1; }
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
229,793,076,489,710,720,000,000,000,000,000,000,000
10
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
set_element (fd_set *set, SCM *ports_ready, SCM element, int pos) { int fd; if (scm_is_integer (element)) { fd = scm_to_int (element); } else { int use_buf = 0; element = SCM_COERCE_OUTPORT (element); SCM_ASSERT (SCM_OPFPORTP (element), element, pos, "select"); if (pos ...
0
[]
guile
245608911698adb3472803856019bdd5670b6614
264,858,789,189,069,400,000,000,000,000,000,000,000
39
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
ModuleExport void UnregisterSUNImage(void) { (void) UnregisterMagickInfo("RAS"); (void) UnregisterMagickInfo("SUN"); }
0
[ "CWE-119", "CWE-125" ]
ImageMagick
78f82d9d1c2944725a279acd573a22168dc6e22a
328,184,257,625,264,600,000,000,000,000,000,000,000
5
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26838
GF_Box *SmDm_box_new() { ISOM_DECL_BOX_ALLOC(GF_SMPTE2086MasteringDisplayMetadataBox, GF_ISOM_BOX_TYPE_SMDM); return (GF_Box *)tmp; }
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
261,750,345,488,859,930,000,000,000,000,000,000,000
5
fixed #1785 (fuzz)
static int req_ssl_is_https_field(request_rec *r) { return ap_lua_ssl_is_https(r->connection); }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
226,590,716,783,697,450,000,000,000,000,000,000,000
4
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
iterator end() { return _data + size(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
119,433,224,908,036,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC) { xmlDoc *docp; xmlDtdPtr dtdptr; int ret; docp = (xmlDocPtr) dom_object_get_node(obj); if (docp == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); return FAILURE; } ALLOC_ZVAL(*retval); dtdptr = xmlGetIntSubset(docp); ...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
253,828,184,682,614,100,000,000,000,000,000,000,000
28
Fix #69719 - more checks for nulls in paths
template<typename tp> const CImg<T>& display_object3d(const char *const title, const CImg<tp>& vertices, const bool centering=true, const int render_static=4, const int render_motion=1, const bool...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
160,663,414,181,732,350,000,000,000,000,000,000,000
14
Fix other issues in 'CImg<T>::load_bmp()'.
static void io_async_task_func(struct callback_head *cb) { struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work); struct async_poll *apoll = req->apoll; struct io_ring_ctx *ctx = req->ctx; trace_io_uring_task_run(req->ctx, req->opcode, req->user_data); if (io_poll_rewait(req, &apoll->poll)) { spi...
1
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
73,404,555,622,332,260,000,000,000,000,000,000,000
28
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
static struct avrcp_server *find_server(GSList *list, struct btd_adapter *a) { for (; list; list = list->next) { struct avrcp_server *server = list->data; if (server->adapter == a) return server; } return NULL; }
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
243,859,348,837,313,600,000,000,000,000,000,000,000
11
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
static int bnxt_re_build_inv_wqe(const struct ib_send_wr *wr, struct bnxt_qplib_swqe *wqe) { wqe->type = BNXT_QPLIB_SWQE_TYPE_LOCAL_INV; wqe->local_inv.inv_l_key = wr->ex.invalidate_rkey; /* Need unconditional fence for local invalidate * opcode to work as expected. */ wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
138,999,498,912,962,700,000,000,000,000,000,000,000
18
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify) { DECODE_HEAD; if ((status = nfsd4_decode_bitmap(argp, verify->ve_bmval))) goto out; /* For convenience's sake, we compare raw xdr'd attributes in * nfsd4_proc_verify */ READ_BUF(4); verify->ve_attrlen = be32_to_cpup(p++); RE...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
242,472,405,830,300,950,000,000,000,000,000,000,000
17
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
void ReadValue(int64 batch, int64 n, tstring* out) const override { CopyToString(values_(row_splits_[batch] + n), out); }
0
[ "CWE-125", "CWE-369" ]
tensorflow
44b7f486c0143f68b56c34e2d01e146ee445134a
216,827,240,015,663,800,000,000,000,000,000,000,000
3
Fix out of bounds read in `ragged_cross_op.cc`. PiperOrigin-RevId: 369757702 Change-Id: Ie6e5d2c21513a8d56bf41fcf35960caf76e890f9
void cli_cm_display(struct cli_state *cli) { int i; for (i=0; cli; cli = cli->next,i++ ) { d_printf("%d:\tserver=%s, share=%s\n", i, smbXcli_conn_remote_name(cli->conn), cli->share); } }
0
[ "CWE-20" ]
samba
d724f835acb9f4886c0001af32cd325dbbf1f895
230,675,360,932,775,630,000,000,000,000,000,000,000
9
CVE-2015-5296: s3:libsmb: force signing when requiring encryption in do_connect() 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 int kvm_clock_sync(struct notifier_block *notifier, unsigned long val, void *v) { struct kvm *kvm; struct kvm_vcpu *vcpu; int i; unsigned long long *delta = v; list_for_each_entry(kvm, &vm_list, vm_list) { kvm_for_each_vcpu(i, vcpu, kvm) { kvm_clock_sync_scb(vcpu->arch.sie_block, *delta); if (...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
123,303,332,989,745,420,000,000,000,000,000,000,000
24
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
Redirection* simulator_redirection() { return simulator_redirection_; }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
79,260,187,786,427,620,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
pg_trigger_depth(PG_FUNCTION_ARGS) { PG_RETURN_INT32(MyTriggerDepth); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
94,986,516,422,130,440,000,000,000,000,000,000,000
4
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...
GF_Box *trpy_New() { ISOM_DECL_BOX_ALLOC(GF_TRPYBox, GF_ISOM_BOX_TYPE_TRPY); return (GF_Box *)tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
129,088,580,629,983,600,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static void __fw_fallback_set_timeout(int timeout) { fw_fallback_config.loading_timeout = timeout; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
63,657,275,376,330,090,000,000,000,000,000,000,000
4
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
TEST_F(QuantizedConv2DTest, OddPaddingBatch) { const int stride = 2; TF_ASSERT_OK(NodeDefBuilder("quantized_conv_op", "QuantizedConv2D") .Input(FakeInput(DT_QUINT8)) .Input(FakeInput(DT_QUINT8)) .Input(FakeInput(DT_FLOAT)) .Input(FakeInput(...
0
[ "CWE-20", "CWE-476" ]
tensorflow
0f0b080ecde4d3dfec158d6f60da34d5e31693c4
34,579,552,878,440,215,000,000,000,000,000,000,000
44
Fix undefined behavior in QuantizedConv2D Added more input validation and tests. Prior to this, we could get `nullptr` exceptions when attempting to access 0th elements of 0-sized inputs, leading to security vulnerability bugs. Also needed to modify `quantized_conv_ops_test.cc` for consistency. Previously the CPU ke...
untrust_key( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { do_trustkey(srcadr, inter, inpkt, 0); }
0
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
37,219,622,421,293,756,000,000,000,000,000,000,000
8
[TALOS-CAN-0052] crash by loop counter underrun.
ShutdownExprContext(ExprContext *econtext, bool isCommit) { ExprContext_CB *ecxt_callback; MemoryContext oldcontext; /* Fast path in normal case where there's nothing to do. */ if (econtext->ecxt_callbacks == NULL) return; /* * Call the callbacks in econtext's per-tuple context. This ensures that * any me...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
10,118,511,751,853,284,000,000,000,000,000,000,000
28
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static int lo_discard(struct loop_device *lo, struct request *rq, loff_t pos) { /* * We use punch hole to reclaim the free space used by the * image a.k.a. discard. However we do not support discard if * encryption is enabled, because it may give an attacker * useful information. */ struct file *file = lo->...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
131,077,753,715,379,300,000,000,000,000,000,000,000
23
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
Status getRoleDescriptionsForDB(OperationContext*, const StringData, PrivilegeFormat, AuthenticationRestrictionsFormat, bool, std::vecto...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
69,102,758,866,585,920,000,000,000,000,000,000,000
8
SERVER-38984 Validate unique User ID on UserCache hit
static void printDebugInfo( CodeBlock *curCodeBlock, PinnedHermesValue *frameRegs, const Inst *ip) { // Check if LLVm debugging is enabled for us. bool debug = false; SLOW_DEBUG(debug = true); if (!debug) return; DecodedInstruction decoded = decodeInstruction(ip); dbgs() << llvh::format_de...
0
[ "CWE-670", "CWE-703" ]
hermes
b2021df620824627f5a8c96615edbd1eb7fdddfc
122,696,192,474,791,330,000,000,000,000,000,000,000
31
Fix CVE-2020-1914 by using NEXTINST for SaveGeneratorLong Summary: If `SaveGeneratorLong` was emitted, it would accidentally jump to the wrong next instruction, based on how long SaveGenerator was. Make a callout function to handle the common case, and handle the dispatch within each case of the interpreter loop. Fi...
ClearPgTm(struct pg_tm * tm, fsec_t *fsec) { tm->tm_year = 0; tm->tm_mon = 0; tm->tm_mday = 0; tm->tm_hour = 0; tm->tm_min = 0; tm->tm_sec = 0; *fsec = 0; }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
288,969,942,900,412,800,000,000,000,000,000,000,000
10
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
cmsBool CMSEXPORT cmsIT8SetDataRowColDbl(cmsHANDLE hIT8, int row, int col, cmsFloat64Number Val) { cmsIT8* it8 = (cmsIT8*) hIT8; char Buff[256]; _cmsAssert(hIT8 != NULL); snprintf(Buff, 255, it8->DoubleFormatter, Val); return SetData(it8, row, col, Buff); }
0
[ "CWE-190", "CWE-787" ]
Little-CMS
768f70ca405cd3159d990e962d54456773bb8cf8
112,353,172,380,768,860,000,000,000,000,000,000,000
11
Upgrade Visual studio 2017 15.8 - Upgrade to 15.8 - Add check on CGATS memory allocation (thanks to Quang Nguyen for pointing out this)
void CServer::ConShutdown(IConsole::IResult *pResult, void *pUser) { ((CServer *)pUser)->m_RunServer = 0; }
0
[ "CWE-20" ]
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
216,735,433,086,229,300,000,000,000,000,000,000,000
4
fixed a server crash
ff_lseg_range_is_after(const struct pnfs_layout_range *l1, const struct pnfs_layout_range *l2) { u64 end1, end2; if (l1->iomode != l2->iomode) return l1->iomode != IOMODE_READ; end1 = pnfs_calc_offset_end(l1->offset, l1->length); end2 = pnfs_calc_offset_end(l2->offset, l2->length); if (end1 < l2->offset) re...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
150,814,399,212,146,150,000,000,000,000,000,000,000
15
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
CImg<T>& _distance_core(longT (*const sep)(const longT, const longT, const longT *const), longT (*const f)(const longT, const longT, const longT *const)) { // Check for g++ 4.9.X, as OpenMP seems to crash for this particular function. I have no clues why. #define cimg_is_gcc49x (__GNUC...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
2,295,104,403,818,333,000,000,000,000,000,000,000
48
Fix other issues in 'CImg<T>::load_bmp()'.
opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format) { opj_codec_private_t *l_codec = 00; l_codec = (opj_codec_private_t*)opj_calloc(1, sizeof(opj_codec_private_t)); if (!l_codec) { return 00; } l_codec->is_decompressor = 0; switch (p_format) { case OPJ_CODEC_J...
1
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
126,336,892,976,036,920,000,000,000,000,000,000,000
97
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
static long kernel_set_mempolicy(int mode, const unsigned long __user *nmask, unsigned long maxnode) { int err; nodemask_t nodes; unsigned short flags; flags = mode & MPOL_MODE_FLAGS; mode &= ~MPOL_MODE_FLAGS; if ((unsigned int)mode >= MPOL_MAX) return -EINVAL; if ((flags & MPOL_F_STATIC_NODES) && (flags...
0
[ "CWE-787" ]
linux
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
44,210,456,202,505,640,000,000,000,000,000,000,000
18
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provi...
xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) { const xmlChar *name; xmlChar *val; *value = NULL; GROW; name = xmlParseName(ctxt); if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, "error parsing attribute name\n"); return(NULL); } /* ...
0
[ "CWE-703", "CWE-835" ]
libxml2
899a5d9f0ed13b8e32449a08a361e0de127dd961
149,148,977,592,158,820,000,000,000,000,000,000,000
59
Detect infinite recursion in parameter entities When expanding a parameter entity in a DTD, infinite recursion could lead to an infinite loop or memory exhaustion. Thanks to Wei Lei for the first of many reports. Fixes bug 759579.
static int rbd_img_fill_nodata(struct rbd_img_request *img_req, u64 off, u64 len) { struct ceph_file_extent ex = { off, len }; union rbd_img_fill_iter dummy = {}; struct rbd_img_fill_ctx fctx = { .pos_type = OBJ_REQUEST_NODATA, .pos = &dummy, }; return rbd_img_fill_request(img_req, &ex, 1, &fctx); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
60,733,127,242,638,530,000,000,000,000,000,000,000
12
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 int emulate_ret_far(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) { struct decode_cache *c = &ctxt->decode; int rc; unsigned long cs; rc = emulate_pop(ctxt, ops, &c->eip, c->op_bytes); if (rc) return rc; if (c->op_bytes == 4) c->eip = (u32)c->eip; rc = emulate_pop(ctxt, ops, &cs, ...
0
[ "CWE-20" ]
kvm
e42d9b8141d1f54ff72ad3850bb110c95a5f3b88
102,155,890,555,911,100,000,000,000,000,000,000,000
18
KVM: x86 emulator: limit instructions to 15 bytes While we are never normally passed an instruction that exceeds 15 bytes, smp games can cause us to attempt to interpret one, which will cause large latencies in non-preempt hosts. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
void btrfs_destroy_inode(struct inode *inode) { struct btrfs_ordered_extent *ordered; struct btrfs_root *root = BTRFS_I(inode)->root; WARN_ON(!hlist_empty(&inode->i_dentry)); WARN_ON(inode->i_data.nrpages); WARN_ON(BTRFS_I(inode)->outstanding_extents); WARN_ON(BTRFS_I(inode)->reserved_extents); WARN_ON(BTRFS_I(...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
8,046,623,872,509,207,000,000,000,000,000,000,000
45
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static int mark_reg_read(struct bpf_verifier_env *env, const struct bpf_reg_state *state, struct bpf_reg_state *parent, u8 flag) { bool writes = parent == state->parent; /* Observe write marks */ int cnt = 0; while (parent) { /* if read wasn't screened by an earlier write ... */ if (writes && state->liv...
0
[ "CWE-787" ]
linux
64620e0a1e712a778095bd35cbb277dc2259281f
215,519,981,529,797,980,000,000,000,000,000,000,000
47
bpf: Fix out of bounds access for ringbuf helpers Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM in their bpf_func_proto definition as their first argument. They both expect the result from a prior bpf_ringbuf_reserve() call which has a return type of RET_PTR_TO_ALLOC_MEM_OR_NULL. Meani...
static void copy_shadow_to_vmcs12(struct vcpu_vmx *vmx) { const u16 *fields[] = { shadow_read_write_fields, shadow_read_only_fields }; const int max_fields[] = { max_shadow_read_write_fields, max_shadow_read_only_fields }; int i, q; unsigned long field; u64 field_value; struct vmcs *shadow_vmcs = vmx->v...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
188,130,141,482,917,000,000,000,000,000,000,000,000
37
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
register_commands (assuan_context_t ctx) { static struct { const char *name; assuan_handler_t handler; const char * const help; } table[] = { { "SERIALNO", cmd_serialno, hlp_serialno }, { "LEARN", cmd_learn, hlp_learn }, { "READCERT", cmd_readcert, hlp_readcert }, { "RE...
0
[]
gnupg
b0b3803e8c2959dd67ca96debc54b5c6464f0d41
35,652,491,804,150,570,000,000,000,000,000,000,000
49
scd: Avoid double-free on error condition in scd * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
void schedule_deferred_open_smb_message(uint16 mid) { struct pending_message_list *pml; int i = 0; for (pml = deferred_open_queue; pml; pml = pml->next) { uint16 msg_mid = SVAL(pml->buf.data,smb_mid); DEBUG(10,("schedule_deferred_open_smb_message: [%d] msg_mid = %u\n", i++, (unsigned int)msg_mid )); if (...
0
[]
samba
c116652a3050a8549b722ae8ab5f9a2bf9a33b9f
147,492,803,107,300,700,000,000,000,000,000,000,000
38
In chain_reply, copy the subrequests' error to the main request
GF_TrunEntry *traf_get_sample_entry(GF_TrackFragmentBox *traf, u32 sample_index) { u32 i, idx; GF_TrackFragmentRunBox *trun; idx=0; i=0; while ((trun = (GF_TrackFragmentRunBox *)gf_list_enum(traf->TrackRuns, &i))) { u32 j; for (j=0; j<trun->sample_count; j++) { GF_TrunEntry *ent = gf_list_get(trun->entries,...
0
[ "CWE-476" ]
gpac
df8fffd839fe5ae9acd82d26fd48280a397411d9
65,701,205,901,825,730,000,000,000,000,000,000,000
22
fixed #1736
static int stbi__psd_test(stbi__context *s) { int r = (stbi__get32be(s) == 0x38425053); stbi__rewind(s); return r; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
7,036,265,872,125,082,000,000,000,000,000,000,000
6
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static inline int security_task_setgroups(struct group_info *group_info) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
293,541,352,787,182,330,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
ut64 get_code_object_addr(RzBuffer *buffer, ut32 magic) { magic_int = magic; pyc_object *co = get_code_object(buffer); ut64 result = 0; if (!co) { return 0; } pyc_code_object *cobj = co->data; result = cobj->start_offset; free_object(co); return result; }
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
97,007,554,837,146,010,000,000,000,000,000,000,000
14
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft) { Extent x; unsigned k; bool const is_shlib = (0!=xct_off); // count passes, set ptload vars uip->ui_total_passes = 0; for (k = 0; k < e_phnum; ++k) { if (is_LOAD32(&phdri[k])) { uip->ui_total_passes++; if (fi...
0
[ "CWE-476", "CWE-415" ]
upx
90279abdfcd235172eab99651043051188938dcc
148,649,243,856,902,150,000,000,000,000,000,000,000
90
PackLinuxElf::canUnpack must checkEhdr() for ELF input https://github.com/upx/upx/issues/485 modified: p_lx_elf.cpp
void fx_DataView_prototype_getBigUint64(txMachine* the) { fx_DataView_prototype_get(the, 8, fxBigUint64Getter); }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
245,598,946,613,103,400,000,000,000,000,000,000,000
4
XS: #896
static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi, int vci) { struct sock *sk = sk_atm(vcc); int error; if ((vpi != ATM_VPI_UNSPEC && vpi != ATM_VPI_ANY && vpi >> dev->ci_range.vpi_bits) || (vci != ATM_VCI_UNSPEC && vci != ATM_VCI_ANY && vci >> dev->ci_range.vci_bits)) ret...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
323,739,006,254,326,420,000,000,000,000,000,000,000
79
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
*/ void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr cur; if (ctxt == NULL) return; if (nargs == 0) { valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context, ctxt->context->node)); nargs = 1; } CHECK_ARITY(1); if ((ctxt->value == NULL) || ((c...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
338,267,092,478,487,600,000,000,000,000,000,000,000
43
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification