func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
reset_start(FILE *fp, bool is_reset, bool is_init) { my_file = fp; use_reset = is_reset; use_init = is_init; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
27,276,226,128,758,303,000,000,000,000,000,000,000
6
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
dns_message_puttemprdatalist(dns_message_t *msg, dns_rdatalist_t **item) { REQUIRE(DNS_MESSAGE_VALID(msg)); REQUIRE(item != NULL && *item != NULL); releaserdatalist(msg, *item); *item = NULL; }
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
104,830,554,988,679,640,000,000,000,000,000,000,000
7
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
int sdsll2str(char *s, long long value) { char *p, aux; unsigned long long v; size_t l; /* Generate the string representation, this method produces * a reversed string. */ v = (value < 0) ? -value : value; p = s; do { *p++ = '0'+(v%10); v /= 10; } while(v); if (...
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
267,474,589,357,047,800,000,000,000,000,000,000,000
30
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
void CLASS pentax_load_raw() { ushort bit[2][15], huff[4097]; int dep, row, col, diff, c, i; ushort vpred[2][2] = {{0,0},{0,0}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); dep = (get2() + 12) & 15; fseek (ifp, 12, SEEK_CUR); FORC(dep) bit[0][c] = get2(); FORC(dep) bit[1][c] = fgetc(ifp); FORC(dep)...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
163,513,038,911,329,980,000,000,000,000,000,000,000
26
cumulated data checks patch
static inline int ib_addr_cmp(const struct ib_addr *a1, const struct ib_addr *a2) { return memcmp(a1, a2, sizeof(struct ib_addr)); }
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
142,372,288,616,932,570,000,000,000,000,000,000,000
4
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
TEST_F(Http1ServerConnectionImplTest, UpgradeRequestWithTEChunked) { initialize(); InSequence sequence; NiceMock<MockRequestDecoder> decoder; EXPECT_CALL(callbacks_, newStream(_, _)).WillOnce(ReturnRef(decoder)); // Even with T-E chunked, the data should neither be inspected for (the not // present in thi...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
334,132,507,187,673,570,000,000,000,000,000,000,000
17
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static ssize_t cpu_probe_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { ssize_t cnt; int ret; ret = lock_device_hotplug_sysfs(); if (ret) return ret; cnt = arch_cpu_probe(buf, count); unlock_device_hotplug(); return cnt; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
33,860,266,808,492,640,000,000,000,000,000,000,000
17
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...
static void reg_set_min_max(struct bpf_reg_state *true_reg, struct bpf_reg_state *false_reg, u64 val, u8 opcode) { /* If the dst_reg is a pointer, we can't learn anything about its * variable offset from the compare (unless src_reg were a pointer into * the same object, but we don't bother with that....
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
1,079,092,128,117,266,400,000,000,000,000,000,000
81
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...
STATIC SV* S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node) { /* Returns a mortal inversion list defining which code points are matched * by 'node', which is of type ANYOF. Handles complementing the result if * appropri...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
206,635,118,609,870,250,000,000,000,000,000,000,000
136
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
enum regex_type filter_parse_regex(char *buff, int len, char **search, int *not) { int type = MATCH_FULL; int i; if (buff[0] == '!') { *not = 1; buff++; len--; } else *not = 0; *search = buff; if (isdigit(buff[0])) return MATCH_INDEX; for (i = 0; i < len; i++) { if (buff[i] == '*') { if (!i) {...
0
[ "CWE-400", "CWE-284", "CWE-401" ]
linux
96c5c6e6a5b6db592acae039fed54b5c8844cd35
116,539,742,900,059,790,000,000,000,000,000,000,000
40
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <nav...
static void yv12_extend_frame_left_right_c(YV12_BUFFER_CONFIG *ybf, unsigned char *y_src, unsigned char *u_src, unsigned char *v_src) { int i; unsigned char *src_ptr1, *src_ptr2; unsign...
0
[ "CWE-125" ]
libvpx
45daecb4f73a47ab3236a29a3a48c52324cbf19a
287,167,041,730,097,870,000,000,000,000,000,000,000
78
vp8_decode_frame: fix oob read on truncated key frame the check for error correction being disabled was overriding the data length checks. this avoids returning incorrect information (width / height) for the decoded frame which could result in inconsistent sizes returned in to an application causing it to read beyond ...
static void srpt_rdma_write_done(struct ib_cq *cq, struct ib_wc *wc) { struct srpt_send_ioctx *ioctx = container_of(wc->wr_cqe, struct srpt_send_ioctx, rdma_cqe); if (unlikely(wc->status != IB_WC_SUCCESS)) { pr_info("RDMA_WRITE for ioctx 0x%p failed with status %d\n", ioctx, wc->status); srpt_abort_cmd(ioct...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
155,850,148,742,639,820,000,000,000,000,000,000,000
11
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
replace_push( int c) // character that is replaced (NUL is none) { char_u *p; if (replace_stack_nr < replace_offset) // nothing to do return; if (replace_stack_len <= replace_stack_nr) { replace_stack_len += 50; p = ALLOC_MULT(char_u, replace_stack_len); if (p == NULL) // out of me...
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
112,778,832,064,316,780,000,000,000,000,000,000,000
30
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
static void mpi_receive_802_11(struct airo_info *ai) { RxFid rxd; struct sk_buff *skb = NULL; u16 len, hdrlen = 0; __le16 fc; struct rx_hdr hdr; u16 gap; u16 *buffer; char *ptr = ai->rxfids[0].virtual_host_addr + 4; memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd)); memcpy ((char *)&hdr, ptr, size...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
244,631,925,352,963,370,000,000,000,000,000,000,000
85
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...
mono_loader_set_error_method_load (const char *class_name, const char *member_name) { MonoLoaderError *error; /* FIXME: Store the signature as well */ if (mono_loader_get_last_error ()) return; error = g_new0 (MonoLoaderError, 1); error->exception_type = MONO_EXCEPTION_MISSING_METHOD; error->class_name = g_st...
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
34,442,873,040,965,815,000,000,000,000,000,000,000
15
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep) { if (nopeep || no_peephole(s)) goto normal; else if (dst == src) return; else { struct mrb_insn_data data = mrb_last_insn(s); switch (data.insn) { case OP_MOVE: if (dst == src) return; /* remove useless MOVE */ ...
0
[ "CWE-415", "CWE-122" ]
mruby
38b164ace7d6ae1c367883a3d67d7f559783faad
256,367,950,181,931,700,000,000,000,000,000,000,000
82
codegen.c: fix a bug in `gen_values()`. - Fix limit handling that fails 15 arguments method calls. - Fix too early argument packing in arrays.
static int vmload_interception(struct kvm_vcpu *vcpu) { return vmload_vmsave_interception(vcpu, true); }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
212,942,124,864,823,150,000,000,000,000,000,000,000
4
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
int mempool_reserved_space(MemoryPoolHandle handle, size_t *free_bytes) { struct mempool *pool = (struct mempool *)handle; if ((pool == NULL) || (free_bytes == NULL)) { return S3_MEMPOOL_INVALID_ARG; } if (pool->flags & ENABLE_LOCKING) { pthread_mutex_lock(&pool->lock); } *free_bytes = pool->memp...
0
[ "CWE-703" ]
cortx-s3server
dd6bfbc4b84f14f898598922ca9efd5aaa645c5d
120,064,189,394,349,900,000,000,000,000,000,000,000
19
avoid the unrelesed lock after the method returns (#1041) Update s3_memory_pool.c. Avoid the unreleased lock pool->lock after the method returns. Co-authored-by: nileshgovande <63101371+nileshgovande@users.noreply.github.com>
static int kvm_is_user_mode(void) { int user_mode = 3; if (percpu_read(current_vcpu)) user_mode = kvm_x86_ops->get_cpl(percpu_read(current_vcpu)); return user_mode != 0; }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
265,829,022,381,926,240,000,000,000,000,000,000,000
9
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
static BOOL nsc_rle_decode(BYTE* in, BYTE* out, UINT32 outSize, UINT32 originalSize) { UINT32 len; UINT32 left; BYTE value; left = originalSize; while (left > 4) { value = *in++; if (left == 5) { if (outSize < 1) return FALSE; outSize--; *out++ = value; left--; } else if (value == *in...
0
[ "CWE-200", "CWE-787" ]
FreeRDP
d1112c279bd1a327e8e4d0b5f371458bf2579659
173,365,651,317,085,700,000,000,000,000,000,000,000
61
Fixed CVE-2018-8788 Thanks to Eyal Itkin from Check Point Software Technologies.
static int sctp_getsockopt_peer_addr_params(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_paddrparams params; struct sctp_transport *trans = NULL; struct sctp_association *asoc = NULL; struct sctp_sock *sp = sctp_sk(sk); if (len < sizeof(struct sctp_paddrparam...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
21,523,894,839,713,183,000,000,000,000,000,000,000
73
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
static void resv_map_put(struct vm_area_struct *vma) { struct resv_map *reservations = vma_resv_map(vma); if (!reservations) return; kref_put(&reservations->refs, resv_map_release); }
0
[ "CWE-399" ]
linux
c50ac050811d6485616a193eb0f37bfbd191cc89
287,207,003,781,476,700,000,000,000,000,000,000,000
8
hugetlb: fix resv_map leak in error path When called for anonymous (non-shared) mappings, hugetlb_reserve_pages() does a resv_map_alloc(). It depends on code in hugetlbfs's vm_ops->close() to release that allocation. However, in the mmap() failure path, we do a plain unmap_region() without the remove_vma() which act...
void ms_fast_dispatch(Message *m) override { usleep(think_time); //cerr << __func__ << " reply message=" << m << std::endl; op_wq.queue(m); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
226,483,854,386,217,660,000,000,000,000,000,000,000
5
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void k_slock(struct vc_data *vc, unsigned char value, char up_flag) { k_shift(vc, value, up_flag); if (up_flag || rep) return; chg_vc_kbd_slock(kbd, value); /* try to make Alt, oops, AltGr and such work */ if (!key_maps[kbd->lockstate ^ kbd->slockstate]) { kbd->slockstate = 0; chg_vc_kbd_slock(kbd, v...
0
[ "CWE-416" ]
linux
6ca03f90527e499dd5e32d6522909e2ad390896b
178,789,955,690,391,100,000,000,000,000,000,000,000
13
vt: keyboard, simplify vt_kdgkbsent Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL 'func_table[i]'. Use an empty string in that case. The original che...
void ieee80211_connection_loss(struct ieee80211_vif *vif) { struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); struct ieee80211_hw *hw = &sdata->local->hw; trace_api_connection_loss(sdata); sdata->u.mgd.connection_loss = true; ieee80211_queue_work(hw, &sdata->u.mgd.beacon_connection_loss_work); }
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
165,091,275,822,172,320,000,000,000,000,000,000,000
10
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
MagickExport MagickBooleanType DefineImageRegistry(const RegistryType type, const char *option,ExceptionInfo *exception) { char key[MagickPathExtent], value[MagickPathExtent]; register char *p; assert(option != (const char *) NULL); (void) CopyMagickString(key,option,MagickPathExtent); for (p=...
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
93,051,749,618,076,400,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/790
ves_icall_System_Object_obj_address (MonoObject *this) { MONO_ARCH_SAVE_REGS; return this; }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
112,255,768,611,579,420,000,000,000,000,000,000,000
6
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
inline char option(const char *const name, const int argc, const char *const *const argv, const char defaut, const char *const usage=0) { const char *const s = cimg::option(name,argc,argv,(char*)0); const char res = s?*s:defaut; char tmp[8]; *tmp = res; tmp[1] = 0; ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
138,996,868,494,677,800,000,000,000,000,000,000,000
9
Fix other issues in 'CImg<T>::load_bmp()'.
iterate_rc4(unsigned char* data, int data_len, unsigned char* okey, int key_len, int iterations, bool reverse) { unsigned char* key = new unsigned char[key_len]; for (int i = 0; i < iterations; ++i) { int const xor_value = (reverse ? iterations - 1 - i : i); for (int j = 0; j < key_len; ++j) { ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
198,815,971,332,950,840,000,000,000,000,000,000,000
17
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int svm_vcpu_reset(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); init_vmcb(svm); if (!kvm_vcpu_is_bsp(vcpu)) { kvm_rip_write(vcpu, 0); svm->vmcb->save.cs.base = svm->vcpu.arch.sipi_vector << 12; svm->vmcb->save.cs.selector = svm->vcpu.arch.sipi_vector << 8; } vcpu->arch.regs_avail = ...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
304,201,562,297,240,800,000,000,000,000,000,000,000
16
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
convert_type_priv_string(text *priv_type_text) { static const priv_map type_priv_map[] = { {"USAGE", ACL_USAGE}, {"USAGE WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_USAGE)}, {NULL, 0} }; return convert_any_priv_string(priv_type_text, type_priv_map); }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
137,460,047,892,684,950,000,000,000,000,000,000,000
10
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
_pblock_assert_pb_mr(Slapi_PBlock *pblock) { if (pblock->pb_mr == NULL) { pblock->pb_mr = (slapi_pblock_matching_rule *)slapi_ch_calloc(1, sizeof(slapi_pblock_matching_rule)); } }
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
303,818,948,859,847,930,000,000,000,000,000,000,000
6
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
parse_rfc1123_time(const char *buf, time_t *t) { struct tm tm; char month[4]; char weekday[4]; int i, m; unsigned tm_mday, tm_year, tm_hour, tm_min, tm_sec; if (strlen(buf) != RFC1123_TIME_LEN) return -1; memset(&tm, 0, sizeof(tm)); if (tor_sscanf(buf, "%3s, %2u %3s %u %2u:%2u:%2u GMT", weekday, ...
1
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
165,640,744,157,490,530,000,000,000,000,000,000,000
59
Fix assertion failure in tor_timegm. Fixes bug 6811.
static int smack_sb_alloc_security(struct super_block *sb) { struct superblock_smack *sbsp = smack_superblock(sb); sbsp->smk_root = &smack_known_floor; sbsp->smk_default = &smack_known_floor; sbsp->smk_floor = &smack_known_floor; sbsp->smk_hat = &smack_known_hat; /* * SMK_SB_INITIALIZED will be zero from kzall...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
18,646,245,449,253,172,000,000,000,000,000,000,000
14
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
stdio_init_source (j_decompress_ptr cinfo) { stdio_src_ptr src = (stdio_src_ptr)cinfo->src; src->start_of_file = FALSE; }
0
[ "CWE-787" ]
gdk-pixbuf
c2a40a92fe3df4111ed9da51fe3368c079b86926
306,273,492,771,601,300,000,000,000,000,000,000,000
5
jpeg: Throw error when number of color components is unsupported Explicitly check "3" or "4" output color components. gdk-pixbuf assumed that the value of output_components to be either 3 or 4, but not an invalid value (9) or an unsupported value (1). The way the buffer size was deduced was using a naive "== 4" chec...
static int mxf_get_d10_aes3_packet(AVIOContext *pb, AVStream *st, AVPacket *pkt, int64_t length) { const uint8_t *buf_ptr, *end_ptr; uint8_t *data_ptr; int i; if (length > 61444) /* worst case PAL 1920 samples 8 channels */ return AVERROR_INVALIDDATA; length = av_get_packet(pb, pkt, length)...
0
[ "CWE-703", "CWE-834" ]
FFmpeg
900f39692ca0337a98a7cf047e4e2611071810c2
127,437,273,688,950,360,000,000,000,000,000,000,000
27
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
AcpiNsInternalizeName ( const char *ExternalName, char **ConvertedName) { char *InternalName; ACPI_NAMESTRING_INFO Info; ACPI_STATUS Status; ACPI_FUNCTION_TRACE (NsInternalizeName); if ((!ExternalName) || (*Ex...
0
[ "CWE-200", "CWE-755" ]
acpica
a23325b2e583556eae88ed3f764e457786bf4df6
303,053,194,900,243,420,000,000,000,000,000,000,000
45
Namespace: fix operand cache leak I found some ACPI operand cache leaks in ACPI early abort cases. Boot log of ACPI operand cache leak is as follows: >[ 0.174332] ACPI: Added _OSI(Module Device) >[ 0.175504] ACPI: Added _OSI(Processor Device) >[ 0.176010] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.177032]...
get_slave_coordinates(MYSQL *connection) { char *relay_log_file = NULL; char *exec_log_pos = NULL; char *result = NULL; mysql_variable slave_coordinates[] = { {"Relay_Master_Log_File", &relay_log_file}, {"Exec_Master_Log_Pos", &exec_log_pos}, {NULL, NULL} }; read_mysql_variables(connection, "SHOW SLAVE ST...
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
296,720,586,673,969,780,000,000,000,000,000,000,000
18
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
int imap_continue(const char *msg, const char *resp) { imap_error(msg, resp); return mutt_yesorno(_("Continue?"), 0); }
0
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
272,622,471,136,446,400,000,000,000,000,000,000,000
5
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
explicit EmptyReadCallback() : ReadCallback(nullptr) {}
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
76,384,880,070,391,750,000,000,000,000,000,000,000
1
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
if (ctx->cp!=GF_DASH_CPMODE_ADAPTATION_SET) { gf_mpd_del_list(ds->rep->content_protection, gf_mpd_descriptor_free, 0); ds->rep->content_protection = dasher_get_content_protection_desc(ctx, ds, NULL); } } static void dasher_setup_rep(GF_DasherCtx *ctx, GF_DashStream *ds, u32 *srd_rep_idx) { const GF_PropertyVal...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
322,231,684,378,120,500,000,000,000,000,000,000,000
55
fixed #2138
static INLINE BOOL file_transferring(wfClipboard* clipboard) { return get_local_format_id_by_name(clipboard, CFSTR_FILEDESCRIPTORW) ? TRUE : FALSE; }
0
[ "CWE-20" ]
FreeRDP
0d79670a28c0ab049af08613621aa0c267f977e9
98,050,730,106,322,880,000,000,000,000,000,000,000
4
Fixed missing input checks for file contents request reported by Valentino Ricotta (Thalium)
asn1str_to_str(const ASN1_STRING *str) { return rb_str_new((const char *)str->data, str->length); }
0
[ "CWE-119" ]
openssl
1648afef33c1d97fb203c82291b8a61269e85d3b
60,127,392,332,851,990,000,000,000,000,000,000,000
4
asn1: fix out-of-bounds read in decoding constructed objects OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bound...
pdf14_pop_transparency_group(gs_gstate *pgs, pdf14_ctx *ctx, const pdf14_nonseparable_blending_procs_t * pblend_procs, int tos_num_color_comp, cmm_profile_t *curr_icc_profile, gx_device *dev) { pdf14_buf *tos = ctx->stack; pdf14_buf *nos = tos->saved; pdf14_mask_t *mask_stack = tos->mask_stack; ...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
225,234,779,443,976,900,000,000,000,000,000,000,000
235
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
static void reopen_general_log(char* name) { logger.get_log_file_handler()->close(0); logger.get_log_file_handler()->open_query_log(name); }
1
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
75,454,913,334,607,620,000,000,000,000,000,000,000
5
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
const OSSL_PARAM *rc4_hmac_md5_gettable_ctx_params(ossl_unused void *cctx, ossl_unused void *provctx) { return rc4_hmac_md5_known_gettable_ctx_params; }
0
[ "CWE-327" ]
openssl
7d56a74a96828985db7354a55227a511615f732b
324,995,202,738,278,700,000,000,000,000,000,000,000
5
Fix the RC4-MD5 cipher A copy&paste error meant that the RC4-MD5 cipher (used in TLS) used the TLS AAD data as the MAC key. CVE-2022-1434 Fixes #18112 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org>
static void cmdloop(void) { int gzip_enabled = 0; struct transaction_t txn; /* Start with an empty (clean) transaction */ memset(&txn, 0, sizeof(struct transaction_t)); /* Pre-allocate our working buffer */ buf_ensure(&txn.buf, 1024); #ifdef HAVE_ZLIB /* Always use gzip format because IE ...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
209,572,843,906,280,400,000,000,000,000,000,000,000
568
HTTP: don't overrun buffer when parsing strings with sscanf()
long ssl2_callback_ctrl(SSL *s, int cmd, void (*fp) (void)) { return (0); }
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
267,896,702,778,073,600,000,000,000,000,000,000,000
4
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
static int dn_dev_insert_ifa(struct dn_dev *dn_db, struct dn_ifaddr *ifa) { struct net_device *dev = dn_db->dev; struct dn_ifaddr *ifa1; unsigned char mac_addr[6]; ASSERT_RTNL(); /* Check for duplicates */ for (ifa1 = rtnl_dereference(dn_db->ifa_list); ifa1 != NULL; ifa1 = rtnl_dereference(ifa1->ifa...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
206,224,333,811,835,900,000,000,000,000,000,000,000
31
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static int smacker_decode_header_tree(SmackVContext *smk, BitstreamContext *bc, int **recodes, int *last, int size) { int res; HuffContext huff; HuffContext tmp1, tmp2; VLC vlc[2] = { { 0 } }; int escapes[3]; DBCtx ctx; int err = 0; if(size >= UINT_...
0
[ "CWE-119", "CWE-787" ]
libav
cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
149,768,604,420,310,400,000,000,000,000,000,000,000
120
smacker: add sanity check for length in smacker_decode_tree() Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Bug-Id: 1098 Cc: libav-stable@libav.org Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
GF_Err stbl_GetSampleSize(GF_SampleSizeBox *stsz, u32 SampleNumber, u32 *Size) { if (!stsz || !SampleNumber || (SampleNumber > stsz->sampleCount)) return GF_BAD_PARAM; if (stsz->sampleSize && (stsz->type != GF_ISOM_BOX_TYPE_STZ2)) { (*Size) = stsz->sampleSize; } else if (stsz->sizes) { (*Size) = stsz->sizes[S...
0
[ "CWE-416", "CWE-401" ]
gpac
2da2f68bffd51d89b1d272d22aa8cc023c1c066e
144,542,408,682,130,590,000,000,000,000,000,000,000
14
fixed #1705
gst_asf_demux_identify_guid (const ASFGuidHash * guids, ASFGuid * guid) { guint32 ret; ret = gst_asf_identify_guid (guids, guid); GST_LOG ("%s 0x%08x-0x%08x-0x%08x-0x%08x", gst_asf_get_guid_nick (guids, ret), guid->v1, guid->v2, guid->v3, guid->v4); return ret; }
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
19,857,484,757,821,836,000,000,000,000,000,000,000
12
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
void CL_ClearPing( int n ) { if (n < 0 || n >= MAX_PINGREQUESTS) return; cl_pinglist[n].adr.port = 0; }
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
9,551,176,303,579,277,000,000,000,000,000,000,000
7
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, u32 handle, u32 sc, struct fastrpc_invoke_args *args) { struct fastrpc_invoke_ctx *ctx = NULL; int err = 0; if (!fl->sctx) return -EINVAL; if (!fl->cctx->rpdev) return -EPIPE; ctx = fastrpc_context_alloc(fl, kernel, sc, a...
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
46,150,304,210,628,470,000,000,000,000,000,000,000
61
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
template<> struct type<unsigned char> {
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
300,570,661,296,218,840,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
int32_t ZrtpStateClass::nextTimer(zrtpTimer_t *t) { t->time += t->time; t->time = (t->time > t->capping)? t->capping : t->time; t->counter++; if (t->counter > t->maxResend) { return -1; } return parent->activateTimer(t->time); }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
230,688,383,893,519,130,000,000,000,000,000,000,000
10
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_include_path, int silent TSRMLS_DC) /* {{{ */ { zval tmp; intern->type = SPL_FS_FILE; php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); if (Z_LVAL(tmp)) { intern->u.file.open_mode = NULL; intern->file_name...
1
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
119,521,291,586,793,230,000,000,000,000,000,000,000
51
Fix bug #72262 - do not overflow int
static void assertExpectedResults( const string& expression, initializer_list<pair<vector<ImplicitValue>, ImplicitValue>> operations) { for (auto&& op : operations) { try { Value result = evaluateExpression(expression, op.first); ASSERT_VALUE_EQ(op.second, result); ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
259,006,721,750,458,370,000,000,000,000,000,000,000
14
SERVER-38070 fix infinite loop in agg expression
static void tipc_link_update_cwin(struct tipc_link *l, int released, bool retransmitted) { int bklog_len = skb_queue_len(&l->backlogq); struct sk_buff_head *txq = &l->transmq; int txq_len = skb_queue_len(txq); u16 cwin = l->window; /* Enter fast recovery */ if (unlikely(retransmitted)) { l->ssthresh = ma...
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
44,757,797,912,760,800,000,000,000,000,000,000,000
41
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r) { core_server_config *conf; int rv; apr_bucket_brigade *bb; header_struct h; apr_bucket *b; int body; char *bodyread = NULL, *bodyoff; apr_size_t bodylen = 0; apr_size_t bodybuf; long res = -1; /* init to avoid gcc -Wall w...
0
[ "CWE-20" ]
httpd
a6027e56924bb6227c1fdbf6f91e7e2438338be6
259,184,189,255,891,800,000,000,000,000,000,000,000
115
Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext authorized characters. Submitted by: Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
static char *check_str(char *line, size_t line_size, const char *needle, size_t needle_size) { char *p; unsigned n; while (c_isspace(*line)) { line++; line_size--; } if (line[0] == '#' || needle_size >= line_size) return NULL; if (memcmp(line, needle, needle_size) == 0) { p = &line[needle_size]; whil...
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
52,066,840,189,249,735,000,000,000,000,000,000,000
43
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
void fx_DataView_prototype_setUint16(txMachine* the) { fx_DataView_prototype_set(the, 2, fxUintCoerce, fxUint16Setter); }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
156,076,997,100,369,500,000,000,000,000,000,000,000
4
XS: #896
TEST(GtOp, ElemMatchKey) { BSONObj operand = BSON("$gt" << 5); GTMatchExpression gt("a", operand["$gt"]); MatchDetails details; details.requestElemMatchKey(); ASSERT(!gt.matchesBSON(BSON("a" << 4), &details)); ASSERT(!details.hasElemMatchKey()); ASSERT(gt.matchesBSON(BSON("a" << 6), &details...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
97,253,268,441,725,740,000,000,000,000,000,000,000
13
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
TEST_F(ConnectionManagerUtilityTest, ContinueIfEscapedSlashesPresentAndConfiguredToUnescape) { ON_CALL(config_, pathWithEscapedSlashesAction()) .WillByDefault(Return(envoy::extensions::filters::network::http_connection_manager::v3:: HttpConnectionManager::UNESCAPE_AND_FORWARD)); ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
141,615,305,635,629,620,000,000,000,000,000,000,000
12
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
local unsigned long crc32_big(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; unsigned len; { register z_crc_t c; register const z_crc_t FAR *buf4; c = ZSWAP32((z_crc_t)crc); c = ~c; while (len && ((ptrdiff_t)buf & 3)) { c = crc_table[4][(c >> 24) ^ *buf++] ^ (c ...
0
[ "CWE-703", "CWE-189" ]
zlib
d1d577490c15a0c6862473d7576352a9f18ef811
249,250,709,726,838,150,000,000,000,000,000,000,000
32
Avoid pre-decrement of pointer in big-endian CRC calculation. There was a small optimization for PowerPCs to pre-increment a pointer when accessing a word, instead of post-incrementing. This required prefacing the loop with a decrement of the pointer, possibly pointing before the object passed. This is not compliant w...
get_function_body( exarg_T *eap, garray_T *newlines, char_u *line_arg_in, garray_T *lines_to_free) { linenr_T sourcing_lnum_top = SOURCING_LNUM; linenr_T sourcing_lnum_off; int saved_wait_return = need_wait_return; char_u *line_arg = line_arg_in; int vim9_function = eap->cmdidx =...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
76,182,614,553,287,350,000,000,000,000,000,000,000
425
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
int close_on_exec_on(int fd) { return fcntl(fd, F_SETFD, FD_CLOEXEC); }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
305,932,878,362,049,800,000,000,000,000,000,000,000
4
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...
SPICE_GNUC_VISIBLE int spice_server_set_zlib_glz_compression(SpiceServer *s, spice_wan_compression_t comp) { if (comp == SPICE_WAN_COMPRESSION_INVALID) { spice_error("invalid zlib_glz state"); return -1; } // todo: support dynamically changing the state s->config->zlib_glz_state = comp; ...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
295,307,837,354,062,230,000,000,000,000,000,000,000
10
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static int kvm_vcpu_ioctl_get_lapic(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s) { memcpy(s->regs, vcpu->arch.apic->regs, sizeof *s); return 0; }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
304,803,617,748,589,400,000,000,000,000,000,000,000
7
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
SProcXkbUseExtension(ClientPtr client) { REQUEST(xkbUseExtensionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbUseExtensionReq); swaps(&stuff->wantedMajor); swaps(&stuff->wantedMinor); return ProcXkbUseExtension(client); }
0
[ "CWE-191" ]
xserver
144849ea27230962227e62a943b399e2ab304787
277,764,533,929,394,700,000,000,000,000,000,000,000
10
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 mif_hdr_t *mif_makehdrfromimage(jas_image_t *image) { mif_hdr_t *hdr; int cmptno; mif_cmpt_t *cmpt; if (!(hdr = mif_hdr_create(jas_image_numcmpts(image)))) { return 0; } hdr->magic = MIF_MAGIC; hdr->numcmpts = jas_image_numcmpts(image); for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { if (!(hdr-...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
323,559,893,456,741,500,000,000,000,000,000,000,000
39
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
int cil_gen_aliasactual(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor) { int rc = SEPOL_ERR; enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); struct c...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
72,394,617,162,189,110,000,000,000,000,000,000,000
43
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) { xReturn = pdTRUE; } else { xReturn = pdFALSE; } } ...
0
[ "CWE-200", "CWE-190" ]
FreeRTOS-Kernel
47338393f1f79558f6144213409f09f81d7c4837
142,803,691,278,206,400,000,000,000,000,000,000,000
19
add assert for addition overflow on queue creation (#225)
static void hub_irq(struct urb *urb) { struct usb_hub *hub = urb->context; int status = urb->status; unsigned i; unsigned long bits; switch (status) { case -ENOENT: /* synchronous unlink */ case -ECONNRESET: /* async unlink */ case -ESHUTDOWN: /* hardware going away */ return; default: /* presumably an e...
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
334,395,597,898,301,460,000,000,000,000,000,000,000
44
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
int ha_partition::copy_partitions(ulonglong * const copied, ulonglong * const deleted) { uint reorg_part= 0; int result= 0; longlong func_value; DBUG_ENTER("ha_partition::copy_partitions"); if (m_part_info->linear_hash_ind) { if (m_part_info->part_type == HASH_PARTITIO...
0
[]
server
f305a7ce4bccbd56520d874e1d81a4f29bc17a96
261,974,806,313,613,900,000,000,000,000,000,000,000
70
bugfix: long partition names
cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb) { return tlink_tcon(cifs_sb_master_tlink(cifs_sb)); }
0
[ "CWE-20" ]
linux
70945643722ffeac779d2529a348f99567fa5c33
157,107,970,321,343,320,000,000,000,000,000,000,000
4
cifs: always do is_path_accessible check in cifs_mount Currently, we skip doing the is_path_accessible check in cifs_mount if there is no prefixpath. I have a report of at least one server however that allows a TREE_CONNECT to a share that has a DFS referral at its root. The reporter in this case was using a UNC that ...
doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore, enum XML_Account account) { const char *s = *startPtr; const char **eventPP; const char **eventEndPP; if (enc == parser->m_encoding) { eventPP...
0
[ "CWE-400", "CWE-703" ]
libexpat
9b4ce651b26557f16103c3a366c91934ecd439ab
302,335,926,008,933,430,000,000,000,000,000,000,000
117
Prevent stack exhaustion in build_model It is possible to trigger stack exhaustion in build_model function if depth of nested children in DTD element is large enough. This happens because build_node is a recursively called function within build_model. The code has been adjusted to run iteratively. It uses the already...
bool_t xdr_authgssapi_creds( XDR *xdrs, auth_gssapi_creds *creds) { if (! xdr_u_int32(xdrs, &creds->version) || ! xdr_bool(xdrs, &creds->auth_msg) || ! xdr_gss_buf(xdrs, &creds->client_handle)) return FALSE; return TRUE; }
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
93,941,731,363,007,300,000,000,000,000,000,000,000
10
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
struct cred *prepare_creds(void) { struct task_struct *task = current; const struct cred *old; struct cred *new; validate_process_creds(); new = kmem_cache_alloc(cred_jar, GFP_KERNEL); if (!new) return NULL; kdebug("prepare_creds() alloc %p", new); old = task->cred; memcpy(new, old, sizeof(struct cred));...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
289,581,595,913,326,270,000,000,000,000,000,000,000
41
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int LZ4S_isSkippableMagicNumber(unsigned int magic) { return (magic & LZ4S_SKIPPABLEMASK) == LZ4S_SKIPPABLE0; }
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
77,116,368,568,285,130,000,000,000,000,000,000,000
1
Fixed : issue 52 (reported by Ludwig Strigeus)
pdf14_increment_smask_color(gs_gstate * pgs, gx_device * dev) { pdf14_device * pdev = (pdf14_device *) dev; pdf14_smaskcolor_t *result; gsicc_smask_t *smask_profiles = pgs->icc_manager->smask_profiles; int k; /* See if we have profiles already in place. Note we also have to worry about a c...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
124,711,849,421,028,640,000,000,000,000,000,000,000
89
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
pixOctcubeHistogram(PIX *pixs, l_int32 level, l_int32 *pncolors) { l_int32 size, i, j, w, h, wpl, ncolors, val; l_int32 rval, gval, bval; l_uint32 octindex; l_uint32 *rtab, *gtab, *btab; l_uint32 *data, *line; l_float32 *array; NUMA *na; PROCNAM...
0
[ "CWE-125" ]
leptonica
5ee24b398bb67666f6d173763eaaedd9c36fb1e5
243,149,280,325,064,530,000,000,000,000,000,000,000
72
Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow * color quantized pix must be 8 bpp before extra colors are added.
static int tls_check_one_certificate (const gnutls_datum_t *certdata, gnutls_certificate_status_t certstat, const char* hostname, int idx, int len) { int certerr, savedcert; gnutls_x509_crt_t cert; char buf[SHORT_STRING]; char fpbuf[SHO...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
99,629,037,762,507,960,000,000,000,000,000,000,000
288
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
smb2_compare_fids(struct cifsFileInfo *ob1, struct cifsFileInfo *ob2) { return ob1->fid.persistent_fid == ob2->fid.persistent_fid && ob1->fid.volatile_fid == ob2->fid.volatile_fid; }
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
131,405,844,268,545,220,000,000,000,000,000,000,000
5
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
int git_path_diriter_init( git_path_diriter *diriter, const char *path, unsigned int flags) { assert(diriter && path); memset(diriter, 0, sizeof(git_path_diriter)); if (git_buf_puts(&diriter->path, path) < 0) return -1; git_path_trim_slashes(&diriter->path); if (diriter->path.size == 0) { git_error_set(...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
29,490,553,003,577,957,000,000,000,000,000,000,000
36
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
bool is_result_field() { return false; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
327,054,049,896,576,900,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
parser_parse_import_statement (parser_context_t *context_p) /**< parser context */ { JERRY_ASSERT (context_p->token.type == LEXER_KEYW_IMPORT); JERRY_ASSERT (context_p->module_names_p == NULL); if (lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN)) { if (context_p->status_flags & PARSER_IS_FUNCTI...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
191,589,144,236,134,970,000,000,000,000,000,000,000
115
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
int ConnectionImpl::onMetadataReceived(int32_t stream_id, const uint8_t* data, size_t len) { ENVOY_CONN_LOG(trace, "recv {} bytes METADATA", connection_, len); StreamImpl* stream = getStream(stream_id); if (!stream) { return 0; } bool success = stream->getMetadataDecoder().receiveMetadata(data, len); ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
121,661,881,624,544,320,000,000,000,000,000,000,000
11
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
void perf_restore_debug_store(void) { struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds); if (!x86_pmu.bts && !x86_pmu.pebs) return; wrmsrl(MSR_IA32_DS_AREA, (unsigned long)ds); }
0
[ "CWE-755" ]
linux
d88d05a9e0b6d9356e97129d4ff9942d765f46ea
29,586,267,182,963,487,000,000,000,000,000,000,000
9
perf/x86/intel: Fix a crash caused by zero PEBS status A repeatable crash can be triggered by the perf_fuzzer on some Haswell system. https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/ For some old CPUs (HSW and earlier), the PEBS status in a PEBS record may be mistakenly set to 0. To minimiz...
static void rt_set_nexthop(struct rtable *rt, __be32 daddr, const struct fib_result *res, struct fib_nh_exception *fnhe, struct fib_info *fi, u16 type, u32 itag) { bool cached = false; if (fi) { struct fib_nh *nh = &FIB_RES_NH(*res); if (nh->nh_gw && nh->nh_scope == RT_SCOPE_LINK) { rt->rt_...
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
123,069,045,153,365,610,000,000,000,000,000,000,000
43
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; }
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
116,470,220,954,699,250,000,000,000,000,000,000,000
1
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
static int chkchildren(const mbentry_t *mbentry, void *rock) { const char *part = (const char *)rock; if (!strcmpnull(part, mbentry->partition)) return CYRUSDB_DONE; return 0; }
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
308,124,370,403,266,800,000,000,000,000,000,000,000
10
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static int dgram_rcv_skb(struct sock *sk, struct sk_buff *skb) { skb = skb_share_check(skb, GFP_ATOMIC); if (!skb) return NET_RX_DROP; if (sock_queue_rcv_skb(sk, skb) < 0) { kfree_skb(skb); return NET_RX_DROP; } return NET_RX_SUCCESS; }
0
[ "CWE-276" ]
linux
e69dbd4619e7674c1679cba49afd9dd9ac347eef
206,319,014,068,780,200,000,000,000,000,000,000,000
13
ieee802154: enforce CAP_NET_RAW for raw sockets When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron <orinimron123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: David S...
GF_Err tbox_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TextBoxBox*ptr = (GF_TextBoxBox*)s; e = gf_isom_box_write_header(s, bs); if (e) return e; gpp_write_box(bs, &ptr->box); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
114,485,298,541,856,940,000,000,000,000,000,000,000
9
fixed #1768
void mdesc_update(void) { unsigned long len, real_len, status; struct mdesc_handle *hp, *orig_hp; unsigned long flags; mutex_lock(&mdesc_mutex); (void) sun4v_mach_desc(0UL, 0UL, &len); hp = mdesc_alloc(len, &kmalloc_mdesc_memops); if (!hp) { printk(KERN_ERR "MD: mdesc alloc fails\n"); goto out; } statu...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
240,318,204,824,172,150,000,000,000,000,000,000,000
42
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
static void curl_block_init(void) { bdrv_register(&bdrv_http); bdrv_register(&bdrv_https); bdrv_register(&bdrv_ftp); bdrv_register(&bdrv_ftps); bdrv_register(&bdrv_tftp); }
0
[ "CWE-20" ]
qemu
6d4b9e55fc625514a38d27cff4b9933f617fa7dc
39,413,450,213,472,660,000,000,000,000,000,000,000
8
curl: check data size before memcpy to local buffer. (CVE-2014-0144) curl_read_cb is callback function for libcurl when data arrives. The data size passed in here is not guaranteed to be within the range of request we submitted, so we may overflow the guest IO buffer. Check the real size we have before memcpy to buffe...
static inline u32 nfsd4_getfh_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) { return (op_encode_hdr_size + 1) * sizeof(__be32) + NFS4_FHSIZE; }
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
337,330,572,685,903,300,000,000,000,000,000,000,000
4
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
void Compute(OpKernelContext* const context) override { ResourceHandle handle; OP_REQUIRES_OK(context, HandleFromInput(context, kResourceHandleName, &handle)); core::RefCountPtr<QuantileStreamResource> stream_resource; // Create a reference to the underlying resource using the handl...
0
[ "CWE-703", "CWE-681" ]
tensorflow
8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992
294,813,768,193,655,940,000,000,000,000,000,000,000
38
Ensure num_streams >= 0 in tf.raw_ops.BoostedTreesCreateQuantileStreamResource PiperOrigin-RevId: 387452765 Change-Id: I9990c760e177fabca6a3b9b4612ceeaeeba51495
static void ipa_udata_init(wmfAPI * API, wmfUserData_t * userdata) { (void) API; (void) userdata; /* wmf_magick_t* ddata = WMF_MAGICK_GetData (API); */ }
0
[ "CWE-772" ]
ImageMagick
b2b48d50300a9fbcd0aa0d9230fd6d7a08f7671e
44,998,399,730,869,675,000,000,000,000,000,000,000
7
https://github.com/ImageMagick/ImageMagick/issues/544
ipmi_sdr_print_sensor_fru_locator(struct sdr_record_fru_locator *fru) { char desc[17]; memset(desc, 0, sizeof (desc)); snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string); if (!verbose) { if (csv_output) printf("%s,00h,ns,%d.%d\n", fru->id_code ? desc : "", fru->entity.id, fru...
1
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
102,949,951,234,905,280,000,000,000,000,000,000,000
48
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...