func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
xsmp_get_restart_command (GsmClient *client) { SmProp *prop; prop = find_property (GSM_XSMP_CLIENT (client), SmRestartCommand, NULL); if (!prop || strcmp (prop->type, SmLISTofARRAY8) != 0) { return NULL; } return prop_to_command (prop); }
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
210,585,139,778,889,360,000,000,000,000,000,000,000
12
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
int cfg80211_external_auth_request(struct net_device *dev, struct cfg80211_external_auth_params *params, gfp_t gfp) { struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); struct sk_buff *msg; void *hdr; if (!wdev->conn_owner_nlportid) ...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
280,047,694,797,399,680,000,000,000,000,000,000,000
39
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp) { struct bnx2x_vlan_entry *vlan; /* The hw forgot all entries after reload */ list_for_each_entry(vlan, &bp->vlan_reg, link) vlan->hw = false; bp->vlan_cnt = 0; /* Don't set rx mode here. Our caller will do it. */ bnx2x_vlan_configure(bp, false); return 0; }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
84,282,131,828,567,800,000,000,000,000,000,000,000
14
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static int send_jpeg_rect(VncState *vs, int x, int y, int w, int h, int quality) { struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; struct jpeg_destination_mgr manager; pixman_image_t *linebuf; JSAMPROW row[1]; uint8_t *buf; int dy; if (surface_bytes_per_pixel(vs->vd->ds) ...
1
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
286,877,895,229,375,430,000,000,000,000,000,000,000
55
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'. ...
SetDeviceIndicators(char *wire, DeviceIntPtr dev, unsigned changed, int num, int *status_rtrn, ClientPtr client, xkbExtensionDeviceNotify * ev, xkbSetDeviceInfoReq * stuff) { x...
0
[ "CWE-94", "CWE-787" ]
xorg-xserver
dd8caf39e9e15d8f302e54045dd08d8ebf1025dc
287,496,678,008,005,180,000,000,000,000,000,000,000
96
xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck XKB often uses a FooCheck and Foo function pair, the former is supposed to check all values in the request and error out on BadLength, BadValue, etc. The latter is then called once we're confident the values are good (they may still fail on an individual device, but...
int setpwnam(struct passwd *pwd, const char *prefix) { FILE *fp = NULL, *pwf = NULL; int save_errno; int found; int namelen; int buflen = 256; int contlen, rc; char *linebuf = NULL; char *tmpname = NULL; pw_init(); if ((fp = xfmkstemp(&tmpname, "/etc", prefix)) == NULL) return -1; /* ptmp should be owne...
0
[ "CWE-264" ]
util-linux
bde91c85bdc77975155058276f99d2e0f5eab5a9
117,802,957,772,390,740,000,000,000,000,000,000,000
111
chsh, chfn, vipw: fix filenames collision The utils when compiled WITHOUT libuser then mkostemp()ing "/etc/%s.XXXXXX" where the filename prefix is argv[0] basename. An attacker could repeatedly execute the util with modified argv[0] and after many many attempts mkostemp() may generate suffix which makes sense. The re...
bool vfs_init_custom(connection_struct *conn, const char *vfs_object) { char *module_path = NULL; char *module_name = NULL; char *module_param = NULL, *p; vfs_handle_struct *handle; const struct vfs_init_function_entry *entry; if (!conn||!vfs_object||!vfs_object[0]) { DEBUG(0,("vfs_init_custon() called with NU...
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
98,089,052,155,169,570,000,000,000,000,000,000,000
96
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...
StringRef ClientHandler::get_forwarded_for() const { return forwarded_for_; }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
252,333,375,683,877,140,000,000,000,000,000,000,000
1
Don't read too greedily
ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */ { return i_zend_is_true(op); }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
301,473,699,579,580,540,000,000,000,000,000,000,000
4
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 void qeth_core_shutdown(struct ccwgroup_device *gdev) { struct qeth_card *card = dev_get_drvdata(&gdev->dev); if (card->discipline && card->discipline->shutdown) card->discipline->shutdown(gdev); }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
239,524,726,913,248,720,000,000,000,000,000,000,000
6
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
TEST_F(ConnectionManagerUtilityTest, MtlsAppendForwardClientCertLocalSanEmpty) { auto ssl = std::make_shared<NiceMock<Ssl::MockConnectionInfo>>(); ON_CALL(*ssl, peerCertificatePresented()).WillByDefault(Return(true)); EXPECT_CALL(*ssl, uriSanLocalCertificate()).WillOnce(Return(std::vector<std::string>())); std:...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
41,384,660,121,952,620,000,000,000,000,000,000,000
24
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int __gfar_is_rx_idle(struct gfar_private *priv) { u32 res; /* Normaly TSEC should not hang on GRS commands, so we should * actually wait for IEVENT_GRSC flag. */ if (!gfar_has_errata(priv, GFAR_ERRATA_A002)) return 0; /* Read the eTSEC register at offset 0xD1C. If bits 7-14 are * the same as bits ...
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
296,278,878,923,710,500,000,000,000,000,000,000,000
21
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
static int proc_keys_show(struct seq_file *m, void *v) { struct rb_node *_p = v; struct key *key = rb_entry(_p, struct key, serial_node); struct timespec now; unsigned long timo; key_ref_t key_ref, skey_ref; char xbuf[16]; int rc; struct keyring_search_context ctx = { .index_key.type = key->type, .index_k...
1
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
200,593,292,371,166,820,000,000,000,000,000,000,000
90
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
int set_decryption_key(MOBIData *m, const char *serial, const char *pid) { if (!pid && !serial) { return SUCCESS; } if (!mobi_is_encrypted(m)) { printf("\nDocument is not encrypted, ignoring PID/serial\n"); return SUCCESS; } if (m->rh && m->rh->encryption_type == MOBI_ENCRYP...
0
[ "CWE-476" ]
libmobi
c0699c8693c47f14a2e57dec7292e862ac7adf9c
145,890,109,952,082,980,000,000,000,000,000,000,000
22
Fix undefined behavior when passing null to strdup
int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) { int i, r; struct kvm_io_bus *new_bus, *bus; bus = kvm->buses[bus_idx]; r = -ENOENT; for (i = 0; i < bus->dev_count; i++) if (bus->range[i].dev == dev) { r = 0; break; } if (r) return r; new_b...
0
[ "CWE-416", "CWE-284" ]
linux
a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
241,404,663,845,543,120,000,000,000,000,000,000,000
32
KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: ...
_PUBLIC_ bool strhasupper_handle(struct smb_iconv_handle *ic, const char *string) { while (*string) { size_t c_size; codepoint_t s; codepoint_t t; s = next_codepoint_handle(ic, string, &c_size); string += c_size; t = tolower_m(s); if (s != t) { return true; /* that means it has upper case char...
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
200,010,603,208,621,840,000,000,000,000,000,000,000
20
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
static void selinux_task_getsecid(struct task_struct *p, u32 *secid) { *secid = task_sid(p); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
92,444,449,862,635,330,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int rfc4106_set_authsize(struct crypto_aead *parent, unsigned int authsize) { struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(parent); struct crypto_aead *cryptd_child = cryptd_aead_child(ctx->cryptd_tfm); switch (authsize) { case 8: case 12: case 16: break; default: return -EINVAL;...
0
[ "CWE-119", "CWE-787" ]
linux
ccfe8c3f7e52ae83155cb038753f4c75b774ca8a
104,680,751,451,678,620,000,000,000,000,000,000,000
18
crypto: aesni - fix memory usage in GCM decryption The kernel crypto API logic requires the caller to provide the length of (ciphertext || authentication tag) as cryptlen for the AEAD decryption operation. Thus, the cipher implementation must calculate the size of the plaintext output itself and cannot simply use cryp...
iscsi_user_scan_session); } static void iscsi_scan_session(struct work_struct *work) { struct iscsi_cls_session *session = container_of(work, struct iscsi_cls_session, scan_work); struct Scsi_Host *shost = iscsi_session_to_shost(session); struct iscsi_cls_host *ihost = shost->shost_data; struct iscsi_s...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
325,928,097,346,770,250,000,000,000,000,000,000,000
16
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key) { SysScanDesc sysscan; Relation irel; if (indexOK && !IgnoreSystemIndexes && !ReindexIsProcessingIndex(indexId)) irel = index_open(indexId, AccessShareLock); else irel...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
308,873,096,221,892,330,000,000,000,000,000,000,000
77
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...
static const char *tag2str(unsigned int tag) { static const char *tags[] = { "EOC", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", /* 0-4 */ "NULL", "OBJECT IDENTIFIER", "OBJECT DESCRIPTOR", "EXTERNAL", "REAL", /* 5-9 */ "ENUMERATED", "Universal 11", "UTF8String", "Universal 13", /* 10-13 */ "Universal 14...
0
[ "CWE-119", "CWE-787" ]
OpenSC
412a6142c27a5973c61ba540e33cdc22d5608e68
88,947,172,337,812,280,000,000,000,000,000,000,000
17
fixed out of bounds access of ASN.1 Bitstring Credit to OSS-Fuzz
static void gf_dump_vrml_simple_field(GF_SceneDumper *sdump, GF_FieldInfo field, GF_Node *parent) { u32 i, sf_type; GF_ChildNodeItem *list; void *slot_ptr; switch (field.fieldType) { case GF_SG_VRML_SFNODE: assert ( *(GF_Node **)field.far_ptr); gf_dump_vrml_node(sdump, *(GF_Node **)field.far_ptr, 0, NULL); ...
1
[ "CWE-703" ]
gpac
3718d583c6ade191dc7979c64f48c001ca6f0243
48,539,094,505,824,770,000,000,000,000,000,000,000
54
fixed #2146
R_API RCmd *r_cmd_new(void) { int i; RCmd *cmd = R_NEW0 (RCmd); if (!cmd) { return cmd; } cmd->lcmds = r_list_new (); for (i = 0; i < NCMDS; i++) { cmd->cmds[i] = NULL; } cmd->nullcallback = cmd->data = NULL; cmd->ht_cmds = ht_pp_new0 (); cmd->root_cmd_desc = create_cmd_desc (cmd, NULL, R_CMD_DESC_TYPE_AR...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
296,093,911,781,134,100,000,000,000,000,000,000,000
18
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
286,491,944,772,857,300,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
poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end) { if (!pool->ptr && !poolGrow(pool)) return NULL; for (;;) { XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); if (ptr == end) break; if (!poolGrow(pool)) return NULL; ...
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
162,497,518,896,259,140,000,000,000,000,000,000,000
14
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
static void bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_data *bfqd, struct bfq_io_cq *bic, bool bfq_already_existing) { unsigned int old_wr_coeff = bfqq->wr_coeff; bool busy = bfq_already_existing && bfq_bfqq_busy(bfqq); if (bic->saved_has_short_ttime) bfq_mark_bfqq_has_short_ttime(bfqq); el...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
140,231,614,687,559,220,000,000,000,000,000,000,000
49
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
int fp_count_bits (fp_int * a) { int r; fp_digit q; /* shortcut */ if (a->used == 0) { return 0; } /* get number of digits and add that */ r = (a->used - 1) * DIGIT_BIT; /* take the last digit and count the bits in it */ q = a->dp[a->used - 1]; while (q > ((fp_digit) 0)) { ++r; q ...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
214,639,782,385,898,250,000,000,000,000,000,000,000
22
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.
static void bpf_ringbuf_free(struct bpf_ringbuf *rb) { /* copy pages pointer and nr_pages to local variable, as we are going * to unmap rb itself with vunmap() below */ struct page **pages = rb->pages; int i, nr_pages = rb->nr_pages; vunmap(rb); for (i = 0; i < nr_pages; i++) __free_page(pages[i]); kvfree(...
0
[ "CWE-787" ]
bpf
4b81ccebaeee885ab1aa1438133f2991e3a2b6ea
168,963,027,137,667,840,000,000,000,000,000,000,000
13
bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota...
virtual void onSettingsForTest(const nghttp2_settings&) {}
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
147,409,464,850,030,860,000,000,000,000,000,000,000
1
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...
int in_gate_area_no_mm(unsigned long addr) { #ifdef AT_SYSINFO_EHDR if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END)) return 1; #endif return 0; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
14,759,777,401,853,174,000,000,000,000,000,000,000
8
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg) { struct sock *sk = path->private; struct iucv_sock *iucv = iucv_sk(sk); struct sk_buff *skb; struct sock_msg_q *save_msg; int len; if (sk->sk_shutdown & RCV_SHUTDOWN) { pr_iucv->message_reject(path, msg); return; } spin_lock(&...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
183,682,155,788,675,400,000,000,000,000,000,000,000
43
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...
TEE_Result syscall_cryp_random_number_generate(void *buf, size_t blen) { TEE_Result res; struct tee_ta_session *sess; res = tee_ta_get_current_session(&sess); if (res != TEE_SUCCESS) return res; res = tee_mmu_check_access_rights(to_user_ta_ctx(sess->ctx), TEE_MEMORY_ACCESS_WRITE | TEE_MEMORY_ACCE...
0
[ "CWE-119", "CWE-787" ]
optee_os
a637243270fc1faae16de059091795c32d86e65e
337,878,187,016,000,800,000,000,000,000,000,000,000
22
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-...
Line(int i1 = -1, int i2 = -1) : idx{i1, i2}, disabled(false) { }
0
[ "CWE-703" ]
openscad
770e3234cbfe66edbc0333f796b46d36a74aa652
334,097,081,009,632,700,000,000,000,000,000,000,000
1
add safety to line lookups in DXF import, fixes #4037 Add safety (test for, and continue past, bad indices). Report warnings about bad indices Add variables just to make the array indices easier to read and debug.
LogLuv24fromXYZ(float XYZ[3], int em) { int Le, Ce; double u, v, s; /* encode luminance */ Le = LogL10fromY(XYZ[1], em); /* encode color */ s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2]; if (!Le || s <= 0.) { u = U_NEU; v = V_NEU; } else { u = 4.*XYZ[0] / s; v = 9.*XYZ[1] / s; } Ce = uv_encode(u, v, em)...
0
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
191,915,393,376,435,650,000,000,000,000,000,000,000
21
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
static void FVMenuSelectByName(GWindow _gw, struct gmenuitem *UNUSED(mi), GEvent *e) { FontView *fv = (FontView *) GDrawGetUserData(_gw); GRect pos; GWindow gw; GWindowAttrs wattrs; GGadgetCreateData gcd[8], *hvarray[12][2], *barray[8], boxes[3]; GTextInfo label[8]; int merge = SelMergeType(...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
165,306,282,489,029,740,000,000,000,000,000,000,000
141
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
setup_firstcall(FuncCallContext *funcctx, HStore *hs, FunctionCallInfoData *fcinfo) { MemoryContext oldcontext; HStore *st; oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); st = (HStore *) palloc(VARSIZE(hs)); memcpy(st, hs, VARSIZE(hs)); funcctx->user_fctx = (void *) st; if (fcinfo...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
11,356,906,820,065,060,000,000,000,000,000,000,000
26
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...
TEST_P(ListenerImplDeathTest, ErrorCallback) { EXPECT_DEATH_LOG_TO_STDERR(errorCallbackTest(GetParam()), ".*listener accept failure.*"); }
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
129,653,953,231,878,820,000,000,000,000,000,000,000
3
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
void async_domain_request(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, struct winbindd_request *request, struct winbindd_response *response, void (*continuation)(void *private_data_data, BOOL success), void *private_data_data) { struct domain_request_state *state; if (domain->initial...
0
[]
samba
c93d42969451949566327e7fdbf29bfcee2c8319
113,807,428,643,129,440,000,000,000,000,000,000,000
31
Back-port of Volkers fix. Fix a race condition in winbind leading to a crash When SIGCHLD handling is delayed for some reason, sending a request to a child can fail early because the child has died already. In this case async_main_request_sent() directly called the continuation function without pr...
init_ctx_call_init(OM_uint32 *minor_status, spnego_gss_ctx_id_t sc, spnego_gss_cred_id_t spcred, gss_name_t target_name, OM_uint32 req_flags, OM_uint32 time_req, gss_buffer_t mechtok_in, gss_OID *actual_mech, gss_buffer_t mechtok_out, OM_uint32 *ret_flags, OM_uint32 *ti...
0
[ "CWE-18", "CWE-763" ]
krb5
b51b33f2bc5d1497ddf5bd107f791c101695000d
90,559,806,956,561,410,000,000,000,000,000,000,000
101
Fix SPNEGO context aliasing bugs [CVE-2015-2695] The SPNEGO mechanism currently replaces its context handle with the mechanism context handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations ...
int common_timer_set(struct k_itimer *timr, int flags, struct itimerspec64 *new_setting, struct itimerspec64 *old_setting) { const struct k_clock *kc = timr->kclock; bool sigev_none; ktime_t expires; if (old_setting) common_timer_get(timr, old_setting); /* Prevent rearming by clearing the interva...
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
304,392,519,344,533,700,000,000,000,000,000,000,000
37
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
static inline struct uffd_msg userfault_msg(unsigned long address, unsigned int flags, unsigned long reason, unsigned int features) { struct uffd_msg msg; msg_init(&msg); msg.event = UFFD_EVENT_PAGEFAULT; msg.arg.pagefault.address = address; if (flags & FAULT_FLAG_WRITE) /* * If UFF...
0
[ "CWE-416" ]
linux
384632e67e0829deb8015ee6ad916b180049d252
69,346,498,996,726,730,000,000,000,000,000,000,000
31
userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the u...
virtual void psXObject(Stream * /*psStream*/, Stream * /*level1Stream*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
253,882,462,815,403,020,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static int do_tmpfile(struct nameidata *nd, unsigned flags, const struct open_flags *op, struct file *file, int *opened) { static const struct qstr name = QSTR_INIT("/", 1); struct dentry *child; struct inode *dir; struct path path; int error = path_lookupat(nd, flags | LOOKUP_DIRECTORY, &path); if (unlikely(...
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
51,964,203,180,450,720,000,000,000,000,000,000,000
57
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
void unit_add_to_dbus_queue(Unit *u) { assert(u); assert(u->type != _UNIT_TYPE_INVALID); if (u->load_state == UNIT_STUB || u->in_dbus_queue) return; /* Shortcut things if nobody cares */ if (set_isempty(u->manager->subscribed)) { u->sent_dbus_new...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
302,066,870,039,962,900,000,000,000,000,000,000,000
16
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...
dwg_new_ref (Dwg_Data *restrict dwg) { Dwg_Object_Ref *ref = (Dwg_Object_Ref *)calloc (1, sizeof (Dwg_Object_Ref)); if (!ref) { LOG_ERROR ("Out of memory"); return NULL; } if (dwg_decode_add_object_ref (dwg, ref)) { free (ref); return NULL; } return ref; }
0
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
196,577,376,153,135,100,000,000,000,000,000,000,000
15
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
GF_Err saio_box_read(GF_Box *s, GF_BitStream *bs) { GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox *)s; if (ptr->flags & 1) { ISOM_DECREASE_SIZE(ptr, 8); ptr->aux_info_type = gf_bs_read_u32(bs); ptr->aux_info_type_parameter = gf_bs_read_u32(bs); } ISOM_DECREASE_SIZE(ptr, 4); ptr->e...
0
[ "CWE-476" ]
gpac
586e817dcd531bb3e75438390f1f753cfe6e940a
284,198,847,420,177,200,000,000,000,000,000,000,000
32
fixed #2046
int git_path_to_dir(git_buf *path) { if (path->asize > 0 && git_buf_len(path) > 0 && path->ptr[git_buf_len(path) - 1] != '/') git_buf_putc(path, '/'); return git_buf_oom(path) ? -1 : 0; }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
224,790,958,246,601,400,000,000,000,000,000,000,000
9
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
void uwsgi_set_cgroup() { char *cgroup_taskfile; FILE *cgroup; char *cgroup_opt; struct uwsgi_string_list *usl, *uslo; if (!uwsgi.cgroup) return; if (getuid()) return; usl = uwsgi.cgroup; while (usl) { int mode = strtol(uwsgi.cgroup_dir_mode, 0, 8); if (mkdir(usl->value, mode)) { if (errno != EE...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
274,997,753,014,690,660,000,000,000,000,000,000,000
80
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
BIGNUM *SRP_Calc_B(BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v) { BIGNUM *kv = NULL, *gb = NULL; BIGNUM *B = NULL, *k = NULL; BN_CTX *bn_ctx; if (b == NULL || N == NULL || g == NULL || v == NULL || (bn_ctx = BN_CTX_new()) == NULL) return NULL; if ( (kv = BN_new()) == NULL || (gb = BN_new()) == NULL || ...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
254,933,923,590,886,460,000,000,000,000,000,000,000
32
Add SRP support.
static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg, struct bpf_reg_state *dst_reg, struct bpf_sanitize_info *info, const bool commit_window) { struct bpf_insn_aux_data *aux =...
0
[ "CWE-203" ]
linux
9183671af6dbf60a1219371d4ed73e23f43b49db
84,036,171,308,771,550,000,000,000,000,000,000,000
89
bpf: Fix leakage under speculation on mispredicted branches The verifier only enumerates valid control-flow paths and skips paths that are unreachable in the non-speculative domain. And so it can miss issues under speculative execution on mispredicted branches. For example, a type confusion has been demonstrated with...
static void smack_sock_graft(struct sock *sk, struct socket *parent) { struct socket_smack *ssp; if (sk == NULL || (sk->sk_family != PF_INET && sk->sk_family != PF_INET6)) return; ssp = sk->sk_security; ssp->smk_in = ssp->smk_out = current_security(); /* cssp->smk_packet is already set in smack_inet_csk_c...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
230,206,803,015,737,860,000,000,000,000,000,000,000
12
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void test_to_ll(char const* str, long long wanted, bool error) { test_to_number(str, wanted, error, QUtil::string_to_ll); }
0
[ "CWE-125" ]
qpdf
6d46346eb93d5032c08cf1e39023b5d57260a766
57,653,124,082,749,760,000,000,000,000,000,000,000
4
Detect integer overflow/underflow
_rsvg_node_poly_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts) { RsvgNodePoly *poly = (RsvgNodePoly *) self; const char *klazz = NULL, *id = NULL, *value; if (rsvg_property_bag_size (atts)) { /* support for svg < 1.0 which used verts */ if ((value = rsvg_property_bag_l...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
266,900,897,818,200,700,000,000,000,000,000,000,000
24
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
void set(CHARSET_INFO *collation_arg, Derivation derivation_arg) { collation= collation_arg; derivation= derivation_arg; set_repertoire_from_charset(collation_arg); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
25,196,999,345,800,237,000,000,000,000,000,000,000
6
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
static int gfar_set_mac_addr(struct net_device *dev, void *p) { eth_mac_addr(dev, p); gfar_set_mac_for_addr(dev, 0, dev->dev_addr); return 0; }
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
92,311,052,680,554,100,000,000,000,000,000,000,000
8
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
static void GTextFieldDrawLine(GWindow pixmap, GTextField *gt, int line, Color fg ) { int y = gt->g.inner.y+(line-gt->loff_top)*gt->fh; int ll = gt->lines[line+1]==-1 ? -1 : gt->lines[line+1]-gt->lines[line]; ll = gt->lines8[line+1]==-1? -1 : gt->lines8[line+1]-gt->lines8[line]; GDrawLayoutInit(pixmap,...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
85,132,586,035,670,840,000,000,000,000,000,000,000
8
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
uint32_t CompactProtocolWriter::serializedSizeString( folly::StringPiece str) const { return serializedSizeBinary(str); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
170,079,483,488,591,950,000,000,000,000,000,000,000
4
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static int io_register_files_update(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args) { struct io_uring_rsrc_update2 up; if (!nr_args) return -EINVAL; memset(&up, 0, sizeof(up)); if (copy_from_user(&up, arg, sizeof(struct io_uring_rsrc_update))) return -EFAULT; if (up.resv || up.resv2) r...
0
[ "CWE-909", "CWE-94" ]
linux
32452a3eb8b64e01e2be717f518c0be046975b9d
161,802,556,039,275,500,000,000,000,000,000,000,000
14
io_uring: fix uninitialized field in rw io_kiocb io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll reads kiocb->private it can contain uninitialized data. Fixes: 3e08773c3841 ("block: switch polling to be bio based") Signed-off-by: Joseph Ravichandran <jravi@mit.edu> Signed-off-by: Jens Axbo...
LosslessReduceDepthOK(Image *image,ExceptionInfo *exception) { /* Reduce bit depth if it can be reduced losslessly from 16+ to 8. * * This is true if the high byte and the next highest byte of * each sample of the image, the colormap, and the background color * are equal to each other. We check...
0
[ "CWE-476" ]
ImageMagick
816ecab6c532ae086ff4186b3eaf4aa7092d536f
25,262,793,845,567,610,000,000,000,000,000,000,000
102
https://github.com/ImageMagick/ImageMagick/issues/58
NormalTextureInfo() : index(-1), texCoord(0), scale(1.0) {}
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
186,386,077,537,462,950,000,000,000,000,000,000,000
1
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int cp2112_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct cp2112_device *dev = (struct cp2112_device *)adap->algo_data; struct hid_device *hdev = dev->hdev; u8 buf[64]; ssize_t count; ssize_t read_length = 0; u8 *read_buf = NULL; unsigned int retries; int ret; hid_dbg(...
0
[ "CWE-388" ]
linux
8e9faa15469ed7c7467423db4c62aeed3ff4cae3
106,964,551,444,515,780,000,000,000,000,000,000,000
116
HID: cp2112: fix gpio-callback error handling In case of a zero-length report, the gpio direction_input callback would currently return success instead of an errno. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@k...
camel_imapx_server_authenticate_sync (CamelIMAPXServer *is, const gchar *mechanism, GCancellable *cancellable, GError **error) { CamelNetworkSettings *network_settings; CamelIMAPXStore *store; CamelService *service; CamelSettings *settings; CamelAuthenticationResult result; CamelIMAP...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
136,826,608,241,681,970,000,000,000,000,000,000,000
200
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
dns_message_renderreset(dns_message_t *msg) { unsigned int i; dns_name_t *name; dns_rdataset_t *rds; /* * Reset the message so that it may be rendered again. */ REQUIRE(DNS_MESSAGE_VALID(msg)); REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTRENDER); msg->buffer = NULL; for (i = 0; i < DNS_SECTION_MAX; i...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
14,541,900,312,758,634,000,000,000,000,000,000,000
38
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
TEST_P(DownstreamProtocolIntegrationTest, OverflowDecoderBufferFromDecodeData) { config_helper_.setBufferLimits(64 * 1024, 64 * 1024); config_helper_.prependFilter(R"EOF( name: crash-filter typed_config: "@type": type.googleapis.com/test.integration.filters.CrashFilterConfig crash_in_decode_headers:...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
316,042,779,066,192,900,000,000,000,000,000,000,000
31
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
application_launch_parameters_new (GAppInfo *application, GList *uris) { ApplicationLaunchParameters *result; result = g_new0 (ApplicationLaunchParameters, 1); result->application = g_object_ref (application); result->uris = g_list_copy_deep (uris, (GCopyFunc) g_st...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
286,597,711,628,219,130,000,000,000,000,000,000,000
11
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
CImg<typename CImg<t>::Tuint> get_index(const CImg<t>& colormap, const float dithering=1, const bool map_indexes=true) const { if (colormap._spectrum!=_spectrum) throw CImgArgumentException(_cimg_instance "index(): Instance and specified colormap (%u,%u,%u,%u,%p...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
243,159,743,518,176,000,000,000,000,000,000,000,000
244
Fix other issues in 'CImg<T>::load_bmp()'.
PHP_FUNCTION(openssl_public_encrypt) { zval **key, *crypted; EVP_PKEY *pkey; int cryptedlen; unsigned char *cryptedbuf; int successful = 0; long keyresource = -1; long padding = RSA_PKCS1_PADDING; char * data; int data_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szZ|l", &data, &data_len, &cryp...
0
[ "CWE-20" ]
php-src
2874696a5a8d46639d261571f915c493cd875897
105,753,624,665,987,900,000,000,000,000,000,000,000
54
Fix CVE-2013-4073 - handling of certs with null bytes
extern "C" const char * aspell_version_string() { return VERSION NDEBUG_STR SLOPPY_STR; }
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
83,102,774,715,369,370,000,000,000,000,000,000,000
3
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
nv_nbcmd(cmdarg_T *cap) { netbeans_keycommand(cap->nchar); }
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
296,730,880,485,787,750,000,000,000,000,000,000,000
4
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); struct l2tp_ip_sock *lsk = l2tp_ip_sk(sk); size_t copied = 0; int err = -EOPNOTSUPP; struct sockaddr_in *sin = (struct sockaddr_in *)m...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
195,138,400,329,403,100,000,000,000,000,000,000,000
56
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
void security_bprm_committed_creds(struct linux_binprm *bprm) { security_ops->bprm_committed_creds(bprm); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
51,481,829,508,525,710,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu) { if (pp_smu && *pp_smu) { kfree(*pp_smu); *pp_smu = NULL; } }
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
223,152,200,878,577,800,000,000,000,000,000,000,000
7
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
FastHufDecoder::readBits (int numBits, Int64 &buffer, // c int &bufferNumBits, // lc const char *&currByte) // in { while (bufferNumBits < numBits) { buffer = (buffer << 8) | *(unsigned char*)(currByte++); bufferNumBits += 8; } bufferNumBits -= ...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
161,998,660,677,043,980,000,000,000,000,000,000,000
15
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static void lan9118_reset(DeviceState *d) { lan9118_state *s = LAN9118(d); s->irq_cfg &= (IRQ_TYPE | IRQ_POL); s->int_sts = 0; s->int_en = 0; s->fifo_int = 0x48000000; s->rx_cfg = 0; s->tx_cfg = 0; s->hw_cfg = s->mode_16bit ? 0x00050000 : 0x00050004; s->pmt_ctrl &= 0x45; s->gpio...
0
[ "CWE-835" ]
qemu
37cee01784ff0df13e5209517e1b3594a5e792d1
48,191,623,552,864,850,000,000,000,000,000,000,000
59
lan9118: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.co...
stl_free_edges(stl_file *stl) { int i; stl_hash_edge *temp; if (stl->error) return; if(stl->stats.malloced != stl->stats.freed) { for(i = 0; i < stl->M; i++) { for(temp = stl->heads[i]; stl->heads[i] != stl->tail; temp = stl->heads[i]) { stl->heads[i] = stl->heads[i]->next; ...
0
[ "CWE-125" ]
admesh
e84d8353f1347e1f26f0a95770d92ba14e6ede38
116,599,284,540,626,940,000,000,000,000,000,000,000
19
Fix heap buffer overflow in stl_update_connects_remove_1 - Add argument value check to the stl_update_connects_remove_1 - Add neighbor value check in stl_remove_degenerate Fixes https://github.com/admesh/admesh/issues/28 Merges https://github.com/admesh/admesh/pull/55
hv_fetch_string(HV *hv, const char *key) { int32 hlen; char *hkey; SV **ret; hkey = (char *) pg_do_encoding_conversion((unsigned char *) key, strlen(key), GetDatabaseEncoding(), PG_UTF8); /* See notes in hv_store_string */ hlen = -(int) strlen(hkey); ret = hv_fetch(hv, hkey, hlen, 0); if (...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
149,102,915,596,795,140,000,000,000,000,000,000,000
19
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 ...
mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) { struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg; struct mpt_ioctl_targetinfo karg; VirtDevice *vdevice; char *pmem; int *pdata; int numDevices = 0; int lun; int maxWordsLeft; int numBytes; u8 port; struct scsi_device ...
0
[ "CWE-362", "CWE-369" ]
linux
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
271,326,552,699,445,630,000,000,000,000,000,000,000
106
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 ...
static int verify_chunk_dev_extent_mapping(struct btrfs_fs_info *fs_info) { struct extent_map_tree *em_tree = &fs_info->mapping_tree.map_tree; struct extent_map *em; struct rb_node *node; int ret = 0; read_lock(&em_tree->lock); for (node = rb_first_cached(&em_tree->map); node; node = rb_next(node)) { em = rb_e...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
50,184,365,473,647,050,000,000,000,000,000,000,000
24
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, const char *mountable, const char *mountpoint) { /* Add this to the fstab entry in 'fs'. * Note these are further filtered by guestfs_inspect_get_mountpoints * and guestfs_inspect_get_filesystems. */ size_t n = fs->nr_fstab + 1; struc...
0
[]
libguestfs
ae8bb84ecd46d7b6ef557a87725923ac8d09dce0
272,100,926,352,242,230,000,000,000,000,000,000,000
27
inspection: Don't segfault if /etc/SuSE-release is an empty file. Related to CVE-2013-2124. Thanks: Olaf Hering.
size_t size() const override{ return _size; }
0
[ "CWE-703" ]
ZLMediaKit
7d8b212a3c3368bc2f6507cb74664fc419eb9327
268,456,049,882,313,970,000,000,000,000,000,000,000
3
修复rtmp汇报窗口太小导致循环递归的bug:#1839
static inline void io_ring_clear_wakeup_flag(struct io_ring_ctx *ctx) { spin_lock_irq(&ctx->completion_lock); ctx->rings->sq_flags &= ~IORING_SQ_NEED_WAKEUP; spin_unlock_irq(&ctx->completion_lock);
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
261,762,167,156,415,070,000,000,000,000,000,000,000
6
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static void smack_sem_free_security(struct sem_array *sma) { struct kern_ipc_perm *isp = &sma->sem_perm; isp->security = NULL; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
63,016,275,994,039,670,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int stashKeyid(unsigned int keyid) { static pthread_mutex_t keyid_lock = PTHREAD_MUTEX_INITIALIZER; static const unsigned int nkeyids_max = 256; static unsigned int nkeyids = 0; static unsigned int nextkeyid = 0; static unsigned int * keyids; int i; int seen = 0; if (keyid == 0...
0
[ "CWE-347", "CWE-345" ]
rpm
d6a86b5e69e46cc283b1e06c92343319beb42e21
227,661,194,103,558,720,000,000,000,000,000,000,000
39
Be much more careful about copying data from the signature header Only look for known tags, and ensure correct type and size where known before copying over. Bump the old arbitrary 16k count limit to 16M limit though, it's not inconceivable that a package could have that many files. While at it, ensure none of these t...
inline void set_time_for_next_stage() { utime_after_query= current_utime(); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
212,120,997,005,872,600,000,000,000,000,000,000,000
4
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...
rsvg_new_use (void) { RsvgNodeUse *use; use = g_new (RsvgNodeUse, 1); _rsvg_node_init (&use->super, RSVG_NODE_TYPE_USE); use->super.draw = rsvg_node_use_draw; use->super.set_atts = rsvg_node_use_set_atts; use->x = _rsvg_css_parse_length ("0"); use->y = _rsvg_css_parse_length ("0"); use->...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
242,047,338,450,314,950,000,000,000,000,000,000,000
14
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
void CLASS parse_cine() { unsigned off_head, off_setup, off_image, i; order = 0x4949; fseek (ifp, 4, SEEK_SET); is_raw = get2() == 2; fseek (ifp, 14, SEEK_CUR); is_raw *= get4(); off_head = get4(); off_setup = get4(); off_image = get4(); timestamp = get4(); if ((i = get4())) timestamp = i; fsee...
0
[ "CWE-189" ]
LibRaw
4606c28f494a750892c5c1ac7903e62dd1c6fdb5
112,102,287,463,611,420,000,000,000,000,000,000,000
48
0.16.1: fix for dcraw ljpeg_start() vulnerability
INST_HANDLER (break) { // BREAK ESIL_A ("BREAK"); }
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
32,692,401,557,763,650,000,000,000,000,000,000,000
3
Fix crash in anal.avr
DeepTiledInputFile::numXTiles (int lx) const { if (lx < 0 || lx >= _data->numXLevels) { THROW (IEX_NAMESPACE::ArgExc, "Error calling numXTiles() on image " "file \"" << _data->_streamData->is->fileName() << "\" " "(Argument is not in valid range)."...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
229,351,367,046,103,130,000,000,000,000,000,000,000
12
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
int Item_cache_int::save_in_field(Field *field, bool no_conversions) { int error; if (!has_value()) return set_field_to_null_with_conversions(field, no_conversions); field->set_notnull(); error= field->store(value, unsigned_flag); return error ? error : field->table->in_use->is_error() ? 1 : 0; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
299,802,465,994,001,300,000,000,000,000,000,000,000
11
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
static void FVMenuJustify(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); SplineFont *sf = fv->b.cidmaster == NULL ? fv->b.sf : fv->b.cidmaster; JustifyDlg(sf); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
243,084,467,771,587,500,000,000,000,000,000,000,000
5
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
PJ_DEF(void) pj_cis_add_num(pj_cis_t *cis) { pj_cis_add_range( cis, '0', '9'+1); }
0
[ "CWE-125" ]
pjproject
077b465c33f0aec05a49cd2ca456f9a1b112e896
84,622,050,939,617,830,000,000,000,000,000,000,000
4
Merge pull request from GHSA-7fw8-54cv-r7pm
static struct ldb_parse_tree *ldb_parse_filtercomp(TALLOC_CTX *mem_ctx, const char **s) { struct ldb_parse_tree *ret; const char *p = *s; while (isspace((unsigned char)*p)) p++; switch (*p) { case '&': ret = ldb_parse_filterlist(mem_ctx, &p); break; case '|': ret = ldb_parse_filterlist(mem_ctx, &p); br...
0
[ "CWE-125" ]
samba
8d34d172092f71baad0d777567e49aebfa07313d
142,302,843,425,377,680,000,000,000,000,000,000,000
32
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero Initialise the created ldb_parse_tree with talloc_zero, this ensures that it is correctly initialised if inadvertently passed to a function expecting a different operation type. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773 Signed-off-by: Gary Lockyer <gary@c...
jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len) { jas_stream_t *in; jas_iccprof_t *prof; if (!(in = jas_stream_memopen(JAS_CAST(char *, buf), len))) goto error; if (!(prof = jas_iccprof_load(in))) goto error; jas_stream_close(in); return prof; error: if (in) jas_stream_close(in); return 0; }
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
283,915,755,491,766,800,000,000,000,000,000,000,000
15
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
void dotted2nested(BSONObjBuilder& b, const BSONObj& obj) { //use map to sort fields BSONMap sorted = bson2map(obj); EmbeddedBuilder eb(&b); for(BSONMap::const_iterator it=sorted.begin(); it!=sorted.end(); ++it) { eb.appendAs(it->second, it->first); } eb.d...
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
130,180,495,906,624,460,000,000,000,000,000,000,000
9
SERVER-7769 - turn objcheck on by default and use new fast bson validate
static inline void php_hash_string_xor(unsigned char *out, const unsigned char *in, const unsigned char *xor_with, const int length) { int i; for (i=0; i < length; i++) { out[i] = in[i] ^ xor_with[i]; } }
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
72,592,702,842,729,660,000,000,000,000,000,000,000
6
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
char const * caca_get_dither_color(caca_dither_t const *d) { return d->color_name; }
0
[ "CWE-369" ]
libcaca
84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c
67,385,722,707,743,890,000,000,000,000,000,000,000
4
dither: fix integer overflows that were causing a division by zero. Fixes: #36 (CVE-2018-20544)
static __always_inline int kvm_handle_hva_range(struct mmu_notifier *mn, unsigned long start, unsigned long end, pte_t pte, hva_handler_t handler) { struct kvm *kvm = mmu_notifier_to_kvm(mn); const struct kvm_hva_range range = { .start = start, .end = end, .pte = pte, .handler = ha...
1
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
132,240,772,059,746,640,000,000,000,000,000,000,000
19
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
bool Field_new_decimal::store_value(const my_decimal *decimal_value, int *native_error) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; int error= 0; DBUG_ENTER("Field_new_decimal::store_value"); #ifndef DBUG_OFF { char dbug_buff[DECIMAL_MAX_STR_LENGTH+2]; DBUG_PRINT("e...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
105,802,323,076,773,490,000,000,000,000,000,000,000
46
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static ssize_t aio_setup_single_vector(struct kiocb *kiocb, int rw, char __user *buf, unsigned long *nr_segs, size_t len, struct iovec *iovec, struct iov_iter *iter) { if (len > MAX_RW_COUNT) len = MAX_RW_COUNT; if (unlikely(!access_ok(!rw, buf, len))) return...
0
[ "CWE-703" ]
linux
4c185ce06dca14f5cea192f5a2c981ef50663f2b
321,615,939,400,348,500,000,000,000,000,000,000,000
18
aio: lift iov_iter_init() into aio_setup_..._rw() the only non-trivial detail is that we do it before rw_verify_area(), so we'd better cap the length ourselves in aio_setup_single_rw() case (for vectored case rw_copy_check_uvector() will do that for us). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void StreamEncoderImpl::flushOutput(bool end_encode) { auto encoded_bytes = connection_.flushOutput(end_encode); bytes_meter_->addWireBytesSent(encoded_bytes); }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
21,209,117,618,623,714,000,000,000,000,000,000,000
4
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>