func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
resetPos(BufferPos * b) { Buffer buf; Line top, cur; top.linenumber = b->top_linenumber; cur.linenumber = b->cur_linenumber; cur.bpos = b->bpos; buf.topLine = ⊤ buf.currentLine = &cur; buf.pos = b->pos; buf.currentColumn = b->currentColumn; restorePosition(Currentbuf, &buf);...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
67,255,051,006,042,730,000,000,000,000,000,000,000
16
Make temporary directory safely when ~/.w3m is unwritable
unsigned long oops_begin(void) { int cpu; unsigned long flags; oops_enter(); /* racy, but better than risking deadlock. */ raw_local_irq_save(flags); cpu = smp_processor_id(); if (!arch_spin_trylock(&die_lock)) { if (cpu == die_owner) /* nested oops. should stop eventually */; else arch_spin_lock(&di...
0
[ "CWE-20" ]
linux
342db04ae71273322f0011384a9ed414df8bdae4
305,909,693,159,890,350,000,000,000,000,000,000,000
22
x86/dumpstack: Don't dump kernel memory based on usermode RIP show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure th...
static int fnmatch_normalize(const char *pattern, const char *string, int flags) { int i, j, r; char *pattern_norm = NULL; r = ALLOC_N(pattern_norm, strlen(pattern) + 1); if (r < 0) goto error; for (i = 0, j = 0; i < strlen(pattern); i++) { if (pattern[i] != '/' || pattern[i+1] != ...
0
[]
augeas
f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26
259,523,012,125,232,170,000,000,000,000,000,000,000
25
Fix umask handling when creating new files * src/transform.c (transform_save): faulty umask arithmetic would cause overly-open file modes when the umask contains "7", as the umask was incorrectly subtracted from the target file mode Fixes CVE-2013-6412, RHBZ#1034261
static void expire_timers(struct timer_base *base, struct hlist_head *head) { while (!hlist_empty(head)) { struct timer_list *timer; void (*fn)(unsigned long); unsigned long data; timer = hlist_entry(head->first, struct timer_list, entry); base->running_timer = timer; detach_timer(timer, true); fn = t...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
255,984,871,451,008,800,000,000,000,000,000,000,000
26
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...
MagickExport Image *MorphImages(const Image *image,const size_t number_frames, ExceptionInfo *exception) { #define MorphImageTag "Morph/Image" double alpha, beta; Image *morph_image, *morph_images; MagickBooleanType status; MagickOffsetType scene; const Image *next; ssiz...
0
[ "CWE-369" ]
ImageMagick
329dd528ab79531d884c0ba131e97d43f872ab5d
191,597,599,913,570,560,000,000,000,000,000,000,000
201
uses the PerceptibleReciprocal() to prevent the divide-by-zero from occurring (#3194) Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com>
__res_nopt(res_state statp, int n0, /* current offset in buffer */ u_char *buf, /* buffer to put query */ int buflen, /* size of buffer */ int anslen) /* UDP answer buffer size */ { u_int16_t flags = 0; #ifdef DEBUG if ((statp->options & RES_DEBUG) != 0U...
0
[ "CWE-476" ]
glibc
fc82b0a2dfe7dbd35671c10510a8da1043d746a5
200,652,492,017,352,450,000,000,000,000,000,000,000
41
CVE-2015-5180: resolv: Fix crash with internal QTYPE [BZ #18784] Also rename T_UNSPEC because an upcoming public header file update will use that name.
if (ret == WS_SUCCESS) { WMEMSET((byte*)&fd, 0, sizeof(HANDLE)); WMEMCPY((byte*)&fd, data + idx, sz); idx += sz; /* get offset into file */ WMEMSET(&offset, 0, sizeof(OVERLAPPED)); ato32(data + idx, &sz); idx += UINT32_SZ; offset.OffsetHigh = (DWORD)s...
0
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
8,908,057,749,815,849,000,000,000,000,000,000,000
31
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint) { #if 0 QTAILQ_REMOVE(&cpu->watchpoints, watchpoint, entry); tlb_flush_page(cpu, watchpoint->vaddr); g_free(watchpoint); #endif }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
142,939,045,309,947,510,000,000,000,000,000,000,000
10
Fix crash when mapping a big memory and calling uc_close
static void nvme_verify_cb(void *opaque, int ret) { NvmeBounceContext *ctx = opaque; NvmeRequest *req = ctx->req; NvmeNamespace *ns = req->ns; BlockBackend *blk = ns->blkconf.blk; BlockAcctCookie *acct = &req->acct; BlockAcctStats *stats = blk_get_stats(blk); NvmeRwCmd *rw = (NvmeRwCmd *)&re...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
97,647,230,936,653,640,000,000,000,000,000,000,000
50
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static void io_ring_ctx_wait_and_kill(struct io_ring_ctx *ctx) { unsigned long index; struct creds *creds; mutex_lock(&ctx->uring_lock); percpu_ref_kill(&ctx->refs); if (ctx->rings) __io_cqring_overflow_flush(ctx, true); xa_for_each(&ctx->personalities, index, creds) io_unregister_personality(ctx, index); ...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
311,889,089,453,567,500,000,000,000,000,000,000,000
28
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
void problem_data_add_text_editable(problem_data_t *problem_data, const char *name, const char *content) { problem_data_add(problem_data, name, content, CD_FLAG_TXT + CD_FLAG_ISEDITABLE); }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
290,389,134,399,609,350,000,000,000,000,000,000,000
6
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
qemuProcessEnableDomainNamespaces(virQEMUDriverPtr driver, virDomainObjPtr vm) { g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) && qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
10,033,467,147,824,773,000,000,000,000,000,000,000
11
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* cond_tensor; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputConditionTensor, &cond_tensor)); TfLiteTensor* output; TF_LITE_ENSURE_OK(context, GetOutputSaf...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
257,465,975,528,957,250,000,000,000,000,000,000,000
25
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static u32 *gen12_emit_preempt_busywait(struct i915_request *request, u32 *cs) { *cs++ = MI_SEMAPHORE_WAIT_TOKEN | MI_SEMAPHORE_GLOBAL_GTT | MI_SEMAPHORE_POLL | MI_SEMAPHORE_SAD_EQ_SDD; *cs++ = 0; *cs++ = intel_hws_preempt_address(request->engine); *cs++ = 0; *cs++ = 0; *cs++ = MI_NOOP; return cs; }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
47,125,632,061,898,890,000,000,000,000,000,000,000
14
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
static int io_rsrc_ref_quiesce(struct fixed_rsrc_data *data, struct io_ring_ctx *ctx, void (*rsrc_put)(struct io_ring_ctx *ctx, struct io_rsrc_put *prsrc)) { struct fixed_rsrc_ref_node *backup_node; int ret; if (data->quiesce) return -ENXIO; data->quiesce = true; ...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
68,765,518,742,385,000,000,000,000,000,000,000,000
42
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t maxlen) { size_t i, j; zend_string *str = zend_string_safe_alloc(1, len, 0, 0); unsigned char *end = *(unsigned char **)p+maxlen; if (end < *p) { zend_string_free(str); return NULL; } for (i = 0; i < len; i++) { if (*p >= end)...
0
[ "CWE-416" ]
php-src
1a23ebc1fff59bf480ca92963b36eba5c1b904c4
163,098,981,934,694,240,000,000,000,000,000,000,000
42
Fixed bug #74103 and bug #75054 Directly fail unserialization when trying to acquire an r/R reference to an UNDEF HT slot. Previously this left an UNDEF and later deleted the index/key from the HT. What actually caused the issue here is a combination of two factors: First, the key deletion was performed using the has...
static void mac80211_hwsim_addr_iter(void *data, u8 *mac, struct ieee80211_vif *vif) { struct mac80211_hwsim_addr_match_data *md = data; if (memcmp(mac, md->addr, ETH_ALEN) == 0) md->ret = true; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
214,973,608,783,150,700,000,000,000,000,000,000,000
8
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static inline void get_conn_text(const conn *c, const int af, char* addr, struct sockaddr *sock_addr) { char addr_text[MAXPATHLEN]; addr_text[0] = '\0'; const char *protoname = "?"; unsigned short port = 0; switch (af) { case AF_INET: (void) inet_ntop(af, ...
1
[ "CWE-125" ]
memcached
554b56687a19300a75ec24184746b5512580c819
135,940,912,963,158,480,000,000,000,000,000,000,000
53
fix strncpy call to avoid ASAN violation Ensure we're only reading to the size of the smallest buffer, since they're both on the stack and could potentially overlap. Overlapping is defined as ... undefined behavior. I've looked through all available implementations of strncpy and they still only copy from the first \0...
void SslIntegrationTestBase::initialize() { config_helper_.addSslConfig(ConfigHelper::ServerSslOptions() .setRsaCert(server_rsa_cert_) .setEcdsaCert(server_ecdsa_cert_) .setTlsV13(server_tlsv1_3_) ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
279,128,943,807,655,800,000,000,000,000,000,000,000
13
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static bool ad_unpack_xattrs(struct adouble *ad) { struct ad_xattr_header *h = &ad->adx_header; const char *p = ad->ad_data; uint32_t hoff; uint32_t i; if (ad_getentrylen(ad, ADEID_FINDERI) <= ADEDLEN_FINDERI) { return true; } /* 2 bytes padding */ hoff = ad_getentryoff(ad, ADEID_FINDERI) + ADEDLEN_FINDERI ...
1
[ "CWE-787" ]
samba
b4c0b4620f12055207adb0519c8d91c3021f354a
122,989,454,030,710,440,000,000,000,000,000,000,000
134
CVE-2021-44142: libadouble: harden ad_unpack_xattrs() This ensures ad_unpack_xattrs() is only called for an ad_type of ADOUBLE_RSRC, which is used for parsing ._ AppleDouble sidecar files, and the buffer ad->ad_data is AD_XATTR_MAX_HDR_SIZE bytes large which is a prerequisite for all buffer out-of-bounds access checks...
ModuleExport void UnregisterSIXELImage(void) { (void) UnregisterMagickInfo("SIXEL"); (void) UnregisterMagickInfo("SIX"); }
0
[ "CWE-399", "CWE-401" ]
ImageMagick
748a03651e5b138bcaf160d15133de2f4b1b89ce
246,973,688,200,373,380,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/1452
GF_Err tmcd_box_read(GF_Box *s, GF_BitStream *bs) { GF_TimeCodeSampleEntryBox *ptr = (GF_TimeCodeSampleEntryBox *)s; GF_Err e = gf_isom_base_sample_entry_read((GF_SampleEntryBox *)s, bs); if (e) return e; ISOM_DECREASE_SIZE(s, 26); gf_bs_read_u32(bs); //reserved ptr->flags = gf_bs_read_u32(bs); ptr->timescale =...
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
140,868,241,908,495,630,000,000,000,000,000,000,000
16
fixed potential crash - cf #1263
flatpak_dir_uninstall (FlatpakDir *self, FlatpakDecomposed *ref, FlatpakHelperUninstallFlags flags, GCancellable *cancellable, GError **error) { const char *repository;...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
126,778,586,035,485,550,000,000,000,000,000,000,000
133
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
GF_Err gf_fs_get_last_connect_error(GF_FilterSession *fs) { GF_Err e; if (!fs) return GF_BAD_PARAM; e = fs->last_connect_error; fs->last_connect_error = GF_OK; return e; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
18,959,976,781,567,760,000,000,000,000,000,000,000
8
fixed crashes for very long path - cf #1908
xfs_iget_cache_miss( struct xfs_mount *mp, struct xfs_perag *pag, xfs_trans_t *tp, xfs_ino_t ino, struct xfs_inode **ipp, int flags, int lock_flags) { struct xfs_inode *ip; int error; xfs_agino_t agino = XFS_INO_TO_AGINO(mp, ino); int iflags; ip = xfs_inode_alloc(mp, ino); if (!ip) return -EN...
1
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
43,456,636,364,976,480,000,000,000,000,000,000,000
117
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
static void __net_exit if6_proc_net_exit(struct net *net) { remove_proc_entry("if_inet6", net->proc_net); }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
199,559,143,412,903,670,000,000,000,000,000,000,000
4
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu, struct kvm_xsave *guest_xsave) { if (cpu_has_xsave) { memset(guest_xsave, 0, sizeof(struct kvm_xsave)); fill_xsave((u8 *) guest_xsave->region, vcpu); } else { memcpy(guest_xsave->region, &vcpu->arch.guest_fpu.state.fxsave, sizeof(struct...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
31,413,137,208,857,205,000,000,000,000,000,000,000
14
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
bool Command::isUserManagementCommand(const std::string& name) { return userManagementCommands.count(name); }
0
[ "CWE-20" ]
mongo
5c7c6729c37514760fd34da462b6961a2e385417
285,126,177,216,851,420,000,000,000,000,000,000,000
3
SERVER-38275 ban explain with UUID
static NTSTATUS dcesrv_lsa_DeleteObject(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_DeleteObject *r) { struct auth_session_info *session_info = dcesrv_call_session_info(dce_call); struct dcesrv_handle *h; int ret; DCESRV_PULL_HANDLE(h, r->in.handle, DCESRV_HANDLE_ANY); if (h->w...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
208,244,096,983,592,300,000,000,000,000,000,000,000
113
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void avrcp_addressed_player_changed(struct avrcp *session, struct avrcp_header *pdu) { struct avrcp_player *player = session->controller->player; uint16_t id = get_be16(&pdu->params[1]); if (player != NULL && player->id == id) return; player = find_ct_player(session, id); if (player == NULL) { p...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
193,720,513,080,680,100,000,000,000,000,000,000,000
25
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.
Tfloat _cubic_atX(const float fx, const int y=0, const int z=0, const int c=0) const { const float nfx = cimg::type<float>::is_nan(fx)?0:cimg::cut(fx,0,width() - 1); const int x = (int)nfx; const float dx = nfx - x; const int px = x - 1<0?0:x - 1, nx = dx>0?x ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
236,798,322,324,218,570,000,000,000,000,000,000,000
14
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
yaffs_validate_config_file(std::map<std::string, std::string> & paramMap){ int offset_field_count; // Make a list of all fields to test std::set<std::string> integerParams; integerParams.insert(YAFFS_CONFIG_SEQ_NUM_STR); integerParams.insert(YAFFS_CONFIG_OBJ_ID_STR); integerParams.insert(YAFFS_...
0
[ "CWE-125", "CWE-787" ]
sleuthkit
459ae818fc8dae717549810150de4d191ce158f1
151,011,987,451,898,090,000,000,000,000,000,000,000
57
Fix stack buffer overflow in yaffsfs_istat Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str.
static ssize_t _consolefs_writev( oe_fd_t* desc, const struct oe_iovec* iov, int iovcnt) { ssize_t ret = -1; file_t* file = _cast_file(desc); void* buf = NULL; size_t buf_size = 0; if (!file || (!iov && iovcnt) || iovcnt < 0 || iovcnt > OE_IOV_MAX) OE_RAISE_ERRNO(OE_EINVAL); ...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
289,794,955,453,883,800,000,000,000,000,000,000,000
31
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static const char *cmd_xml_external_entity(cmd_parms *cmd, void *_dcfg, const char *p1) { directory_config *dcfg = (directory_config *)_dcfg; if (dcfg == NULL) return NULL; if (strcasecmp(p1, "on") == 0) { dcfg->xml_external_entity = 1; } else if (strcasecmp(p1, "off") == 0) { d...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
213,881,847,750,680,060,000,000,000,000,000,000,000
15
Added SecXmlExternalEntity
int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, u32 dur) { struct sk_buff *skb; struct wmi_remain_on_chnl_cmd *p; skb = ath6kl_wmi_get_new_buf(sizeof(*p)); if (!skb) return -ENOMEM; ath6kl_dbg(ATH6KL_DBG_WMI, "remain_on_chnl_cmd: freq=%u dur=%u\n", freq, dur); p = (struct wmi_rema...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
213,112,570,003,282,400,000,000,000,000,000,000,000
17
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
OPJ_BOOL opj_j2k_decode(opj_j2k_t * p_j2k, opj_stream_private_t * p_stream, opj_image_t * p_image, opj_event_mgr_t * p_manager) { OPJ_UINT32 compno; if (!p_image) { return OPJ_FALSE; } p_j2k->m_output_image = opj_image_cre...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
253,912,407,094,740,600,000,000,000,000,000,000,000
47
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static void tg3_rx_prodring_fini(struct tg3 *tp, struct tg3_rx_prodring_set *tpr) { kfree(tpr->rx_std_buffers); tpr->rx_std_buffers = NULL; kfree(tpr->rx_jmb_buffers); tpr->rx_jmb_buffers = NULL; if (tpr->rx_std) { dma_free_coherent(&tp->pdev->dev, TG3_RX_STD_RING_BYTES(tp), tpr->rx_std, tpr->rx_std_m...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
187,669,468,036,047,300,000,000,000,000,000,000,000
18
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
expand_by_function(int type, char_u *base) { list_T *matchlist = NULL; dict_T *matchdict = NULL; typval_T args[3]; char_u *funcname; pos_T pos; callback_T *cb; typval_T rettv; int save_State = State; int retval; funcname = get_complete_funcname(type); if (*funcname ==...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
12,911,699,815,305,558,000,000,000,000,000,000,000
77
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
ex_sort(exarg_T *eap) { regmatch_T regmatch; int len; linenr_T lnum; long maxlen = 0; sorti_T *nrs; size_t count = (size_t)(eap->line2 - eap->line1 + 1); size_t i; char_u *p; char_u *s; char_u *s2; char_u c; // temporary character storage int unique = FALSE; long ...
0
[ "CWE-416" ]
vim
37f47958b8a2a44abc60614271d9537e7f14e51a
61,577,326,304,483,300,000,000,000,000,000,000,000
296
patch 8.2.4253: using freed memory when substitute with function call Problem: Using freed memory when substitute uses a recursive function call. Solution: Make a copy of the substitute text.
TEST_F(HttpConnectionManagerImplTest, FilterAddTrailersInTrailersCallback) { InSequence s; setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { RequestDecoder* decoder = &conn_manager_->newStream(response_encoder_); RequestHeaderMapPtr headers{ ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
248,226,093,238,509,540,000,000,000,000,000,000,000
86
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
long sched_setaffinity(pid_t pid, const struct cpumask *in_mask) { cpumask_var_t cpus_allowed, new_mask; struct task_struct *p; int retval; get_online_cpus(); rcu_read_lock(); p = find_process_by_pid(pid); if (!p) { rcu_read_unlock(); put_online_cpus(); return -ESRCH; } /* Prevent p going away */ get...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
43,191,742,309,360,560,000,000,000,000,000,000,000
62
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
timeout_cb (gpointer data) { TimeoutDialog *timeout = data; timeout->countdown--; if (timeout->countdown == 0) { timeout->response_id = GTK_RESPONSE_CANCEL; gtk_main_quit (); } else { print_countdown_text (timeout); } ret...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
223,040,671,094,966,750,000,000,000,000,000,000,000
15
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
static unsigned long target_load(int cpu, int type) { struct rq *rq = cpu_rq(cpu); unsigned long total = weighted_cpuload(rq); if (type == 0 || !sched_feat(LB_BIAS)) return total; return max(rq->cpu_load[type-1], total); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
153,231,807,730,764,300,000,000,000,000,000,000,000
10
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static void toggle_quadoption (int opt) { int n = opt/4; int b = (opt % 4) * 2; QuadOptions[n] ^= (1 << b); }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
4,517,673,253,710,985,400,000,000,000,000,000,000
7
use a 64-bit random value in temporary filenames. closes #3158
static bool junkscan(const char *part, unsigned int flags) { if(part) { static const char badbytes[]={ /* */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0...
0
[]
curl
914aaab9153764ef8fa4178215b8ad89d3ac263a
258,588,910,390,004,200,000,000,000,000,000,000,000
21
urlapi: reject percent-decoding host name into separator bytes CVE-2022-27780 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-27780.html Closes #8826
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var)...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
105,367,750,426,620,910,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void CL_Record_f( void ) { char name[MAX_OSPATH]; byte bufData[MAX_MSGLEN]; msg_t buf; int i; int len; entityState_t *ent; entityState_t nullstate; char *s; if ( Cmd_Argc() > 2 ) { Com_Printf ("record <demoname>\n"); return; } if ( clc.demorecording ) { if (!clc.spDemoRecording) { Com_Print...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
285,286,256,682,874,800,000,000,000,000,000,000,000
133
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static void FVDrawGlyph(GWindow pixmap, FontView *fv, int index, int forcebg ) { GRect box, old2; int feat_gid; SplineChar *sc; struct _GImage base; GImage gi; GClut clut; int i,j; int em = fv->b.sf->ascent+fv->b.sf->descent; int yorg = fv->magnify*(fv->show->ascent); i = index ...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
173,777,383,934,079,970,000,000,000,000,000,000,000
161
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
pktap_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { uint32_t dlt, hdrlen, rectype; u_int caplen = h->caplen; u_int length = h->len; if_printer printer; const pktap_header_t *hdr; struct pcap_pkthdr nhdr; if (caplen < sizeof(pktap_header_t) || length < sizeof(pk...
0
[ "CWE-125", "CWE-787" ]
tcpdump
ca336198e8bebccc18502de27672fdbd6eb34856
50,513,907,950,069,200,000,000,000,000,000,000,000
66
CVE-2017-13007/PKTAP: Pass a properly updated struct pcap_pkthdr to the sub-dissector. The sub-dissector expects that the length and captured length will reflect the actual remaining data in the packet, not the raw amount including the PKTAP header; pass an updated header, just as we do for PPI. This fixes a buffer o...
void HTTPSession::startNow() { CHECK(!started_); started_ = true; codec_->generateSettings(writeBuf_); if (connFlowControl_) { connFlowControl_->setReceiveWindowSize(writeBuf_, receiveSessionWindowSize_); } // For HTTP/2 if we are currently draining it means we...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
191,987,311,276,529,200,000,000,000,000,000,000,000
19
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
static unsigned long bpf_map_memory_footprint(const struct bpf_map *map) { unsigned long size; size = round_up(map->key_size + bpf_map_value_size(map), 8); return round_up(map->max_entries * size, PAGE_SIZE); }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
138,384,867,626,361,500,000,000,000,000,000,000,000
8
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
process_cmd_polltarget(CMD_Request *msg, char *line) { IPAddr address; int poll_target; int ok; if (read_address_integer(line, &address, &poll_target)) { UTI_IPHostToNetwork(&address, &msg->data.modify_polltarget.address); msg->data.modify_polltarget.new_poll_target = htonl(poll_target); msg->com...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
154,921,425,981,932,870,000,000,000,000,000,000,000
18
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
Effect Statement::eval(const Environment& e, optional<const rgw::auth::Identity&> ida, uint64_t act, const ARN& res) const { if (ida && (!ida->is_identity(princ) || ida->is_identity(noprinc))) { return Effect::Pass; } if (!std::any_of(resource.begin(), resource.end(), [&res](const ARN...
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
241,797,279,020,318,000,000,000,000,000,000,000,000
31
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>
int rtl8xxxu_write8(struct rtl8xxxu_priv *priv, u16 addr, u8 val) { struct usb_device *udev = priv->udev; int ret; mutex_lock(&priv->usb_buf_mutex); priv->usb_buf.val8 = val; ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), REALTEK_USB_CMD_REQ, REALTEK_USB_WRITE, addr, 0, &priv->usb_buf.val...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
136,692,336,142,347,360,000,000,000,000,000,000,000
19
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */ { return php_stream_url_wrap_http_ex(wrapper, path, mode, options, opened_path, context, PHP_URL_REDIRECT_MAX, HTTP_WRAPPER_HEADER_INIT ...
0
[]
php-src
d82d68742c69fc20a5180a2dbcca4cac52435931
336,923,033,988,017,840,000,000,000,000,000,000,000
4
Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
static int ext4_delete_entry(handle_t *handle, struct inode *dir, struct ext4_dir_entry_2 *de_del, struct buffer_head *bh) { struct ext4_dir_entry_2 *de, *pde; unsigned int blocksize = dir->i_sb->s_blocksize; int csum_size = 0; int i, err; if (EXT4_HAS_RO_COMPAT_FEATURE(dir->i_sb, ...
0
[ "CWE-20" ]
linux
c9b92530a723ac5ef8e352885a1862b18f31b2f5
141,660,942,931,122,650,000,000,000,000,000,000,000
51
ext4: make orphan functions be no-op in no-journal mode Instead of checking whether the handle is valid, we check if journal is enabled. This avoids taking the s_orphan_lock mutex in all cases when there is no journal in use, including the error paths where ext4_orphan_del() is called with a handle set to NULL. Signe...
static int plug_ctx_cmp(void *priv, struct list_head *a, struct list_head *b) { struct request *rqa = container_of(a, struct request, queuelist); struct request *rqb = container_of(b, struct request, queuelist); return !(rqa->mq_ctx < rqb->mq_ctx || (rqa->mq_ctx == rqb->mq_ctx && blk_rq_pos(rqa) < blk_rq_pos...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
26,227,695,573,693,070,000,000,000,000,000,000,000
9
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) { int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; int wid; int w, wstart; int thick = im->thick; if (color == gdAntiAliased) { /* gdAntiAliased passed as color: use the much faster, much cheaper and equally ...
0
[ "CWE-190" ]
php-src
c395c6e5d7e8df37a21265ff76e48fe75ceb5ae6
162,902,473,726,693,970,000,000,000,000,000,000,000
167
iFixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow
void input_reset_device(struct input_dev *dev) { unsigned long flags; mutex_lock(&dev->mutex); spin_lock_irqsave(&dev->event_lock, flags); input_dev_toggle(dev, true); input_dev_release_keys(dev); spin_unlock_irqrestore(&dev->event_lock, flags); mutex_unlock(&dev->mutex); }
0
[ "CWE-703", "CWE-787" ]
linux
cb222aed03d798fc074be55e59d9a112338ee784
41,636,468,543,646,225,000,000,000,000,000,000,000
13
Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keyc...
GF_Err gf_isom_add_subsample(GF_ISOFile *movie, u32 track, u32 sampleNumber, u32 flags, u32 subSampleSize, u8 priority, u32 reserved, Bool discardable) { u32 i, count; GF_SubSampleInformationBox *sub_samples; GF_TrackBox *trak; GF_Err e; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
42,930,429,764,697,180,000,000,000,000,000,000,000
34
fixed #1706
static json_t * check_attestation_packed(json_t * j_params, cbor_item_t * auth_data, cbor_item_t * att_stmt, const unsigned char * client_data, gnutls_pubkey_t g_key) { json_t * j_error = json_array(), * j_return; cbor_item_t * key, * alg = NULL, * sig = NULL, * x5c_array = NULL, * cert_leaf = NULL; size_t i, cli...
0
[ "CWE-120", "CWE-787" ]
glewlwyd
0efd112bb62f566877750ad62ee828bff579b4e2
226,342,525,212,029,700,000,000,000,000,000,000,000
168
Fix fido2 signature validation bug
check_for_opt_string_or_list_arg(typval_T *args, int idx) { return (args[idx].v_type == VAR_UNKNOWN || check_for_string_or_list_arg(args, idx)); }
0
[ "CWE-125", "CWE-122" ]
vim
1e56bda9048a9625bce6e660938c834c5c15b07d
304,152,153,142,541,940,000,000,000,000,000,000,000
5
patch 9.0.0104: going beyond allocated memory when evaluating string constant Problem: Going beyond allocated memory when evaluating string constant. Solution: Properly skip over <Key> form.
static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); } return value; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
216,324,434,859,850,140,000,000,000,000,000,000,000
11
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 bool kvm_vcpu_mapped(struct kvm_host_map *map) { return !!map->hva; }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
177,168,864,733,507,550,000,000,000,000,000,000,000
4
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...
static int dsa_bits(const EVP_PKEY *pkey) { return BN_num_bits(pkey->pkey.dsa->p); }
0
[]
openssl
ab4a81f69ec88d06c9d8de15326b9296d7f498ed
101,424,458,393,189,600,000,000,000,000,000,000,000
4
Remove broken DSA private key workarounds. Remove old code that handled various invalid DSA formats in ancient software. This also fixes a double free bug when parsing malformed DSA private keys. Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using libFuzzer. CVE-2016-0705 Reviewed-by: Emilia K...
timelib_tzinfo *php_date_parse_tzfile_wrapper(char *formal_tzname, const timelib_tzdb *tzdb) { TSRMLS_FETCH(); return php_date_parse_tzfile(formal_tzname, tzdb TSRMLS_CC);
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
178,443,253,838,463,930,000,000,000,000,000,000,000
5
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
has_suffix_icmp (const gchar *text, const gchar *suffix) { gint ii, tlen, slen; g_return_val_if_fail (text != NULL, FALSE); g_return_val_if_fail (suffix != NULL, FALSE); tlen = strlen (text); slen = strlen (suffix); if (!*text || !*suffix || tlen < slen) return FALSE; for (ii = 0; ii < sle...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
69,974,466,903,827,630,000,000,000,000,000,000,000
22
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static int try_grow_lower(MAIN_WINDOW_REC *window, int count) { MAIN_WINDOW_REC *grow_win; grow_win = mainwindows_find_lower(window); if (grow_win != NULL) { MAIN_WINDOW_REC *win; GSList *grow_list, *shrink_list, *tmp; grow_list = mainwindows_get_line(grow_win); shrink_list = mainwindows_get_line(window); ...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
297,971,278,761,814,660,000,000,000,000,000,000,000
25
check the error condition of mainwindow_create
static enum test_return test_binary_decrq(void) { return test_binary_decr_impl("test_binary_decrq", PROTOCOL_BINARY_CMD_DECREMENTQ); }
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
67,802,583,894,298,490,000,000,000,000,000,000,000
4
Issue 102: Piping null to the server will crash it
PHP_RSHUTDOWN_FUNCTION(mb_regex) { MBREX(current_mbctype) = MBREX(default_mbctype); if (MBREX(search_str) != NULL) { zval_ptr_dtor(&MBREX(search_str)); MBREX(search_str) = (zval *)NULL; } MBREX(search_pos) = 0; if (MBREX(search_regs) != NULL) { onig_region_free(MBREX(search_regs), 1); MBREX(search_regs) ...
0
[ "CWE-415" ]
php-src
5b597a2e5b28e2d5a52fc1be13f425f08f47cb62
128,035,690,816,069,230,000,000,000,000,000,000,000
18
Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
tsqueryrecv(PG_FUNCTION_ARGS) { StringInfo buf = (StringInfo) PG_GETARG_POINTER(0); TSQuery query; int i, len; QueryItem *item; int datalen; char *ptr; uint32 size; const char **operands; size = pq_getmsgint(buf, sizeof(uint32)); if (size > (MaxAllocSize / sizeof(QueryItem))) elog(ERROR, "inv...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
236,506,657,942,312,230,000,000,000,000,000,000,000
123
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static double y2scr(ASS_Renderer *render_priv, double y) { if (render_priv->state.explicit) return y2scr_pos(render_priv, y); return y * render_priv->orig_height_nocrop / render_priv->track->PlayResY + FFMAX(render_priv->settings.top_margin, 0); }
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
173,489,931,182,273,740,000,000,000,000,000,000,000
8
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
requestAssociationTCP(PRIVATE_NETWORKKEY ** network, DUL_ASSOCIATESERVICEPARAMETERS * params, PRIVATE_ASSOCIATIONKEY ** association) { char node[128]; int port; OFSockAddr server; #ifdef _WIN32 SOCKET s; #else int s; #endif struct linger sockarg; ...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
296,557,217,568,587,440,000,000,000,000,000,000,000
308
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) COMMAND *command; int asynchronous; int pipe_in, pipe_out; struct fd_bitmap *fds_to_close; { int user_subshell, return_code, function_value, should_redir_stdin, invert; int ois, user_coproc; int result; volatile COM...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
29,479,196,485,455,296,000,000,000,000,000,000,000
224
bash-4.4-rc2 release
static unsigned long do_compress(void **pptr, unsigned long size) { git_zstream stream; void *in, *out; unsigned long maxsize; git_deflate_init(&stream, pack_compression_level); maxsize = git_deflate_bound(&stream, size); in = *pptr; out = xmalloc(maxsize); *pptr = out; stream.next_in = in; stream.avail_in...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
95,231,622,133,790,600,000,000,000,000,000,000,000
24
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static void write_config(struct string_list *config) { int i; for (i = 0; i < config->nr; i++) { if (git_config_parse_parameter(config->items[i].string, write_one_config, NULL) < 0) die(_("unable to write parameters to config file")); } }
0
[ "CWE-20" ]
git
0060fd1511b94c918928fa3708f69a3f33895a4a
152,607,984,516,508,350,000,000,000,000,000,000,000
10
clone --recurse-submodules: prevent name squatting on Windows In addition to preventing `.git` from being tracked by Git, on Windows we also have to prevent `git~1` from being tracked, as the default NTFS short name (also known as the "8.3 filename") for the file name `.git` is `git~1`, otherwise it would be possible ...
TRIO_PUBLIC char* trio_vaprintf TRIO_ARGS2((format, args), TRIO_CONST char* format, va_list args) { trio_string_t* info; char* result = NULL; assert(VALID(format)); info = trio_xstring_duplicate(""); if (info) { (void)TrioFormat(info, 0, TrioOutStreamStringDynamic, format, args, NULL, NULL); trio_string_ter...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
220,947,184,375,563,780,000,000,000,000,000,000,000
17
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data) { unsigned long hash; OPENSSL_LH_NODE *nn, **rn; void *ret; lh->error = 0; rn = getrn(lh, data, &hash); if (*rn == NULL) { return NULL; } else { nn = *rn; *rn = nn->next; ret = nn->data; OP...
0
[ "CWE-404" ]
openssl
64c85430f95200b6b51fe9475bd5203f7c19daf1
14,755,227,952,515,990,000,000,000,000,000,000,000
25
Fix bug in OPENSSL_LH_flush Fixes #18139. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18141) (cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e)
static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box ) { MP4_Box_data_enda_t *p_enda; MP4_READBOX_ENTER( MP4_Box_data_enda_t ); p_enda = p_box->data.p_enda; MP4_GET2BYTES( p_enda->i_little_endian ); #ifdef MP4_VERBOSE msg_Dbg( p_stream, "read box: \"enda\" little_endian=...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
80,063,073,351,701,740,000,000,000,000,000,000,000
15
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
delete_properties_callback (SmsConn conn, SmPointer manager_data, int num_props, char **prop_names) { GsmXSMPClient *client = manager_data; int i; g_debug ("GsmXSMPClient: Delete properties fr...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
29,555,619,026,547,646,000,000,000,000,000,000,000
18
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
const char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order) { const j2k_prog_order_t *po; for (po = j2k_prog_order_list; po->enum_prog != -1; po++) { if (po->enum_prog == prg_order) { return po->str_prog; } } return po->str_prog; }
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
76,600,923,503,478,960,000,000,000,000,000,000,000
10
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static int _sx_sasl_rio(sx_t s, sx_plugin_t p, sx_buf_t buf) { sx_error_t sxe; size_t len; int ret; char *out; Gsasl_session *sd = (Gsasl_session *) s->plugin_data[p->index]; _sx_debug(ZONE, "doing sasl decode"); /* decode the input */ ret = gsasl_decode(sd, buf->data, buf->len, &out, ...
0
[ "CWE-287", "CWE-703" ]
jabberd2
8416ae54ecefa670534f27a31db71d048b9c7f16
75,904,141,031,692,440,000,000,000,000,000,000,000
27
Fixed offered SASL mechanism check
static int rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { UINT16 length; rdpFastPath* fastpath; fastpath = rdp->fastpath; if (!fastpath_read_header_rdp(fastpath, s, &length)) return -1; if ((length == 0) || (length > stream_get_left(s))) { printf("incorrect FastPath PDU header length %d\n", length); ret...
0
[ "CWE-476" ]
FreeRDP
7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7
28,694,434,777,801,203,000,000,000,000,000,000,000
26
security: add a NULL pointer check to fix a server crash.
static inline int pskb_trim(struct sk_buff *skb, unsigned int len) { return (len < skb->len) ? __pskb_trim(skb, len) : 0;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
23,078,987,615,306,446,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
bool asn1_check_BOOLEAN(struct asn1_data *data, bool v) { uint8_t b = 0; if (!asn1_read_uint8(data, &b)) return false; if (b != ASN1_BOOLEAN) { data->has_error = true; return false; } if (!asn1_read_uint8(data, &b)) return false; if (b != v) { data->has_error = true; return false; } return !data->has_e...
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
148,452,768,705,541,870,000,000,000,000,000,000,000
16
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
TEST(BitTestMatchExpression, MatchesBinary2) { BSONArray bas = BSON_ARRAY(21 << 22 << 8 << 9); BSONArray bac = BSON_ARRAY(20 << 23 << 612); std::vector<uint32_t> bitPositionsSet = bsonArrayToBitPositions(bas); std::vector<uint32_t> bitPositionsClear = bsonArrayToBitPositions(bac); BSONObj match1 = ...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
51,268,753,423,727,880,000,000,000,000,000,000,000
33
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
xfs_bmap_shift_update_extent( struct xfs_inode *ip, int whichfork, struct xfs_iext_cursor *icur, struct xfs_bmbt_irec *got, struct xfs_btree_cur *cur, int *logflags, struct xfs_defer_ops *dfops, xfs_fileoff_t startoff) { struct xfs_mount *mp = ip->i_mount; struct xfs_bmbt_irec prev = *got; int error, ...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
281,638,947,455,688,070,000,000,000,000,000,000,000
40
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
njs_function_capture_global_closures(njs_vm_t *vm, njs_function_t *function) { void *start, *end; uint32_t n; njs_value_t *value, **refs, **global; njs_index_t *indexes, index; njs_native_frame_t *native; njs_function_lambda_t *lambda; ...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
271,338,192,093,568,550,000,000,000,000,000,000,000
63
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
void kernel_restart(char *cmd) { kernel_restart_prepare(cmd); disable_nonboot_cpus(); if (!cmd) printk(KERN_EMERG "Restarting system.\n"); else printk(KERN_EMERG "Restarting system with command '%s'.\n", cmd); kmsg_dump(KMSG_DUMP_RESTART); machine_restart(cmd); }
0
[ "CWE-16", "CWE-79" ]
linux
2702b1526c7278c4d65d78de209a465d4de2885e
88,509,721,277,710,270,000,000,000,000,000,000,000
11
kernel/sys.c: fix stack memory content leak via UNAME26 Calling uname() with the UNAME26 personality set allows a leak of kernel stack contents. This fixes it by defensively calculating the length of copy_to_user() call, making the len argument unsigned, and initializing the stack buffer to zero (now technically unne...
bool JOIN::get_best_combination() { uint tablenr; table_map used_tables; JOIN_TAB *j; KEYUSE *keyuse; DBUG_ENTER("get_best_combination"); /* Additional plan nodes for postjoin tmp tables: 1? + // For GROUP BY 1? + // For DISTINCT 1? + // For aggregation functions aggregated in outer ...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
83,630,079,315,190,800,000,000,000,000,000,000,000
177
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
bool CParaNdisTX::RestartQueue(bool DoKick) { TSpinLocker LockedContext(m_Lock); auto res = ParaNdis_SynchronizeWithInterrupt(m_Context, m_messageIndex, CParaNdisTX::RestartQueueSynchronously, ...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
88,246,697,121,398,680,000,000,000,000,000,000,000
15
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
STATIC GC_bool GC_alloc_reclaim_list(struct obj_kind *kind) { struct hblk ** result = (struct hblk **) GC_scratch_alloc((MAXOBJGRANULES+1) * sizeof(struct hblk *)); if (result == 0) return(FALSE); BZERO(result, (MAXOBJGRANULES+1)*sizeof(struct hblk *)); kind -> ok_reclaim_list = result; ...
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
131,648,295,622,095,500,000,000,000,000,000,000,000
9
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
parse_file_info(struct archive_read *a, struct file_info *parent, const unsigned char *isodirrec, size_t reclen) { struct iso9660 *iso9660; struct file_info *file, *filep; size_t name_len; const unsigned char *rr_start, *rr_end; const unsigned char *p; size_t dr_len; uint64_t fsize, offset; int32_t location...
0
[ "CWE-400", "CWE-703" ]
libarchive
8312eaa576014cd9b965012af51bc1f967b12423
182,905,039,845,893,850,000,000,000,000,000,000,000
347
iso9660: Fail when expected Rockridge extensions is missing A corrupted or malicious ISO9660 image can cause read_CE() to loop forever. read_CE() calls parse_rockridge(), expecting a Rockridge extension to be read. However, parse_rockridge() is structured as a while loop starting with a sanity check, and if the sanit...
void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new) { struct vm_area_struct *vma; down_write(&mm->mmap_sem); for (vma = mm->mmap; vma; vma = vma->vm_next) mpol_rebind_policy(vma->vm_policy, new, MPOL_REBIND_ONCE); up_write(&mm->mmap_sem); }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
167,526,260,022,307,540,000,000,000,000,000,000,000
9
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
uchar *in_decimal::get_value(Item *item) { my_decimal *result= item->val_decimal(&val); if (item->null_value) return 0; return (uchar *)result; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
213,072,783,773,052,900,000,000,000,000,000,000,000
7
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 ...
TEST_F(RouterTest, UpstreamTimingSingleRequest) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::ConnectionPo...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
116,157,203,168,545,120,000,000,000,000,000,000,000
58
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
Curl_cookie_add(struct Curl_easy *data, /* * The 'data' pointer here may be NULL at times, and thus * must only be used very carefully for things that can deal * with data being NULL. Such as infof() and similar */ struc...
1
[]
curl
8dfc93e573ca740544a2d79ebb0ed786592c65c3
340,011,739,869,148,140,000,000,000,000,000,000,000
717
cookie: reject cookies with "control bytes" Rejects 0x01 - 0x1f (except 0x09) plus 0x7f Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-35252.html CVE-2022-35252 Closes #9381
input_buffer& ChangeCipherSpec::set(input_buffer& in) { return in >> *this; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
26,151,145,284,586,994,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
PrimaryChromaticity() : x_(0), y_(0) {}
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
134,138,116,161,252,640,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static char *get_next_processed_event(GList **events_list) { if (!events_list || !*events_list) return NULL; char *event_name = (char *)(*events_list)->data; const size_t event_len = strlen(event_name); /* pop the current event */ *events_list = g_list_delete_link(*events_list, *events_lis...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
261,315,622,249,756,140,000,000,000,000,000,000,000
81
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...