func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, HA_CREATE_INFO *create_info, handlerton *old_db_type, bool *partition_changed, char *db, const char *table_nam...
0
[]
server
f305a7ce4bccbd56520d874e1d81a4f29bc17a96
306,681,398,024,881,920,000,000,000,000,000,000,000
1,000
bugfix: long partition names
int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) { if (data) dev->features |= NETIF_F_IP_CSUM; else dev->features &= ~NETIF_F_IP_CSUM; return 0; }
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
183,974,906,708,515,840,000,000,000,000,000,000,000
9
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
int OSD::handle_pg_peering_evt( spg_t pgid, const pg_history_t& orig_history, const PastIntervals& pi, epoch_t epoch, PG::CephPeeringEvtRef evt) { if (service.splitting(pgid)) { peering_wait_for_split[pgid].push_back(evt); return -EEXIST; } PG *pg = _lookup_lock_pg(pgid); if (!pg) { // sa...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
200,995,363,263,722,560,000,000,000,000,000,000,000
181
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 ...
DEFUN(pgBack, PREV_PAGE, "Scroll up one page") { if (vi_prec_num) nscroll(-searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL); else nscroll(-(prec_num ? searchKeyNum() : searchKeyNum() * (Currentbuf->LINES - 1)), prec_num ? B_SCROLL : B_NORMAL); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
209,919,948,788,171,100,000,000,000,000,000,000,000
8
Make temporary directory safely when ~/.w3m is unwritable
e_mail_part_verify_validity_sender (EMailPart *part, CamelInternetAddress *from_address) { GList *link; g_return_if_fail (E_IS_MAIL_PART (part)); if (!from_address) return; for (link = g_queue_peek_head_link (&part->validities); link; link = g_list_next (link)) { EMailPartValidityPair *pair = link->d...
0
[ "CWE-347" ]
evolution
f66cd3e1db301d264563b4222a3574e2e58e2b85
188,622,483,894,716,080,000,000,000,000,000,000,000
36
eds-I#3 - [GPG] Mails that are not encrypted look encrypted Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3
fr_window_set_password (FrWindow *window, const char *password) { g_return_if_fail (window != NULL); if (window->priv->password == password) return; if (window->priv->password != NULL) { g_free (window->priv->password); window->priv->password = NULL; } if ((password != NULL) && (password[0] != '\0'))...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
40,922,643,749,117,686,000,000,000,000,000,000,000
16
libarchive: sanitize filenames before extracting
static void nfs_volume_list_stop(struct seq_file *p, void *v) { spin_unlock(&nfs_client_lock); }
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
117,130,108,784,723,890,000,000,000,000,000,000,000
4
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
pk_transaction_is_exclusive (PkTransaction *transaction) { g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE); return transaction->priv->exclusive; }
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
242,178,055,054,487,370,000,000,000,000,000,000,000
6
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi, bool umount) { __issue_discard_cmd(sbi, false); __drop_discard_cmd(sbi); __wait_discard_cmd(sbi, !umount); }
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
323,978,002,766,394,560,000,000,000,000,000,000,000
6
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
void BrotliContext::resetOut() { avail_out_ = chunk_size_; next_out_ = chunk_ptr_.get(); }
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
235,656,914,190,694,480,000,000,000,000,000,000,000
4
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
GF_HEVCConfig *gf_isom_lhvc_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex) { GF_HEVCConfig *lhvc; GF_OperatingPointsInformation *oinf=NULL; GF_TrackBox *trak; GF_MPEGVisualSampleEntryBox *entry; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !Descr...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
1,682,526,175,457,241,700,000,000,000,000,000,000
29
fix some exploitable overflows (#994, #997)
static void fuse_copy_init(struct fuse_copy_state *cs, struct fuse_conn *fc, int write, const struct iovec *iov, unsigned long nr_segs) { memset(cs, 0, sizeof(*cs)); cs->fc = fc; cs->write = write; cs->iov = iov; cs->nr_segs = nr_segs; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
linux
c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae
95,444,675,134,155,110,000,000,000,000,000,000,000
10
fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the message processing could overrun and result in a "kernel BUG at fs/fuse/dev.c:629!" Reported-by: Han-Wen Nienhuys <hanwenn@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: stable@kern...
int listTypeEqual(listTypeEntry *entry, robj *o) { if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) { serverAssertWithInfo(NULL,o,sdsEncodedObject(o)); return quicklistCompare(entry->entry.zi,o->ptr,sdslen(o->ptr)); } else { serverPanic("Unknown list encoding"); } }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
321,265,471,745,252,900,000,000,000,000,000,000,000
8
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
iperf_get_test_server_hostname(struct iperf_test *ipt) { return ipt->server_hostname; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
158,795,615,151,239,940,000,000,000,000,000,000,000
4
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
Item_in_subselect::single_value_transformer(JOIN *join) { SELECT_LEX *select_lex= join->select_lex; DBUG_ENTER("Item_in_subselect::single_value_transformer"); DBUG_ASSERT(thd == join->thd); /* Check that the right part of the subselect contains no more than one column. E.g. in SELECT 1 IN (SELECT * ..)...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
5,017,039,632,218,122,700,000,000,000,000,000,000
87
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
ecma_free_number_list (jmem_cpointer_t number_list_cp) /**< number list */ { while (number_list_cp != JMEM_CP_NULL) { ecma_lit_storage_item_t *number_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t, number_list_cp); f...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
147,917,882,796,862,930,000,000,000,000,000,000,000
20
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 int wait_serial_change(struct acm *acm, unsigned long arg) { int rv = 0; DECLARE_WAITQUEUE(wait, current); struct async_icount old, new; do { spin_lock_irq(&acm->read_lock); old = acm->oldcount; new = acm->iocount; acm->oldcount = new; spin_unlock_irq(&acm->read_lock); if ((arg & TIOCM_DSR) && ...
0
[ "CWE-416" ]
linux
c52873e5a1ef72f845526d9f6a50704433f9c625
72,943,521,443,806,680,000,000,000,000,000,000,000
42
usb: cdc-acm: make sure a refcount is taken early enough destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Cc: stable <stable@vger.kernel.org> Reported-and-tested-by: ...
static JSValue js_bs_put_s16(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { return js_bs_put_val(ctx, this_val, argc, argv, 4); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
251,526,698,049,405,700,000,000,000,000,000,000,000
4
fixed #2138
static void megasas_finish_dcmd(MegasasCmd *cmd, uint32_t iov_size) { trace_megasas_finish_dcmd(cmd->index, iov_size); if (iov_size > cmd->iov_size) { if (megasas_frame_is_ieee_sgl(cmd)) { cmd->frame->dcmd.sgl.sg_skinny->len = cpu_to_le32(iov_size); } else if (megasas_frame_is_sgl64...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
327,300,509,295,135,000,000,000,000,000,000,000,000
14
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *asconf_ack = arg; struct sctp_chunk *last_asconf = asoc->addip_last_asconf; struct sctp_chunk *abort; s...
1
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
238,014,936,619,603,620,000,000,000,000,000,000,000
110
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd, DisplayState *ds) { ssd->ds = ds; qemu_mutex_init(&ssd->lock); ssd->mouse_x = -1; ssd->mouse_y = -1; ssd->bufsize = (16 * 1024 * 1024); ssd->buf = qemu_malloc(ssd->bufsize); }
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
111,057,968,734,308,270,000,000,000,000,000,000,000
9
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
static void vrend_free_programs(struct vrend_sub_context *sub) { struct vrend_linked_shader_program *ent, *tmp; if (LIST_IS_EMPTY(&sub->programs)) return; LIST_FOR_EACH_ENTRY_SAFE(ent, tmp, &sub->programs, head) { vrend_destroy_program(ent); } }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
223,398,930,574,537,000,000,000,000,000,000,000,000
11
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static inline void pgtable_page_dtor(struct page *page) { pte_lock_deinit(page); dec_zone_page_state(page, NR_PAGETABLE); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
260,660,799,686,751,000,000,000,000,000,000,000,000
5
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
Item_insert_value(THD *thd, Name_resolution_context *context_arg, Item *a) :Item_field(thd, context_arg, (const char *)NULL, (const char *)NULL, (const char *)NULL), arg(a) {}
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
7,681,298,216,031,655,000,000,000,000,000,000,000
4
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static void svm_vcpu_unblocking(struct kvm_vcpu *vcpu) { if (kvm_check_request(KVM_REQ_APICV_UPDATE, vcpu)) kvm_vcpu_update_apicv(vcpu); avic_set_running(vcpu, true); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
124,048,636,278,078,250,000,000,000,000,000,000,000
6
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
BitWriter::writeBitsInt(int val, size_t bits) { writeBits(static_cast<unsigned long long>(val), bits); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
98,142,550,933,513,870,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void pblock(int d, js_Ast *block) { assert(block->type == STM_BLOCK); pc('{'); nl(); pstmlist(d, block->a); in(d); pc('}'); }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
6,589,825,730,882,029,000,000,000,000,000,000,000
7
Issue #161: Cope with empty programs in mujs-pp.
int jbd2_journal_try_to_free_buffers(journal_t *journal, struct page *page) { struct buffer_head *head; struct buffer_head *bh; int ret = 0; J_ASSERT(PageLocked(page)); head = page_buffers(page); bh = head; do { struct journal_head *jh; /* * We take our own ref against the journal_head here to avoid ...
0
[ "CWE-416" ]
linux
cc16eecae687912238ee6efbff71ad31e2bc414e
327,548,667,102,268,070,000,000,000,000,000,000,000
34
jbd2: fix use-after-free of transaction_t race jbd2_journal_wait_updates() is called with j_state_lock held. But if there is a commit in progress, then this transaction might get committed and freed via jbd2_journal_commit_transaction() -> jbd2_journal_free_transaction(), when we release j_state_lock. So check for jou...
bool ValidateSKIPJACK() { std::cout << "\nSKIPJACK validation suite running...\n\n"; bool pass1 = true, pass2 = true; SKIPJACKEncryption enc; // 80-bits only pass1 = enc.StaticGetValidKeyLength(8) == 10 && pass1; pass1 = enc.StaticGetValidKeyLength(9) == 10 && pass1; pass1 = enc.StaticGetValidKeyLength(...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
24,391,551,701,359,367,000,000,000,000,000,000,000
21
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
PHP_FUNCTION(openssl_error_string) { char buf[256]; unsigned long val; if (zend_parse_parameters_none() == FAILURE) { return; } php_openssl_store_errors(); if (OPENSSL_G(errors) == NULL || OPENSSL_G(errors)->top == OPENSSL_G(errors)->bottom) { RETURN_FALSE; } OPENSSL_G(errors)->bottom = (OPENSSL_G(error...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
165,010,362,180,722,550,000,000,000,000,000,000,000
25
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
void CLASS blend_highlights() { int clip = INT_MAX, row, col, c, i, j; static const float trans[2][4][4] = {{{1, 1, 1}, {1.7320508, -1.7320508, 0}, {-1, -1, 2}}, {{1, 1, 1, 1}, {1, -1, 1, -1}, {1, 1, -1, -1}, {1, -1, -1, 1}}}; static const float itrans[2][4][4] = {{{1, 0.866...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
286,721,409,552,173,740,000,000,000,000,000,000,000
46
Secunia SA75000 advisory: several buffer overruns
terminal_enabled(void) { return dyn_winpty_init(FALSE) == OK; }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
276,257,981,716,740,800,000,000,000,000,000,000,000
4
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static double mxEndianDouble_Swap(double a) { #if defined(__GNUC__) || defined(__llvm__) uint64_t result = __builtin_bswap64(*(uint64_t *)&a); return *(double *)&result; #else double b; txU1 *p1 = (txU1 *) &a, *p2 = (txU1 *) &b; int i; for (i = 0; i < 8; i++) p2[i] = p1[7 - i]; return b; #endif }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
300,095,871,339,713,330,000,000,000,000,000,000,000
14
XS: #896
mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec) { mrb_method_t m; int ai = mrb_gc_arena_save(mrb); MRB_METHOD_FROM_FUNC(m, func); #ifndef MRB_USE_METHOD_T_STRUCT mrb_assert(MRB_METHOD_FUNC(m) == func); #endif if (aspec == MRB_ARGS_NONE()) { MRB_METHOD...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
254,955,546,308,521,800,000,000,000,000,000,000,000
15
class.c: clear method cache after `remove_method`.
unknown_to_zero(uint64_t count) { return count != UINT64_MAX ? count : 0; }
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
36,891,051,337,821,816,000,000,000,000,000,000,000
4
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
QPDFTokenizer::expectInlineImage() { expectInlineImage(PointerHolder<InputSource>()); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
173,344,198,324,949,130,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void cm_format_rep(struct cm_rep_msg *rep_msg, struct cm_id_private *cm_id_priv, struct ib_cm_rep_param *param) { cm_format_mad_hdr(&rep_msg->hdr, CM_REP_ATTR_ID, cm_id_priv->tid); rep_msg->local_comm_id = cm_id_priv->id.local_id; rep_msg->remote_comm_id = cm_id_priv->id.remote_id; cm_rep_set_start...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
125,095,365,254,738,120,000,000,000,000,000,000,000
29
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
supported_hashes(void) { /* TODO: check if jose has a way to export the hash algorithms it * supports. */ static const char* hashes[] = {"S1", "S224", "S256", "S384", "S512", NULL}; return hashes; }
0
[ "CWE-200" ]
tang
e82459fda10f0630c3414ed2afbc6320bb9ea7c9
214,355,992,516,253,950,000,000,000,000,000,000,000
7
keys: move signing part out of find_by_thp() and to find_jws() (#81) Handle just signing keys in find_jws(), to make sure we are responding only to proper queries. Tests were also failing to detect this issue and were updated accordingly. Issue discovered by Twitter Kernel and OS team during a source code aud...
TEST_F(AsStringGraphTest, Int8) { TF_ASSERT_OK(Init(DT_INT8)); AddInputFromArray<int8>(TensorShape({3}), {-42, 0, 42}); TF_ASSERT_OK(RunOpKernel()); Tensor expected(allocator(), DT_STRING, TensorShape({3})); test::FillValues<tstring>(&expected, {"-42", "0", "42"}); test::ExpectTensorEqual<tstring>(expected...
0
[ "CWE-20", "CWE-134", "CWE-703" ]
tensorflow
33be22c65d86256e6826666662e40dbdfe70ee83
39,284,600,599,878,914,000,000,000,000,000,000,000
9
Prevent format string vulnerability in `tf.strings.as_string`. The `printf` format specifier only allows `#`, `0`, `-`, `+` and space as flag characters. Others are interpreted as width/precision/length modifier or conversion specifiers. If a character does not fit into any of these sets `printf` just displays it. Al...
wc_push_to_euctw(Str os, wc_wchar_t cc, wc_status *st) { while (1) { switch (cc.ccs) { case WC_CCS_US_ASCII: Strcat_char(os, (char)cc.code); return; case WC_CCS_CNS_11643_1: break; case WC_CCS_CNS_11643_2: case WC_CCS_CNS_11643_3: case WC_CCS_CNS_11643_4: case WC_CCS_CNS_11643_5: ca...
0
[ "CWE-125" ]
w3m
9cf6926c5d947371dc9e44f32bc7a2fbfca5d469
219,799,166,165,060,400,000,000,000,000,000,000,000
55
Prevent segfault when iso2022 parsing Bug-Debian: https://github.com/tats/w3m/issues/14
static int truncate_nodes(struct dnode_of_data *dn, unsigned int nofs, int ofs, int depth) { struct dnode_of_data rdn = *dn; struct page *page; struct f2fs_node *rn; nid_t child_nid; unsigned int child_nofs; int freed = 0; int i, ret; if (dn->nid == 0) return NIDS_PER_BLOCK + 1; trace_f2fs_truncate_n...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
286,688,034,317,035,100,000,000,000,000,000,000,000
74
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
TEST_P(Http2FloodMitigationTest, ZerolenHeader) { beginSession(); // Send invalid request. uint32_t request_idx = 0; auto request = Http2Frame::makeMalformedRequestWithZerolenHeader(request_idx, "host", "/"); sendFame(request); tcp_client_->waitForDisconnect(); EXPECT_EQ(1, test_server_->counter("http2...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
244,126,274,932,040,100,000,000,000,000,000,000,000
14
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
bool dns_server_limited_domains(DnsServer *server) { DnsSearchDomain *domain; bool domain_restricted = false; /* Check if the server has route-only domains without ~., i. e. whether * it should only be used for particular domains */ if (!server->link) return fal...
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
311,006,574,309,685,580,000,000,000,000,000,000,000
19
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
static void port_cleanup(struct si_sm_io *io) { unsigned int addr = io->addr_data; int idx; if (addr) { for (idx = 0; idx < io->io_size; idx++) release_region(addr + idx * io->regspacing, io->regsize); } }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
308,166,744,359,027,800,000,000,000,000,000,000,000
11
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static void print_msr_bits(unsigned long val) { pr_cont("<"); print_bits(val, msr_bits, ","); print_tm_bits(val); pr_cont(">"); }
0
[ "CWE-862" ]
linux
8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
99,563,259,524,615,350,000,000,000,000,000,000,000
7
powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn'...
Bool gf_isom_is_JPEG2000(GF_ISOFile *mov) { return (mov && mov->is_jp2) ? GF_TRUE : GF_FALSE; }
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
89,089,159,928,778,870,000,000,000,000,000,000,000
4
fixed #2120
void _ma_check_print_error(HA_CHECK *param, const char *fmt, ...) { va_list args; DBUG_ENTER("_ma_check_print_error"); param->error_printed++; param->out_flag |= O_DATA_LOST; if (param->testflag & T_SUPPRESS_ERR_HANDLING) DBUG_VOID_RETURN; va_start(args, fmt); _ma_check_print_msg(param, MA_CHECK_ERROR...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
53,856,293,814,489,250,000,000,000,000,000,000,000
13
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
static int ntlm_read_message_header(wStream* s, NTLM_MESSAGE_HEADER* header) { if (Stream_GetRemainingLength(s) < 12) return -1; Stream_Read(s, header->Signature, 8); Stream_Read_UINT32(s, header->MessageType); if (strncmp((char*) header->Signature, NTLM_SIGNATURE, 8) != 0) return -1; return 1; }
0
[ "CWE-416", "CWE-125" ]
FreeRDP
2ee663f39dc8dac3d9988e847db19b2d7e3ac8c6
144,140,771,714,169,000,000,000,000,000,000,000,000
13
Fixed CVE-2018-8789 Thanks to Eyal Itkin from Check Point Software Technologies.
void svm_complete_interrupt_delivery(struct kvm_vcpu *vcpu, int delivery_mode, int trig_mode, int vector) { /* * vcpu->arch.apicv_active must be read after vcpu->mode. * Pairs with smp_store_release in vcpu_enter_guest. */ bool in_guest_mode = (smp_load_acquire(&vcpu->mode) == IN_GUEST_MODE); if (!RE...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
327,648,438,388,004,200,000,000,000,000,000,000,000
32
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
rsvg_cairo_push_early_clips (RsvgDrawingCtx * ctx) { RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render); cairo_save (render->cr); if (rsvg_current_state (ctx)->clip_path_ref) if (((RsvgClipPath *) rsvg_current_state (ctx)->clip_path_ref)->units == userSpaceOnUse) rsvg_cairo_cli...
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
106,891,245,301,405,880,000,000,000,000,000,000,000
10
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
static int AppLayerProtoDetectPPTestData(AppLayerProtoDetectProbingParser *pp, AppLayerProtoDetectPPTestDataIPProto *ip_proto, int no_of_ip_proto) { int result = 0; int i = -1, j = -1 , k = -1; #ifdef DEBUG int dir = 0; #endif...
0
[ "CWE-20" ]
suricata
8357ef3f8ffc7d99ef6571350724160de356158b
202,058,506,746,680,880,000,000,000,000,000,000,000
89
proto/detect: workaround dns misdetected as dcerpc The DCERPC UDP detection would misfire on DNS with transaction ID 0x0400. This would happen as the protocol detection engine gives preference to pattern based detection over probing parsers for performance reasons. This hack/workaround fixes this specific case by sti...
static int errorCond(OFCondition cond, const char *message) { int result = (cond.bad()); if (result) { OFString temp_str; OFLOG_ERROR(dcmpsrcvLogger, message << OFendl << DimseCondition::dump(temp_str, cond)); } return result; }
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
60,377,604,287,578,450,000,000,000,000,000,000,000
10
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, struct page *page) { struct inode *inode; unsigned long idx; unsigned long size; unsigned long limit; unsigned long stage; struct page **dir; struct page *subdir; swp_entry_t *ptr; int offset; idx = 0; ptr = info->i_direct; spin...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
195,538,941,301,522,960,000,000,000,000,000,000,000
81
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
Goffset PDFDoc::writeObjectHeader (Ref *ref, OutStream* outStr) { Goffset offset = outStr->getPos(); outStr->printf("%i %i obj\r\n", ref->num, ref->gen); return offset; }
0
[ "CWE-20" ]
poppler
9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f
300,706,516,860,090,720,000,000,000,000,000,000,000
6
PDFDoc::setup: Fix return value At that point xref can have gone wrong since extractPDFSubtype() can have caused a reconstruct that broke stuff so instead of unconditionally returning true, return xref->isOk() Fixes #706
static long get_nr_inodes(void) { int i; long sum = 0; for_each_possible_cpu(i) sum += per_cpu(nr_inodes, i); return sum < 0 ? 0 : sum; }
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
63,935,265,382,008,030,000,000,000,000,000,000,000
8
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
static void __init acpi_reduced_hw_init(void) { if (acpi_gbl_reduced_hardware) { /* * Override x86_init functions and bypass legacy pic * in Hardware-reduced ACPI mode */ x86_init.timers.timer_init = x86_init_noop; x86_init.irqs.pre_vector_init = x86_init_noop; legacy_pic = &null_legacy_pic; } }
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
203,951,617,488,592,060,000,000,000,000,000,000,000
12
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
bool FirstNInputsAreUnique(const NodeDef& node, int n) const { if (n > node.input_size()) return false; absl::flat_hash_set<string> unique_inputs; const int start = node.op() == "Concat" ? 1 : 0; const int end = start + n; for (int i = start; i < end; ++i) { unique_inputs.insert(node.input(i...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
73,701,482,720,796,470,000,000,000,000,000,000,000
11
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
GF_Err sidx_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GF_SegmentIndexBox *ptr = (GF_SegmentIndexBox*) s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->reference_ID); gf_bs_write_u32(bs, ptr->timescale); if (ptr->version==0) { gf_bs_write_u32(bs, (u32) ptr->ear...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
194,472,150,065,672,100,000,000,000,000,000,000,000
30
fixed #1587
bool CModules::OnSendToIRCMessage(CMessage& Message) { MODHALTCHK(OnSendToIRCMessage(Message)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
179,969,607,615,391,140,000,000,000,000,000,000,000
3
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 bfq_exit_queue(struct elevator_queue *e) { struct bfq_data *bfqd = e->elevator_data; struct bfq_queue *bfqq, *n; hrtimer_cancel(&bfqd->idle_slice_timer); spin_lock_irq(&bfqd->lock); list_for_each_entry_safe(bfqq, n, &bfqd->idle_list, bfqq_list) bfq_deactivate_bfqq(bfqd, bfqq, false, false); spin_...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
130,665,974,121,228,190,000,000,000,000,000,000,000
28
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...
Item_sp::Item_sp(THD *thd, Name_resolution_context *context_arg, sp_name *name_arg) : context(context_arg), m_name(name_arg), m_sp(NULL), func_ctx(NULL), sp_result_field(NULL) { dummy_table= (TABLE*) thd->calloc(sizeof(TABLE) + sizeof(TABLE_SHARE) + sizeof(Quer...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
203,756,377,378,562,520,000,000,000,000,000,000,000
13
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors) { Coroutine *co; DiscardCo rwco = { .bs = bs, .sector_num = sector_num, .nb_sectors = nb_sectors, .ret = NOT_DONE, }; if (qemu_in_coroutine()) { /* Fast-path if already in coroutine contex...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
164,747,299,551,342,460,000,000,000,000,000,000,000
23
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
static inline struct buffer *h2_get_buf(struct h2c *h2c, struct buffer *bptr) { struct buffer *buf = NULL; if (likely(LIST_ISEMPTY(&h2c->buf_wait.list)) && unlikely((buf = b_alloc_margin(bptr, 0)) == NULL)) { h2c->buf_wait.target = h2c; h2c->buf_wait.wakeup_cb = h2_buf_available; HA_SPIN_LOCK(BUF_WQ_LOCK,...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
242,993,184,706,817,400,000,000,000,000,000,000,000
15
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
bool CModules::OnUserCTCPMessage(CCTCPMessage& Message) { MODHALTCHK(OnUserCTCPMessage(Message)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
22,572,828,635,844,100,000,000,000,000,000,000,000
3
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
Status WrapInCallOp(EagerOperation* op, EagerOperation** wrapped_op) { DCHECK(!op->is_function()); const OpDef& opdef = OpRegistry::Global()->LookUp(op->Name())->op_def; // Raise an error for ops which don't support wrapping yet. This includes // ops with list inputs/outputs and ops with private attrs. // TOD...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
17,668,001,849,021,898,000,000,000,000,000,000,000
75
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
static void ehci_work_timer(void *opaque) { EHCIState *ehci = opaque; qemu_bh_schedule(ehci->async_bh); }
0
[ "CWE-617" ]
qemu
2fdb42d840400d58f2e706ecca82c142b97bcbd6
53,620,663,183,246,270,000,000,000,000,000,000,000
6
hw: ehci: check return value of 'usb_packet_map' If 'usb_packet_map' fails, we should stop to process the usb request. Signed-off-by: Li Qiang <liq3ea@163.com> Message-Id: <20200812161727.29412-1-liq3ea@163.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
rpc_C_DecryptFinal (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_BYTE_PTR last_part; CK_ULONG last_part_len; BEGIN_CALL (DecryptFinal); IN_ULONG (session); IN_BYTE_BUFFER (last_part, last_part_len); PROCESS_CALL ((self, session, last_part, &last_part_len)...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
174,885,755,419,709,900,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_layoutcommit *lcp) { struct xdr_stream *xdr = &resp->xdr; __be32 *p; if (nfserr) return nfserr; p = xdr_reserve_space(xdr, 4); if (!p) return nfserr_resource; *p++ = cpu_to_be32(lcp->lc_size_chg); if (lcp->lc_size_ch...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
287,896,622,907,291,900,000,000,000,000,000,000,000
22
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) { BlockDriver *drv = bs->drv; if (!drv) return -ENOMEDIUM; if (!drv->bdrv_get_info) return -ENOTSUP; memset(bdi, 0, sizeof(*bdi)); return drv->bdrv_get_info(bs, bdi); }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
326,931,181,366,863,370,000,000,000,000,000,000,000
10
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
get_property (xmlNodePtr node_ptr, const gchar *name) { xmlChar *xml_s; gchar *s; xml_s = xmlGetProp (node_ptr, (const xmlChar *) name); s = g_strdup ((gchar *) xml_s); xmlFree (xml_s); return s; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
239,558,725,220,788,400,000,000,000,000,000,000,000
12
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
gdm_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GdmSession *self; self = GDM_SESSION (object); switch (prop_id) { case PROP_SESSION_TYPE: ...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
295,055,519,069,315,430,000,000,000,000,000,000,000
56
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
bool is_delimiter(const char* p) { uint match= 0; char* delim= delimiter; while (*p && *p == *delim++) { match++; p++; } return (match == delimiter_length); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
315,330,148,488,037,650,000,000,000,000,000,000,000
12
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static void reply_entry(fuse_req_t req, const struct fuse_entry_param *e, int err) { if (!err) { struct fuse *f = req_fuse(req); #ifdef __SOLARIS__ /* Skip forget for negative result */ if ((fuse_reply_entry(req, e) == -ENOENT) && (e->ino != 0))...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
289,834,989,103,630,000,000,000,000,000,000,000,000
17
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
static void read_commands_complete(uint8_t status, uint16_t length, const void *param, void *user_data) { const struct mgmt_rp_read_commands *rp = param; uint16_t num_commands, num_events; size_t expected_len; int i; if (status != MGMT_STATUS_SUCCESS) { error("Failed to read supported commands: %s (0x%02x)...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
12,475,339,949,140,296,000,000,000,000,000,000,000
78
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
webSocketsHasDataInBuffer(rfbClientPtr cl) { ws_ctx_t *wsctx = (ws_ctx_t *)cl->wsctx; if (wsctx && wsctx->readbuflen) return TRUE; return (cl->sslctx && rfbssl_pending(cl) > 0); }
1
[ "CWE-787" ]
libvncserver
aac95a9dcf4bbba87b76c72706c3221a842ca433
290,908,885,960,268,020,000,000,000,000,000,000,000
9
fix overflow and refactor websockets decode (Hybi) fix critical heap-based buffer overflow which allowed easy modification of a return address via an overwritten function pointer fix bug causing connections to fail due a "one websocket frame = one ws_read" assumption, which failed with LibVNCServer-0.9.11 refactor w...
TRIO_PRIVATE void TrioOutStreamStringDynamic TRIO_ARGS2((self, output), trio_class_t* self, int output) { assert(VALID(self)); assert(VALID(self->location)); if (self->error == 0) { trio_xstring_append_char((trio_string_t*)self->location, (char)output); s...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
159,896,294,443,102,140,000,000,000,000,000,000,000
14
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
std::ostream& indent(std::ostream& os) { return generator_->indent(os); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
132,281,798,215,330,130,000,000,000,000,000,000,000
1
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
_PUBLIC_ void dump_data_dbgc(int dbgc_class, int level, const uint8_t *buf, int len) { struct debug_channel_level dcl = { dbgc_class, level }; if (!DEBUGLVLC(dbgc_class, level)) { return; } dump_data_cb(buf, len, false, debugadd_channel_cb, &dcl); }
0
[]
samba
8eae8d28bce2c3f6a323d3dc48ed10c2e6bb1ba5
126,149,538,374,971,140,000,000,000,000,000,000,000
9
CVE-2013-4476: lib-util: add file_check_permissions() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
static struct extent_map *btrfs_new_extent_direct(struct inode *inode, u64 start, u64 len) { struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_trans_handle *trans; struct extent_map *em; struct btrfs_key ins; u64 alloc_hint; int ret; trans = btrfs_join_transaction(root); if (IS_ERR(trans)) ...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
67,498,275,733,931,470,000,000,000,000,000,000,000
39
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
static void tg3_tx(struct tg3_napi *tnapi) { struct tg3 *tp = tnapi->tp; u32 hw_idx = tnapi->hw_status->idx[0].tx_consumer; u32 sw_idx = tnapi->tx_cons; struct netdev_queue *txq; int index = tnapi - tp->napi; unsigned int pkts_compl = 0, bytes_compl = 0; if (tg3_flag(tp, ENABLE_TSS)) index--; txq = netdev_g...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
151,815,028,319,510,460,000,000,000,000,000,000,000
99
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
/* Abort a zerocopy operation and revert zckey on error in send syscall */ static inline void skb_zcopy_abort(struct sk_buff *skb) { struct ubuf_info *uarg = skb_zcopy(skb); if (uarg) { sock_zerocopy_put_abort(uarg); skb_shinfo(skb)->tx_flags &= ~SKBTX_ZEROCOPY_FRAG; }
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
101,309,686,420,611,740,000,000,000,000,000,000,000
9
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
EXPORTED void xml_partial_response(struct transaction_t *txn, xmlDocPtr doc, xmlNodePtr node, unsigned level, xmlBufferPtr *buf) { const char *eol = "\n"; unsigned n; if (!config_httpprettytelemetry) { level = 0; eol = ""...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
214,432,835,684,034,630,000,000,000,000,000,000,000
51
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static void hci_le_phy_update_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_le_phy_update_complete *ev = (void *) skb->data; struct hci_conn *conn; BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); if (!ev->status) return; hci_dev_lock(hdev); conn = hci_conn_hash_lookup_handle(hdev, __le...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
223,301,064,331,502,130,000,000,000,000,000,000,000
22
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
xfs_attr_sf_findname( struct xfs_da_args *args, struct xfs_attr_sf_entry **sfep, unsigned int *basep) { struct xfs_attr_shortform *sf; struct xfs_attr_sf_entry *sfe; unsigned int base = sizeof(struct xfs_attr_sf_hdr); int size = 0; int end; int i; sf = (struct xfs_attr_shortform *)args->dp->i_afp->...
0
[ "CWE-131" ]
linux
f4020438fab05364018c91f7e02ebdd192085933
113,835,584,261,409,200,000,000,000,000,000,000,000
34
xfs: fix boundary test in xfs_attr_shortform_verify The boundary test for the fixed-offset parts of xfs_attr_sf_entry in xfs_attr_shortform_verify is off by one, because the variable array at the end is defined as nameval[1] not nameval[]. Hence we need to subtract 1 from the calculation. This can be shown by: # tou...
int Monitor::sanitize_options() { int r = 0; // mon_lease must be greater than mon_lease_renewal; otherwise we // may incur in leases expiring before they are renewed. if (g_conf->mon_lease_renew_interval_factor >= 1.0) { clog->error() << "mon_lease_renew_interval_factor (" << g_conf->mon_lease_renew_i...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
36,159,886,365,343,160,000,000,000,000,000,000,000
27
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 ...
void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio) { pgio->pg_ops = &nfs_pageio_write_ops; pgio->pg_bsize = NFS_SERVER(pgio->pg_inode)->wsize; }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
125,529,075,134,751,690,000,000,000,000,000,000,000
5
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
static void ntlm_compute_channel_bindings(NTLM_CONTEXT* context) { WINPR_DIGEST_CTX* md5; BYTE* ChannelBindingToken; UINT32 ChannelBindingTokenLength; SEC_CHANNEL_BINDINGS* ChannelBindings; ZeroMemory(context->ChannelBindingsHash, WINPR_MD5_DIGEST_LENGTH); ChannelBindings = context->Bindings.Bindings; if (!Chan...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
58a3122250d54de3a944c487776bcd4d1da4721e
137,215,613,271,705,250,000,000,000,000,000,000,000
45
Fixed OOB read in ntlm_av_pair_get CVE-2020-11097 thanks to @antonio-morales for finding this.
void vt_set_led_state(int console, int leds) { struct kbd_struct *kb = kbd_table + console; setledstate(kb, leds); }
0
[ "CWE-416" ]
linux
6ca03f90527e499dd5e32d6522909e2ad390896b
237,864,088,940,456,570,000,000,000,000,000,000,000
5
vt: keyboard, simplify vt_kdgkbsent Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL 'func_table[i]'. Use an empty string in that case. The original che...
static void vmci_transport_qp_resumed_cb(u32 sub_id, const struct vmci_event_data *e_data, void *client_data) { vsock_for_each_connected_socket(vmci_transport_handle_detach); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
12,982,422,916,949,037,000,000,000,000,000,000,000
6
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...
static void init_params(link_ctx *ctx) { if (!ctx->params) { ctx->params = apr_table_make(ctx->pool, 5); } else { apr_table_clear(ctx->params); } }
0
[ "CWE-444" ]
mod_h2
b8a8c5061eada0ce3339b24ba1d587134552bc0c
98,222,799,765,662,070,000,000,000,000,000,000,000
9
* Removing support for abandoned draft of http-wg regarding cache-digests.
void audit_log_d_path(struct audit_buffer *ab, const char *prefix, const struct path *path) { char *p, *pathname; if (prefix) audit_log_format(ab, "%s", prefix); /* We will allow 11 spaces for ' (deleted)' to be appended */ pathname = kmalloc(PATH_MAX+11, ab->gfp_mask); if (!pathname) { audit_log_str...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
41,946,783,266,828,330,000,000,000,000,000,000,000
22
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. ...
int ClientHandler::on_read() { if (rb_.chunk_avail()) { auto rv = on_read_(*this); if (rv != 0) { return rv; } } conn_.handle_tls_pending_read(); return 0; }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
134,877,380,628,376,070,000,000,000,000,000,000,000
10
Don't read too greedily
bool ha_maria::is_crashed() const { return (file->s->state.changed & (STATE_CRASHED_FLAGS | STATE_MOVED) || (my_disable_locking && file->s->state.open_count)); }
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
43,349,032,947,224,620,000,000,000,000,000,000,000
5
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
int ha_myisam::end_bulk_insert() { mi_end_bulk_insert(file); int err=mi_extra(file, HA_EXTRA_NO_CACHE, 0); if (!err) { if (can_enable_indexes) { /* Truncate the table when enable index operation is killed. After truncating the table we don't need to enable the indexes, b...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
1,178,565,387,519,834,000,000,000,000,000,000,000
26
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
bgp_attr_aggregate_intern (struct bgp *bgp, u_char origin, struct aspath *aspath, struct community *community, int as_set) { struct attr attr; struct attr *new; struct attr_extra *attre; memset (&attr, 0, sizeof (struct attr)); attre = bgp_attr_extra_get (&attr); /* Origin attribute. */ at...
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
231,998,977,228,815,600,000,000,000,000,000,000,000
50
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
static uint nr_of_decimals(const char *str, const char *end) { const char *decimal_point; /* Find position for '.' */ for (;;) { if (str == end) return 0; if (*str == 'e' || *str == 'E') return NOT_FIXED_DEC; if (*str++ == '.') break; } decimal_point= str; for ( ; str < ...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
142,851,890,504,370,220,000,000,000,000,000,000,000
38
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 int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_cdef_t *cdef = &box->data.cdef; jp2_cdefchan_t *chan; unsigned int channo; cdef->ents = 0; if (jp2_getuint16(in, &cdef->numchans)) { return -1; } if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) { return -1; } for (c...
0
[ "CWE-476" ]
jasper
e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d
43,520,944,220,047,180,000,000,000,000,000,000,000
21
Fixed bugs due to uninitialized data in the JP2 decoder. Also, added some comments marking I/O stream interfaces that probably need to be changed (in the long term) to fix integer overflow problems.
static gboolean verify_control_frame_crc(tvbuff_t * tvb, packet_info * pinfo, proto_item * pi, guint16 frame_crc) { guint8 crc = 0; guint8 * data = NULL; /* Get data. */ data = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 0, tvb_reported_length(tvb)); /* Include only FT flag bit in CRC calculation...
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
42,031,910,621,840,980,000,000,000,000,000,000,000
20
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
void ClientConnectionImpl::onEncodeHeaders(const HeaderMap& headers) { if (headers.Method()->value() == Headers::get().MethodValues.Head.c_str()) { pending_responses_.back().head_request_ = true; } }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
124,144,054,743,829,520,000,000,000,000,000,000,000
5
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
virtual void setEndStream(bool end) { end_stream_ = end; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
301,010,727,412,735,850,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>