func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void addReplySds(client *c, sds s) { if (prepareClientToWrite(c) != C_OK) { /* The caller expects the sds to be free'd. */ sdsfree(s); return; } if (_addReplyToBuffer(c,s,sdslen(s)) != C_OK) _addReplyProtoToList(c,s,sdslen(s)); sdsfree(s); }
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
112,076,134,652,309,260,000,000,000,000,000,000,000
10
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
void sdma_unfreeze(struct hfi1_devdata *dd) { int i; /* tell all engines start freeze clean up */ for (i = 0; i < dd->num_sdma; i++) sdma_process_event(&dd->per_sdma[i], sdma_event_e82_hw_unfreeze); }
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
17,556,905,631,951,240,000,000,000,000,000,000,000
9
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
handle_ftp_ctl(struct conntrack *ct, const struct conn_lookup_ctx *ctx, struct dp_packet *pkt, struct conn *ec, long long now, enum ftp_ctl_pkt ftp_ctl, bool nat) { struct ip_header *l3_hdr = dp_packet_l3(pkt); ovs_be32 v4_addr_rep = 0; union ct_addr v6_addr_rep; size_t add...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
275,467,793,346,094,200,000,000,000,000,000,000,000
100
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
CImg<T> get_crop(const int x0, const int y0, const int z0, const int c0, const int x1, const int y1, const int z1, const int c1, const unsigned int boundary_conditions=0) const { if (is_empty()) throw CImgInstanceException(_cimg_instance ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
145,401,728,773,906,670,000,000,000,000,000,000,000
55
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void tipc_netlink_compat_stop(void) { genl_unregister_family(&tipc_genl_compat_family); }
0
[ "CWE-200" ]
net
5d2be1422e02ccd697ccfcd45c85b4a26e6178e2
244,729,298,015,404,500,000,000,000,000,000,000,000
4
tipc: fix an infoleak in tipc_nl_compat_link_dump link_info.str is a char array of size 60. Memory after the NULL byte is not initialized. Sending the whole object out can cause a leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long vmflag) { unsigned long addr; /* do a global flush by default */ unsigned long base_pages_to_flush = TLB_FLUSH_ALL; preempt_disable(); if (current->active_mm != mm) goto out; if (!current->mm) { leave_mm(...
1
[ "CWE-362" ]
linux
71b3c126e61177eb693423f2e18a1914205b165e
137,563,516,796,776,540,000,000,000,000,000,000,000
40
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization When switch_mm() activates a new PGD, it also sets a bit that tells other CPUs that the PGD is in use so that TLB flush IPIs will be sent. In order for that to work correctly, the bit needs to be visible prior to loading the PGD and therefore star...
ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp_l(const char *s1, size_t len1, const char *s2, size_t len2, size_t length) /* {{{ */ { size_t len; int c1, c2; if (s1 == s2) { return 0; } len = MIN(length, MIN(len1, len2)); while (len--) { c1 = zend_tolower((int)*(unsigned char *)s1++); c2 = zend_tolower...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
100,360,521,287,032,970,000,000,000,000,000,000,000
19
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int p54u_open(struct ieee80211_hw *dev) { /* * TODO: Because we don't know how to reliably stop the 3887 and * the isl3886+net2280, other than brutally cut off all * communications. We have to reinitialize the urbs on every start. */ return p54u_init_urbs(dev); }
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
283,377,245,971,589,960,000,000,000,000,000,000,000
9
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
CSocket* CModule::FindSocket(const CString& sSockName) { for (CSocket* pSocket : m_sSockets) { if (pSocket->GetSockName().Equals(sSockName)) { return pSocket; } } return nullptr; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
175,818,165,198,291,330,000,000,000,000,000,000,000
9
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static void manager_print_jobs_in_progress(Manager *m) { _cleanup_free_ char *job_of_n = NULL; Iterator i; Job *j; unsigned counter = 0, print_nr; char cylon[6 + CYLON_BUFFER_EXTRA + 1]; unsigned cylon_pos; char time[FORMAT_TIMESPAN_MAX], limit[FORMAT_TIMESPAN_MAX...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
304,012,552,649,760,730,000,000,000,000,000,000,000
48
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static int ieee80211_set_monitor_channel(struct wiphy *wiphy, struct cfg80211_chan_def *chandef) { struct ieee80211_local *local = wiphy_priv(wiphy); struct ieee80211_sub_if_data *sdata; int ret = 0; if (cfg80211_chandef_identical(&local->monitor_chandef, chandef)) return 0; mutex_lock(&local->mtx); if ...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
53,863,919,048,959,310,000,000,000,000,000,000,000
29
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
int submodule_touches_in_range(struct object_id *excl_oid, struct object_id *incl_oid) { struct string_list subs = STRING_LIST_INIT_DUP; struct argv_array args = ARGV_ARRAY_INIT; int ret; gitmodules_config(); /* No need to check if there are no submodules configured */ if (!submodule_from_path(NULL, NU...
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
150,195,978,807,225,960,000,000,000,000,000,000,000
25
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format) { FUN_IN; return lys_parse_mem_(ctx, data, format, NULL, 0, 1); }
0
[ "CWE-617" ]
libyang
5ce30801f9ccc372bbe9b7c98bb5324b15fb010a
185,916,242,650,313,730,000,000,000,000,000,000,000
6
schema tree BUGFIX freeing nodes with no module set Context must be passed explicitly for these cases. Fixes #1452
int get_file_format(const char *filename) { unsigned int i; static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp", "tif", "tiff", "raw", "yuv", "rawl", "tga", "png", "j2k", "jp2", "jpt", "j2c", "jpc" }; static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, T...
0
[ "CWE-824" ]
openjpeg
0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
246,583,224,945,538,550,000,000,000,000,000,000,000
20
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
check_secret_key( DSA_secret_key *sk ) { int rc; gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) ); mpi_powm( y, sk->g, sk->x, sk->p ); rc = !mpi_cmp( y, sk->y ); mpi_free( y ); return rc; }
0
[ "CWE-203" ]
libgcrypt
7c2943309d14407b51c8166c4dcecb56a3628567
79,054,598,642,864,910,000,000,000,000,000,000,000
10
dsa,ecdsa: Fix use of nonce, use larger one. * cipher/dsa-common.c (_gcry_dsa_modify_k): New. * cipher/pubkey-internal.h (_gcry_dsa_modify_k): New. * cipher/dsa.c (sign): Use _gcry_dsa_modify_k. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise. * cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise. CVE-id: CVE-201...
static int ssl_parse_use_srtp_ext( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { mbedtls_ssl_srtp_profile client_protection = MBEDTLS_TLS_SRTP_UNSET; size_t i,j; size_t profile_length; uint16_t mki_length; /*!...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
311,264,045,438,894,340,000,000,000,000,000,000,000
117
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
static void hardware_disable_all(void) { raw_spin_lock(&kvm_count_lock); hardware_disable_all_nolock(); raw_spin_unlock(&kvm_count_lock); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
226,443,474,421,466,100,000,000,000,000,000,000,000
6
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...
Status operator()(OpKernelContext* c, const int rows, const int cols, TTypes<int>::UnalignedVec coo_row_ind, TTypes<int>::UnalignedVec csr_row_ptr) { GpuSparse cuda_sparse(c); TF_RETURN_IF_ERROR(cuda_sparse.Initialize()); return cuda_sparse.Coo2csr(coo_row_ind.data(...
0
[ "CWE-20", "CWE-703" ]
tensorflow
ea50a40e84f6bff15a0912728e35b657548cef11
13,686,299,709,382,702,000,000,000,000,000,000,000
9
Fix failed check in SparseTensorToCSRSparseMatrix Security vulnerability fix. A `CHECK` fails if inputing either an empty `dense_shape`, or a non-rank-2 `indices`. Added appropriate checks and tests. PiperOrigin-RevId: 446053984
static ssize_t phys_index_show(struct device *dev, struct device_attribute *attr, char *buf) { struct memory_block *mem = to_memory_block(dev); unsigned long phys_index; phys_index = mem->start_section_nr / sections_per_block; return sysfs_emit(buf, "%08lx\n", phys_index); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
295,958,208,365,473,900,000,000,000,000,000,000,000
9
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
PHP_FUNCTION(curl_version) { curl_version_info_data *d; zend_long uversion = CURLVERSION_NOW; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &uversion) == FAILURE) { return; } d = curl_version_info(uversion); if (d == NULL) { RETURN_FALSE; } array_init(return_value); CAAL("version_number", d->version...
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
147,857,574,116,038,700,000,000,000,000,000,000,000
38
Fixed bug #68739 #68740 #68741
spell_read_tree( FILE *fd, char_u **bytsp, idx_T **idxsp, int prefixtree, /* TRUE for the prefix tree */ int prefixcnt) /* when "prefixtree" is TRUE: prefix count */ { int len; int idx; char_u *bp; idx_T *ip; /* The tree size was computed when writing the file, so that we ca...
1
[ "CWE-190" ]
vim
399c297aa93afe2c0a39e2a1b3f972aebba44c9d
299,704,516,071,114,350,000,000,000,000,000,000,000
38
patch 8.0.0322: possible overflow with corrupted spell file Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking)
TEST_P(Http2CodecImplTest, InvalidHeadersFrameAllowed) { stream_error_on_invalid_http_messaging_ = true; initialize(); MockStreamCallbacks request_callbacks; request_encoder_->getStream().addCallbacks(request_callbacks); ON_CALL(client_connection_, write(_, _)) .WillByDefault( Invoke([&](Buf...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
209,570,851,545,663,960,000,000,000,000,000,000,000
18
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...
**/ CImg<T>& load_gzip_external(const char *const filename) { if (!filename) throw CImgIOException(_cimg_instance "load_gzip_external(): Specified filename is (null).", cimg_instance); std::fclose(cimg::fopen(filename,"rb")); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
260,438,234,397,786,640,000,000,000,000,000,000,000
43
Fix other issues in 'CImg<T>::load_bmp()'.
htmlParseHTMLName(htmlParserCtxtPtr ctxt) { int i = 0; xmlChar loc[HTML_PARSER_BUFFER_SIZE]; if (!IS_ASCII_LETTER(CUR) && (CUR != '_') && (CUR != ':') && (CUR != '.')) return(NULL); while ((i < HTML_PARSER_BUFFER_SIZE) && ((IS_ASCII_LETTER(CUR)) || (IS_ASCII_DIGIT(CUR)) || (CUR ...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
203,864,620,864,173,350,000,000,000,000,000,000,000
20
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
RZ_API RZ_OWN char *rz_bin_dex_resolve_proto_by_idx(RZ_NONNULL RzBinDex *dex, ut32 proto_idx) { rz_return_val_if_fail(dex, NULL); return dex_resolve_proto_id(dex, "", proto_idx, false); }
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
96,484,436,743,570,540,000,000,000,000,000,000,000
5
fix #2969 - oob write (1 byte) in dex.c
ProtocolV1::~ProtocolV1() { ceph_assert(out_q.empty()); ceph_assert(sent.empty()); delete[] temp_buffer; }
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
131,729,348,716,463,030,000,000,000,000,000,000,000
6
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
CryptRsaEncrypt( TPM2B_PUBLIC_KEY_RSA *cOut, // OUT: the encrypted data TPM2B *dIn, // IN: the data to encrypt OBJECT *key, // IN: the key used for encryption TPMT_RSA_DECRYPT *scheme, // IN: the type of padding and...
0
[ "CWE-787" ]
libtpms
505ef841c00b4c096b1977c667cb957bec3a1d8b
90,706,433,261,723,440,000,000,000,000,000,000,000
113
tpm2: Fix output buffer parameter and size for RSA decyrption For the RSA decryption we have to use an output buffer of the size of the (largest possible) RSA key for the decryption to always work. This fixes a stack corruption bug that caused a SIGBUS and termination of 'swtpm'. Signed-off-by: Stefan Berger <stefan...
static void hdr_dump_segments(struct crypt_device *cd, json_object *hdr_jobj) { char segment[16]; json_object *jobj_segments, *jobj_segment, *jobj1, *jobj2; int i, j, flags; uint64_t value; log_std(cd, "Data segments:\n"); json_object_object_get_ex(hdr_jobj, "segments", &jobj_segments); for (i = 0; i < LUKS2_S...
0
[ "CWE-787" ]
cryptsetup
52f5cb8cedf22fb3e14c744814ec8af7614146c7
77,552,299,903,071,060,000,000,000,000,000,000,000
54
Check segment gaps regardless of heap space. Segments are validated in hdr_validate_segments. Gaps in segment keys are detected when collecting offsets. But if an invalid segment is very large, larger than count, it could happen that cryptsetup is unable to allocate enough memory, not giving a clue about what actually...
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; zval **retval = &EX_T(opl...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
286,637,062,485,657,560,000,000,000,000,000,000,000
86
- 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
MD5auth_setkey( keyid_t keyno, int keytype, const u_char *key, size_t len ) { symkey * sk; symkey ** bucket; u_char * secret; size_t secretsize; DEBUG_ENSURE(keytype <= USHRT_MAX); DEBUG_ENSURE(len < 4 * 1024); /* * See if we already have the key. If so just stick in the * new value. */ bucket = ...
0
[ "CWE-416" ]
ntp
1bb401576f412532d8cdcca5509b85ad29605913
104,764,471,580,578,730,000,000,000,000,000,000,000
68
[TALOS-CAN-0054] memory corruption - make sure there's *always* a new buffer for storing the key again
MOVE_null(unsigned int x, unsigned int y) { (void) x; /* avoid -Wunused warning */ (void) y; }
0
[ "CWE-787" ]
gnuplot
963c7df3e0c5266efff260d0dff757dfe03d3632
135,753,929,330,119,620,000,000,000,000,000,000,000
5
Better error handling for faulty font syntax A missing close-quote in an enhanced text font specification could cause a segfault. Bug #2303
int ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx) { int ret; if (ttm->state != tt_unpopulated) return 0; if (ttm->bdev->driver->ttm_tt_populate) ret = ttm->bdev->driver->ttm_tt_populate(ttm, ctx); else ret = ttm_pool_populate(ttm, ctx); if (!ret) ttm_tt_add_mapping(ttm); return ret;...
0
[]
linux
5de5b6ecf97a021f29403aa272cb4e03318ef586
316,934,644,416,542,640,000,000,000,000,000,000,000
15
drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here...
static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); int noblock = flags & MSG_DONTWAIT; size_t copied = 0; int target, err; long timeo; IRDA_DEBUG(3, "%s()\n", __func__);...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
54,821,628,277,220,840,000,000,000,000,000,000,000
115
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...
int mp_sqrmod(mp_int *a, mp_int *b, mp_int *c) { return fp_sqrmod(a, b, c); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
15,506,335,419,763,614,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
pkcs11rsa_fromlabel(dst_key_t *key, const char *engine, const char *label, const char *pin) { CK_RV rv; CK_OBJECT_HANDLE hKey = CK_INVALID_HANDLE; CK_OBJECT_CLASS keyClass = CKO_PUBLIC_KEY; CK_KEY_TYPE keyType = CKK_RSA; CK_ATTRIBUTE searchTemplate[] = { { CKA_CLASS, &keyClass, (CK_ULONG) sizeof(keyClass)...
0
[ "CWE-617" ]
bind9
8d807cc21655eaa6e6a08afafeec3682c0f3f2ab
92,717,717,837,329,350,000,000,000,000,000,000,000
148
Fix crash in pk11_numbits() when native-pkcs11 is used When pk11_numbits() is passed a user provided input that contains all zeroes (via crafted DNS message), it would crash with assertion failure. Fix that by properly handling such input.
static void ipv4ll_stop(GDHCPClient *dhcp_client) { switch_listening_mode(dhcp_client, L_NONE); remove_timeouts(dhcp_client); if (dhcp_client->listener_watch > 0) { g_source_remove(dhcp_client->listener_watch); dhcp_client->listener_watch = 0; } dhcp_client->state = IPV4LL_PROBE; dhcp_client->retry_times ...
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
247,704,315,833,508,760,000,000,000,000,000,000,000
19
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
format_BUNDLE(const struct ofpact_bundle *a, struct ds *s) { bundle_format(a, s); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
251,673,208,277,296,850,000,000,000,000,000,000,000
4
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 Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) { #define ThrowPCXException(severity,tag) \ { \ if (scanline != (unsigned char *) NULL) \ scanline=(unsigned char *) RelinquishMagickMemory(scanline); \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemor...
0
[ "CWE-772" ]
ImageMagick
df8a62fe4938aa41a39e815937c58bc0ed21b664
333,875,682,904,783,800,000,000,000,000,000,000,000
499
https://github.com/ImageMagick/ImageMagick/issues/1049
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, ASN1_OCTET_STRING **pid, ASN1_GENERALIZEDTIME **pdate, ASN1_OBJECT **potherid, ...
0
[ "CWE-311", "CWE-327" ]
openssl
08229ad838c50f644d7e928e2eef147b4308ad64
258,893,535,921,794,050,000,000,000,000,000,000,000
33
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...
void Right(const CPUDevice& d, typename Functor::tout_type out, typename Functor::tin_type in, typename Functor::tscalar_type scalar, bool* error) { typedef typename Functor::out_type Tout; typedef typename Functor::in_type Tin; typedef typename Functor::func Binary; typedef ...
0
[ "CWE-476", "CWE-787" ]
tensorflow
93f428fd1768df147171ed674fee1fc5ab8309ec
1,909,919,268,938,325,200,000,000,000,000,000,000
11
Fix nullptr deref and heap OOB access in binary cwise ops. PiperOrigin-RevId: 387936777 Change-Id: I608b8074cec36a982cca622b7144cb2c43e6e19f
void Gfx::opCloseEOFillStroke(Object args[], int numArgs) { if (!state->isCurPt()) { //error(getPos(), "No path in closepath/eofill/stroke"); return; } if (state->isPath() && !contentIsHidden()) { state->closePath(); if (state->getFillColorSpace()->getMode() == csPattern) { doPatternFill(gTr...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
98,945,325,137,195,610,000,000,000,000,000,000,000
20
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void fdctrl_handle_version(FDCtrl *fdctrl, int direction) { /* Controller's version */ fdctrl->fifo[0] = fdctrl->version; fdctrl_to_result_phase(fdctrl, 1); }
0
[ "CWE-787" ]
qemu
defac5e2fbddf8423a354ff0454283a2115e1367
47,205,095,909,017,780,000,000,000,000,000,000,000
6
hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) Per the 82078 datasheet, if the end-of-track (EOT byte in the FIFO) is more than the number of sectors per side, the command is terminated unsuccessfully: * 5.2.5 DATA TRANSFER TERMINATION The 82078 supports terminal count explicitly through the TC pin a...
scanner_literal_exists (parser_context_t *context_p, /**< context */ uint16_t literal_index) /**< literal index */ { JERRY_ASSERT (literal_index < PARSER_REGISTER_START); parser_scope_stack_t *scope_stack_p = context_p->scope_stack_p + context_p->scope_stack_top; while (scope_stack_p-- >...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
276,687,274,130,279,400,000,000,000,000,000,000,000
18
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static struct device *wakeup_source_device_create(struct device *parent, struct wakeup_source *ws) { struct device *dev = NULL; int retval = -ENODEV; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) { retval = -ENOMEM; goto error; } device_initialize(dev); dev->devt = MKDEV(0, 0); dev->class = w...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
317,270,835,015,701,500,000,000,000,000,000,000,000
35
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static void x509_append(const br_x509_class **ctx, const unsigned char *buf, size_t len) { struct x509_context *x509 = (struct x509_context *)ctx; x509->minimal.vtable->append(&x509->minimal.vtable, buf, len); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
71,385,746,729,786,740,000,000,000,000,000,000,000
7
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static struct net_bridge_mdb_entry *br_mdb_ip_get( struct net_bridge_mdb_htable *mdb, struct br_ip *dst) { if (!mdb) return NULL; return __br_mdb_ip_get(mdb, dst, br_ip_hash(mdb, dst)); }
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
21,767,744,532,391,913,000,000,000,000,000,000,000
8
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
my_suspend_hook(my_bool suspend, void *data) { struct my_hook_data *hook_data= (struct my_hook_data *)data; if (suspend) { hook_data->orig_vio= hook_data->orig_mysql->net.vio; hook_data->orig_mysql->net.vio= hook_data->new_mysql->net.vio; } else hook_data->orig_mysql->net.vio= hook_data->orig_vio;...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
325,777,907,714,478,200,000,000,000,000,000,000,000
11
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
input_buffer& ServerKeyExchange::set(input_buffer& in) { return in; // process does }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
81,204,872,041,370,730,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static inline int spl_array_object_verify_pos(spl_array_object *object, HashTable *ht TSRMLS_DC) { return spl_array_object_verify_pos_ex(object, ht, "" TSRMLS_CC); } /* }}} */
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
159,566,303,798,759,400,000,000,000,000,000,000,000
4
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu) { struct sk_buff *skb = hu->tx_skb; if (!skb) { percpu_down_read(&hu->proto_lock); if (test_bit(HCI_UART_PROTO_READY, &hu->flags)) skb = hu->proto->dequeue(hu); percpu_up_read(&hu->proto_lock); } else { hu->tx_skb = NULL; } return s...
0
[ "CWE-416" ]
linux
56897b217a1d0a91c9920cb418d6b3fe922f590a
205,752,748,307,323,950,000,000,000,000,000,000,000
17
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() task A: task B: hci_uart_set_proto flush_to_ldisc - p->open(hu) -> h5_open //alloc h5 - receive_buf - set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf - hci_uar...
AsyncConnection::~AsyncConnection() { assert(out_q.empty()); assert(sent.empty()); delete authorizer; if (recv_buf) delete[] recv_buf; if (state_buffer) delete[] state_buffer; assert(!delay_state); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
74,709,835,926,813,200,000,000,000,000,000,000,000
11
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 ...
AA_7_State13SendAbort(PRIVATE_NETWORKKEY ** /* network */, PRIVATE_ASSOCIATIONKEY ** association, int nextState, void * /*params*/) { DUL_ABORTITEMS abortItems; abortItems.result = 0x00; abortItems.source = DUL_ABORTSERVICEPROVIDER; abortItems.reason = DUL_ABORTUNEXPECTEDPDU; OFCondition ...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
126,803,212,092,212,130,000,000,000,000,000,000,000
13
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
lookup_file_id (struct stat const *st) { file_id *p = __lookup_file_id (st); return p ? p->type : UNKNOWN; }
0
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
97,236,031,537,947,260,000,000,000,000,000,000,000
6
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
static int handle_vmx_instruction(struct kvm_vcpu *vcpu) { kvm_queue_exception(vcpu, UD_VECTOR); return 1; }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
327,210,390,072,936,360,000,000,000,000,000,000,000
5
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
int git_pkt_buffer_have(git_oid *oid, git_buf *buf) { char oidhex[GIT_OID_HEXSZ + 1]; memset(oidhex, 0x0, sizeof(oidhex)); git_oid_fmt(oidhex, oid); return git_buf_printf(buf, "%s%s\n", pkt_have_prefix, oidhex); }
0
[ "CWE-119", "CWE-787" ]
libgit2
66e3774d279672ee51c3b54545a79d20d1ada834
238,348,735,689,772,600,000,000,000,000,000,000,000
8
smart_pkt: verify packet length exceeds PKT_LEN_SIZE Each packet line in the Git protocol is prefixed by a four-byte length of how much data will follow, which we parse in `git_pkt_parse_line`. The transmitted length can either be equal to zero in case of a flush packet or has to be at least of length four, as it also...
dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, size_t size, off_t fsize, int sh_num, int *flags, uint16_t *notecount) { Elf32_Phdr ph32; Elf64_Phdr ph64; const char *linking_style = "statically"; unsigned char nbuf[BUFSIZ]; char ibuf[BUFSIZ]; char interp[BUFSIZ]; ssize_...
0
[ "CWE-125" ]
file
a642587a9c9e2dd7feacdf513c3643ce26ad3c22
103,156,683,963,807,070,000,000,000,000,000,000,000
123
Avoid reading past the end of buffer (Rui Reis)
void dump_isom_scene_stats(char *file, char *inName, Bool is_final_name, u32 stat_level) { GF_Err e; FILE *dump; Bool close; u32 i, j, count; char szBuf[1024]; GF_SceneManager *ctx; GF_SceneLoader load; GF_StatManager *sm; GF_List *sample_list; GF_SceneGraph *scene_graph; dump = NULL; sm = NULL; sample_li...
0
[ "CWE-476", "CWE-401" ]
gpac
289ffce3e0d224d314f5f92a744d5fe35999f20b
258,502,178,776,589,340,000,000,000,000,000,000,000
136
fixed #1767 (fuzz)
int ripemd_test() { RIPEMD160 ripe160; byte hash[RIPEMD160::DIGEST_SIZE]; testVector test_ripemd[] = { testVector("", "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28\x08\x97\x7e\xe8" "\xf5\x48\xb2\x25\x8d\x31"), testVector("a", "\x0b\x...
0
[]
mysql-server
5c6169fb309981b564a17bee31b367a18866d674
220,976,305,424,820,820,000,000,000,000,000,000,000
46
Bug #24740291: YASSL UPDATE TO 2.4.2
int smb_vfs_call_link(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath) { VFS_FIND(link); return handle->fns->link(handle, oldpath, newpath); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
252,219,188,788,312,650,000,000,000,000,000,000,000
6
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
mrb_mruby_fiber_gem_final(mrb_state* mrb) { }
0
[ "CWE-476", "CWE-703" ]
mruby
da48e7dbb20024c198493b8724adae1b842083aa
316,850,756,343,008,900,000,000,000,000,000,000,000
3
fiber.c: should pack 15+ arguments in an array.
void Magick::Image::evaluate(const ChannelType channel_, const MagickFunction function_,const size_t number_parameters_, const double *parameters_) { GetPPException; GetAndSetPPChannelMask(channel_); FunctionImage(image(),function_,number_parameters_,parameters_, exceptionInfo); RestorePPChannelMask; ...
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
211,696,676,649,242,330,000,000,000,000,000,000,000
11
Added missing return to avoid use after free.
static void nfs4_session_limit_xasize(struct nfs_server *server) { #ifdef CONFIG_NFS_V4_2 struct nfs4_session *sess; u32 server_gxa_sz; u32 server_sxa_sz; u32 server_lxa_sz; if (!nfs4_has_session(server->nfs_client)) return; sess = server->nfs_client->cl_session; server_gxa_sz = sess->fc_attrs.max_resp_sz -...
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
193,883,164,013,034,500,000,000,000,000,000,000,000
26
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
Buf getBuf(const std::string& hex) { auto data = unhexlify(hex); return IOBuf::copyBuffer(data.data(), data.size()); }
0
[ "CWE-119", "CWE-835", "CWE-787" ]
fizz
40bbb161e72fb609608d53b9d64c56bb961a6ee2
269,224,522,432,139,300,000,000,000,000,000,000,000
4
Avoid arithmetic operation on uint16 read from the wire. Summary: This could overflow previously. CVE-2019-3560 Reviewed By: yfeldblum Differential Revision: D14152362 fbshipit-source-id: c0ebb3fc59b49c7c23e6bcb90458c19cd891be65
static ssize_t ati_remote2_store_channel_mask(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct usb_device *udev = to_usb_device(dev); struct usb_interface *intf = usb_ifnum_to_if(udev, 0); struct ati_remote2 *ar2 = usb_get_intfdata(intf); unsigned int ...
0
[ "CWE-703" ]
linux
950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d
302,635,831,044,006,830,000,000,000,000,000,000,000
38
Input: ati_remote2 - fix crashes on detecting device with invalid descriptor The ati_remote2 driver expects at least two interfaces with one endpoint each. If given malicious descriptor that specify one interface or no endpoints, it will crash in the probe function. Ensure there is at least two interfaces and one endp...
nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr, struct nfs_getaclres *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto out; status = decode_putfh(xdr); i...
1
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
256,319,801,404,611,500,000,000,000,000,000,000,000
20
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
GF_Err paen_box_read(GF_Box *s, GF_BitStream *bs) { return gf_isom_box_array_read(s, bs);
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
259,116,613,970,398,030,000,000,000,000,000,000,000
4
fixed #1757
void ServerConnectionImpl::onEncodeComplete() { if (active_request_.value().remote_complete_) { // Only do this if remote is complete. If we are replying before the request is complete the // only logical thing to do is for higher level code to reset() / close the connection so we // leave the request aro...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
261,715,152,025,548,700,000,000,000,000,000,000,000
8
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static void rpmsg_remove(struct virtio_device *vdev) { struct virtproc_info *vrp = vdev->priv; size_t total_buf_space = vrp->num_bufs * vrp->buf_size; int ret; virtio_reset_device(vdev); ret = device_for_each_child(&vdev->dev, NULL, rpmsg_remove_device); if (ret) dev_warn(&vdev->dev, "can't remove rpmsg devic...
0
[ "CWE-415" ]
linux
1680939e9ecf7764fba8689cfb3429c2fe2bb23c
216,816,637,525,073,350,000,000,000,000,000,000,000
21
rpmsg: virtio: Fix possible double free in rpmsg_virtio_add_ctrl_dev() vch will be free in virtio_rpmsg_release_device() when rpmsg_ctrldev_register_device() fails. There is no need to call kfree() again. Fixes: c486682ae1e2 ("rpmsg: virtio: Register the rpmsg_char device") Signed-off-by: Hangyu Hua <hbh25y@gmail.com...
static void virtio_gpu_notify_event(VirtIOGPU *g, uint32_t event_type) { g->virtio_config.events_read |= event_type; virtio_notify_config(&g->parent_obj); }
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
317,176,025,451,739,300,000,000,000,000,000,000,000
5
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
int install_session_keyring_to_cred(struct cred *cred, struct key *keyring) { unsigned long flags; struct key *old; might_sleep(); /* create an empty session keyring */ if (!keyring) { flags = KEY_ALLOC_QUOTA_OVERRUN; if (cred->session_keyring) flags = KEY_ALLOC_IN_QUOTA; keyring = keyring_alloc("_ses"...
0
[ "CWE-362" ]
linux
0da9dfdd2cd9889201bc6f6f43580c99165cd087
75,717,429,095,129,570,000,000,000,000,000,000,000
31
keys: fix race with concurrent install_user_keyrings() This fixes CVE-2013-1792. There is a race in install_user_keyrings() that can cause a NULL pointer dereference when called concurrently for the same user if the uid and uid-session keyrings are not yet created. It might be possible for an unprivileged user to tr...
static inline void io_req_task_complete(struct io_kiocb *req, bool *locked) { int res = req->cqe.res; if (*locked) { io_req_complete_state(req, res, io_put_kbuf(req, 0)); io_req_add_compl_list(req); } else { io_req_complete_post(req, res, io_put_kbuf(req, IO_URING_F_UNLOCKED)); } }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
316,960,564,123,411,330,000,000,000,000,000,000,000
12
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...
static int audit_log_common_recv_msg(struct audit_buffer **ab, u16 msg_type) { int rc = 0; uid_t uid = from_kuid(&init_user_ns, current_uid()); pid_t pid = task_tgid_nr(current); if (!audit_enabled && msg_type != AUDIT_USER_AVC) { *ab = NULL; return rc; } *ab = audit_log_start(NULL, GFP_KERNEL, msg_type); ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
284,200,626,200,750,880,000,000,000,000,000,000,000
20
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
f_sign_getplaced(typval_T *argvars, typval_T *rettv) { buf_T *buf = NULL; dict_T *dict; dictitem_T *di; linenr_T lnum = 0; int sign_id = 0; char_u *group = NULL; int notanum = FALSE; if (rettv_list_alloc_id(rettv, aid_sign_getplaced) != OK) return; if (argvars[0].v_type != VAR_U...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
6,987,642,034,709,930,000,000,000,000,000,000,000
56
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static int ext4_xattr_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo) { __u64 physical = 0; __u64 length; __u32 flags = FIEMAP_EXTENT_LAST; int blockbits = inode->i_sb->s_blocksize_bits; int error = 0; /* in-inode? */ if (ext4_test_inode_state(inode, EXT4_STATE_XATTR)) { struct ext4_iloc i...
0
[ "CWE-362" ]
linux-2.6
dee1f973ca341c266229faa5a1a5bb268bed3531
295,521,319,546,684,250,000,000,000,000,000,000,000
34
ext4: race-condition protection for ext4_convert_unwritten_extents_endio We assumed that at the time we call ext4_convert_unwritten_extents_endio() extent in question is fully inside [map.m_lblk, map->m_len] because it was already split during submission. But this may not be true due to a race between writeback vs fa...
copy_dest_receive(TupleTableSlot *slot, DestReceiver *self) { DR_copy *myState = (DR_copy *) self; CopyState cstate = myState->cstate; /* Make sure the tuple is fully deconstructed */ slot_getallattrs(slot); /* And send the data */ CopyOneRowTo(cstate, InvalidOid, slot->tts_values, slot->tts_isnull); myStat...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
101,866,538,775,945,910,000,000,000,000,000,000,000
12
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, const struct in6_addr *daddr, u32 rnd) { u32 a, b, c; a = (__force u32)saddr->s6_addr32[0]; b = (__force u32)saddr->s6_addr32[1]; c = (__force u32)saddr->s6_addr32[2]; a += JHASH_GOLDEN_RATIO; b += JHASH_GOLDEN_RATIO; c += rnd; __jh...
0
[]
linux-2.6
70789d7052239992824628db8133de08dc78e593
195,764,896,639,007,500,000,000,000,000,000,000,000
26
ipv6: discard overlapping fragment RFC5722 prohibits reassembling fragments when some data overlaps. Bug spotted by Zhang Zuotao <zuotao.zhang@6wind.com>. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
timeval_divide(struct timeval* avg, const struct timeval* sum, size_t d) { #ifndef S_SPLINT_S size_t leftover; if(d <= 0) { avg->tv_sec = 0; avg->tv_usec = 0; return; } avg->tv_sec = sum->tv_sec / d; avg->tv_usec = sum->tv_usec / d; /* handle fraction from seconds divide */ leftover = sum->tv_sec - avg->tv...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
291,516,908,791,139,050,000,000,000,000,000,000,000
22
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
void CiffComponent::doRead(const byte* pData, uint32_t size, uint32_t start, ByteOrder byteOrder) { if (size < 10) throw Error(kerNotACrwImage); tag_ = getUShort(pData + start, byteOrder); ...
0
[ "CWE-400" ]
exiv2
b3d077dcaefb6747fff8204490f33eba5a144edb
288,050,026,927,765,200,000,000,000,000,000,000,000
29
Fix #460 by adding more checks in CiffDirectory::readDirectory
static int tcp_is_sackfrto(const struct tcp_sock *tp) { return (sysctl_tcp_frto == 0x2) && !tcp_is_reno(tp); }
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
249,464,223,274,128,050,000,000,000,000,000,000,000
4
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
TEST(IndexBoundsBuilderTest, IntersectizeBasic) { OrderedIntervalList oil1("xyz"); oil1.intervals = {Interval(BSON("" << 0 << "" << 5), false, false)}; OrderedIntervalList oil2("xyz"); oil2.intervals = {Interval(BSON("" << 1 << "" << 6), false, false)}; IndexBoundsBuilder::intersectize(oil1, &oil2...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
190,754,964,184,653,830,000,000,000,000,000,000,000
14
SERVER-44377 generate correct plan for indexed inequalities to null
static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_createdata *data) { int status = rpc_call_sync(NFS_CLIENT(dir), &data->msg, 0); if (status == 0) { update_changeattr(dir, &data->res.dir_cinfo); nfs_post_op_update_inode(dir, data->res.dir_fattr); status = nfs_instantiate(dentry, da...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
224,669,276,612,909,800,000,000,000,000,000,000,000
10
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
agent_get_version (ctrl_t ctrl, char **r_version) { gpg_error_t err; membuf_t data; err = start_agent (ctrl, 0); if (err) return err; init_membuf (&data, 64); err = assuan_transact (agent_ctx, "GETINFO version", membuf_data_cb, &data, NULL, NULL, NULL, N...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
1,271,922,559,239,710,900,000,000,000,000,000,000
27
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
Status getAuthorizationVersion(OperationContext*, int*) override { UASSERT_NOT_IMPLEMENTED; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
130,844,939,686,146,160,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static inline int sk_stream_wspace(struct sock *sk) { return sk->sk_sndbuf - sk->sk_wmem_queued; }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
154,273,744,416,452,120,000,000,000,000,000,000,000
4
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
string_dequote(const uschar **sptr) { const uschar *s = *sptr; uschar *t, *yield; /* First find the end of the string */ if (*s != '\"') { while (*s != 0 && !isspace(*s)) s++; } else { s++; while (*s != 0 && *s != '\"') { if (*s == '\\') (void)string_interpret_escape(&s); s++; } if (*s !...
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
177,740,069,433,354,000,000,000,000,000,000,000,000
51
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
static bool download_and_write(SPDBDownloaderOpt *opt, const char *file) { char *dir = r_str_newf ("%s%s%s%s%s", opt->symbol_store_path, R_SYS_DIR, opt->dbg_file, R_SYS_DIR, opt->guid); if (!r_sys_mkdirp (dir)) { free (dir); return false; } char *url = r_str_newf ("%s/%s/%s/%s", opt->symbol_server, opt->d...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
221,582,431,853,521,630,000,000,000,000,000,000,000
29
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
find_end_event( char_u *arg, int have_group) /* TRUE when group name was found */ { char_u *pat; char_u *p; if (*arg == '*') { if (arg[1] && !VIM_ISWHITE(arg[1])) { EMSG2(_("E215: Illegal character after *: %s"), arg); return NULL; } pat = arg + 1; } else { ...
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
233,613,613,115,932,270,000,000,000,000,000,000,000
32
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
static ssize_t hugetlbfs_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) { struct hstate *h = hstate_file(filp); struct address_space *mapping = filp->f_mapping; struct inode *inode = mapping->host; unsigned long index = *ppos >> huge_page_shift(h); unsigned long offset = *ppos & ~huge...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
94,359,318,268,912,640,000,000,000,000,000,000,000
78
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static int ieee80211_fragment(struct ieee80211_tx_data *tx, struct sk_buff *skb, int hdrlen, int frag_threshold) { struct ieee80211_local *local = tx->local; struct ieee80211_tx_info *info; struct sk_buff *tmp; int per_fragm = frag_threshold - hdrlen - FCS_LEN; int pos = hdrlen + per_fragm; int ...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
3,153,535,598,598,941,000,000,000,000,000,000,000
59
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
static int selinux_inet_conn_request(struct sock *sk, struct sk_buff *skb, struct request_sock *req) { struct sk_security_struct *sksec = sk->sk_security; int err; u16 family = req->rsk_ops->family; u32 connsid; u32 peersid; err = selinux_skb_peerlbl_sid(skb, family, &peersid); if (err) return err; ...
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
304,452,093,872,174,770,000,000,000,000,000,000,000
20
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
Result visit_any_double(T) { return FMT_DISPATCH(visit_unhandled_arg()); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
328,883,067,951,292,730,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
GtkTreeModel *bluetooth_client_get_device_model (BluetoothClient *client) { BluetoothClientPrivate *priv; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; gboolean cont, found = FALSE; g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), NULL); priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); cont = gtk_t...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
324,856,945,673,415,100,000,000,000,000,000,000,000
36
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
static int snd_pcm_rewind_ioctl(struct snd_pcm_substream *substream, snd_pcm_uframes_t __user *_frames) { snd_pcm_uframes_t frames; snd_pcm_sframes_t result; if (get_user(frames, _frames)) return -EFAULT; if (put_user(0, _frames)) return -EFAULT; result = snd_pcm_rewind(substream, frames); if (put_user(r...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
23,937,079,671,441,710,000,000,000,000,000,000,000
15
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
static struct hlist_nulls_node *ct_get_next(struct seq_file *seq, struct hlist_nulls_node *head) { struct ct_iter_state *st = seq->private; head = rcu_dereference(hlist_nulls_next_rcu(head)); while (is_a_nulls(head)) { if (likely(get_nulls_value(head) == st->bucket)) { if (++st->bucket >= st->htable_...
0
[ "CWE-203" ]
linux
2671fa4dc0109d3fb581bc3078fdf17b5d9080f6
132,072,647,235,355,900,000,000,000,000,000,000,000
16
netfilter: conntrack: Make global sysctls readonly in non-init netns These sysctls point to global variables: - NF_SYSCTL_CT_MAX (&nf_conntrack_max) - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max) - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user) Because their data pointers are not updated to point to per-netns s...
u16 tipc_link_acked(struct tipc_link *l) { return l->acked; }
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
170,180,229,065,722,660,000,000,000,000,000,000,000
4
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
static int vbg_input_open(struct input_dev *input) { struct vbg_dev *gdev = input_get_drvdata(input); u32 feat = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_NEW_PROTOCOL; int ret; ret = vbg_core_set_mouse_status(gdev, feat); if (ret) return ret; return 0; }
0
[ "CWE-362" ]
linux
bd23a7269834dc7c1f93e83535d16ebc44b75eba
147,817,061,373,223,910,000,000,000,000,000,000,000
12
virt: vbox: Only copy_from_user the request-header once In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the 'version', 'size_in', and 'size_out' fields of 'hdr' are verified. Before this commit, after the checks a buffe...
Http2Scope::Http2Scope(Http2Stream* stream) : Http2Scope(stream->session()) {}
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
205,658,107,315,339,600,000,000,000,000,000,000,000
1
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
inline void ResizeBilinear(const float* input_data, const Dims<4>& input_dims, const int32* output_size_data, const Dims<4>& output_size_dims, float* output_data, const Dims<4>& output_dims, bool align_corners) { tflite::ResizeBilinearPa...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
238,239,972,411,041,570,000,000,000,000,000,000,000
11
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
R_API bool r_bin_file_set_cur_binfile(RBin *bin, RBinFile *bf) { r_return_val_if_fail (bin && bf, false); return r_bin_file_set_obj (bin, bf, bf->o); }
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
37,993,411,841,295,360,000,000,000,000,000,000,000
4
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
Item *get_item() const { return m_item; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
45,960,931,740,557,940,000,000,000,000,000,000,000
4
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...