func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline void php_rshutdown_session_globals(void) /* {{{ */ { /* Do NOT destroy PS(mod_user_names) here! */ if (!Z_ISUNDEF(PS(http_session_vars))) { zval_ptr_dtor(&PS(http_session_vars)); ZVAL_UNDEF(&PS(http_session_vars)); } if (PS(mod_data) || PS(mod_user_implemented)) { zend_try { PS(mod)->s_close(...
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
298,915,846,243,078,840,000,000,000,000,000,000,000
26
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
static int kvm_s390_get_processor_feat(struct kvm *kvm, struct kvm_device_attr *attr) { struct kvm_s390_vm_cpu_feat data; bitmap_copy((unsigned long *) data.feat, kvm->arch.cpu_feat, KVM_S390_VM_CPU_FEAT_NR_BITS); if (copy_to_user((void __user *)attr->addr, &data, sizeof(data))) return -EFAULT; ...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
150,446,124,215,237,600,000,000,000,000,000,000,000
15
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
Error Box::read(BitstreamRange& range, std::shared_ptr<heif::Box>* result) { BoxHeader hdr; Error err = hdr.parse(range); if (err) { return err; } if (range.error()) { return range.get_error(); } std::shared_ptr<Box> box; switch (hdr.get_short_type()) { case fourcc("ftyp"): box = std::m...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
295,239,952,439,667,560,000,000,000,000,000,000,000
176
force fraction to a limited resolution to finally solve those pesky numerical edge cases
resolve_iffeature_recursive(struct lys_iffeature *expr, int *index_e, int *index_f) { uint8_t op; int a, b; op = iff_getop(expr->expr, *index_e); (*index_e)++; switch (op) { case LYS_IFF_F: /* resolve feature */ return resolve_feature_value(expr->features[(*index_f)++]); ca...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
148,887,455,222,625,240,000,000,000,000,000,000,000
28
schema tree BUGFIX do not check features while still resolving schema Fixes #723
static int sctp_eat_data(const struct sctp_association *asoc, struct sctp_chunk *chunk, sctp_cmd_seq_t *commands) { sctp_datahdr_t *data_hdr; struct sctp_chunk *err; size_t datalen; sctp_verb_t deliver; int tmp; __u32 tsn; struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map; struct sock ...
0
[ "CWE-125" ]
linux
bf911e985d6bbaa328c20c3e05f4eb03de11fdd6
232,772,277,779,990,600,000,000,000,000,000,000,000
207
sctp: validate chunk len before actually using it Andrey Konovalov reported that KASAN detected that SCTP was using a slab beyond the boundaries. It was caused because when handling out of the blue packets in function sctp_sf_ootb() it was checking the chunk len only after already processing the first chunk, validatin...
bool operator!=(const LowerCaseString& rhs) const { return string_ != rhs.string_; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
19,535,025,312,875,477,000,000,000,000,000,000,000
1
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...
static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh) { return DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : sizeof(struct dccp_hdr); }
0
[ "CWE-125" ]
tcpdump
211124b972e74f0da66bc8b16f181f78793e2f66
20,802,706,472,144,924,000,000,000,000,000,000,000
4
(for 4.9.3) CVE-2018-16229/DCCP: Fix printing "Timestamp" and "Timestamp Echo" options Add some comments. Moreover: Put a function definition name at the beginning of the line. (This change was ported from commit 6df4852 in the master branch.) Ryan Ackroyd had independently identified this buffer over-read later by...
static int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop) { cirrus_fill_t rop_func; if (blit_is_unsafe(s, true)) { return 0; } rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; rop_func(s, s->cirrus_blt_dstaddr, s->cirrus_blt_dstpitch, ...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
260,921,312,717,718,700,000,000,000,000,000,000,000
17
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
static void virgl_cmd_resource_unref(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_resource_unref unref; VIRTIO_GPU_FILL_CMD(unref); trace_virtio_gpu_cmd_res_unref(unref.resource_id); virgl_renderer_resource_unref(unref.resource_id); }
0
[]
qemu
2fe760554eb3769d70f608a158474f728ba45ba6
167,456,952,717,316,500,000,000,000,000,000,000,000
10
virtio-gpu: check max_outputs only The scanout id should not be above the configured num_scanouts. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
LEX::sp_block_with_exceptions_finalize_exceptions(THD *thd, uint executable_section_ip, uint exception_count) { if (!exception_count) { /* The jump from the end of DECLARE section to the beginning of ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
116,671,775,302,740,350,000,000,000,000,000,000,000
21
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 int check_chain_extensions(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else int i, ok = 0, must_be_ca, plen = 0; X509 *x; int (*cb) (int xok, X509_STORE_CTX *xctx); int proxy_path_length = 0; int purpose; int allow_proxy_certs; cb = ctx->verify_cb; /*- ...
0
[ "CWE-119" ]
openssl
370ac320301e28bb615cee80124c042649c95d14
119,797,870,211,312,460,000,000,000,000,000,000,000
146
Fix length checks in X509_cmp_time to avoid out-of-bounds reads. Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
__execlists_schedule_in(struct i915_request *rq) { struct intel_engine_cs * const engine = rq->engine; struct intel_context * const ce = rq->hw_context; intel_context_get(ce); if (unlikely(i915_gem_context_is_banned(ce->gem_context))) reset_active(rq, engine); if (ce->tag) { /* Use a fixed tag for OA and fr...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
289,174,408,578,723,100,000,000,000,000,000,000,000
28
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
//! Access to a pixel value, using Dirichlet boundary conditions for the X and Y coordinates \const. T atXY(const int x, const int y, const int z, const int c, const T& out_value) const { return (x<0 || y<0 || x>=width() || y>=height())?out_value:(*this)(x,y,z,c);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
37,293,057,100,700,840,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
napi_status napi_get_and_clear_last_exception(napi_env env, napi_value* result) { // NAPI_PREAMBLE is not used here: this function must execute when there is a // pending exception. CHECK_ENV(env); CHECK_ARG(env, result); if (env->last_exception.IsEmpty()) { ...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
207,320,527,338,890,680,000,000,000,000,000,000,000
17
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
rte_vhost_dequeue_burst(int vid, uint16_t queue_id, struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count) { struct virtio_net *dev; struct rte_mbuf *rarp_mbuf = NULL; struct vhost_virtqueue *vq; int16_t success = 1; dev = get_device(vid); if (!dev) return 0; if (unlikely(!(dev->flags & VIRT...
0
[ "CWE-665" ]
dpdk
97ecc1c85c95c13bc66a87435758e93406c35c48
42,929,287,906,204,640,000,000,000,000,000,000,000
103
vhost: fix translated address not checked Malicious guest can construct desc with invalid address and zero buffer length. That will request vhost to check both translated address and translated data length. This patch will add missed address check. CVE-2020-10725 Fixes: 75ed51697820 ("vhost: add packed ring batch deq...
safeputchar(netdissect_options *ndo, const u_char c) { ND_PRINT((ndo, (c < 0x80 && ND_ISPRINT(c)) ? "%c" : "\\0x%02x", c)); }
0
[ "CWE-119", "CWE-125" ]
tcpdump
9f0730bee3eb65d07b49fd468bc2f269173352fe
32,897,358,851,093,120,000,000,000,000,000,000,000
5
CVE-2017-13011/Properly check for buffer overflow in bittok2str_internal(). Also, make the buffer bigger. This fixes a buffer overflow discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s), modified so the capture file won't be rejected as an invalid capture.
auth_passdb_preinit(struct auth *auth, const struct auth_passdb_settings *set, struct auth_passdb **passdbs) { struct auth_passdb *auth_passdb, **dest; auth_passdb = p_new(auth->pool, struct auth_passdb, 1); auth_passdb->set = set; auth_passdb->skip = auth_passdb_skip_parse(set->skip); auth_passdb->result_s...
1
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
156,512,071,185,038,900,000,000,000,000,000,000,000
38
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
sec_send_to_channel(STREAM s, uint32 flags, uint16 channel) { int datalen; #ifdef WITH_SCARD scard_lock(SCARD_LOCK_SEC); #endif s_pop_layer(s, sec_hdr); if ((!g_licence_issued && !g_licence_error_result) || (flags & SEC_ENCRYPT)) out_uint32_le(s, flags); if (flags & SEC_ENCRYPT) { flags &= ~SEC_ENCRYPT; ...
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
278,561,334,332,625,300,000,000,000,000,000,000,000
26
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
archive_wstring_append_from_mbs(struct archive_wstring *dest, const char *p, size_t len) { size_t r; int ret_val = 0; /* * No single byte will be more than one wide character, * so this length estimate will always be big enough. */ // size_t wcs_length = len; size_t mbs_length = len; const char *mbs = p...
0
[ "CWE-125" ]
libarchive
22b1db9d46654afc6f0c28f90af8cdc84a199f41
211,137,499,884,441,500,000,000,000,000,000,000,000
67
Bugfix and optimize archive_wstring_append_from_mbs() The cal to mbrtowc() or mbtowc() should read up to mbs_length bytes and not wcs_length. This avoids out-of-bounds reads. mbrtowc() and mbtowc() return (size_t)-1 wit errno EILSEQ when they encounter an invalid multibyte character and (size_t)-2 when they they enco...
int rand_neg(void) { static unsigned int neg=0; static int sign[8]={0,0,0,1,1,0,1,1}; return(sign[(neg++)%8]); }
0
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
1,887,810,031,169,346,000,000,000,000,000,000,000
7
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
static int check_packet_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed) { struct bpf_reg_state *regs = cur_regs(env); struct bpf_reg_state *reg = &regs[regno]; int err; /* We may have added a variable offset to the packet pointer; but any * reg->range we have ...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
78,850,894,611,116,180,000,000,000,000,000,000,000
27
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
decompileRETURN(int n, SWF_ACTION *actions, int maxn) { struct SWF_ACTIONPUSHPARAM *var=pop(); INDENT printf("return "); if (var->Type== PUSH_REGISTER && var->p.RegisterNumber==0) /* REGISTER 0 used as helper variable */ puts(getName(regs[0])); else decompilePUSHPARAM(var,1); ...
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
335,812,911,416,141,260,000,000,000,000,000,000,000
12
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
wc_push_to_iso2022(Str os, wc_wchar_t cc, wc_status *st) { wc_uchar g = 0; wc_bool is_wide = WC_FALSE, retry = WC_FALSE; wc_wchar_t cc2; while (1) { switch (WC_CCS_TYPE(cc.ccs)) { case WC_CCS_A_CS94: if (cc.ccs == WC_CCS_US_ASCII) cc.ccs = st->g0_ccs; g = cs94_gmap[WC_CCS_INDEX(cc.ccs) - W...
1
[ "CWE-125" ]
w3m
9cf6926c5d947371dc9e44f32bc7a2fbfca5d469
325,428,912,520,925,300,000,000,000,000,000,000,000
104
Prevent segfault when iso2022 parsing Bug-Debian: https://github.com/tats/w3m/issues/14
int ssl_check_serverhello_tlsext(SSL *s) { int ret = SSL_TLSEXT_ERR_NOACK; int al = SSL_AD_UNRECOGNIZED_NAME; # ifndef OPENSSL_NO_EC /* * If we are client and using an elliptic curve cryptography cipher * suite, then if server returns an EC point formats lists extension it * must contain unc...
0
[ "CWE-190" ]
openssl
a004e72b95835136d3f1ea90517f706c24c03da7
285,926,458,515,540,360,000,000,000,000,000,000,000
116
Avoid some undefined pointer arithmetic A common idiom in the codebase is: if (p + len > limit) { return; /* Too long */ } Where "p" points to some malloc'd data of SIZE bytes and limit == p + SIZE "len" here could be from some externally supplied data (e.g. from a TLS message). The rules of C pointer arithmet...
void ImapModelOpenConnectionTest::init() { Common::registerMetaTypes(); qRegisterMetaType<Imap::Mailbox::ImapTask*>(); init( false ); }
0
[ "CWE-200" ]
trojita
25fffa3e25cbad85bbca804193ad336b090a9ce1
5,849,290,766,125,094,000,000,000,000,000,000,000
6
IMAP: refuse to work when STARTTLS is required but server sends PREAUTH Oops, we cannot send STARTTLS when the connection is already authenticated. This is serious enough to warrant an error; an attacker might be going after a plaintext of a message we're going to APPEND, etc. Thanks to Arnt Gulbrandsen on the imap-p...
__acquires(ping_table.lock) { struct ping_iter_state *state = seq->private; state->bucket = 0; state->family = family; read_lock_bh(&ping_table.lock); return *pos ? ping_get_idx(seq, *pos-1) : SEQ_START_TOKEN; }
0
[ "CWE-284" ]
linux
0eab121ef8750a5c8637d51534d5e9143fb0633f
33,598,281,230,202,883,000,000,000,000,000,000,000
10
net: ping: check minimum size on ICMP header length Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there was no check that the iovec contained enough bytes for an ICMP header, and the read loop would walk across neighboring stack contents. Since the iov_iter conversion, bad arguments are noticed, ...
static int process_io_create_file(Master_info* mi, Create_file_log_event* cev) { int error = 1; ulong num_bytes; bool cev_not_written; THD *thd = mi->info_thd; NET *net = &mi->mysql->net; DBUG_ENTER("process_io_create_file"); mysql_mutex_assert_owner(&mi->data_lock); if (unlikely(!cev->is_valid())) ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
279,132,332,123,577,500,000,000,000,000,000,000,000
105
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
int ssl3_setup_read_buffer(SSL *s) { unsigned char *p; size_t len, align = 0, headerlen; if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER) headerlen = DTLS1_RT_HEADER_LENGTH; else headerlen = SSL3_RT_HEADER_LENGTH; #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAY...
0
[ "CWE-125" ]
openssl
bb1a4866034255749ac578adb06a76335fc117b1
110,576,805,634,807,810,000,000,000,000,000,000,000
38
Make message buffer slightly larger than message. Grow TLS/DTLS 16 bytes more than strictly necessary as a precaution against OOB reads. In most cases this will have no effect because the message buffer will be large enough already. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 006a788c84e54...
hb_set_clear (hb_set_t *set) { if (unlikely (hb_object_is_immutable (set))) return; set->clear (); }
1
[ "CWE-787" ]
harfbuzz
d3e09bf4654fe5478b6dbf2b26ebab6271317d81
227,010,932,939,962,460,000,000,000,000,000,000,000
7
[set] Make all operators null-safe again Changed my mind. Also for hb_map_clear(). Part of https://github.com/harfbuzz/harfbuzz/pull/3162
FOR_EACH_MODULE_Type(CUser* pUser) : CMuser(pUser ? pUser->GetModules() : CMtemp), CMnet(CMtemp) { where = AtGlobal; }
0
[ "CWE-703" ]
znc
2bd410ee5570cea127233f1133ea22f25174eb28
85,736,973,768,119,330,000,000,000,000,000,000,000
3
Fix NULL pointer dereference in webadmin. Triggerable by any non-admin, if webadmin is loaded. The only affected version is 1.0 Thanks to ChauffeR (Simone Esposito) for reporting this.
circle_contained(PG_FUNCTION_ARGS) { CIRCLE *circle1 = PG_GETARG_CIRCLE_P(0); CIRCLE *circle2 = PG_GETARG_CIRCLE_P(1); PG_RETURN_BOOL(FPle((point_dt(&circle1->center, &circle2->center) + circle1->radius), circle2->radius)); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
75,947,659,685,400,330,000,000,000,000,000,000,000
7
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
char *cgi_user_name(void) { return(C_user); }
0
[]
samba
91f4275873ebeda8f57684f09df67162ae80515a
288,332,290,572,924,100,000,000,000,000,000,000,000
4
swat: Use additional nonce on XSRF protection If the user had a weak password on the root account of a machine running SWAT, there still was a chance of being targetted by an XSRF on a malicious web site targetting the SWAT setup. Use a random nonce stored in secrets.tdb to close this possible attack window. Thanks t...
static inline bool llc_listener_match(const struct llc_sap *sap, const struct llc_addr *laddr, const struct sock *sk) { struct llc_sock *llc = llc_sk(sk); return sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN && llc->laddr.lsap == laddr->lsap && ether_addr_equal(llc->laddr.mac, ladd...
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
73,731,037,877,152,370,000,000,000,000,000,000,000
10
net/llc: avoid BUG_ON() in skb_orphan() It seems nobody used LLC since linux-3.12. Fortunately fuzzers like syzkaller still know how to run this code, otherwise it would be no fun. Setting skb->sk without skb->destructor leads to all kinds of bugs, we now prefer to be very strict about it. Ideally here we would use...
Item_bool_rowready_func2 *Eq_creator::create(THD *thd, Item *a, Item *b) const { return new(thd->mem_root) Item_func_eq(thd, a, b); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
273,694,202,386,092,000,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd) { if (unlikely(IS_PRIVATE(dentry->d_inode))) return 0; return security_ops->inode_follow_link(dentry, nd); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
297,342,549,866,226,940,000,000,000,000,000,000,000
6
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...
HiiSetImage ( IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN CONST EFI_IMAGE_INPUT *Image ) { HII_DATABASE_PRIVATE_DATA *Private; HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode; H...
1
[ "CWE-787" ]
edk2
ffe5f7a6b4e978dffbe1df228963adc914451106
114,887,428,051,252,140,000,000,000,000,000,000,000
142
MdeModulePkg/HiiDatabase: Fix potential integer overflow (CVE-2018-12181) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu ...
_zip_cdir_free(zip_cdir_t *cd) { zip_uint64_t i; if (!cd) return; for (i=0; i<cd->nentry; i++) _zip_entry_finalize(cd->entry+i); free(cd->entry); _zip_string_free(cd->comment); free(cd); }
0
[ "CWE-416", "CWE-415" ]
libzip
2217022b7d1142738656d891e00b3d2d9179b796
265,922,523,187,970,800,000,000,000,000,000,000,000
13
Fix double free(). Found by Brian 'geeknik' Carpenter using AFL.
int rxe_mem_copy(struct rxe_mem *mem, u64 iova, void *addr, int length, enum copy_direction dir, u32 *crcp) { int err; int bytes; u8 *va; struct rxe_map **map; struct rxe_phys_buf *buf; int m; int i; size_t offset; u32 crc = crcp ? (*crcp) : 0; if (length == 0) return 0; if (mem->type =...
0
[ "CWE-190" ]
linux
647bf3d8a8e5777319da92af672289b2a6c4dc66
30,797,923,181,475,397,000,000,000,000,000,000,000
85
IB/rxe: Fix mem_check_range integer overflow Update the range check to avoid integer-overflow in edge case. Resolves CVE 2016-8636. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <d...
camel_imapx_server_expunge_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, GCancellable *cancellable, GError **error) { CamelFolder *folder; gboolean success; g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE); g_return_val_if_fail (CAMEL_IS_IMAPX_MAILBOX (mailbox), FALSE); folder = ...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
268,390,174,411,140,640,000,000,000,000,000,000,000
71
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
Value ExpressionStrLenBytes::evaluate(const Document& root) const { Value str(vpOperand[0]->evaluate(root)); uassert(34473, str::stream() << "$strLenBytes requires a string argument, found: " << typeName(str.getType()), str.getType() == String); size_t str...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
123,161,850,400,931,600,000,000,000,000,000,000,000
15
SERVER-38070 fix infinite loop in agg expression
void path_get(struct path *path) { mntget(path->mnt); dget(path->dentry); }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
309,650,988,657,268,970,000,000,000,000,000,000,000
5
[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...
int ipmi_si_port_setup(struct si_sm_io *io) { unsigned int addr = io->addr_data; int idx; if (!addr) return -ENODEV; io->io_cleanup = port_cleanup; /* * Figure out the actual inb/inw/inl/etc routine to use based * upon the register size. */ switch (io->regsize) { case 1: io->inputb = port_i...
1
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
17,349,846,300,182,796,000,000,000,000,000,000,000
51
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static inline void set_raw_inline(struct inode *inode, struct f2fs_inode *ri) { ri->i_inline = 0; if (is_inode_flag_set(inode, FI_INLINE_XATTR)) ri->i_inline |= F2FS_INLINE_XATTR; if (is_inode_flag_set(inode, FI_INLINE_DATA)) ri->i_inline |= F2FS_INLINE_DATA; if (is_inode_flag_set(inode, FI_INLINE_DENTRY)) r...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
234,598,705,803,949,830,000,000,000,000,000,000,000
19
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
int gethostbyname2_r(const char *name, int family, struct hostent *result_buf, char *buf, size_t buflen, struct hostent **result, int *h_errnop) { #ifndef __UCLIBC_HAS_IPV6__ return family == (AF_INET) ? gethostbyname_r(name, result_buf, buf, buflen, result, h_errnop) : HOST_NOT_FOUND; #else struct in...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
186,841,751,487,982,540,000,000,000,000,000,000,000
193
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
e_ews_connection_get_password (EEwsConnection *cnc) { g_return_val_if_fail (E_IS_EWS_CONNECTION (cnc), NULL); return cnc->priv->password; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
278,425,899,841,075,940,000,000,000,000,000,000,000
6
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static void S_cleanup_regmatch_info_aux(pTHX_ void *arg) { regmatch_info_aux *aux = (regmatch_info_aux *) arg; regmatch_info_aux_eval *eval_state = aux->info_aux_eval; regmatch_slab *s; Safefree(aux->poscache); if (eval_state) { /* undo the effects of S_setup_eval_state() */ if ...
0
[ "CWE-416" ]
perl5
22b433eff9a1ffa2454e18405a56650f07b385b5
6,450,511,424,779,486,000,000,000,000,000,000,000
51
PATCH [perl #123562] Regexp-matching "hangs" The regex engine got into an infinite loop because of the malformation. It is trying to back-up over a sequence of UTF-8 continuation bytes. But the character just before the sequence should be a start byte. If not, there is a malformation. I added a test to croak if that...
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert) { STACK_OF(CMS_RecipientInfo) *ris; CMS_RecipientInfo *ri; int i, r, ri_type; int debug = 0, match_ri = 0; ris = CMS_get0_RecipientInfos(cms); if (ris) debug = cms->d.envelopedData->encryptedContentInfo->debug; ...
0
[ "CWE-311", "CWE-327" ]
openssl
08229ad838c50f644d7e928e2eef147b4308ad64
149,066,707,862,817,280,000,000,000,000,000,000,000
70
Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the mess...
CascadeClassifierImpl::Data::Data() { stageType = featureType = ncategories = maxNodesPerTree = minNodesPerTree = 0; }
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
282,793,383,050,998,800,000,000,000,000,000,000,000
4
objdetect: validate feature rectangle on reading
my_gnutls_write (gnutls_transport_ptr_t ptr, const void *buffer, size_t size) { my_socket_t sock = ptr; #if USE_NPTH return npth_write (sock->fd, buffer, size); #else return write (sock->fd, buffer, size); #endif }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
103,380,745,953,053,840,000,000,000,000,000,000,000
9
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
gnutls_ocsp_resp_get_signature(gnutls_ocsp_resp_t resp, gnutls_datum_t * sig) { int ret; if (resp == NULL || sig == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } ret = _gnutls_x509_read_value(resp->basicresp, "signature", sig); if (ret != GNUTLS_E_SUCCESS) { gnutls_assert(); retur...
0
[ "CWE-264" ]
gnutls
964632f37dfdfb914ebc5e49db4fa29af35b1de9
275,804,895,690,179,630,000,000,000,000,000,000,000
18
ocsp: corrected the comparison of the serial size in OCSP response Previously the OCSP certificate check wouldn't verify the serial length and could succeed in cases it shouldn't. Reported by Stefan Buehler.
static int dns_packet_read_type_window(DnsPacket *p, Bitmap **types, size_t *start) { uint8_t window; uint8_t length; const uint8_t *bitmap; uint8_t bit = 0; unsigned i; bool found = false; _cleanup_(rewind_dns_packet) DnsPacketRewinder rewinder; int r; ...
0
[ "CWE-20", "CWE-476" ]
systemd
a924f43f30f9c4acaf70618dd2a055f8b0f166be
41,529,355,916,370,156,000,000,000,000,000,000,000
73
resolved: bugfix of null pointer p->question dereferencing (#6020) See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
static int _nfs4_recover_proc_open(struct nfs4_opendata *data) { struct inode *dir = d_inode(data->dir); struct nfs_openres *o_res = &data->o_res; int status; status = nfs4_run_open_task(data, NULL); if (status != 0 || !data->rpc_done) return status; nfs_fattr_map_and_free_names(NFS_SERVER(dir), &data->f_attr...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
151,701,314,737,591,290,000,000,000,000,000,000,000
17
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...
static void cmd_parse_myrights(struct ImapAccountData *adata, const char *s) { mutt_debug(LL_DEBUG2, "Handling MYRIGHTS\n"); s = imap_next_word((char *) s); s = imap_next_word((char *) s); /* zero out current rights set */ adata->mailbox->rights = 0; while (*s && !isspace((unsigned char) *s)) { swi...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
312,275,708,469,476,520,000,000,000,000,000,000,000
61
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
void HttpIntegrationTest::testRouterNotFoundWithBody() { config_helper_.setDefaultHostAndRoute("foo.com", "/found"); initialize(); BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest( lookupPort("http"), "POST", "/notfound", "foo", downstream_protocol_, version_); ASSERT_TRUE(response...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
16,669,874,547,296,153,000,000,000,000,000,000,000
9
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void rb_commit(struct ring_buffer_per_cpu *cpu_buffer, struct ring_buffer_event *event) { local_inc(&cpu_buffer->entries); rb_update_write_stamp(cpu_buffer, event); rb_end_commit(cpu_buffer); }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
28,221,113,081,646,770,000,000,000,000,000,000,000
7
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
test_bson_initializer (void) { bson_t b = BSON_INITIALIZER; BSON_ASSERT (bson_empty (&b)); bson_append_bool (&b, "foo", -1, true); BSON_ASSERT (!bson_empty (&b)); bson_destroy (&b); }
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
288,802,601,419,970,900,000,000,000,000,000,000,000
9
CDRIVER-2269 Check for zero string length in codewscope
static bool emulator_get_segment(struct x86_emulate_ctxt *ctxt, u16 *selector, struct desc_struct *desc, u32 *base3, int seg) { struct kvm_segment var; kvm_get_segment(emul_to_vcpu(ctxt), &var, seg); *selector = var.selector; if (var.unusable) { memset(desc, 0, sizeof(*desc)); return false; } if ...
0
[ "CWE-119" ]
kvm
c300aa64ddf57d9c5d9c898a64b36877345dd4a9
116,677,576,895,012,450,000,000,000,000,000,000,000
33
KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) If the guest sets the GPA of the time_page so that the request to update the time straddles a page then KVM will write onto an incorrect page. The write is done byusing kmap atomic to get a pointer to the page for the time structure ...
PJ_DEF(pj_status_t) pjsip_ua_destroy(void) { /* Check if module already destroyed. */ PJ_ASSERT_RETURN(mod_ua.mod.id != -1, PJ_EINVALIDOP); return pjsip_endpt_unregister_module(mod_ua.endpt, &mod_ua.mod); }
0
[ "CWE-416" ]
pjproject
db3235953baa56d2fb0e276ca510fefca751643f
129,961,230,120,230,150,000,000,000,000,000,000,000
7
Merge pull request from GHSA-ffff-m5fm-qm62 * Update pjsip_ua_unregister_dlg(): - update the hash key if the dialog being unregistered is used as hash key. - add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table). * Change hash key string comparison method.
static int vsock_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, size_t len) { int err; struct sock *sk; struct vsock_sock *vsk; struct sockaddr_vm *remote_addr; if (msg->msg_flags & MSG_OOB) return -EOPNOTSUPP; /* For now, MSG_DONTWAIT is always assumed... */ err = 0; ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
280,369,877,067,683,150,000,000,000,000,000,000,000
70
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void sctp_assoc_control_transport(struct sctp_association *asoc, struct sctp_transport *transport, sctp_transport_cmd_t command, sctp_sn_error_t error) { struct sctp_transport *t = NULL; struct sctp_transport *first; struct sctp_transport *second; struct sctp_ulpevent *event; struct sockaddr_stor...
0
[]
linux
bbd0d59809f923ea2b540cbd781b32110e249f6e
242,326,530,031,781,850,000,000,000,000,000,000,000
105
[SCTP]: Implement the receive and verification of AUTH chunk This patch implements the receive path needed to process authenticated chunks. Add ability to process the AUTH chunk and handle edge cases for authenticated COOKIE-ECHO as well. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David ...
static pyc_object *get_object(RzBinPycObj *pyc, RzBuffer *buffer) { bool error = false; pyc_object *ret = NULL; ut8 code = get_ut8(buffer, &error); ut8 flag = code & FLAG_REF; RzListIter *ref_idx = NULL; ut8 type = code & ~FLAG_REF; if (error) { return NULL; } if (flag) { ret = get_none_object(); if (!...
0
[ "CWE-787" ]
rizin
38d8006cd609ac75de82b705891d3508d2c218d5
41,144,786,615,133,420,000,000,000,000,000,000,000
128
fix #2963 - oob write (1 byte) in pyc/marshal.c
INLINE BOOL gdi_SetRectRgn(HGDI_RGN hRgn, INT32 nLeftRect, INT32 nTopRect, INT32 nRightRect, INT32 nBottomRect) { gdi_CRectToRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, hRgn); hRgn->null = FALSE; return TRUE; }
0
[ "CWE-190" ]
FreeRDP
ce21b9d7ecd967e0bc98ed31a6b3757848aa6c9e
337,203,599,236,707,130,000,000,000,000,000,000,000
7
Fix CVE-2020-11523: clamp invalid rectangles to size 0 Thanks to Sunglin and HuanGMz from Knownsec 404
uint32 CSoundFile::GetNoteFromPeriod(uint32 period, int32 nFineTune, uint32 nC5Speed) const { if(!period) return 0; if(m_playBehaviour[kFT2Periods]) { // FT2's "RelocateTon" function actually rounds up and down, while GetNoteFromPeriod normally just truncates. nFineTune += 64; } // This essentially implements ...
0
[ "CWE-125" ]
openmpt
7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c
183,060,540,006,397,270,000,000,000,000,000,000,000
26
[Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27
void xen_poll_irq(int irq) { xen_poll_irq_timeout(irq, 0 /* no timeout */); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
19,959,363,850,074,719,000,000,000,000,000,000,000
4
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
TEST_F(ExpressionNaryTest, InternalOperandOptimizationIsDone) { BSONArray spec = BSON_ARRAY(BSON("$and" << BSONArray()) << "$abc"); addOperandArrayToExpr(_notAssociativeNorCommutative, spec); assertContents(_notAssociativeNorCommutative, spec); ASSERT(_notAssociativeNorCommutative == _notAssociativeNorC...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
204,934,173,102,229,500,000,000,000,000,000,000,000
7
SERVER-38070 fix infinite loop in agg expression
**/ CImgDisplay& wait(const unsigned int milliseconds) { cimg::_wait(milliseconds,_timer); return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
315,115,074,058,416,900,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out, unsigned int *tag_out, size_t *taglen) { const u8 *p = *buf; size_t left = buflen, len; unsigned int cla, tag, i; if (left < 2) return SC_ERROR_INVALID_ASN1_OBJECT; *buf = NULL; if (*p == 0xff || *p == 0) { /* end of data reac...
1
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
254,075,480,788,881,940,000,000,000,000,000,000,000
66
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static char *tcm_loop_get_fabric_name(void) { return "loopback"; }
0
[ "CWE-119", "CWE-787" ]
linux
12f09ccb4612734a53e47ed5302e0479c10a50f8
322,541,724,502,901,800,000,000,000,000,000,000,000
4
loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
static void FS_CheckPak0( void ) { searchpath_t *path; pack_t *curpack; qboolean founddemo = qfalse; unsigned int foundPak = 0, foundTA = 0; for( path = fs_searchpaths; path; path = path->next ) { const char* pakBasename = path->pack->pakBasename; if(!path->pack) continue; curpack = path->pack; if...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
125,490,081,199,672,690,000,000,000,000,000,000,000
184
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
openURL(char *url, ParsedURL *pu, ParsedURL *current, URLOption *option, FormList *request, TextList *extra_header, URLFile *ouf, HRequest *hr, unsigned char *status) { Str tmp; int sock, scheme; char *p, *q, *u; URLFile uf; HRequest hr0; #ifdef USE_SSL SSL *sslh = NULL; #endif /* USE_SSL *...
0
[ "CWE-119" ]
w3m
ba9d78faeba9024c3e8840579c3b0e959ae2cb0f
131,339,950,956,635,150,000,000,000,000,000,000,000
328
Prevent global-buffer-overflow in parseURL() Bug-Debian: https://github.com/tats/w3m/issues/41
open_log_table(THD *thd, TABLE_LIST *one_table, Open_tables_backup *backup) { uint flags= ( MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK | MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY | MYSQL_OPEN_IGNORE_FLUSH | MYSQL_LOCK_IGNORE_TIMEOUT | MYSQL_LOCK_LOG_TABLE); TABLE *ta...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
128,971,251,411,199,270,000,000,000,000,000,000,000
27
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) { /* * XPointer don't allow by syntax to address in mutirooted trees * this might prove useful in some cases, warn about it. */ if ((name == NULL) && (CUR == '/') && (NXT(1) != '1')) { xmlXPtrErr(ctxt, XML_XPTR_CHILDSEQ_STA...
0
[ "CWE-416" ]
libxml2
9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
284,460,024,340,166,470,000,000,000,000,000,000,000
28
Fix XPointer paths beginning with range-to The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-fr...
static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice) { return !slice_area_is_free(mm, slice << SLICE_LOW_SHIFT, 1ul << SLICE_LOW_SHIFT); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
131,158,661,957,892,450,000,000,000,000,000,000,000
5
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static char *err_path(const char *filename) { char *result = NULL; if (filename == NULL) pathjoin(&result, 2, AUGEAS_META_FILES, s_error); else pathjoin(&result, 3, AUGEAS_META_FILES, filename, s_error); return result; }
0
[]
augeas
051c73a9a7ffe9e525f6f0a1b8f5198ff8cc6752
206,090,187,543,414,170,000,000,000,000,000,000,000
8
Fix regression in permissions of created files Commit 16387744 changed temporary file creation to use mkstemp, resulting in new files being created with 0600 permissions. For brand new files created through Augeas, their permissions stayed at 0600 rather than being set by the umask as before. * src/transform.c (tr...
hook_completion_get_string (struct t_gui_completion *completion, const char *property) { return gui_completion_get_string (completion, property); }
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
303,145,849,719,042,300,000,000,000,000,000,000,000
5
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
static MagickBooleanType ImportCharPixel(Image *image,const RectangleInfo *roi, const char *magick_restrict map,const QuantumType *quantum_map, const void *pixels,ExceptionInfo *exception) { register const unsigned char *magick_restrict p; register Quantum *magick_restrict q; register ssize_t x;...
0
[ "CWE-190" ]
ImageMagick
406da3af9e09649cda152663c179902edf5ab3ac
183,009,552,838,335,000,000,000,000,000,000,000,000
260
https://github.com/ImageMagick/ImageMagick/issues/1732
static int io_remove_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_provide_buf *p = &req->pbuf; u64 tmp; if (sqe->rw_flags || sqe->addr || sqe->len || sqe->off || sqe->splice_fd_in) return -EINVAL; tmp = READ_ONCE(sqe->fd); if (!tmp || tmp > USHRT_MAX) return -EINV...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
154,865,598,574,389,520,000,000,000,000,000,000,000
19
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
parse_cosine_rec_hdr(struct wtap_pkthdr *phdr, const char *line, int *err, gchar **err_info) { union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; int num_items_scanned; int yy, mm, dd, hr, min, sec, csec, pkt_len; int pro, off, pri, rm, error; guint code1, code2; char if_name[COSINE_MAX_IF_NAME_...
1
[ "CWE-119", "CWE-787" ]
wireshark
f5ec0afb766f19519ea9623152cca3bbe2229500
192,795,618,471,140,650,000,000,000,000,000,000,000
91
Fix packet length handling. Treat the packet length as unsigned - it shouldn't be negative in the file. If it is, that'll probably cause the sscanf to fail, so we'll report the file as bad. Check it against WTAP_MAX_PACKET_SIZE to make sure we don't try to allocate a huge amount of memory, just as we do in other fil...
static struct super_block *alloc_super(struct file_system_type *type, int flags) { struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER); static const struct super_operations default_op; int i; if (!s) return NULL; if (security_sb_alloc(s)) goto fail; for (i = 0; i < SB_FREEZE_LEVELS; i++)...
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
167,748,741,527,657,360,000,000,000,000,000,000,000
73
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
uint16_t btd_adapter_get_index(struct btd_adapter *adapter) { if (!adapter) return MGMT_INDEX_NONE; return adapter->dev_id; }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
210,950,992,867,599,970,000,000,000,000,000,000,000
7
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 int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { unsigned long size, tmp_check; struct io_provide_buf *p = &req->pbuf; u64 tmp; if (sqe->ioprio || sqe->rw_flags || sqe->splice_fd_in) return -EINVAL; tmp = READ_ONCE(sqe->fd); if (!tmp || tmp > USHRT_MAX) retur...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
115,378,448,129,410,320,000,000,000,000,000,000,000
34
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime) { int ret; struct rt_schedulable_data data = { .tg = tg, .rt_period = period, .rt_runtime = runtime, }; rcu_read_lock(); ret = walk_tg_tree(tg_rt_schedulable, tg_nop, &data); rcu_read_unlock(); return ret; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
332,377,570,081,771,500,000,000,000,000,000,000,000
16
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt) { int rc; unsigned long eip; rc = emulate_pop(ctxt, &eip, ctxt->op_bytes); if (rc != X86EMUL_CONTINUE) return rc; rc = assign_eip_near(ctxt, eip); if (rc != X86EMUL_CONTINUE) return rc; rsp_increment(ctxt, ctxt->src.val); return X86EMUL_CONTINUE; }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
278,431,326,835,097,520,000,000,000,000,000,000,000
14
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static int identity_count(void *v, const char *key, const char *val) { int *count = v; *count += strlen(key) * 3 + strlen(val) * 3 + 1; return 1; }
1
[ "CWE-787" ]
httpd
7e09dd714fc62c08c5b0319ed7b9702594faf49b
50,330,208,498,269,000,000,000,000,000,000,000,000
6
mod_session: account for the '&' in identity_concat(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887052 13f79535-47bb-0310-9956-ffa450edef68
const char* get_backup_uuid(MYSQL *connection) { if (!backup_uuid) { backup_uuid = read_mysql_one_value(connection, "SELECT UUID()"); } return backup_uuid; }
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
74,013,485,108,987,260,000,000,000,000,000,000,000
7
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
void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left) { struct snd_timer_instance *ti, *ts, *tmp; unsigned long resolution, ticks; struct list_head *p, *ack_list_head; unsigned long flags; int use_tasklet = 0; if (timer == NULL) return; spin_lock_irqsave(&timer->lock, flags); /* reme...
1
[ "CWE-200", "CWE-362" ]
linux
ee8413b01045c74340aa13ad5bdf905de32be736
270,861,720,613,835,200,000,000,000,000,000,000,000
100
ALSA: timer: Fix double unlink of active_list ALSA timer instance object has a couple of linked lists and they are unlinked unconditionally at snd_timer_stop(). Meanwhile snd_timer_interrupt() unlinks it, but it calls list_del() which leaves the element list itself unchanged. This ends up with unlinking twice, and i...
get_preview_thumbnail (const char *uri, int size) { GdkPixbuf *pixbuf; GFile *file; GFileInfo *file_info; GInputStream *input_stream; GObject *object; g_return_val_if_fail (uri != NULL, NULL); input_stream = NULL; file = g_file_new_for_uri (uri); /*...
0
[]
nautilus
2ddba428ef2b13d0620bd599c3635b9c11044659
110,180,961,239,309,640,000,000,000,000,000,000,000
56
Update gnome-desktop code Closes https://gitlab.gnome.org/GNOME/nautilus/issues/987
static int generic_kmemdup_sysctl_table(struct nf_proto_net *pn, struct nf_generic_net *gn) { #ifdef CONFIG_SYSCTL pn->ctl_table = kmemdup(generic_sysctl_table, sizeof(generic_sysctl_table), GFP_KERNEL); if (!pn->ctl_table) return -ENOMEM; pn->ctl_table[0].data = &gn->timeout; #endif return 0; }
0
[ "CWE-20", "CWE-254", "CWE-787" ]
linux
db29a9508a9246e77087c5531e45b2c88ec6988b
277,920,720,044,130,000,000,000,000,000,000,000,000
14
netfilter: conntrack: disable generic tracking for known protocols Given following iptables ruleset: -P FORWARD DROP -A FORWARD -m sctp --dport 9 -j ACCEPT -A FORWARD -p tcp --dport 80 -j ACCEPT -A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT One would assume that this allows SCTP on port 9 and...
HandleFileUploadWrite(rfbClientPtr cl, rfbTightClientPtr rtcp, char* pBuf) { FileTransferMsg ftm; memset(&ftm, 0, sizeof(FileTransferMsg)); ftm = ChkFileUploadWriteErr(cl, rtcp, pBuf); if((ftm.data != NULL) && (ftm.length != 0)) { rfbWriteExact(cl, ftm.data, ftm.length); FreeFileTransferMsg(ftm); } }
0
[ "CWE-416" ]
libvncserver
ca2a5ac02fbbadd0a21fabba779c1ea69173d10b
269,637,864,104,179,330,000,000,000,000,000,000,000
12
tightvnc-filetransfer: fix heap use-after-free One can only guess what the intended semantics were here, but as every other rfbCloseClient() call in this file is followed by an immediate return, let's assume this was forgotton in this case. Anyway, don't forget to clean up to not leak memory. Closes #241
static void tweak_special_requests(struct urb *urb) { if (!urb || !urb->setup_packet) return; if (usb_pipetype(urb->pipe) != PIPE_CONTROL) return; if (is_clear_halt_cmd(urb)) /* tweak clear_halt */ tweak_clear_halt_cmd(urb); else if (is_set_interface_cmd(urb)) /* tweak set_interface */ tweak_set_int...
0
[ "CWE-125" ]
linux
635f545a7e8be7596b9b2b6a43cab6bbd5a88e43
294,596,314,636,996,140,000,000,000,000,000,000,000
25
usbip: fix stub_rx: get_pipe() to validate endpoint number get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of calling BUG(). Change caller stub_recv_cmd_submit() to...
Interval IndexBoundsBuilder::allValues() { BSONObjBuilder bob; bob.appendMinKey(""); bob.appendMaxKey(""); return makeRangeInterval(bob.obj(), BoundInclusion::kIncludeBothStartAndEndKeys); }
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
203,796,943,352,204,640,000,000,000,000,000,000,000
6
SERVER-44377 generate correct plan for indexed inequalities to null
void SshIo::SshImpl::getDataByRange(long lowBlock, long highBlock, std::string& response) { if (protocol_ == pSftp) { if (sftp_seek(fileHandler_, (uint32_t) (lowBlock * blockSize_)) < 0) throw Error(kerErrorMessage, "SFTP: unable to sftp_seek"); size_t buffSize = (highBlock - low...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
87,233,412,998,172,820,000,000,000,000,000,000,000
29
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
std::shared_ptr<FizzServerQuicHandshakeContext> getFizzServerContext() { if (!fizzServerContext) { fizzServerContext = FizzServerQuicHandshakeContext::Builder() .setFizzServerContext(createServerCtx()) .build(); } return fizzServerContext;...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
237,470,015,938,370,320,000,000,000,000,000,000,000
9
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
TEST_P(RedirectIntegrationTest, InternalRedirectCancelledDueToBufferOverflow) { useAccessLog("%RESPONSE_FLAGS% %RESPONSE_CODE% %RESPONSE_CODE_DETAILS% %RESP(test-header)%"); // Validate that header sanitization is only called once. config_helper_.addConfigModifier( [](envoy::extensions::filters::network::ht...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
259,637,582,601,714,300,000,000,000,000,000,000,000
35
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void ep_nested_calls_init(struct nested_calls *ncalls) { INIT_LIST_HEAD(&ncalls->tasks_call_list); spin_lock_init(&ncalls->lock); }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
161,709,123,444,095,950,000,000,000,000,000,000,000
5
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh) { transaction_t *transaction = handle->h_transaction; journal_t *journal; struct journal_head *jh = jbd2_journal_add_journal_head(bh); int err; jbd_debug(5, "journal_head %p\n", jh); err = -EROFS; if (is_handle_aborted(handle)) goto ...
0
[ "CWE-787" ]
linux
e09463f220ca9a1a1ecfda84fcda658f99a1f12a
206,996,760,827,809,200,000,000,000,000,000,000,000
72
jbd2: don't mark block as modified if the handle is out of credits Do not set the b_modified flag in block's journal head should not until after we're sure that jbd2_journal_dirty_metadat() will not abort with an error due to there not being enough space reserved in the jbd2 handle. Otherwise, future attempts to modi...
static int finish_line(struct imap_parser *parser, unsigned int count, const struct imap_arg **args_r) { struct imap_arg *arg; int ret = array_count(&parser->root_list); parser->line_size += parser->cur_pos; i_stream_skip(parser->input, parser->cur_pos); parser->cur_pos = 0; parser->cur_resp_text = FALS...
0
[ "CWE-787" ]
core
85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b
23,339,389,082,017,930,000,000,000,000,000,000,000
26
lib-imap: Don't accept strings with NULs IMAP doesn't allow NULs except in binary literals. We'll still allow them in regular literals as well, but just not in strings. This fixes a bug with unescaping a string with NULs: str_unescape() could have been called for memory that points outside the allocated string, causi...
static void hci_cc_pin_code_reply(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_pin_code_reply *rp = (void *) skb->data; struct hci_cp_pin_code_reply *cp; struct hci_conn *conn; BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); hci_dev_lock(hdev); if (hci_dev_test_flag(hdev, HCI_MGMT)) mgmt_p...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
254,315,642,852,463,060,000,000,000,000,000,000,000
27
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
void vbg_req_free(void *req, size_t len) { if (!req) return; free_pages((unsigned long)req, get_order(PAGE_ALIGN(len))); }
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
e0b0cb9388642c104838fac100a4af32745621e2
334,271,203,967,992,960,000,000,000,000,000,000,000
7
virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr In hgcm_call_preprocess_linaddr memory is allocated for bounce_buf but is not released if copy_form_user fails. In order to prevent memory leak in case of failure, the assignment to bounce_buf_ret is moved before the error check. This way the allocated bounce...
intersect_aggregates_with_edge (struct cgraph_edge *cs, int index, vec<ipa_agg_value> inter) { struct ipa_jump_func *jfunc; jfunc = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), index); if (jfunc->type == IPA_JF_PASS_THROUGH && ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR) { class ipa_nod...
0
[ "CWE-20" ]
gcc
a09ccc22459c565814f79f96586fe4ad083fe4eb
95,377,116,336,882,980,000,000,000,000,000,000,000
169
Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015) 2019-12-21 Martin Jambor <mjambor@suse.cz> PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists testsuite/ * gcc.dg/lto/pr93015_0.c: New test. From-SVN: r279695