func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) { struct inode *inode = udf_new_inode(dir, mode); if (IS_ERR(inode)) return PTR_ERR(inode); if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) inode->i_data.a_ops = &udf_adinicb_aops; else inode->i_data.a_...
0
[ "CWE-17" ]
linux
0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14
261,151,154,635,553,160,000,000,000,000,000,000,000
18
udf: Check path length when reading symlink Symlink reading code does not check whether the resulting path fits into the page provided by the generic code. This isn't as easy as just checking the symlink size because of various encoding conversions we perform on path. So we have to check whether there is still enough ...
amgtar_restore( application_argument_t *argument) { char *cmd; GPtrArray *argv_ptr = g_ptr_array_new(); GPtrArray *include_array = g_ptr_array_new(); char **env; int j; char *e; char *include_filename = NULL; char *exclude_filename = NULL; i...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
87,398,532,643,576,380,000,000,000,000,000,000,000
355
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
static void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp) { int val; ChardevVC *vc; vc = backend->u.vc.data = g_new0(ChardevVC, 1); qemu_chr_parse_common(opts, qapi_ChardevVC_base(vc)); val = qemu_opt_get_number(opts, "width", 0); if (va...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
225,602,035,546,576,400,000,000,000,000,000,000,000
33
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static inline void gen_string_movl_A0_ESI(DisasContext *s) { gen_lea_v_seg(s, s->aflag, cpu_regs[R_ESI], R_DS, s->override); }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
59,736,438,787,008,790,000,000,000,000,000,000,000
4
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
int x25_addr_aton(unsigned char *p, struct x25_address *called_addr, struct x25_address *calling_addr) { unsigned int called_len, calling_len; char *called, *calling; int i; called = called_addr->x25_addr; calling = calling_addr->x25_addr; called_len = strlen(called); calling_len = strlen(calling); *p+...
0
[]
net
7781607938c8371d4c2b243527430241c62e39c2
311,594,746,685,362,740,000,000,000,000,000,000,000
37
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
static inline int unix_recvq_full_lockless(const struct sock *sk) { return skb_queue_len_lockless(&sk->sk_receive_queue) > READ_ONCE(sk->sk_max_ack_backlog); }
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
210,114,821,505,408,100,000,000,000,000,000,000,000
5
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
TEST(Context, ResponseAttributes) { NiceMock<StreamInfo::MockStreamInfo> info; NiceMock<StreamInfo::MockStreamInfo> empty_info; const std::string header_name = "test-header"; const std::string trailer_name = "test-trailer"; const std::string grpc_status = "grpc-status"; Http::TestResponseHeaderMapImpl heade...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
141,580,274,282,794,310,000,000,000,000,000,000,000
154
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
insertEmphasisSymbol(const EmphasisInfo *buffer, const int at, const EmphRuleNumber emphRule, const EmphasisClass class, const TranslationTableHeader *table, int pos, const InString *input, OutString *output, int *posMapping, int *cursorPosition, int *cursorStatus) { if (buffer[at].symbol & class) { const Tran...
0
[ "CWE-125" ]
liblouis
5e4089659bb49b3095fa541fa6387b4c40d7396e
213,502,976,018,599,600,000,000,000,000,000,000,000
12
Fix a buffer overflow Fixes #635 Thanks to HongxuChen for reporting it
struct razer_report razer_chroma_extended_matrix_effect_spectrum(unsigned char variable_storage, unsigned char led_id) { return razer_chroma_extended_matrix_effect_base(0x06, variable_storage, led_id, 0x03); }
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
288,889,182,176,966,600,000,000,000,000,000,000,000
4
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
ModResult BuildChannelExempts(User* source, Channel* channel, SilenceEntry::SilenceFlags flag, CUList& exemptions) { const Channel::MemberMap& members = channel->GetUsers(); for (Channel::MemberMap::const_iterator member = members.begin(); member != members.end(); ++member) { if (!CanReceiveMessage(source, m...
0
[ "CWE-416" ]
inspircd
7b47de3c194f239c5fea09a0e49696c9af017d51
265,211,006,880,001,300,000,000,000,000,000,000,000
10
Copy the silence flags when sending update notifications. This fixes a crash bug in the silence module on some versions of GCC.
bool is_single_level_stmt() { /* This check exploits the fact that the last added to all_select_list is on its top. So select_lex (as the first added) will be at the tail of the list. */ if (first_select_lex() == all_selects_list && !sroutines.records) { return TRUE; ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
104,154,528,293,415,720,000,000,000,000,000,000,000
13
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static u64 window_update(struct psi_window *win, u64 now, u64 value) { u64 elapsed; u64 growth; elapsed = now - win->start_time; growth = value - win->start_value; /* * After each tracking window passes win->start_value and * win->start_time get reset and win->prev_growth stores * the average per-window gro...
0
[ "CWE-787" ]
linux
6fcca0fa48118e6d63733eb4644c6cd880c15b8f
237,718,834,551,464,350,000,000,000,000,000,000,000
25
sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasa...
TEST(LteOp, MatchesScalar) { BSONObj operand = BSON("$lte" << 5); LTEMatchExpression lte; ASSERT(lte.init("a", operand["$lte"]).isOK()); ASSERT(lte.matchesBSON(BSON("a" << 4.5), NULL)); ASSERT(!lte.matchesBSON(BSON("a" << 6), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
267,431,988,492,437,100,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
txtwrite_close_device(gx_device * dev) { int code = 0; gx_device_txtwrite_t *const tdev = (gx_device_txtwrite_t *) dev; if (tdev->file) { code = gx_device_close_output_file(dev, tdev->fname, tdev->file); tdev->file = 0; } #ifdef TRACE_TXTWRITE fclose(tdev->DebugFile); #endif re...
0
[ "CWE-476" ]
ghostpdl
407c98a38c3a6ac1681144ed45cc2f4fc374c91f
73,708,435,707,051,750,000,000,000,000,000,000,000
15
txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref" Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph name or Unicode code point from the glyph ID, as this is not a valid ID.
char **fill_out_embedded_options(PerlIO *stream, char *options, int options_type, int slen, int cnt) { int ind, len; char c; char *ptr; char **options_list= NULL; if (!(options_list= (char **) calloc(cnt, size...
0
[ "CWE-125" ]
DBD-mysql
793b72b1a0baa5070adacaac0e12fd995a6fbabe
127,592,390,388,094,670,000,000,000,000,000,000,000
53
Added Pali's fix for CVE-2016-1249
uint32_t readListEnd() { T_VIRTUAL_CALL(); return readListEnd_virt(); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
47,020,930,943,600,580,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
x509::x509(const x509& that) : length_(that.length_), buffer_(NEW_YS opaque[length_]) { memcpy(buffer_, that.buffer_, length_); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
279,346,414,943,726,130,000,000,000,000,000,000,000
5
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static int bond_change_mtu(struct net_device *bond_dev, int new_mtu) { struct bonding *bond = netdev_priv(bond_dev); struct slave *slave, *stop_at; int res = 0; int i; pr_debug("bond=%p, name=%s, new_mtu=%d\n", bond, (bond_dev ? bond_dev->name : "None"), new_mtu); /* Can't hold bond->lock with bh disabled he...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
292,448,247,504,670,340,000,000,000,000,000,000,000
66
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...
static __always_inline int __do_follow_link(struct path *path, struct nameidata *nd) { int error; void *cookie; struct dentry *dentry = path->dentry; touch_atime(path->mnt, dentry); nd_set_link(nd, NULL); if (path->mnt != nd->path.mnt) { path_to_nameidata(path, nd); dget(dentry); } mntget(path->mnt); coo...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
336,609,845,976,666,100,000,000,000,000,000,000,000
28
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
static int copy_from_user_sec_ctx(struct xfrm_policy *pol, struct nlattr **attrs) { struct nlattr *rt = attrs[XFRMA_SEC_CTX]; struct xfrm_user_sec_ctx *uctx; if (!rt) return 0; uctx = nla_data(rt); return security_xfrm_policy_alloc(&pol->security, uctx); }
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
97,559,453,261,071,910,000,000,000,000,000,000,000
11
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
int RGWPutObjRetention_ObjStore_S3::get_params() { const char *bypass_gov_header = s->info.env->get("HTTP_X_AMZ_BYPASS_GOVERNANCE_RETENTION"); if (bypass_gov_header) { std::string bypass_gov_decoded = url_decode(bypass_gov_header); bypass_governance_mode = boost::algorithm::iequals(bypass_gov_decoded, "true...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
71,460,423,336,566,270,000,000,000,000,000,000,000
12
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
// Return a random filename. inline const char* filenamerand() { cimg::mutex(6); static char randomid[9]; cimg::srand(); for (unsigned int k = 0; k<8; ++k) { const int v = (int)cimg::rand(65535)%3; randomid[k] = (char)(v==0?('0' + ((int)cimg::rand(65535)%10)): ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
152,501,843,865,933,450,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
cdf_namecmp(const char *d, const uint16_t *s, size_t l) { for (; l--; d++, s++) if (*d != CDF_TOLE2(*s)) return CAST(unsigned char, *d) - CDF_TOLE2(*s); return 0; }
0
[ "CWE-787" ]
file
46a8443f76cec4b41ec736eca396984c74664f84
19,221,926,245,309,407,000,000,000,000,000,000,000
7
Limit the number of elements in a vector (found by oss-fuzz)
int gnutls_x509_ext_export_authority_key_id(gnutls_x509_aki_t aki, gnutls_datum_t * ext) { ASN1_TYPE c2 = ASN1_TYPE_EMPTY; unsigned i; int result, ret; result = asn1_create_element(_gnutls_get_pkix(), "PKIX1.AuthorityKeyIdentifier", &c2); if (result != ASN1_SUCCESS) { gnutls_assert(); return _g...
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
257,966,216,721,729,000,000,000,000,000,000,000,000
74
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
void dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr) { memset(msg_hdr, 0, sizeof(*msg_hdr)); msg_hdr->type = *(data++); n2l3(data, msg_hdr->msg_len); n2s(data, msg_hdr->seq); n2l3(data, msg_hdr->frag_off); n2l3(data, msg_hdr->frag_len); }
0
[ "CWE-399" ]
openssl
df6b5e29ffea2d5a3e08de92fb765fdb21c7a21e
17,082,898,793,630,977,000,000,000,000,000,000,000
10
Excessive allocation of memory in dtls1_preprocess_fragment() This issue is very similar to CVE-2016-6307 described in the previous commit. The underlying defect is different but the security analysis and impacts are the same except that it impacts DTLS. A DTLS message includes 3 bytes for its length in the header fo...
static MemTxResult flatview_read(struct uc_struct *uc, FlatView *fv, hwaddr addr, MemTxAttrs attrs, void *buf, hwaddr len) { hwaddr l; hwaddr addr1; MemoryRegion *mr; l = len; mr = flatview_translate(uc, fv, addr, &addr1, &l, false, attrs); return flatview_read_...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
270,948,610,068,123,130,000,000,000,000,000,000,000
12
Fix crash when mapping a big memory and calling uc_close
static MagickBooleanType LoadOpenCLLibrary(void) { openCL_library=(MagickLibrary *) AcquireMagickMemory(sizeof(MagickLibrary)); if (openCL_library == (MagickLibrary *) NULL) return(MagickFalse); if (BindOpenCLFunctions() == MagickFalse) { openCL_library=(MagickLibrary *)RelinquishMagickMemory(openC...
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
318,331,230,720,128,030,000,000,000,000,000,000,000
14
https://github.com/ImageMagick/ImageMagick/issues/790
getOwnedSequences(Oid relid) { return getOwnedSequences_internal(relid, 0, 0); }
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
160,162,096,561,423,300,000,000,000,000,000,000,000
4
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset, struct pt_regs *regs, unsigned int save_r0) { int ret; /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) ret = setup_rt_frame(sig, ka, info, oldset, regs); else ret = setup_frame(sig, ka, oldset, reg...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
212,557,548,818,429,100,000,000,000,000,000,000,000
25
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...
void DL_Dxf::addImageDef(DL_CreationInterface* creationInterface) { DL_ImageDefData id(// handle getStringValue(5, ""), getStringValue(1, "")); creationInterface->linkImage(id); creationInterface->endEntity(); currentObjectType = DL_UNKNOWN; }
0
[ "CWE-191" ]
qcad
1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8
737,850,883,275,849,600,000,000,000,000,000,000
9
check vertexIndex which might be -1 for broken DXF
zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry, struct zip_entry *rsrc) { struct zip *zip = (struct zip *)a->format->data; unsigned char *metadata, *mp; int64_t offset = archive_filter_bytes(&a->archive, 0); size_t remaining_bytes, metadata_bytes; ssize_t hsize; int ret = ARCHIVE_OK...
0
[ "CWE-703", "CWE-125" ]
libarchive
cfaa28168a07ea4a53276b63068f94fce37d6aff
211,190,384,557,105,100,000,000,000,000,000,000,000
149
ZIP reader: fix possible out-of-bounds read in zipx_lzma_alone_init() Fixes #1672
int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len) { int i; SSL3_BUFFER *wb = s->rlayer.wbuf; unsigned int currbuf = 0; /* XXXX */ if ((s->rlayer.wpend_tot > (int)len) || ((s->rlayer.wpend_buf != buf) && !(s->mode & SSL_MODE_A...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
250,847,303,423,980,640,000,000,000,000,000,000,000
55
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
static pyc_object *get_int64_object(RzBuffer *buffer) { pyc_object *ret = NULL; bool error = false; st64 i; i = get_st64(buffer, &error); if (error) { return NULL; } ret = RZ_NEW0(pyc_object); if (!ret) { return NULL; } ret->type = TYPE_INT64; ret->data = rz_str_newf("%lld", i); if (!ret->data) { RZ...
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
222,192,142,938,341,100,000,000,000,000,000,000,000
21
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
unsigned int scalar7(const mp_func op, const unsigned int arg1, const unsigned int arg2, const unsigned int arg3, const unsigned int arg4, const unsigned int arg5, const unsigned int arg6, const unsigned int arg7) { const un...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
115,032,623,058,365,540,000,000,000,000,000,000,000
15
Fix other issues in 'CImg<T>::load_bmp()'.
static double mp_list_set_jxyzc(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width()); CImg<T> &img = mp.listout[ind]; const double ox = mp.mem[_cimg_mp_slot_x], oy = mp.mem[_cimg_mp_slot_y], oz = mp.mem[_cimg_mp_s...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
188,696,157,968,384,070,000,000,000,000,000,000,000
15
Fix other issues in 'CImg<T>::load_bmp()'.
static void add_stub(compiler_common *common, struct sljit_jump *start) { DEFINE_COMPILER; stub_list *list_item = sljit_alloc_memory(compiler, sizeof(stub_list)); if (list_item) { list_item->start = start; list_item->quit = LABEL(); list_item->next = common->stubs; common->stubs = list_item; } }
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
263,435,920,881,770,670,000,000,000,000,000,000,000
13
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_function, void* exec_payload, lxc_attach_options_t* options, pid_t* attached_process) { int ret, status; pid_t init_pid, pid, attached_pid, expected; struct lxc_proc_context_info *init_ctx; char* cwd; char* new_cwd; int ipc_sockets[2]; ...
0
[ "CWE-284", "CWE-264" ]
lxc
81f466d05f2a89cb4f122ef7f593ff3f279b165c
90,114,988,577,592,660,000,000,000,000,000,000,000
337
attach: do not send procfd to attached process So far, we opened a file descriptor refering to proc on the host inside the host namespace and handed that fd to the attached process in attach_child_main(). This was done to ensure that LSM labels were correctly setup. However, by exploiting a potential kernel bug, ptrac...
reallocarray (void *ptr, size_t nmemb, size_t size) { assert (nmemb >= 0 && size >= 0); if (nmemb != 0 && SIZE_MAX / nmemb < size) { errno = ENOMEM; return NULL; } return realloc (ptr, nmemb * size); }
0
[ "CWE-190" ]
p11-kit
bd670b1d4984b27d6a397b9ddafaf89ab26e4e7f
21,095,124,535,045,270,000,000,000,000,000,000,000
11
Follow-up to arithmetic overflow fix Check if nmemb is zero in p11_rpc_message_alloc_extra_array to avoid a division by zero trap. Additionally, change the reallocarray compatibility shim so that it won't assert when resizing an array to zero, and add the same nmemb != 0 check there.
static void init_packet(struct dhcp_packet *packet, struct dhcp_packet *oldpacket, char type) { /* Sets op, htype, hlen, cookie fields * and adds DHCP_MESSAGE_TYPE option */ udhcp_init_header(packet, type); packet->xid = oldpacket->xid; memcpy(packet->chaddr, oldpacket->chaddr, sizeof(oldpacket->chaddr)); packe...
0
[ "CWE-125" ]
busybox
6d3b4bb24da9a07c263f3c1acf8df85382ff562c
266,369,636,655,207,820,000,000,000,000,000,000,000
13
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506 function old new delta udhcp_get_option32 - 27 +27 udhcp_get_option 231 248 +17 ----------------------------------...
static inline ut32 r_read_at_be32(const void *src, size_t offset) { const ut8 *s = (const ut8*)src + offset; return r_read_be32 (s); }
0
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
180,549,059,250,806,980,000,000,000,000,000,000,000
4
Fix #6816 - null deref in r_read_*
OVS_REQUIRES(ct->ct_lock) { uint32_t hash = zone_key_hash(zone, ct->hash_basis); struct zone_limit *zl; HMAP_FOR_EACH_IN_BUCKET (zl, node, hash, &ct->zone_limits) { if (zl->czl.zone == zone) { return zl; } } return NULL; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
214,745,014,421,701,540,000,000,000,000,000,000,000
11
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
CairoOutputDev::~CairoOutputDev() { if (fontEngine_owner && fontEngine) { delete fontEngine; } if (cairo) cairo_destroy (cairo); cairo_pattern_destroy (stroke_pattern); cairo_pattern_destroy (fill_pattern); if (group) cairo_pattern_destroy (group); if (mask) cairo_pattern_destroy (mask); ...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
30,396,073,156,840,763,000,000,000,000,000,000,000
20
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
virtual void updateLineJoin(GfxState *state) { }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
132,522,023,769,210,750,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* isoc packet */ int len) /* iso packet length */ { struct sd *sd = (struct sd *) gspca_dev; switch (sd->bridge) { case BRIDGE_OV511: case BRIDGE_OV511PLUS: ov511_pkt_scan(gspca_dev, data, len); break; case BRIDGE_OV518: case BRIDGE_OV...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
42,331,720,888,348,710,000,000,000,000,000,000,000
26
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
static void device_flags_changed_callback(uint16_t index, uint16_t length, const void *param, void *user_data) { const struct mgmt_ev_device_flags_changed *ev = param; struct btd_adapter *adapter = user_data; struct btd_device *dev; char addr[18]; if (length < sizeof(*ev)) { btd_error(adapter->dev_id, ...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
319,080,921,451,922,860,000,000,000,000,000,000,000
26
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void zipfileDequote(char *zIn){ char q = zIn[0]; if( q=='"' || q=='\'' || q=='`' || q=='[' ){ int iIn = 1; int iOut = 0; if( q=='[' ) q = ']'; while( ALWAYS(zIn[iIn]) ){ char c = zIn[iIn++]; if( c==q && zIn[iIn++]!=q ) break; zIn[iOut++] = c; } zIn[iOut] = '\0'; } ...
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
328,181,401,712,467,700,000,000,000,000,000,000,000
14
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
bool map_attr_check_remote(const struct ldb_map_context *data, const char *attr) { const struct ldb_map_attribute *map = map_attr_find_local(data, attr); if (map == NULL) { return false; } if (map->type == LDB_MAP_IGNORE) { return false; } return true; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
318,696,331,066,436,260,000,000,000,000,000,000,000
13
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...
repodata_lookup_type(Repodata *data, Id solvid, Id keyname) { Id schema, *keyp, *kp; if (!maybe_load_repodata(data, keyname)) return 0; if (!solvid2data(data, solvid, &schema)) return 0; keyp = data->schemadata + data->schemata[schema]; for (kp = keyp; *kp; kp++) if (data->keys[*kp].name == keynam...
0
[ "CWE-125" ]
libsolv
fdb9c9c03508990e4583046b590c30d958f272da
143,016,637,106,929,410,000,000,000,000,000,000,000
13
repodata_schema2id: fix heap-buffer-overflow in memcmp When the length of last schema in data->schemadata is less than length of input schema, we got a read overflow in asan test. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
template<typename t, typename T> static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs, t *ptrd, const unsigned int wd, const unsigned int hd) { unsigned int *const offx = new unsigned int[wd], *const offy = new unsigned int[hd + 1], *poffx, ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
9,549,416,496,008,574,000,000,000,000,000,000,000
25
Fix other issues in 'CImg<T>::load_bmp()'.
struct dentry *d_alloc(struct dentry * parent, const struct qstr *name) { struct dentry *dentry = __d_alloc(parent->d_sb, name); if (!dentry) return NULL; dentry->d_flags |= DCACHE_RCUACCESS; spin_lock(&parent->d_lock); /* * don't need child lock because it is not subject * to concurrency here */ __dget_d...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
12,372,746,332,684,646,000,000,000,000,000,000,000
18
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
static inline int fxrstor_user(struct i387_fxsave_struct __user *fx) { if (config_enabled(CONFIG_X86_32)) return user_insn(fxrstor %[fx], "=m" (*fx), [fx] "m" (*fx)); else if (config_enabled(CONFIG_AS_FXSAVEQ)) return user_insn(fxrstorq %[fx], "=m" (*fx), [fx] "m" (*fx)); /* See comment in fpu_fxsave() below. *...
0
[ "CWE-284", "CWE-264" ]
linux
26bef1318adc1b3a530ecc807ef99346db2aa8b0
288,772,115,362,092,580,000,000,000,000,000,000,000
11
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Before we do an EMMS in the AMD FXSAVE information leak workaround we need to clear any pending exceptions, otherwise we trap with a floating-point exception inside this code. Reported-by: halfdog <me@halfdog.net> Tested-by: Borislav Petkov <bp@suse.de> Link: h...
static void check_active(struct ioat2_dma_chan *ioat) { struct ioat_chan_common *chan = &ioat->base; if (ioat2_ring_active(ioat)) { mod_timer(&chan->timer, jiffies + COMPLETION_TIMEOUT); return; } if (test_and_clear_bit(IOAT_CHAN_ACTIVE, &chan->state)) mod_timer(&chan->timer, jiffies + IDLE_TIMEOUT); else ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
256,086,590,058,035,900,000,000,000,000,000,000,000
25
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, netdev_features_t features) { struct sk_buff *segs = ERR_PTR(-EINVAL); unsigned int mss; __wsum csum; struct udphdr *uh; struct iphdr *iph; if (skb->encapsulation && (skb_shinfo(skb)->gso_type & (SKB_GSO_UDP_TUNNEL|SKB_GSO_UDP_TUNNEL_...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
249,793,079,692,174,650,000,000,000,000,000,000,000
72
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
TEST_F(TcpHealthCheckerImplTest, TimeoutWithoutReusingConnection) { InSequence s; setupDataDontReuseConnection(); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())}; expectSessionCreate(); expectClientCreate(); EXPECT_CALL(*connection...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
317,922,418,168,550,860,000,000,000,000,000,000,000
69
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
void CalculateOutputIndexValueRowID( OpKernelContext* context, const RowPartitionTensor& value_rowids, const vector<INDEX_TYPE>& parent_output_index, INDEX_TYPE output_index_multiplier, INDEX_TYPE output_size, vector<INDEX_TYPE>* result) { const INDEX_TYPE index_size = value_rowids.size();...
1
[ "CWE-131", "CWE-787" ]
tensorflow
c4d7afb6a5986b04505aca4466ae1951686c80f6
118,135,674,707,118,300,000,000,000,000,000,000,000
38
Fix heap OOB / undefined behavior in `RaggedTensorToTensor` PiperOrigin-RevId: 373244623 Change-Id: I2d6cbbc8c67b238a8815bf58097f7586d87c54f2
Opal::Call::toggle_stream_pause (StreamType type) { OpalMediaStreamPtr stream = NULL; PString codec_name; std::string stream_name; bool paused = false; PSafePtr<OpalConnection> connection = get_remote_connection (); if (connection != NULL) { stream = connection->GetMediaStream ((type == Audio) ? Opal...
0
[]
ekiga
7d09807257963a4f5168a01aec1795a398746372
97,956,245,149,561,970,000,000,000,000,000,000,000
26
Validate UTF-8 strings before showing them Closes bug #653009.
void *load_device_tree_from_sysfs(void) { void *host_fdt; int host_fdt_size; host_fdt = create_device_tree(&host_fdt_size); read_fstree(host_fdt, SYSFS_DT_BASEDIR); if (fdt_check_header(host_fdt)) { error_report("%s host device tree extracted into memory is invalid", __...
0
[ "CWE-119" ]
qemu
da885fe1ee8b4589047484bd7fa05a4905b52b17
194,002,945,219,724,240,000,000,000,000,000,000,000
14
device_tree.c: Don't use load_image() The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Revie...
dns_zone_setrcvquerystats(dns_zone_t *zone, dns_stats_t *stats) { REQUIRE(DNS_ZONE_VALID(zone)); LOCK_ZONE(zone); if (zone->requeststats_on && stats != NULL) { if (zone->rcvquerystats == NULL) { dns_stats_attach(stats, &zone->rcvquerystats); zone->requeststats_on = true; } } UNLOCK_ZONE(zone); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
170,840,649,747,708,900,000,000,000,000,000,000,000
13
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
Sequence(const std::vector<std::shared_ptr<Ope>> &opes) : opes_(opes) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
300,855,285,898,347,000,000,000,000,000,000,000,000
1
Fix #122
ldns_rr_list2str_fmt(const ldns_output_format *fmt, const ldns_rr_list *list) { char *result = NULL; ldns_buffer *tmp_buffer = ldns_buffer_new(LDNS_MAX_PACKETLEN); if (!tmp_buffer) { return NULL; } if (list) { if (ldns_rr_list2buffer_str_fmt( tmp_buffer, fmt, list) == LDNS_STATUS_OK) { } ...
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
325,845,452,361,313,980,000,000,000,000,000,000,000
27
CAA and URI
PyBytes_FromFormat(const char *format, ...) { PyObject* ret; va_list vargs; #ifdef HAVE_STDARG_PROTOTYPES va_start(vargs, format); #else va_start(vargs); #endif ret = PyBytes_FromFormatV(format, vargs); va_end(vargs); return ret; }
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
137,207,635,390,158,760,000,000,000,000,000,000,000
14
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
std::string help() const override { return "Used to update a user, for example to change its password"; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
159,397,457,367,307,330,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static void sr9700_set_multicast(struct net_device *netdev) { struct usbnet *dev = netdev_priv(netdev); /* We use the 20 byte dev->data for our 8 byte filter buffer * to avoid allocating memory that is tricky to free later */ u8 *hashes = (u8 *)&dev->data; /* rx_ctl setting : enable, disable_long, disable_crc *...
0
[]
linux
e9da0b56fe27206b49f39805f7dcda8a89379062
263,067,624,300,392,300,000,000,000,000,000,000,000
30
sr9700: sanity check for packet length A malicious device can leak heap data to user space providing bogus frame lengths. Introduce a sanity check. Signed-off-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Grant Grundler <grundler@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
static void node_lost_contact(struct tipc_node *n, struct sk_buff_head *inputq) { struct tipc_sock_conn *conn, *safe; struct tipc_link *l; struct list_head *conns = &n->conn_sks; struct sk_buff *skb; uint i; pr_debug("Lost contact with %x\n", n->addr); n->delete_at = jiffies + msecs_to_jiffies(NODE_CLE...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
113,427,308,451,920,440,000,000,000,000,000,000,000
40
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
void Box_iref::derive_box_version() { uint8_t version = 0; for (const auto& ref : m_references) { if (ref.from_item_ID > 0xFFFF) { version=1; break; } for (uint32_t r : ref.to_item_ID) { if (r > 0xFFFF) { version=1; break; } } } set_version(version); }
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
193,612,758,154,967,460,000,000,000,000,000,000,000
20
force fraction to a limited resolution to finally solve those pesky numerical edge cases
nv_bck_word(cmdarg_T *cap) { cap->oap->motion_type = MCHAR; cap->oap->inclusive = FALSE; curwin->w_set_curswant = TRUE; if (bck_word(cap->count1, cap->arg, FALSE) == FAIL) clearopbeep(cap->oap); #ifdef FEAT_FOLDING else if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP) foldOpen...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
308,391,840,162,165,470,000,000,000,000,000,000,000
12
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb, struct udphdr *uh, __be32 saddr, __be32 daddr, struct udp_table *udptable, int proto) { struct sock *sk, *stack[256 / sizeof(struct sock *)]; struct hlist_nulls_node *node; unsigned short hnum = ntohs(uh->dest)...
0
[ "CWE-358" ]
linux
197c949e7798fbf28cfadc69d9ca0c2abbf93191
315,852,470,003,936,130,000,000,000,000,000,000,000
61
udp: properly support MSG_PEEK with truncated buffers Backport of this upstream commit into stable kernels : 89c22d8c3b27 ("net: Fix skb csum races when peeking") exposed a bug in udp stack vs MSG_PEEK support, when user provides a buffer smaller than skb payload. In this case, skb_copy_and_csum_datagram_iovec(skb, s...
int sched_group_set_rt_period(struct task_group *tg, long rt_period_us) { u64 rt_runtime, rt_period; rt_period = (u64)rt_period_us * NSEC_PER_USEC; rt_runtime = tg->rt_bandwidth.rt_runtime; if (rt_period == 0) return -EINVAL; return tg_set_bandwidth(tg, rt_period, rt_runtime); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
281,745,270,053,122,520,000,000,000,000,000,000,000
12
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...
static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req, size_t *acl_len) { __be32 *savep; uint32_t attrlen, bitmap[2] = {0}; struct kvec *iov = req->rq_rcv_buf.head; int status; *acl_len = 0; if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) goto out; if ((status = decode_attr_bitmap(xdr...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
172,870,473,833,642,560,000,000,000,000,000,000,000
41
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void init_kvm_softmmu(struct kvm_vcpu *vcpu) { struct kvm_mmu *context = &vcpu->arch.root_mmu; struct kvm_mmu_role_regs regs = vcpu_to_role_regs(vcpu); kvm_init_shadow_mmu(vcpu, &regs); context->get_guest_pgd = get_cr3; context->get_pdptr = kvm_pdptr_read; context->inject_page_fault = kvm_inj...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
327,347,191,515,803,750,000,000,000,000,000,000,000
11
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
rsvg_filter_primitive_specular_lighting_free (RsvgNode * self) { RsvgFilterPrimitiveSpecularLighting *upself; upself = (RsvgFilterPrimitiveSpecularLighting *) self; g_string_free (upself->super.result, TRUE); g_string_free (upself->super.in, TRUE); _rsvg_node_free (self); }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
185,635,099,051,467,530,000,000,000,000,000,000,000
9
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, int flags, struct nfs_open_context *ctx) { struct nfs4_state_owner *sp = opendata->owner; struct nfs_server *server = sp->so_server; struct dentry *dentry; struct nfs4_state *state; fmode_t acc_mode = _nfs4_ctx_to_accessmode(ctx); struct inode ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
88,488,132,374,394,770,000,000,000,000,000,000,000
76
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
qb_rb_chunk_commit(struct qb_ringbuffer_s * rb, size_t len) { uint32_t old_write_pt; if (rb == NULL) { return -EINVAL; } /* * commit the magic & chunk_size */ old_write_pt = rb->shared_hdr->write_pt; rb->shared_data[old_write_pt] = len; /* * commit the new write pointer */ rb->shared_hdr->write_pt =...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
63,877,067,024,709,240,000,000,000,000,000,000,000
35
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
rb_f_chop_bang(str) VALUE str; { return rb_str_chop_bang(uscore_get()); }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
296,476,246,598,357,270,000,000,000,000,000,000,000
5
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ves_icall_get_attributes (MonoReflectionType *type) { MonoClass *klass = mono_class_from_mono_type (type->type); MONO_ARCH_SAVE_REGS; return klass->flags; }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
123,111,956,369,983,270,000,000,000,000,000,000,000
8
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection) { struct pop3_conn *pop3c= &conn->proto.pop3c; /* We cannot send quit unconditionally. If this connection is stale or bad in any way, sending quit and waiting around here will make the disconnect wait in vain and cause more p...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
249,431,156,892,942,600,000,000,000,000,000,000,000
19
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
static void sctp_addr_wq_timeout_handler(unsigned long arg) { struct net *net = (struct net *)arg; struct sctp_sockaddr_entry *addrw, *temp; struct sctp_sock *sp; spin_lock_bh(&net->sctp.addr_wq_lock); list_for_each_entry_safe(addrw, temp, &net->sctp.addr_waitq, list) { pr_debug("%s: the first ent in wq:%p is ...
0
[ "CWE-119", "CWE-787" ]
linux
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
306,591,684,740,840,500,000,000,000,000,000,000,000
59
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) ...
syslog_sigsafe(int priority, const char *msg, size_t msglen) { static int syslog_fd = -1; char buf[sizeof("<1234567890>ripngd[1234567890]: ")+msglen+50]; char *s; if ((syslog_fd < 0) && ((syslog_fd = syslog_connect()) < 0)) return; #define LOC s,buf+sizeof(buf)-s s = buf; s = str_append(LOC,"<"); s ...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
165,909,966,318,102,310,000,000,000,000,000,000,000
27
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static inline void adjust_tsc_offset_guest(struct kvm_vcpu *vcpu, s64 adjustment) { u64 tsc_offset = vcpu->arch.l1_tsc_offset; kvm_vcpu_write_tsc_offset(vcpu, tsc_offset + adjustment); }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
143,523,522,914,736,770,000,000,000,000,000,000,000
6
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
void addrconf_leave_solict(struct inet6_dev *idev, struct in6_addr *addr) { struct in6_addr maddr; if (idev->dev->flags&(IFF_LOOPBACK|IFF_NOARP)) return; addrconf_addr_solict_mult(addr, &maddr); __ipv6_dev_mc_dec(idev, &maddr); }
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
290,279,652,391,664,930,000,000,000,000,000,000,000
10
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
int main(int argc, char *argv[]) { int err = 0, r, c, long_optind = 0; int do_info = 0; int do_get_conf_entry = 0; int do_set_conf_entry = 0; int do_list_readers = 0; int do_list_drivers = 0; int do_list_files = 0; int do_send_apdu = 0; int do_print_atr = 0; int do_print_version = 0; int do_print_serial = 0;...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
21,364,646,990,279,130,000,000,000,000,000,000,000
233
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
m_local_df(union DateData *x) { if (simple_dat_p(x)) return 0; else { get_c_df(x); return local_df(x); } }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
186,592,217,340,400,500,000,000,000,000,000,000,000
9
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static void nsg_mrxu_parse_report(struct sony_sc *sc, u8 *rd, int size) { int n, offset, relx, rely; u8 active; /* * The NSG-MRxU multi-touch trackpad data starts at offset 1 and * the touch-related data starts at offset 2. * For the first byte, bit 0 is set when touchpad button is pressed. * Bit 2 is set...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
122,232,380,017,707,560,000,000,000,000,000,000,000
73
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
sign_hash(const struct private_key_stuff *pks , const u_char *hash_val, size_t hash_len , u_char *sig_val, size_t sig_len) { chunk_t ch; mpz_t t1; size_t padlen; u_char *p = sig_val; const struct RSA_private_key *k = &pks->u.RSA_private_key; DBG(DBG_CONTROL | DBG_CRYPT, DBG_log("signing ...
0
[ "CWE-347" ]
Openswan
9eaa6c2a823c1d2b58913506a15f9474bf857a3d
190,499,251,484,939,130,000,000,000,000,000,000,000
40
wo#7449 . verify padding contents for IKEv2 RSA sig check Special thanks to Sze Yiu Chau of Purdue University (schau@purdue.edu) who reported the issue.
void sched_move_task(struct task_struct *tsk) { int on_rq, running; unsigned long flags; struct rq *rq; rq = task_rq_lock(tsk, &flags); running = task_current(rq, tsk); on_rq = tsk->se.on_rq; if (on_rq) dequeue_task(rq, tsk, 0); if (unlikely(running)) tsk->sched_class->put_prev_task(rq, tsk); #ifdef CON...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
129,748,106,938,181,190,000,000,000,000,000,000,000
30
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...
static void adjust_link(struct net_device *dev) { struct gfar_private *priv = netdev_priv(dev); struct phy_device *phydev = dev->phydev; if (unlikely(phydev->link != priv->oldlink || (phydev->link && (phydev->duplex != priv->oldduplex || phydev->speed != priv->oldspeed)))) gfar_update_link_state...
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
281,191,560,872,727,900,000,000,000,000,000,000,000
10
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
ObjectComputeName( UINT32 size, // IN: the size of the area to digest BYTE *publicArea, // IN: the public area to digest TPM_ALG_ID nameAlg, // IN: the hash algorithm to use TPM2B_NAME *name // OUT: Computed name ) { // Hash the publicA...
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
147,341,238,967,145,260,000,000,000,000,000,000,000
16
tpm2: Initialize a whole OBJECT before using it Initialize a whole OBJECT before using it. This is necessary since an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT union and that HASH_OBJECT can leave bad size inidicators in TPM2B buffer in the OBJECT. To get rid of this problem we reset the whole OBJECT...
static gboolean sasl_reassemble_incoming(IRC_SERVER_REC *server, const char *fragment, GString **decoded) { GString *enc_req; gsize fragment_len; fragment_len = strlen(fragment); /* Check if there is an existing fragment to prepend. */ if (server->sasl_buffer != NULL) { if (g_strcmp0("+", fragment) == 0) { ...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
284,871,671,905,264,200,000,000,000,000,000,000,000
54
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
virDomainBlockJobAbort(virDomainPtr dom, const char *disk, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(dom, "disk=%s, flags=%x", disk, flags); virResetLastError(); virCheckDomainReturn(dom, -1); conn = dom->conn; virCheckReadOnlyGoto(conn->flags, error);...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
291,854,667,832,262,300,000,000,000,000,000,000,000
29
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
void virtio_gpu_process_cmdq(VirtIOGPU *g) { struct virtio_gpu_ctrl_command *cmd; while (!QTAILQ_EMPTY(&g->cmdq)) { cmd = QTAILQ_FIRST(&g->cmdq); /* process command */ VIRGL(g, virtio_gpu_virgl_process_cmd, virtio_gpu_simple_process_cmd, g, cmd); if (cmd->waiting)...
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
207,934,389,998,784,580,000,000,000,000,000,000,000
32
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
static inline int mount_entry_on_systemfs(struct mntent *mntent) { return mount_entry_on_generic(mntent, mntent->mnt_dir, NULL); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
205,260,484,344,746,500,000,000,000,000,000,000,000
4
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void synic_init(struct kvm_vcpu_hv_synic *synic) { int i; memset(synic, 0, sizeof(*synic)); synic->version = HV_SYNIC_VERSION_1; for (i = 0; i < ARRAY_SIZE(synic->sint); i++) { atomic64_set(&synic->sint[i], HV_SYNIC_SINT_MASKED); atomic_set(&synic->sint_to_gsi[i], -1); } }
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
227,755,418,898,628,300,000,000,000,000,000,000,000
11
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
replace_readwrite_async_thread (GTask *task, gpointer object, gpointer task_data, GCancellable *cancellable) { GFileIOStream *stream; GError *error = NULL; ReplaceRWAsyncData *data = task_data; stre...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
256,426,136,109,616,100,000,000,000,000,000,000,000
21
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
read_signature(cdk_stream_t inp, size_t pktlen, cdk_pkt_signature_t sig) { size_t nbytes; size_t i, nsig; ssize_t size; cdk_error_t rc; if (!inp || !sig) return gnutls_assert_val(CDK_Inv_Value); if (DEBUG_PKT) _gnutls_write_log("read_signature: %d octets\n", (int) pktlen); if (pktlen < 16) return ...
0
[ "CWE-119" ]
gnutls
94fcf1645ea17223237aaf8d19132e004afddc1a
172,503,192,860,254,520,000,000,000,000,000,000,000
87
opencdk: read_attribute: added more precise checks when reading stream That addresses heap read overflows found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
static void subpage_write(void *opaque, hwaddr addr, uint64_t value, unsigned len) { subpage_t *subpage = opaque; uint8_t buf[8]; #if defined(DEBUG_SUBPAGE) printf("%s: subpage %p len %u addr " TARGET_FMT_plx " value %"PRIx64"\n", __func__, subpage, len, addr...
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
110,323,293,291,119,680,000,000,000,000,000,000,000
29
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
void ssh_reseed(void){ }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
291,255,402,854,087,080,000,000,000,000,000,000,000
2
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
XML_GetCurrentColumnNumber(XML_Parser parser) { if (parser == NULL) return 0; if (parser->m_eventPtr && parser->m_eventPtr >= parser->m_positionPtr) { XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr, parser->m_eventPtr, &parser->m_position); parser->m_positionPtr = pars...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
299,791,044,091,602,560,000,000,000,000,000,000,000
10
xmlparse.c: Deny internal entities closing the doctype
uint32_t CompactProtocolWriter::serializedSizeZCBinary( folly::ByteRange v) const { return serializedSizeBinary(v); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
81,529,957,751,399,490,000,000,000,000,000,000,000
4
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static int report_consumption_iter(void *ctx, void *val) { h2_stream *stream = val; h2_mplx *m = ctx; input_consumed_signal(m, stream); if (stream->state == H2_SS_CLOSED_L && (!stream->task || stream->task->worker_done)) { ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, ...
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
245,037,540,647,311,800,000,000,000,000,000,000,000
15
* Fixed keepalives counter on slave connections.
getenv_TZ (void) { return getenv ("TZ"); }
0
[]
gnulib
94e01571507835ff59dd8ce2a0b56a4b566965a4
288,769,467,144,585,940,000,000,000,000,000,000,000
4
time_rz: fix heap buffer overflow vulnerability This issue has been assigned CVE-2017-7476 and was detected with American Fuzzy Lop 2.41b run on the coreutils date(1) program with ASAN enabled. ERROR: AddressSanitizer: heap-buffer-overflow on address 0x... WRITE of size 8 at 0x60d00000cff8 thread T0 #1 0x443020...