func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
finish_realm(kdc_realm_t *rdp) { if (rdp->realm_name) free(rdp->realm_name); if (rdp->realm_mpname) free(rdp->realm_mpname); if (rdp->realm_stash) free(rdp->realm_stash); if (rdp->realm_ports) free(rdp->realm_ports); if (rdp->realm_tcp_ports) free(rdp->realm_t...
0
[ "CWE-703" ]
krb5
c2ccf4197f697c4ff143b8a786acdd875e70a89d
15,602,905,944,600,660,000,000,000,000,000,000,000
36
Multi-realm KDC null deref [CVE-2013-1418] If a KDC serves multiple realms, certain requests can cause setup_server_realm() to dereference a null pointer, crashing the KDC. CVSSv2: AV:N/AC:M/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C A related but more minor vulnerability requires authentication to exploit, and is only prese...
komeda_wb_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct drm_device *dev = connector->dev; struct drm_mode_config *mode_config = &dev->mode_config; int w = mode->hdisplay, h = mode->vdisplay; if ((w < mode_config->min_width) || (w > mode_config->max_width)) ...
0
[ "CWE-401" ]
linux
a0ecd6fdbf5d648123a7315c695fb6850d702835
185,041,487,294,676,330,000,000,000,000,000,000,000
15
drm/komeda: prevent memory leak in komeda_wb_connector_add In komeda_wb_connector_add if drm_writeback_connector_init fails the allocated memory for kwb_conn should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Sig...
int tls1_ec_nid2curve_id(int nid) { /* ECC curves from RFC 4492 */ switch (nid) { case NID_sect163k1: /* sect163k1 (1) */ return 1; case NID_sect163r1: /* sect163r1 (2) */ return 2; case NID_sect163r2: /* sect163r2 (3) */ return 3; case NID_sect193r1:...
0
[ "CWE-190" ]
openssl
6f35f6deb5ca7daebe289f86477e061ce3ee5f46
178,442,265,379,378,100,000,000,000,000,000,000,000
58
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...
unpack_vcol_info_from_frm(THD *thd, MEM_ROOT *mem_root, TABLE *table, String *expr_str, Virtual_column_info **vcol_ptr, bool *error_reported) { Create_field vcol_storage; // placeholder for vcol_info Parser_state parser_state; Virtual_column_info *vcol= *vcol_pt...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
290,145,131,022,004,200,000,000,000,000,000,000,000
44
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
flatpak_remote_state_add_sideload_repo (FlatpakRemoteState *self, GFile *dir) { g_autoptr(GFile) summary_path = NULL; g_autoptr(GMappedFile) mfile = NULL; g_autoptr(OstreeRepo) sideload_repo = NULL; /* Sideloading only works if collection id is set */ if (self->collect...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
251,509,668,254,490,900,000,000,000,000,000,000,000
40
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static inline int get_bpp(SM501State *s, int crt) { int bpp = crt ? s->dc_crt_control : s->dc_panel_control; return 1 << (bpp & 3); }
0
[ "CWE-190" ]
qemu
b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4
74,150,363,724,103,385,000,000,000,000,000,000,000
5
sm501: Replace hand written implementation with pixman where possible Besides being faster this should also prevent malicious guests to abuse 2D engine to overwrite data or cause a crash. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik...
BPF_CALL_1(bpf_get_socket_uid, struct sk_buff *, skb) { struct sock *sk = sk_to_full_sk(skb->sk); kuid_t kuid; if (!sk || !sk_fullsock(sk)) return overflowuid; kuid = sock_net_uid(sock_net(sk), sk); return from_kuid_munged(sock_net(sk)->user_ns, kuid); }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
177,183,310,293,040,380,000,000,000,000,000,000,000
10
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len) { unsigned char *search; struct evbuffer_ptr ptr; EVBUFFER_LOCK(buffer); ptr = evbuffer_search(buffer, (const char *)what, len, NULL); if (ptr.pos < 0) { search = NULL; } else { search = evbuffer_pullup(buffer, ptr.pos + len); i...
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
121,492,462,519,508,420,000,000,000,000,000,000,000
18
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
int ssl_connect(struct tunnel *tunnel) { ssl_disconnect(tunnel); tunnel->ssl_socket = tcp_connect(tunnel); if (tunnel->ssl_socket == -1) return 1; // registration is deprecated from OpenSSL 1.1.0 onward #if OPENSSL_API_COMPAT < 0x10100000L // Register the error strings for libcrypto & libssl SSL_load_error_st...
0
[ "CWE-295" ]
openfortivpn
60660e00b80bad0fadcf39aee86f6f8756c94f91
324,852,872,044,591,370,000,000,000,000,000,000,000
214
correctly check return value of X509_check_host CVE-2020-7041 incorrect use of X509_check_host (regarding return value) is fixed with this commit. The flaw came in with #242 and prevented proper host name verification when openssl >= 1.0.2 was in use since openfortivpn 1.7.0.
int LinkResolver::vtable_index_of_interface_method(Klass* klass, const methodHandle& resolved_method) { InstanceKlass* ik = InstanceKlass::cast(klass); return ik->vtable_index_of_interface_method(resolved_method()); }
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
59,545,553,442,271,050,000,000,000,000,000,000,000
4
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
int __dev_set_mtu(struct net_device *dev, int new_mtu) { const struct net_device_ops *ops = dev->netdev_ops; if (ops->ndo_change_mtu) return ops->ndo_change_mtu(dev, new_mtu); dev->mtu = new_mtu; return 0;
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
191,292,163,670,578,730,000,000,000,000,000,000,000
10
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
TEST(ArrayOpsTest, OneHot_ShapeFn) { ShapeInferenceTestOp op("OneHot"); op.input_tensors.resize(4); auto set_axis = [&op](int axis) { TF_ASSERT_OK(NodeDefBuilder("test", "OneHot") .Input("indices", 0, DT_FLOAT) .Input("depth", 1, DT_INT32) .Input(...
0
[ "CWE-125" ]
tensorflow
7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d
46,231,279,711,939,210,000,000,000,000,000,000,000
32
Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute. PiperOrigin-RevId: 402446942 Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9
static int __init max_loop_setup(char *str) { max_loop = simple_strtol(str, NULL, 0); return 1; }
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
166,831,972,883,114,830,000,000,000,000,000,000,000
5
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
application_api_calc_estimate( disk_estimates_t * est) { int level; int i; int levels[DUMP_LEVELS]; int nb_level = 0; backup_support_option_t *bsu; GPtrArray *errarray; estimatelist_t el; estimate_t estimate; estimate_t estimate_method = ES_ES; ...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
69,967,457,611,512,190,000,000,000,000,000,000,000
176
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_packet *packet; struct sctp_transport *transport; __u16 sport; __u16 dport; __u32 vtag; /* Get the source and destination port from the inbound packet. */ sport = ntohs(chun...
0
[]
linux-2.6
7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5
216,249,960,049,182,830,000,000,000,000,000,000,000
56
[SCTP]: Allow spillover of receive buffer to avoid deadlock. This patch fixes a deadlock situation in the receive path by allowing temporary spillover of the receive buffer. - If the chunk we receive has a tsn that immediately follows the ctsn, accept it even if we run out of receive buffer space and renege data wi...
set_quantifier(Node* qnode, Node* target, int group, ScanEnv* env) { QtfrNode* qn; qn = NQTFR(qnode); if (qn->lower == 1 && qn->upper == 1) { return 1; } switch (NTYPE(target)) { case NT_STR: if (! group) { StrNode* sn = NSTR(target); if (str_node_can_be_split(sn, env->enc)) { Node* n...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
242,442,133,764,305,200,000,000,000,000,000,000,000
81
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
static int timerslack_ns_open(struct inode *inode, struct file *filp) { return single_open(filp, timerslack_ns_show, inode); }
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
244,471,982,917,612,600,000,000,000,000,000,000,000
4
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
lou_translatePrehyphenated(const char *tableList, const widechar *inbufx, int *inlen, widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int *outputPos, int *inputPos, int *cursorPos, char *inputHyphens, char *outputHyphens, int mode) { int rv = 1; int *alloc_inputPos = NULL; if (inputHyphens !=...
0
[ "CWE-125" ]
liblouis
5e4089659bb49b3095fa541fa6387b4c40d7396e
285,503,860,168,161,150,000,000,000,000,000,000,000
36
Fix a buffer overflow Fixes #635 Thanks to HongxuChen for reporting it
void Http2Stream::Trailers(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); Http2Stream* stream; ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); Local<Array> headers = args[0].As<Array>(); args.GetReturnValue().Set( stream->SubmitTrailers(Http2Headers(env, ...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
122,583,937,422,428,220,000,000,000,000,000,000,000
10
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
static void php_ldap_do_escape(const zend_bool *map, const char *value, size_t valuelen, char **result, size_t *resultlen) { char hex[] = "0123456789abcdef"; int i, p = 0; size_t len = 0; for (i = 0; i < valuelen; i++) { len += (map[(unsigned char) value[i]]) ? 3 : 1; } (*result) = (char *) safe_emalloc_strin...
0
[ "CWE-476" ]
php-src
49782c54994ecca2ef2a061063bd5a7079c43527
272,617,133,111,199,230,000,000,000,000,000,000,000
27
Fix bug #76248 - Malicious LDAP-Server Response causes Crash
camel_imapx_server_sync_changes_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, gboolean can_influence_flags, GCancellable *cancellable, GError **error) { guint i, jj, on, on_orset, off_orset; GPtrArray *changed_uids; GArray *on_user = NULL, *off_user = NULL; CamelFol...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
226,490,572,689,174,840,000,000,000,000,000,000,000
413
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
static BOOL rdp_read_window_activation_capability_set(wStream* s, UINT16 length, rdpSettings* settings) { WINPR_UNUSED(settings); if (length < 12) return FALSE; Stream_Seek_UINT16(s); /* helpKeyFlag (2 bytes) */ Stream_Seek_UINT16(s); /* helpKeyIndexFlag (2 b...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
92,929,385,624,240,840,000,000,000,000,000,000,000
13
Fixed #6011: Bounds check in rdp_read_font_capability_set
static int _etc_hosts_lookup(const char *cszName, char *szIP, const int ciMaxIPLen) { #define EHL_LINE_LEN 260 int iSuccess = 0; size_t iLen; char szLine[EHL_LINE_LEN + 1]; /* one extra for the space character (*) */ char *pcStart, *pcEnd; FILE *fHosts; do { /* initialization */ ...
0
[ "CWE-20" ]
jabberd2
aabcffae560d5fd00cd1d2ffce5d760353cf0a4d
169,349,311,296,644,950,000,000,000,000,000,000,000
74
Fixed possibility of Unsolicited Dialback Attacks
parse_set_vlan_vid(char *arg, struct ofpbuf *ofpacts, bool push_vlan_if_needed) { struct ofpact_vlan_vid *vlan_vid; uint16_t vid; char *error; error = str_to_u16(arg, "VLAN VID", &vid); if (error) { return error; } if (vid & ~VLAN_VID_MASK) { return xasprintf("%s: not a val...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
332,254,010,791,967,680,000,000,000,000,000,000,000
19
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void vnc_init_basic_info_from_remote_addr(QIOChannelSocket *ioc, VncBasicInfo *info, Error **errp) { SocketAddress *addr = NULL; addr = qio_channel_socket_get_remote_address(ioc, errp); if (!addr) { ...
0
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
161,724,740,292,966,290,000,000,000,000,000,000,000
14
vnc: fix memory leak when vnc disconnect Currently when qemu receives a vnc connect, it creates a 'VncState' to represent this connection. In 'vnc_worker_thread_loop' it creates a local 'VncState'. The connection 'VcnState' and local 'VncState' exchange data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'. ...
static int __init setup_relax_domain_level(char *str) { if (kstrtoint(str, 0, &default_relax_domain_level)) pr_warn("Unable to set relax_domain_level\n"); return 1; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
11,647,649,352,747,806,000,000,000,000,000,000,000
7
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 GF_Node *lsr_read_animateMotion(GF_LASeRCodec *lsr, SVG_Element *parent) { Bool flag; GF_Node *elt = gf_node_new(lsr->sg, TAG_SVG_animateMotion); lsr_read_id(lsr, elt); lsr_read_rare(lsr, elt); lsr_read_accumulate(lsr, elt); lsr_read_additive(lsr, elt); lsr_read_anim_value(lsr, elt, TAG_SVG_ATT_by, "by");...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
67,002,367,592,448,090,000,000,000,000,000,000,000
39
fixed #2213
Fatal( const char* message ) { FTDemo_Display_Done( display ); FTDemo_Done( handle ); PanicZ( message ); }
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
322,706,724,293,621,340,000,000,000,000,000,000,000
6
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder) { unsigned i; FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); FLAC__ASSERT(0 != decoder->protected_); if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED) return false; for(i = 0; i ...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
308,453,794,134,671,160,000,000,000,000,000,000,000
13
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
inline uint8_t* WireFormatLite::InternalWriteMessageNoVirtualToArray( int field_number, const MessageType_WorkAroundCppLookupDefect& value, uint8_t* target) { target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); target = io::CodedOutputStream::WriteVarint32ToArray( static_cast<ui...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
233,200,027,738,051,930,000,000,000,000,000,000,000
12
Apply patch
static int lookup_node(struct mm_struct *mm, unsigned long addr) { struct page *p; int err; int locked = 1; err = get_user_pages_locked(addr & PAGE_MASK, 1, 0, &p, &locked); if (err >= 0) { err = page_to_nid(p); put_page(p); } if (locked) up_read(&mm->mmap_sem); return err; }
0
[ "CWE-787" ]
linux
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
66,328,628,686,648,170,000,000,000,000,000,000,000
15
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provi...
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VA...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
65,135,535,632,372,560,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
bool Uint32Analysis::Uint32UsesAreSafe(HValue* uint32val) { bool collect_phi_uses = false; for (HUseIterator it(uint32val->uses()); !it.Done(); it.Advance()) { HValue* use = it.value(); if (use->IsPhi()) { if (!use->CheckFlag(HInstruction::kUint32)) { // There is a phi use of this value from ...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
232,562,023,318,210,500,000,000,000,000,000,000,000
36
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
innodb_get_item_info( /*=================*/ ENGINE_HANDLE* handle __attribute__((unused)), /*!< in: Engine Handle */ const void* cookie __attribute__((unused)), /*!< in: connection cookie */ const item* item, /*!< in: item in question */ item_info* item_info) /*!< out: item info got */ { struct in...
0
[]
mysql-server
659514dc83299a7d8c7defeb543be4339fbe1ee1
308,328,090,563,858,400,000,000,000,000,000,000,000
81
Bug #25147515 SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED PROBLEM ------- User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5 and with binlog on. Since "get" is a read transaction this connection is not allocated any conn_data->thd (which is used for bin log commit...
ModuleExport size_t RegisterDPXImage(void) { MagickInfo *entry; static const char *DPXNote = { "Digital Moving Picture Exchange Bitmap, Version 2.0.\n" "See SMPTE 268M-2003 specification at http://www.smtpe.org\n" }; entry=SetMagickInfo("DPX"); entry->decoder=(DecodeImageHandler *)...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
262,003,310,915,721,100,000,000,000,000,000,000,000
24
Fix ultra rare but potential memory-leak
void start_split(spg_t parent, const set<spg_t> &children) { Mutex::Locker l(in_progress_split_lock); return _start_split(parent, children); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
337,479,355,612,930,230,000,000,000,000,000,000,000
4
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
amstar_validate( application_argument_t *argument G_GNUC_UNUSED) { char *cmd; GPtrArray *argv_ptr = g_ptr_array_new(); char **env; char *e; char buf[32768]; if (!star_path) { dbprintf("STAR-PATH not set; Piping to /dev/null\n"); fprintf(stderr,"STAR-PATH not set; ...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
135,562,970,406,284,200,000,000,000,000,000,000,000
34
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
e1000e_set_tidv(E1000ECore *core, int index, uint32_t val) { e1000e_set_16bit(core, index, val); if ((val & E1000_TIDV_FPD) && (core->tidv.running)) { trace_e1000e_irq_tidv_fpd_running(); e1000e_intrmgr_fire_delayed_interrupts(core); } else { trace_e1000e_irq_tidv_fpd_not_running();...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
95,355,153,471,541,020,000,000,000,000,000,000,000
11
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static int selinux_binder_transfer_binder(struct task_struct *from, struct task_struct *to) { return avc_has_perm(&selinux_state, task_sid_binder(from), task_sid_binder(to), SECCLASS_BINDER, BINDER__TRANSFER, NULL); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
129,597,700,361,917,160,000,000,000,000,000,000,000
8
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
Buffer::InstancePtr ActiveStreamEncoderFilter::createBuffer() { auto buffer = dispatcher().getWatermarkFactory().createBuffer( [this]() -> void { this->responseDataDrained(); }, [this]() -> void { this->responseDataTooLarge(); }, []() -> void { /* TODO(adisuissa): Handle overflow watermark */ }); ...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
238,328,228,229,934,350,000,000,000,000,000,000,000
8
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
void nl80211_send_sta_del_event(struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *mac_addr, gfp_t gfp) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_GOODSIZE, gfp); if (!msg) return; hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_DEL_STATION); if (!hdr) { nlmsg_fr...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
37,277,299,950,271,013,000,000,000,000,000,000,000
33
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
CString CZNC::GetVersion() { return CString(VERSION_STR) + CString(ZNC_VERSION_EXTRA); }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
209,167,116,595,428,800,000,000,000,000,000,000,000
3
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static int do_move_mount(struct path *path, const char *old_name) { struct path old_path, parent_path; struct mount *p; struct mount *old; int err; if (!old_name || !*old_name) return -EINVAL; err = kern_path(old_name, LOOKUP_FOLLOW, &old_path); if (err) return err; err = lock_mount(path); if (err < 0) ...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
122,192,472,967,280,100,000,000,000,000,000,000,000
67
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
ZEND_API void zend_objects_proxy_destroy(zend_object *object, zend_object_handle handle TSRMLS_DC) { }
0
[ "CWE-119", "CWE-787" ]
php-src
6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43
25,995,825,721,010,390,000,000,000,000,000,000,000
3
Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
static MemTxResult gic_do_cpu_write(void *opaque, hwaddr addr, uint64_t value, unsigned size, MemTxAttrs attrs) { GICState **backref = (GICState **)opaque; GICState *s = *backref; int id = (backref - s->backref); return gic_cpu_writ...
0
[ "CWE-787" ]
qemu
edfe2eb4360cde4ed5d95bda7777edcb3510f76a
194,214,333,219,113,450,000,000,000,000,000,000,000
9
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register Per the ARM Generic Interrupt Controller Architecture specification (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, not 10: - 4.3 Distributor register descriptions - 4.3.15 Software Generated Interrupt Register, GICD_SG - Table 4-2...
static void relocation_noreturn_process(RzCore *core, RzList *noretl, SetU *todo, RzAnalysisBlock *b, RzBinReloc *rel, ut64 opsize, ut64 addr) { RzListIter *iter3; char *noret; if (rel->import) { rz_list_foreach (noretl, iter3, noret) { if (!strcmp(rel->import->name, noret)) { relocation_function_process_no...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
43,095,328,308,999,940,000,000,000,000,000,000,000
17
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static int l2tp_nl_cmd_session_delete(struct sk_buff *skb, struct genl_info *info) { int ret = 0; struct l2tp_session *session; u16 pw_type; session = l2tp_nl_session_get(info, true); if (session == NULL) { ret = -ENODEV; goto out; } l2tp_session_notify(&l2tp_nl_family, info, session, L2TP_CMD_SESSI...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
247,974,939,266,174,200,000,000,000,000,000,000,000
27
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
SCTP_STATIC int sctp_connect(struct sock *sk, struct sockaddr *addr, int addr_len) { int err = 0; struct sctp_af *af; sctp_lock_sock(sk); SCTP_DEBUG_PRINTK("%s - sk: %p, sockaddr: %p, addr_len: %d\n", __FUNCTION__, sk, addr, addr_len); /* Validate addr_len before calling common connect/connectx rou...
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
150,250,560,582,819,430,000,000,000,000,000,000,000
25
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
static void btrfs_end_dio_bio(struct bio *bio) { struct btrfs_dio_private *dip = bio->bi_private; int err = bio->bi_error; if (err) btrfs_warn(BTRFS_I(dip->inode)->root->fs_info, "direct IO failed ino %llu rw %lu sector %#Lx len %u err no %d", btrfs_ino(dip->inode), bio->bi_rw, (unsigned long lo...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
216,250,798,373,315,170,000,000,000,000,000,000,000
38
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static inline void gen_op_movq_env_0(int d_offset) { tcg_gen_movi_i64(cpu_tmp1_i64, 0); tcg_gen_st_i64(cpu_tmp1_i64, cpu_env, d_offset); }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
334,910,090,948,097,300,000,000,000,000,000,000,000
5
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....
static int load_all_keys(struct crypt_device *cd, struct luks2_hdr *hdr, struct volume_key *vks) { int r; struct volume_key *vk = vks; while (vk) { r = LUKS2_volume_key_load_in_keyring_by_digest(cd, hdr, vk, crypt_volume_key_get_id(vk)); if (r < 0) return r; vk = crypt_volume_key_next(vk); } return 0; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
73,888,757,555,077,890,000,000,000,000,000,000,000
14
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static void gdImageBrushApply (gdImagePtr im, int x, int y) { int lx, ly; int hy, hx; int x1, y1, x2, y2; int srcx, srcy; if (!im->brush) { return; } hy = gdImageSY(im->brush) / 2; y1 = y - hy; y2 = y1 + gdImageSY(im->brush); hx = gdImageSX(im->brush) / 2; x1 = x - hx; x2 = x1 + gdImageSX(im->brush); s...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
52,264,409,027,038,235,000,000,000,000,000,000,000
75
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
void PSOutputDev::updateStrokeColorSpace(GfxState *state) { switch (level) { case psLevel1: case psLevel1Sep: break; case psLevel2: case psLevel3: if (state->getStrokeColorSpace()->getMode() != csPattern) { dumpColorSpaceL2(state->getStrokeColorSpace(), gTrue, gFalse, gFalse); writePS(" CS...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
161,070,409,363,596,850,000,000,000,000,000,000,000
17
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int qemuProcessAutoDestroyRemove(virQEMUDriverPtr driver, virDomainObjPtr vm) { VIR_DEBUG("vm=%s", vm->def->name); return virCloseCallbacksUnset(driver->closeCallbacks, vm, qemuProcessAutoDestroy); }
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
289,325,876,772,165,570,000,000,000,000,000,000,000
7
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
void kvm_configure_mmu(bool enable_tdp, int tdp_forced_root_level, int tdp_max_root_level, int tdp_huge_page_level) { tdp_enabled = enable_tdp; tdp_root_level = tdp_forced_root_level; max_tdp_level = tdp_max_root_level; /* * max_huge_page_level reflects KVM's MMU capabilities irrespective * of kernel ...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
224,793,257,157,613,800,000,000,000,000,000,000,000
21
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...
static int handle_task_switch(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { struct vcpu_vmx *vmx = to_vmx(vcpu); unsigned long exit_qualification; u16 tss_selector; int reason; exit_qualification = vmcs_readl(EXIT_QUALIFICATION); reason = (u32)exit_qualification >> 30; if (reason == TASK_SWITCH_GATE && vmx...
0
[ "CWE-20" ]
linux-2.6
16175a796d061833aacfbd9672235f2d2725df65
290,380,286,515,673,700,000,000,000,000,000,000,000
34
KVM: VMX: Don't allow uninhibited access to EFER on i386 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still do so through the default: label in the switch. If they set EFER_LME, they can oops the host. Fix by having EFER access through the normal channel (which will check for EFER_LME) even o...
static void __tun_detach(struct tun_struct *tun) { /* Detach from net device */ netif_tx_lock_bh(tun->dev); tun->tfile = NULL; netif_tx_unlock_bh(tun->dev); /* Drop read queue */ skb_queue_purge(&tun->readq); /* Drop the extra count on the net device */ dev_put(tun->dev); }
0
[ "CWE-119" ]
linux-2.6
3c8a9c63d5fd738c261bd0ceece04d9c8357ca13
15,272,909,383,417,731,000,000,000,000,000,000,000
13
tun/tap: Fix crashes if open() /dev/net/tun and then poll() it. Fix NULL pointer dereference in tun_chr_pool() introduced by commit 33dccbb050bbe35b88ca8cf1228dcf3e4d4b3554 ("tun: Limit amount of queued packets per device") and triggered by this code: int fd; struct pollfd pfd; fd = open("/dev/net/tun", O_RDWR); ...
mwifiex_clean_txrx(struct mwifiex_private *priv) { struct sk_buff *skb, *tmp; mwifiex_11n_cleanup_reorder_tbl(priv); spin_lock_bh(&priv->wmm.ra_list_spinlock); mwifiex_wmm_cleanup_queues(priv); mwifiex_11n_delete_all_tx_ba_stream_tbl(priv); if (priv->adapter->if_ops.cleanup_mpa_buf) priv->adapter->if_ops.cle...
0
[ "CWE-787" ]
linux
3a9b153c5591548612c3955c9600a98150c81875
109,154,079,650,137,680,000,000,000,000,000,000,000
35
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before call...
static int ecryptfs_write_headers_virt(char *page_virt, size_t max, size_t *size, struct ecryptfs_crypt_stat *crypt_stat, struct dentry *ecryptfs_dentry) { int rc; size_t written; size_t offset; offset = ECRYPTFS_FILE_SIZE_BYTES; write_ecryptfs_marker((page_virt + offset), &writte...
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
57,775,577,163,903,150,000,000,000,000,000,000,000
29
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_o...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
163,597,067,504,946,100,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2) { /* * XXX if you change this routine, see also the inlined version in * utils/sort/tuplesort.c! */ FunctionCallInfoData fcinfo; Datum result; InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL); fcinfo.arg[0] = arg1...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
8,174,139,067,275,718,000,000,000,000,000,000,000
24
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
TEST_P( QuicServerTransportHandshakeTest, TestConnectionSetupWithoutSourceTokenInPsk) { serverCtx->setSendNewSessionTicket(false); expectedSourceToken_ = {clientAddr.getIPAddress()}; testSetupConnection(); }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
153,149,717,714,680,880,000,000,000,000,000,000,000
7
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
cmsHANDLE CMSEXPORT cmsDictDup(cmsHANDLE hDict) { _cmsDICT* old_dict = (_cmsDICT*) hDict; cmsHANDLE hNew; _cmsDICT* new_dict; cmsDICTentry *entry; _cmsAssert(old_dict != NULL); hNew = cmsDictAlloc(old_dict ->ContextID); if (hNew == NULL) return NULL; new_dict = (_cmsDICT*) hNew; ...
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
321,043,112,376,424,000,000,000,000,000,000,000,000
29
Fixes from coverity check
**/ CImg<T>& load_dcraw_external(const char *const filename) { if (!filename) throw CImgArgumentException(_cimg_instance "load_dcraw_external(): Specified filename is (null).", cimg_instance); std::fclose(cimg::fopen(fil...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
223,962,655,823,100,850,000,000,000,000,000,000,000
48
Fix other issues in 'CImg<T>::load_bmp()'.
size_t& stream_threshold() { return res_stream_threshold_; }
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
52,095,640,665,454,750,000,000,000,000,000,000,000
4
Prevent HTTP pipelining which Crow doesn't support.
sg_vma_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; Sg_fd *sfp; unsigned long offset, len, sa; Sg_scatter_hold *rsv_schp; int k, length; if ((NULL == vma) || (!(sfp = (Sg_fd *) vma->vm_private_data))) return VM_FAULT_SIGBUS; rsv_schp = &sfp->reserve; offset = vmf->pgoff << PAGE_SHIFT;...
0
[ "CWE-200" ]
linux
3e0097499839e0fe3af380410eababe5a47c4cf9
9,708,182,000,269,886,000,000,000,000,000,000,000
35
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE When calling SG_GET_REQUEST_TABLE ioctl only a half-filled table is returned; the remaining part will then contain stale kernel memory information. This patch zeroes out the entire table to avoid this issue. Signed-off-by: Hannes Reinecke <hare@suse.com> Revie...
msg_to_pipe (const char *cmd, mu_message_t msg) { mu_stream_t progstream, msgstream; int status, rc; char *argv[4]; argv[0] = getenv ("SHELL"); if (!argv[0]) argv[0] = "/bin/sh"; argv[1] = "-c"; argv[2] = (char*) cmd; argv[3] = NULL; status = mu_prog_stream_create (&progstream, argv[0], ...
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
26,153,108,971,039,503,000,000,000,000,000,000,000
39
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
static bool op_u32_from_binary_helper(uint32_t *v, const uint8_t *data, size_t data_len, size_t *offs) { uint32_t field; if (!data || (*offs + sizeof(field)) > data_len) return false; memcpy(&field, data + *offs, sizeof(field)); *v = TEE_U32_FROM_BIG_ENDIAN(field); (*offs) += sizeof(field); return t...
0
[ "CWE-119", "CWE-787" ]
optee_os
a637243270fc1faae16de059091795c32d86e65e
99,458,382,542,015,220,000,000,000,000,000,000,000
13
svc: check for allocation overflow in crypto calls Without checking for overflow there is a risk of allocating a buffer with size smaller than anticipated and as a consequence of that it might lead to a heap based overflow with attacker controlled data written outside the boundaries of the buffer. Fixes: OP-TEE-2018-...
void _modbus_init_common(modbus_t *ctx) { /* Slave and socket are initialized to -1 */ ctx->slave = -1; ctx->s = -1; ctx->debug = FALSE; ctx->error_recovery = MODBUS_ERROR_RECOVERY_NONE; ctx->response_timeout.tv_sec = 0; ctx->response_timeout.tv_usec = _RESPONSE_TIMEOUT; ctx->byte_tim...
0
[ "CWE-125" ]
libmodbus
5ccdf5ef79d742640355d1132fa9e2abc7fbaefc
116,259,889,126,752,280,000,000,000,000,000,000,000
18
Fix VD-1301 and VD-1302 vulnerabilities This patch was contributed by Maor Vermucht and Or Peles from VDOO Connected Trust.
static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) { struct net *net = sock_net(sk); struct sctp_sock *sp = sctp_sk(sk); struct sctp_endpoint *ep = sp->ep; struct sctp_bind_addr *bp = &ep->base.bind_addr; struct sctp_af *af; unsigned short snum; int ret = 0; /* Common sockaddr verificatio...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
140,913,082,982,662,560,000,000,000,000,000,000,000
79
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
static void check_for_d_option_error(const char *msg) { static char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz"; char *colon; int saw_d = 0; if (*msg != 'r' || strncmp(msg, REMOTE_OPTION_ERROR, sizeof REMOTE_OPTION_ERROR - 1) != 0) return; msg += sizeof REMOTE_OPTION_ERROR - 1; if (*msg == '-' || (col...
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
195,931,080,310,217,600,000,000,000,000,000,000,000
28
Some extra file-list safety checks.
get_ftp_greeting(int csock, ccon *con) { uerr_t err = 0; /* Get the server's greeting */ err = ftp_greeting (csock); if (err != FTPOK) { logputs (LOG_NOTQUIET, "Error in server response. Closing.\n"); fd_close (csock); con->csock = -1; } return err; }
0
[ "CWE-200" ]
wget
a933bdd31eee9c956a3b5cc142f004ef1fa94cb3
222,525,155,258,137,100,000,000,000,000,000,000,000
15
Keep fetched URLs in POSIX extended attributes * configure.ac: Check for xattr availability * src/Makefile.am: Add xattr.c * src/ftp.c: Include xattr.h. (getftp): Set attributes if enabled. * src/http.c: Include xattr.h. (gethttp): Add parameter 'original_url', set attributes if enabled. (http_loop): Add 'orig...
int MYSQL_BIN_LOG::find_next_log(LOG_INFO* linfo, bool need_lock) { int error= 0; uint length; char fname[FN_REFLEN]; char *full_fname= linfo->log_file_name; if (need_lock) mysql_mutex_lock(&LOCK_index); mysql_mutex_assert_owner(&LOCK_index); /* As the file is flushed, we can't get an error here */ ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
336,957,358,169,459,560,000,000,000,000,000,000,000
40
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static BOOL rdp_read_font_capability_set(wStream* s, UINT16 length, rdpSettings* settings) { WINPR_UNUSED(settings); if (length > 5) Stream_Seek_UINT16(s); /* fontSupportFlags (2 bytes) */ if (length > 7) Stream_Seek_UINT16(s); /* pad2Octets (2 bytes) */ return TRUE; }
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
92,561,895,110,037,280,000,000,000,000,000,000,000
11
Fixed #6011: Bounds check in rdp_read_font_capability_set
int ssl_set_truncated_hmac( ssl_context *ssl, int truncate ) { ssl->trunc_hmac = truncate; return( 0 ); }
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
310,104,052,102,428,720,000,000,000,000,000,000,000
6
Added max length checking of hostname
_equalNullIfExpr(const NullIfExpr *a, const NullIfExpr *b) { COMPARE_SCALAR_FIELD(opno); /* * Special-case opfuncid: it is allowable for it to differ if one node * contains zero and the other doesn't. This just means that the one node * isn't as far along in the parse/plan pipeline and hasn't had the * opfu...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
146,622,470,197,064,120,000,000,000,000,000,000,000
24
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void reply_ntcancel(struct smb_request *req) { /* * Go through and cancel any pending change notifies. */ START_PROFILE(SMBntcancel); srv_cancel_sign_response(smbd_server_conn); remove_pending_change_notify_requests_by_mid(req->mid); remove_pending_lock_requests_by_mid(req->mid); DEBUG(3,("reply_ntcancel: c...
0
[ "CWE-189" ]
samba
6ef0e33fe8afa0ebb81652b9d42b42d20efadf04
222,800,188,328,557,920,000,000,000,000,000,000,000
16
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
ConnStateData::isOpen() const { return cbdataReferenceValid(this) && // XXX: checking "this" in a method Comm::IsConnOpen(clientConnection) && !fd_table[clientConnection->fd].closing(); }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
255,833,091,196,624,150,000,000,000,000,000,000,000
6
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
u32 gf_base16_decode(u8 *in, u32 inSize, u8 *out, u32 outSize) { u32 j=0; u32 c[2] = {0,0}; if (outSize < (inSize / 2)) return 0; if ((inSize % 2) != 0) return 0; for (j=0; j<inSize/2; j++) { c[0] = char16(in[2*j]); c[1] = char16(in[2*j+1]); out[j] = ((c[0] << 4)&0xf0) | (c[1]&0x0f); } out[inSize/2] = 0;...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
262,898,634,906,776,560,000,000,000,000,000,000,000
17
fixed #2138
static int __io_import_fixed(struct io_kiocb *req, int rw, struct iov_iter *iter, struct io_mapped_ubuf *imu) { size_t len = req->rw.len; u64 buf_end, buf_addr = req->rw.addr; size_t offset; if (unlikely(check_add_overflow(buf_addr, (u64)len, &buf_end))) return -EFAULT; /* not inside the mapped region *...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
288,288,860,731,068,900,000,000,000,000,000,000,000
57
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static int __init nfnl_cthelper_init(void) { int ret; ret = nfnetlink_subsys_register(&nfnl_cthelper_subsys); if (ret < 0) { pr_err("nfnl_cthelper: cannot register with nfnetlink.\n"); goto err_out; } return 0; err_out: return ret; }
0
[ "CWE-862" ]
linux
4b380c42f7d00a395feede754f0bc2292eebe6e5
323,551,100,569,973,200,000,000,000,000,000,000,000
13
netfilter: nfnetlink_cthelper: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, nfnl_cthelper_list is shared by all net namespaces on the system. An unprivileged user can create user and net names...
static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc) { uint8_t codec_name[32] = { 0 }; int64_t stsd_start; unsigned int len; /* The first 16 bytes of the video sample description are already * read in ff_mov_read_stsd...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
83,455,699,618,715,300,000,000,000,000,000,000,000
55
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void kvm_release_pfn_dirty(kvm_pfn_t pfn) { kvm_set_pfn_dirty(pfn); kvm_release_pfn_clean(pfn); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
319,978,091,351,431,800,000,000,000,000,000,000,000
5
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...
ref_param_end_read_collection(gs_param_list * plist, gs_param_name pkey, gs_param_dict * pvalue) { iparam_list_release((dict_param_list *) pvalue->list); gs_free_object(plist->memory, pvalue->list, "ref_param_end_read_collection"); return 0; }
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
227,240,515,050,256,600,000,000,000,000,000,000,000
8
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
static inline int tree_mod_dont_log(struct btrfs_fs_info *fs_info, struct extent_buffer *eb) { smp_mb(); if (list_empty(&(fs_info)->tree_mod_seq_list)) return 1; if (eb && btrfs_header_level(eb) == 0) return 1; tree_mod_log_write_lock(fs_info); if (list_empty(&(fs_info)->tree_mod_seq_list)) { tree_m...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
53,537,182,553,932,280,000,000,000,000,000,000,000
16
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
gettoken(WORKSTATE *state, int32 *val) { char nnn[16]; int innn; *val = 0; /* default result */ innn = 0; while (1) { if (innn >= sizeof(nnn)) return ERR; /* buffer overrun => syntax error */ switch (state->state) { case WAITOPERAND: innn = 0; if ((*(state->buf) >= '0' && *(state->b...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
290,108,963,146,510,720,000,000,000,000,000,000,000
83
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static int get_debug_info(struct PE_(r_bin_pe_obj_t)* bin, PE_(image_debug_directory_entry)* dbg_dir_entry, ut8* dbg_data, int dbg_data_len, SDebugInfo* res) { #define SIZEOF_FILE_NAME 255 int i = 0; const char* basename; if (!dbg_data) { return 0; } switch (dbg_dir_entry->Type) { case IMAGE_DEBUG_TYPE_CODEVIE...
1
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
100,623,568,797,470,490,000,000,000,000,000,000,000
62
Fix crash in pe
xdr_encode_netobj(__be32 *p, const struct xdr_netobj *obj) { unsigned int quadlen = XDR_QUADLEN(obj->len); p[quadlen] = 0; /* zero trailing bytes */ *p++ = cpu_to_be32(obj->len); memcpy(p, obj->data, obj->len); return p + XDR_QUADLEN(obj->len); }
0
[ "CWE-119", "CWE-787" ]
linux
6d1c0f3d28f98ea2736128ed3e46821496dc3a8c
23,553,287,697,765,250,000,000,000,000,000,000,000
9
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a poin...
build_key_sequence (gcry_mpi_t *kparms, int mode, size_t *r_length) { int rc, i; size_t needed, n; unsigned char *plain, *p; size_t plainlen; size_t outseqlen, oidseqlen, octstrlen, inseqlen; needed = 3; /* The version integer with value 0. */ for (i=0; kparms[i]; i++) { n = 0; rc = gcry_...
0
[]
gnupg
ed8383c618e124cfa708c9ee87563fcdf2f4649c
38,336,197,706,349,186,000,000,000,000,000,000,000
129
sm: Avoid double-free on iconv failure * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid double-free of pwbuf. -- Observed by Joshua Rogers <honey@internot.info>, who proposed a slightly different fix. Debian-Bug-Id: 773472 Added fix at a second place - wk.
commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value) { callbacks++; if (noout) return; fprintf(stdout, "SAX.comment(%s)\n", value); }
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
5,283,813,974,961,448,400,000,000,000,000,000,000
7
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
messageHasArgument(const message *m, const char *variable) { int i; size_t len; assert(m != NULL); assert(variable != NULL); len = strlen(variable); for(i = 0; i < m->numberOfArguments; i++) { const char *ptr; ptr = messageGetArgument(m, i); if((ptr == NULL) || (*ptr == '\0')) continue; #ifdef CL_DEB...
0
[ "CWE-125" ]
clamav-devel
586a5180287262070637c8943f2f7efd652e4a2c
334,766,960,197,458,900,000,000,000,000,000,000,000
33
bb11797 - fix invalid read in fuzzed mail file.
mrb_realloc(mrb_state *mrb, void *p, size_t len) { void *p2; p2 = mrb_realloc_simple(mrb, p, len); if (!p2 && len) { if (mrb->gc.out_of_memory) { mrb_exc_raise(mrb, mrb_obj_value(mrb->nomem_err)); /* mrb_panic(mrb); */ } else { mrb->gc.out_of_memory = TRUE; mrb_exc_raise(mrb, ...
0
[ "CWE-416" ]
mruby
5c114c91d4ff31859fcd84cf8bf349b737b90d99
263,647,850,019,011,820,000,000,000,000,000,000,000
21
Clear unused stack region that may refer freed objects; fix #3596
static void __io_poll_execute(struct io_kiocb *req, int mask, int events) { req->result = mask; /* * This is useful for poll that is armed on behalf of another * request, and where the wakeup path could be on a different * CPU. We want to avoid pulling in req->apoll->events for that * case. */ req->cflags...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
263,371,029,631,129,900,000,000,000,000,000,000,000
18
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...
update_xdg_dir_cache (void) { GFile *file; char *config_file, *uri; int i; free_xdg_dir_cache (); schedule_user_dirs_changed (); desktop_dir_changed (); cached_xdg_dirs = parse_xdg_dirs (NULL); for (i = 0 ; cached_xdg_dirs[i].type != NULL; i++) { cached_xdg_dirs[i].file = NULL; if (strcmp (cached_xdg_di...
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
100,908,101,537,964,400,000,000,000,000,000,000,000
39
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate) { int end_in_lf = 0; int remain = 0; size_t old_avail = 0; size_t avail = 0; if (ctxt == NULL) return(XML_ERR_INTERNAL_ERROR); if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1)) ...
0
[ "CWE-119" ]
libxml2
35bcb1d758ed70aa7b257c9c3b3ff55e54e3d0da
250,488,037,487,363,150,000,000,000,000,000,000,000
177
Detect incoherency on GROW the current pointer to the input has to be between the base and end if not stop everything we have an internal state error.
qemuProcessQMPConnectMonitor(qemuProcessQMPPtr proc) { virDomainXMLOptionPtr xmlopt = NULL; virDomainChrSourceDef monConfig; int ret = -1; VIR_DEBUG("proc=%p, emulator=%s, proc->pid=%lld", proc, proc->binary, (long long)proc->pid); monConfig.type = VIR_DOMAIN_CHR_TYPE_UNIX; monCo...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
197,247,966,885,224,700,000,000,000,000,000,000,000
36
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
strstric(uschar *s, uschar *t, BOOL space_follows) { uschar *p = t; uschar *yield = NULL; int cl = tolower(*p); int cu = toupper(*p); while (*s) { if (*s == cl || *s == cu) { if (yield == NULL) yield = s; if (*(++p) == 0) { if (!space_follows || s[1] == ' ' || s[1] == '\n' ) return yield; ...
0
[]
exim
24c929a27415c7cfc7126c47e4cad39acf3efa6b
179,600,708,519,671,400,000,000,000,000,000,000,000
33
Buffer overrun fix. fixes: bug #787
node_new_cclass_by_codepoint_range(int not, OnigCodePoint sb_out, const OnigCodePoint ranges[]) { int n, i; CClassNode* cc; OnigCodePoint j; Node* node = node_new_cclass_locked(); CHECK_NULL_RETURN(node); cc = NCCLASS(node); if (not != 0) NCCLASS_SET_NOT(cc); BITSET_CLEAR(cc->bs); if (sb_out...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
208,352,599,000,893,550,000,000,000,000,000,000,000
48
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
static char *copy_mount_string(const void __user *data) { return data ? strndup_user(data, PATH_MAX) : NULL; }
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
178,077,780,842,904,160,000,000,000,000,000,000,000
4
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static void ConvertLoopSlice(ModSample &src, ModSample &dest, SmpLength start, SmpLength len, bool loop) { if(!src.HasSampleData()) return; dest.FreeSample(); dest = src; dest.nLength = len; dest.pSample = nullptr; if(!dest.AllocateSample()) { return; } // only preserve cue points if the target sample len...
1
[ "CWE-125" ]
openmpt
b60b322cf9f0ffa624018f1bb9783edf0dc908c3
335,206,512,259,039,170,000,000,000,000,000,000,000
30
[Sec] STP: Possible out-of-bounds memory read with malformed STP files (caught with afl-fuzz). Patch-by: sagamusix (originally committed as part of r9568) git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.27@9576 56274372-70c3-4bfc-bfc3-4c3a0b034d27