func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
GF_Err asrt_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_AdobeSegmentRunTableBox *p = (GF_AdobeSegmentRunTableBox*)a;
gf_isom_box_dump_start(a, "AdobeSegmentRunTableBox", trace);
fprintf(trace, ">\n");
for (i=0; i<p->quality_entry_count; i++) {
char *str = (char*)gf_list_get(p->quality_segment_url_modifiers, i);
... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 327,410,653,884,267,570,000,000,000,000,000,000,000 | 21 | fixed 2 possible heap overflows (inc. #1088) |
void CServer::SendMap(int ClientID)
{
CMsgPacker Msg(NETMSG_MAP_CHANGE, true);
Msg.AddString(GetMapName(), 0);
Msg.AddInt(m_CurrentMapCrc);
Msg.AddInt(m_CurrentMapSize);
Msg.AddInt(m_MapChunksPerRequest);
Msg.AddInt(MAP_CHUNK_SIZE);
Msg.AddRaw(&m_CurrentMapSha256, sizeof(m_CurrentMapSha256));
SendMsg(&Msg, MSGF... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | teeworlds | c68402fa7e279d42886d5951d1ea8ac2facc1ea5 | 303,252,465,203,613,200,000,000,000,000,000,000,000 | 11 | changed a check |
set_phone_number (EContact *contact,
EContactField field,
EEwsItem *item,
const gchar *item_field)
{
const gchar *pn;
pn = e_ews_item_get_phone_number (item, item_field);
if (pn && *pn)
e_contact_set (contact, field, pn);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 13,189,802,593,019,470,000,000,000,000,000,000,000 | 11 | 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 |
int apply_filter_to_req_headers(struct session *t, struct channel *req, struct hdr_exp *exp)
{
char term;
char *cur_ptr, *cur_end, *cur_next;
int cur_idx, old_idx, last_hdr;
struct http_txn *txn = &t->txn;
struct hdr_idx_elem *cur_hdr;
int delta;
last_hdr = 0;
cur_next = req->buf->p + hdr_idx_first_pos(&txn->... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 43,170,367,061,358,750,000,000,000,000,000,000,000 | 126 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
static Token *quote_any_token(Token *t)
{
size_t len = t->len;
char *p;
p = nasm_quote(tok_text(t), &len);
t->type = TOK_STRING;
return set_text_free(t, p, len);
} | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 233,609,359,214,939,580,000,000,000,000,000,000,000 | 9 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
update_load_sub(&cfs_rq->load, se->load.weight);
cfs_rq->nr_running--;
se->on_rq = 0;
} | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 17,825,089,591,258,154,000,000,000,000,000,000,000 | 6 | sched: simplify sched_slice()
Use the existing calc_delta_mine() calculation for sched_slice(). This
saves a divide and simplifies the code because we share it with the
other /cfs_rq->load users.
It also improves code size:
text data bss dec hex filename
42659 2740 144 45543 b1e... |
uint64_t HELPER(pacdb)(CPUARMState *env, uint64_t x, uint64_t y)
{
int el = arm_current_el(env);
if (!pauth_key_enabled(env, el, SCTLR_EnDB)) {
return x;
}
pauth_check_trap(env, el, GETPC());
return pauth_addpac(env, x, y, &env->keys.apdb, true);
} | 0 | [] | qemu | de0b1bae6461f67243282555475f88b2384a1eb9 | 204,823,040,230,080,800,000,000,000,000,000,000,000 | 9 | target/arm: Fix PAuth sbox functions
In the PAC computation, sbox was applied over wrong bits.
As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16.
Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was
used to verify one computation of the pauth_computepac() function which
us... |
exportable_function_name (string)
char *string;
{
if (absolute_program (string))
return 0;
if (mbschr (string, '=') != 0)
return 0;
return 1;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 72,344,721,670,928,460,000,000,000,000,000,000,000 | 9 | bash-4.4-rc2 release |
static inline unsigned int
ext4_rec_len_from_disk(__le16 dlen, unsigned blocksize)
{
unsigned len = le16_to_cpu(dlen);
#if (PAGE_SIZE >= 65536)
if (len == EXT4_MAX_REC_LEN || len == 0)
return blocksize;
return (len & 65532) | ((len & 3) << 16);
#else
return len;
#endif | 0 | [
"CWE-787"
] | linux | c37e9e013469521d9adb932d17a1795c139b36db | 16,518,498,709,865,228,000,000,000,000,000,000,000 | 12 | ext4: add more inode number paranoia checks
If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.
Also, if the superblock's first inode number field is too small,
refuse to mount the file system.
This addresses CVE-2018-10882.
https... |
void CLASS romm_coeff(float romm_cam[3][3])
{
static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */
{{2.034193, -0.727420, -0.306766}, {-0.228811, 1.231729, -0.002922}, {-0.008565, -0.153273, 1.161839}};
int i, j, k;
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
for (cmatrix[i][j] = ... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 261,180,597,452,923,580,000,000,000,000,000,000,000 | 11 | Secunia SA75000 advisory: several buffer overruns |
int SSL_CTX_set_session_id_context(SSL_CTX*, const unsigned char*,
unsigned int)
{
// No application specific context needed for yaSSL
return SSL_SUCCESS;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 115,799,022,625,680,680,000,000,000,000,000,000,000 | 6 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
ex_mode(exarg_T *eap)
{
if (*eap->arg == NUL)
shell_resized();
else
emsg(_(e_screen_mode_setting_not_supported));
} | 0 | [
"CWE-125"
] | vim | d3a117814d6acbf0dca3eff1a7626843b9b3734a | 136,390,846,771,763,540,000,000,000,000,000,000,000 | 7 | patch 8.2.4009: reading one byte beyond the end of the line
Problem: Reading one byte beyond the end of the line.
Solution: Check for NUL byte first. |
de265_error decoder_context::read_sps_NAL(bitreader& reader)
{
logdebug(LogHeaders,"----> read SPS\n");
std::shared_ptr<seq_parameter_set> new_sps = std::make_shared<seq_parameter_set>();
de265_error err;
if ((err=new_sps->read(this, &reader)) != DE265_OK) {
return err;
}
if (param_sps_headers_fd>=0)... | 1 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 311,878,980,940,285,400,000,000,000,000,000,000,000 | 19 | fix streams where SPS image size changes without refreshing PPS (#299) |
static void usbredir_register_types(void)
{
type_register_static(&usbredir_dev_info);
} | 0 | [
"CWE-770"
] | qemu | 7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986 | 122,707,288,789,566,640,000,000,000,000,000,000,000 | 4 | usb/redir: avoid dynamic stack allocation (CVE-2021-3527)
Use autofree heap allocation instead.
Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id:... |
static gboolean highlight_forbidden(void)
{
GList *forbidden_words = load_words_from_file(FORBIDDEN_WORDS_BLACKLLIST);
GList *allowed_words = load_words_from_file(FORBIDDEN_WORDS_WHITELIST);
const gboolean result = highligh_words_in_tabs(forbidden_words, allowed_words, /*case sensitive*/false);
list_f... | 0 | [
"CWE-200"
] | libreport | 257578a23d1537a2d235aaa2b1488ee4f818e360 | 32,741,831,856,293,230,000,000,000,000,000,000,000 | 12 | wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was passed to the bugzilla bug
report.
report-gtk saves the first text view buffer and then reloads data from the
reported problem directory... |
const string name() override { return "init_multipart"; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 215,151,873,548,742,050,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
void libworker_fg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
char* ATTR_UNUSED(why_bogus), int ATTR_UNUSED(was_ratelimited))
{
log_assert(0);
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 271,443,253,139,372,940,000,000,000,000,000,000,000 | 6 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
buf_write(
buf_T *buf,
char_u *fname,
char_u *sfname,
linenr_T start,
linenr_T end,
exarg_T *eap, /* for forced 'ff' and 'fenc', can be
NULL! */
int append, /* append to the file */
int forceit,
int reset_changed,
int filterin... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 113,462,371,093,062,330,000,000,000,000,000,000,000 | 2,055 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
main (argc, argv)
int argc;
char **argv;
{
unsigned int i;
for (i = 1; i < argc; ++i)
{
char **value = glob_filename (argv[i], 0);
if (value == NULL)
puts ("Out of memory.");
else if (value == &glob_error_return)
perror (argv[i]);
else
for (i = 0; value[i] != NULL; i++)
... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 42,877,554,561,329,760,000,000,000,000,000,000,000 | 20 | commit bash-20190628 snapshot |
int rad_packet_add_ifid(struct rad_packet_t *pack, const char *vendor_name, const char *name, uint64_t ifid)
{
struct rad_attr_t *ra;
struct rad_dict_attr_t *attr;
struct rad_dict_vendor_t *vendor;
if (pack->len + (vendor_name ? 8 : 2) + 8 >= REQ_LENGTH_MAX)
return -1;
if (vendor_name) {
vendor = rad_dict_fi... | 0 | [
"CWE-191",
"CWE-787"
] | accel-ppp | e9d369aa0054312b7633e964e9f7eb323f1f3d69 | 60,592,843,861,550,270,000,000,000,000,000,000,000 | 37 | radius: sanity check for vendor attribute length |
reset_cursorline(void)
{
curwin->w_last_cursorline = 0;
} | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 200,557,622,347,303,480,000,000,000,000,000,000,000 | 4 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
static void submodule_reset_index(const char *path)
{
struct child_process cp = CHILD_PROCESS_INIT;
prepare_submodule_repo_env(&cp.env_array);
cp.git_cmd = 1;
cp.no_stdin = 1;
cp.dir = path;
argv_array_pushf(&cp.args, "--super-prefix=%s%s/",
get_super_prefix_or_empty(), path);
argv_array_pushl(&cp.args,... | 0 | [] | git | a8dee3ca610f5a1d403634492136c887f83b59d2 | 214,266,627,183,762,700,000,000,000,000,000,000,000 | 18 | Disallow dubiously-nested submodule git directories
Currently it is technically possible to let a submodule's git
directory point right into the git dir of a sibling submodule.
Example: the git directories of two submodules with the names `hippo`
and `hippo/hooks` would be `.git/modules/hippo/` and
`.git/modules/hipp... |
void usage()
{
printf("\n"
" %s - (C) 2007,2008 Andrea Bittau\n"
" http://www.aircrack-ng.org\n"
"\n"
" Usage: buddy-ng <options>\n"
"\n"
" Options:\n"
"\n"
" -h : This help screen\n"
" -p : Don't drop privileges\n"
"\n",
getVersion("Buddy-ng", _MAJ, _MIN, _SUB_MIN, ... | 0 | [
"CWE-20",
"CWE-787"
] | aircrack-ng | da087238963c1239fdabd47dc1b65279605aca70 | 166,008,880,064,004,550,000,000,000,000,000,000,000 | 17 | Buddy-ng: Fixed segmentation fault (Closes #15 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2418 28c6078b-6c39-48e3-add9-af49d547ecab |
static int smk_bu_file(struct file *file, int mode, int rc)
{
struct task_smack *tsp = smack_cred(current_cred());
struct smack_known *sskp = tsp->smk_task;
struct inode *inode = file_inode(file);
struct inode_smack *isp = smack_inode(inode);
char acc[SMK_NUM_ACCESS_TYPE + 1];
if (isp->smk_flags & SMK_INODE_IMPU... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 141,810,679,109,378,970,000,000,000,000,000,000,000 | 24 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
const __int128& value() const { return val; } | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 130,851,024,122,515,820,000,000,000,000,000,000,000 | 1 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
void gf_smil_setup_events(GF_Node *node)
{
GF_FieldInfo info;
if (gf_node_get_attribute_by_tag(node, TAG_SVG_ATT_begin, GF_FALSE, GF_FALSE, &info) == GF_OK)
gf_smil_setup_event_list(node, * (GF_List **)info.far_ptr, GF_TRUE);
if (gf_node_get_attribute_by_tag(node, TAG_SVG_ATT_end, GF_FALSE, GF_FALSE, &info) == GF_... | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 130,750,127,709,369,230,000,000,000,000,000,000,000 | 8 | fixed #2109 |
static int WIN32_rename(const char *from, const char *to)
{
TCHAR *tfrom=NULL,*tto;
DWORD err;
int ret=0;
if (sizeof(TCHAR) == 1)
{
tfrom = (TCHAR *)from;
tto = (TCHAR *)to;
}
else /* UNICODE path */
{
size_t i,flen=strlen(from)+1,tlen=strlen(to)+1;
tfrom = (TCHAR *)malloc(sizeof(TCHAR)*(flen+tl... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 12,876,951,286,634,666,000,000,000,000,000,000,000 | 47 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
_hivex_get_children (hive_h *h, hive_node_h node,
hive_node_h **children_ret, size_t **blocks_ret,
int flags)
{
if (!IS_VALID_BLOCK (h, node) || !block_id_eq (h, node, "nk")) {
SET_ERRNO (EINVAL, "invalid block or not an 'nk' block");
return -1;
}
struct ntreg_nk... | 1 | [
"CWE-400"
] | hivex | 771728218dac2fbf6997a7e53225e75a4c6b7255 | 329,034,084,996,749,500,000,000,000,000,000,000,000 | 100 | lib/node.c: Limit recursion in ri-records (CVE-2021-3622)
Windows Registry hive "ri"-records are arbitrarily nested B-tree-like
structures:
+-------------+
| ri |
|-------------|
| nr_offsets |
| offset[0] ------> points to another lf/lh/li/ri block
| offset[1] ------>
| offset[2] -----... |
static struct net_bridge_mdb_entry *br_mdb_ip4_get(
struct net_bridge_mdb_htable *mdb, __be32 dst)
{
struct br_ip br_dst;
br_dst.u.ip4 = dst;
br_dst.proto = htons(ETH_P_IP);
return br_mdb_ip_get(mdb, &br_dst);
} | 0 | [
"CWE-399"
] | linux | 6b0d6a9b4296fa16a28d10d416db7a770fc03287 | 85,318,718,100,749,600,000,000,000,000,000,000,000 | 10 | bridge: Fix mglist corruption that leads to memory corruption
The list mp->mglist is used to indicate whether a multicast group
is active on the bridge interface itself as opposed to one of the
constituent interfaces in the bridge.
Unfortunately the operation that adds the mp->mglist node to the
list neglected to che... |
agg_item_charsets_for_comparison(DTCollation &c, const char *name,
Item **items, uint nitems,
int item_sep= 1)
{
uint flags= MY_COLL_ALLOW_SUPERSET_CONV |
MY_COLL_ALLOW_COERCIBLE_CONV |
MY_COLL_DISALLOW_NONE;
return agg_it... | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 132,367,807,308,212,600,000,000,000,000,000,000,000 | 9 | 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... |
char *Curl_checkheaders(const struct Curl_easy *data,
const char *thisheader)
{
struct curl_slist *head;
size_t thislen = strlen(thisheader);
for(head = data->set.headers; head; head = head->next) {
if(strncasecompare(head->data, thisheader, thislen) &&
Curl_headersep(head->dat... | 0 | [
"CWE-200"
] | curl | 7214288898f5625a6cc196e22a74232eada7861c | 273,055,956,977,637,260,000,000,000,000,000,000,000 | 14 | transfer: strip credentials from the auto-referer header field
Added test 2081 to verify.
CVE-2021-22876
Bug: https://curl.se/docs/CVE-2021-22876.html |
static void kvm_update_dr7(struct kvm_vcpu *vcpu)
{
unsigned long dr7;
if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP)
dr7 = vcpu->arch.guest_debug_dr7;
else
dr7 = vcpu->arch.dr7;
kvm_x86_ops->set_dr7(vcpu, dr7);
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_BP_ENABLED;
if (dr7 & DR7_BP_EN_MASK)
vcpu->arch.sw... | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 8,827,817,631,952,117,000,000,000,000,000,000,000 | 13 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
const CImg<T>& _save_dlm(std::FILE *const file, const char *const filename) const {
if (!file && !filename)
throw CImgArgumentException(_cimg_instance
"save_dlm(): Specified filename is (null).",
cimg_instance);
if (is_empt... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 62,475,672,239,378,650,000,000,000,000,000,000,000 | 26 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
{
int start = 0;
u32 prev_legacy, cur_legacy;
mutex_lock(&kvm->arch.vpit->pit_state.lock);
prev_legacy = kvm->arch.vpit->pit_state.flags & KVM_PIT_FLAGS_HPET_LEGACY;
cur_legacy = ps->flags & KVM_PIT_FLAGS_HPET_LEGACY;
if (!prev_legacy &&... | 1 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 201,137,855,085,151,400,000,000,000,000,000,000,000 | 16 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
mapfont(struct rangefont * ranges, uint len, char * script, uchar f)
{
for (uint i = 0; i < len; i++) {
if (0 == strcmp(ranges[i].scriptname, script))
ranges[i].font = f;
}
if (0 == strcmp(script, "CJK")) {
mapfont(ranges, len, "Han", f);
mapfont(ranges, len, "Hangul", f);
mapfont(ranges, le... | 0 | [
"CWE-703",
"CWE-770"
] | mintty | bd52109993440b6996760aaccb66e68e782762b9 | 163,842,025,871,912,400,000,000,000,000,000,000,000 | 17 | tame some window operations, just in case |
int reset(void) { ptr[0]=0; return 0; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 229,465,890,766,740,940,000,000,000,000,000,000,000 | 1 | 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 void test_send_s32(GOutputStream *os, gint32 v)
{
v = GINT32_TO_BE(v);
g_assert(g_output_stream_write_all(os, &v, 4, NULL, NULL, NULL));
} | 0 | [] | gtk-vnc | ea0386933214c9178aaea9f2f85049ea3fa3e14a | 48,355,871,129,048,940,000,000,000,000,000,000,000 | 5 | Fix bounds checking for RRE, hextile & copyrect encodings
While the client would bounds check the overall update
region, it failed to bounds check the payload data
parameters.
Add a test case to validate bounds checking.
https://bugzilla.gnome.org/show_bug.cgi?id=778048
CVE-2017-5884
Signed-off-by: Daniel P. Berra... |
ComparisonMatchExpression::ComparisonMatchExpression(MatchType type,
StringData path,
const BSONElement& rhs)
: ComparisonMatchExpressionBase(type,
path,
... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 160,863,941,069,923,630,000,000,000,000,000,000,000 | 22 | SERVER-43699 $mod should not overflow for large negative values |
vg_resource_attach_backing(VuGpu *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_simple_resource *res;
struct virtio_gpu_resource_attach_backing ab;
int ret;
VUGPU_FILL_CMD(ab);
virtio_gpu_bswap_32(&ab, sizeof(ab));
res = virtio_gpu_find_resource(g, ab.r... | 0 | [] | qemu | b9f79858a614d95f5de875d0ca31096eaab72c3b | 46,285,566,707,458,410,000,000,000,000,000,000,000 | 31 | vhost-user-gpu: fix memory leak in vg_resource_attach_backing (CVE-2021-3544)
Check whether the 'res' has already been attach_backing to avoid
memory leak.
Fixes: CVE-2021-3544
Reported-by: Li Qiang <liq3ea@163.com>
virtio-gpu fix: 204f01b309 ("virtio-gpu: fix memory leak
in resource attach backing")
Signed-off-by: ... |
GF_Err gf_isom_clone_root_od(GF_ISOFile *input, GF_ISOFile *output)
{
GF_List *esds;
GF_Err e;
u32 i;
GF_Descriptor *desc;
e = gf_isom_remove_root_od(output);
if (e) return e;
if (!input->moov || !input->moov->iods || !input->moov->iods->descriptor) return GF_OK;
e = gf_isom_insert_moov(output);
if (e) return... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 21,301,798,810,098,220,000,000,000,000,000,000,000 | 37 | fixed #1706 |
static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
struct tcp_sack_block *next_dup,
struct tcp_sacktag_state *state,
u32 start_seq, u32 end_seq,
int dup_sack_in)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *tmp;
tcp_for_write_queue_from(skb, sk) {
int in_sack ... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 246,897,400,009,453,850,000,000,000,000,000,000,000 | 68 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
void tipc_link_set_abort_limit(struct tipc_link *l, u32 limit)
{
l->abort_limit = limit;
} | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 67,217,767,052,635,220,000,000,000,000,000,000,000 | 4 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
void run() {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
intrusive_ptr<Expression> expression = ExpressionFieldPath::create(expCtx, "a.b.c");
assertBinaryEqual(fromjson("{'':[[1,2],3,[4],[[5]],[6,7]]}"),
toBson(expression->evaluat... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 302,955,052,222,238,830,000,000,000,000,000,000,000 | 10 | SERVER-38070 fix infinite loop in agg expression |
static void decode_bitmap_rgb24(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi,
dbuf *unc_pixels, de_bitmap *img, i64 pos)
{
i64 i, j;
u8 cr, cg, cb;
for(j=0; j<bi->height; j++) {
for(i=0; i<bi->pdwidth; i++) {
cr = dbuf_getbyte(unc_pixels, j*bi->rowspan + (bi->cmpcount-3+0)*bi->pdwidth + i);
cg = db... | 0 | [
"CWE-476"
] | deark | 287f5ac31dfdc074669182f51ece637706070eeb | 335,542,571,210,150,560,000,000,000,000,000,000,000 | 15 | pict: Fixed a bug with ICC profile extraction
Could cause a NULL pointer dereference.
Found by F. Çelik. |
int ax25_fwd_ioctl(unsigned int cmd, struct ax25_fwd_struct *fwd)
{
ax25_dev *ax25_dev, *fwd_dev;
if ((ax25_dev = ax25_addr_ax25dev(&fwd->port_from)) == NULL)
return -EINVAL;
switch (cmd) {
case SIOCAX25ADDFWD:
fwd_dev = ax25_addr_ax25dev(&fwd->port_to);
if (!fwd_dev) {
ax25_dev_put(ax25_dev);
return ... | 0 | [
"CWE-416"
] | linux | 87563a043cef044fed5db7967a75741cc16ad2b1 | 19,193,370,038,218,754,000,000,000,000,000,000,000 | 40 | ax25: fix reference count leaks of ax25_dev
The previous commit d01ffb9eee4a ("ax25: add refcount in ax25_dev
to avoid UAF bugs") introduces refcount into ax25_dev, but there
are reference leak paths in ax25_ctl_ioctl(), ax25_fwd_ioctl(),
ax25_rt_add(), ax25_rt_del() and ax25_rt_opt().
This patch uses ax25_dev_put() ... |
void expand_deblock_weights(
astcenc_context& ctx
) {
unsigned int xdim = ctx.config.block_x;
unsigned int ydim = ctx.config.block_y;
unsigned int zdim = ctx.config.block_z;
float centerpos_x = static_cast<float>(xdim - 1) * 0.5f;
float centerpos_y = static_cast<float>(ydim - 1) * 0.5f;
float centerpos_z = stat... | 0 | [
"CWE-787"
] | astc-encoder | 6ffb3058bfbcc836108c25274e955e399481e2b4 | 275,661,523,377,166,100,000,000,000,000,000,000,000 | 30 | Provide a fallback for blocks which find no valid encoding |
static inline u32 kvm_async_pf_hash_fn(gfn_t gfn)
{
return hash_32(gfn & 0xffffffff, order_base_2(ASYNC_PF_PER_VCPU));
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 75,354,198,723,337,130,000,000,000,000,000,000,000 | 4 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
GF_Err gf_isom_wma_set_tag(GF_ISOFile *mov, char *name, char *value)
{
GF_Err e;
GF_XtraTag *tag=NULL;
u32 count, i;
GF_XtraBox *xtra;
e = CanAccessMovie(mov, GF_ISOM_OPEN_WRITE);
if (e) return e;
gf_isom_create_meta_extensions(mov, GF_FALSE);
xtra = (GF_XtraBox *) gf_isom_create_meta_extensions(mov, GF_TRUE... | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 266,840,704,639,018,140,000,000,000,000,000,000,000 | 59 | fixed #2046 |
file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
size_t nbytes)
{
union {
int32_t l;
char c[sizeof (int32_t)];
} u;
int clazz;
int swap;
struct stat st;
off_t fsize;
int flags = 0;
Elf32_Ehdr elf32hdr;
Elf64_Ehdr elf64hdr;
uint16_t type, phnum, shnum, notecount;
if (ms->flags & (M... | 0 | [
"CWE-119"
] | file | 35c94dc6acc418f1ad7f6241a6680e5327495793 | 131,895,279,514,530,670,000,000,000,000,000,000,000 | 67 | Fix always true condition (Thomas Jarosch) |
static int nl80211_disconnect(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
u16 reason;
int ret;
if (dev->ieee80211_ptr->conn_owner_nlportid &&
dev->ieee80211_ptr->conn_owner_nlportid != info->snd_portid... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 74,639,437,277,057,160,000,000,000,000,000,000,000 | 28 | 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... |
static struct nft_expr *nft_expr_init(const struct nft_ctx *ctx,
const struct nlattr *nla)
{
struct nft_expr_info expr_info;
struct nft_expr *expr;
struct module *owner;
int err;
err = nf_tables_expr_parse(ctx, nla, &expr_info);
if (err < 0)
goto err_expr_parse;
err = -EOPNOTSUPP;
if (!(expr_info.... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 308,346,080,588,673,770,000,000,000,000,000,000,000 | 37 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param)
{
if (ctx->param)
X509_VERIFY_PARAM_free(ctx->param);
ctx->param = param;
} | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 301,287,910,436,524,800,000,000,000,000,000,000,000 | 6 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
TORRENT_TEST(bdecode_error)
{
error_code ec(bdecode_errors::overflow);
TEST_EQUAL(ec.message(), "integer overflow");
TEST_EQUAL(ec.category().name(), std::string("bdecode error"));
ec.assign(5434, get_bdecode_category());
TEST_EQUAL(ec.message(), "Unknown error");
} | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 322,649,964,589,179,760,000,000,000,000,000,000,000 | 8 | fix out-of-bounds read in bdecode
Fixes #2099 |
bool ShouldDisableHtmlFullscreenWindowResize() const {
return disable_html_fullscreen_window_resize_;
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 261,754,749,113,667,840,000,000,000,000,000,000,000 | 3 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const Tensor& filter = context->input(1);
const Tensor& out_backprop = context->input(2);
// Determine relevant sizes from input and filters.
int stride_rows = 0, stride_cols = 0;
int rate_rows = 0, rat... | 1 | [
"CWE-787"
] | tensorflow | 3f6fe4dfef6f57e768260b48166c27d148f3015f | 336,376,399,522,786,870,000,000,000,000,000,000,000 | 42 | Add missing validations in dillation ops.
PiperOrigin-RevId: 372037158
Change-Id: I4ee304c84a02550c030288a6534000b934fc1599 |
int WavInFile::readWavHeaders()
{
int res;
memset(&header, 0, sizeof(header));
res = readRIFFBlock();
if (res) return 1;
// read header blocks until data block is found
do
{
// read header blocks
res = readHeaderBlock();
if (res < 0) return 1; // error... | 0 | [
"CWE-119"
] | soundtouch | 9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e | 133,687,041,497,370,400,000,000,000,000,000,000,000 | 18 | Added minimum size check for WAV header block lengh values |
uint32_t op_mask() override {
return RGW_OP_TYPE_WRITE;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 198,378,965,222,697,100,000,000,000,000,000,000,000 | 3 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
nautilus_directory_get_info_for_new_files (NautilusDirectory *directory,
GList *location_list)
{
NewFilesState *state;
GFile *location;
GList *l;
if (location_list == NULL) {
return;
}
state = g_new (NewFilesState, 1);
state->directory = directory;
state->cancellable = g_cancellable_new ();
state-... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 141,285,252,408,769,060,000,000,000,000,000,000,000 | 33 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
kv_double_from_string(const char *string,
const char *pair_separator,
const char *kv_separator,
struct key_value_double **result_out)
{
char **pairs;
char **pair;
struct key_value_double *result = NULL;
ssize_t npairs = 0;
unsigned int idx = 0;
if (!pair_separator || pair_separator[0] ==... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 203,972,851,433,205,300,000,000,000,000,000,000,000 | 57 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static input_translation_t *setup_translation_table (exporter_ipfix_domain_t *exporter, uint16_t id) {
input_translation_t *table;
extension_map_t *extension_map;
uint32_t i, ipv6, offset, next_extension;
size_t size_required;
ipv6 = 0;
table = GetTranslationTable(exporter, id);
if ( !table ) {
LogInfo("Pr... | 0 | [
"CWE-190"
] | nfdump | 3b006ededaf351f1723aea6c727c9edd1b1fff9b | 322,781,292,740,872,160,000,000,000,000,000,000,000 | 327 | Fix potential unsigned integer underflow |
void ndpi_set_bitmask_protocol_detection(char *label, struct ndpi_detection_module_struct *ndpi_str,
const NDPI_PROTOCOL_BITMASK *detection_bitmask, const u_int32_t idx,
u_int16_t ndpi_protocol_id,
... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 69,610,242,774,937,310,000,000,000,000,000,000,000 | 51 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
SWFInput_buffer_getChar(SWFInput input)
{
if ( input->offset >= input->length )
return EOF;
else
return ((unsigned char *)input->data)[input->offset++];
} | 0 | [
"CWE-190",
"CWE-703"
] | libming | a009a38dce1d9316cad1ab522b813b1d5ba4c62a | 218,280,072,615,309,000,000,000,000,000,000,000,000 | 7 | Fix left shift of a negative value in SWFInput_readSBits. Check for number before before left-shifting by (number-1). |
xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
const xmlChar *cur = input;
xmlChar *buffer = NULL;
xmlChar *out = NULL;
size_t buffer_size = 0;
int html = 0;
if (input == NULL) return(NULL);
if (doc != NULL)
html = (doc->type == XML_HTML_DOCUMENT_NODE);
... | 0 | [
"CWE-787"
] | libxml2 | bf22713507fe1fc3a2c4b525cf0a88c2dc87a3a2 | 116,537,115,844,529,620,000,000,000,000,000,000,000 | 199 | Validate UTF8 in xmlEncodeEntities
Code is currently assuming UTF-8 without validating. Truncated UTF-8
input can cause out-of-bounds array access.
Adds further checks to partial fix in 50f06b3e.
Fixes #178 |
int Field_varstring::key_cmp(const uchar *a,const uchar *b)
{
return field_charset->coll->strnncollsp(field_charset,
a + HA_KEY_BLOB_LENGTH,
uint2korr(a),
b + HA_KEY_BLOB_LENGTH,
... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 243,673,840,068,604,630,000,000,000,000,000,000,000 | 8 | 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... |
TEST(FloatPoolingOpTest, AveragePoolPaddingValidStride1) {
FloatPoolingOpModel m(BuiltinOperator_AVERAGE_POOL_2D,
/*input=*/{TensorType_FLOAT32, {1, 2, 4, 1}},
/*filter_width=*/2, /*filter_height=*/2,
/*output=*/{TensorType_FLOAT32, {}}, Padding_... | 0 | [
"CWE-369"
] | tensorflow | 5f7975d09eac0f10ed8a17dbb6f5964977725adc | 92,150,988,635,727,810,000,000,000,000,000,000,000 | 13 | Prevent another div by 0 in optimized pooling implementations TFLite
PiperOrigin-RevId: 370800091
Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b |
void CLASS lossless_dng_load_raw()
{
unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col;
struct jhead jh;
ushort *rp;
while (trow < raw_height) {
save = ftell(ifp);
if (tile_length < INT_MAX)
fseek (ifp, get4(), SEEK_SET);
if (!ljpeg_start (&jh, 0)) break;
jwide = jh.wide;
if ... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 276,890,742,320,087,780,000,000,000,000,000,000,000 | 71 | cumulated data checks patch |
char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize)
{
int c;
char *bufptr;
assert(bufsize > 0);
bufptr = buf;
while (bufsize > 1) {
if ((c = jas_stream_getc(stream)) == EOF) {
break;
}
*bufptr++ = c;
--bufsize;
if (c == '\n') {
break;
}
}
*bufptr = '\0';
return buf;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 9,568,265,688,565,531,000,000,000,000,000,000,000 | 20 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *i_s_table,
const char *db)
{
TABLE *schema_table= i_s_table->table;
Open_tables_backup open_tables_backup;
TABLE_LIST event_table;
int ret= 0;
DBUG_ENTER("Event_db_repository::fill_schema_events");
DBUG_PR... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 78,960,842,097,094,440,000,000,000,000,000,000,000 | 42 | 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 int em_iret(struct x86_emulate_ctxt *ctxt)
{
switch(ctxt->mode) {
case X86EMUL_MODE_REAL:
return emulate_iret_real(ctxt);
case X86EMUL_MODE_VM86:
case X86EMUL_MODE_PROT16:
case X86EMUL_MODE_PROT32:
case X86EMUL_MODE_PROT64:
default:
/* iret from protected mode unimplemented yet */
return X86EMUL_UNH... | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 123,504,298,378,703,040,000,000,000,000,000,000,000 | 14 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
static int imap_mbox_open(struct Context *ctx)
{
struct ImapData *idata = NULL;
struct ImapStatus *status = NULL;
char buf[PATH_MAX];
char bufout[PATH_MAX];
int count = 0;
struct ImapMbox mx, pmx;
int rc;
if (imap_parse_path(ctx->path, &mx))
{
mutt_error(_("%s is an invalid IMAP path"), ctx->path... | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 12,936,604,634,351,817,000,000,000,000,000,000,000 | 221 | Quote path in imap_subscribe |
ikev1_attrmap_print(netdissect_options *ndo,
const u_char *p, const u_char *ep,
const struct attrmap *map, size_t nmap)
{
int totlen;
uint32_t t, v;
if (p[0] & 0x80)
totlen = 4;
else
totlen = 4 + EXTRACT_16BITS(&p[2]);
if (ep < p + totlen) {
ND_PRINT((ndo,"[|attr]"));
return ep + 1;
}
ND_PR... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | e0a5a02b0fc1900a69d6c37ed0aab36fb8494e6d | 34,754,997,241,047,065,000,000,000,000,000,000,000 | 36 | CVE-2017-13039/IKEv1: Do more bounds checking.
Have ikev1_attrmap_print() and ikev1_attr_print() do full bounds
checking, and return null on a bounds overflow. Have their callers
check for a null return.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file ... |
void OSD::send_beacon(const ceph::coarse_mono_clock::time_point& now)
{
const auto& monmap = monc->monmap;
// send beacon to mon even if we are just connected, and the monmap is not
// initialized yet by then.
if (monmap.epoch > 0 &&
monmap.get_required_features().contains_all(
ceph::features::mon... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 302,327,959,089,240,850,000,000,000,000,000,000,000 | 21 | 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 ... |
static void clean_func_state(struct bpf_verifier_env *env,
struct bpf_func_state *st)
{
enum bpf_reg_liveness live;
int i, j;
for (i = 0; i < BPF_REG_FP; i++) {
live = st->regs[i].live;
/* liveness must not touch this register anymore */
st->regs[i].live |= REG_LIVE_DONE;
if (!(live & REG_LIVE_READ)... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 306,937,763,832,545,900,000,000,000,000,000,000,000 | 28 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
execute_function (var, words, flags, fds_to_close, async, subshell)
SHELL_VAR *var;
WORD_LIST *words;
int flags;
struct fd_bitmap *fds_to_close;
int async, subshell;
{
int return_val, result;
COMMAND *tc, *fc, *save_current;
char *debug_trap, *error_trap, *return_trap;
#if defined (ARRAY_... | 1 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 29,179,998,606,313,550,000,000,000,000,000,000,000 | 242 | bash-4.4-rc2 release |
rb_str_locktmp(str)
VALUE str;
{
if (FL_TEST(str, STR_TMPLOCK)) {
rb_raise(rb_eRuntimeError, "temporal locking already locked string");
}
FL_SET(str, STR_TMPLOCK);
return str;
} | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 141,920,284,756,521,600,000,000,000,000,000,000,000 | 9 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
{
struct ifconf32 ifc32;
struct ifconf ifc;
struct ifconf __user *uifc;
struct ifreq32 __user *ifr32;
struct ifreq __user *ifr;
unsigned int i, j;
int err;
if (copy_from_user(&ifc32, compat_ptr(arg), sizeof(struct ifconf32)))
return ... | 0 | [] | linux-2.6 | 188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7 | 198,393,140,292,083,680,000,000,000,000,000,000,000 | 68 | [PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6]
Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos
driver so that the msdos header file doesn't need to be included.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel... |
static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len)
{
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct ... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 207,542,894,627,792,800,000,000,000,000,000,000,000 | 206 | 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... |
gql_root_type() {
if (NULL == _gql_root_type && NULL != gql_type_func) {
_gql_root_type = gql_type_func(gql_root);
}
return _gql_root_type;
} | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 14,964,086,078,686,486,000,000,000,000,000,000,000 | 6 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
static int ext4_write_info(struct super_block *sb, int type)
{
int ret, err;
handle_t *handle;
/* Data block + inode block */
handle = ext4_journal_start(d_inode(sb->s_root), EXT4_HT_QUOTA, 2);
if (IS_ERR(handle))
return PTR_ERR(handle);
ret = dquot_commit_info(sb, type);
err = ext4_journal_stop(handle);
if ... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 333,253,472,434,655,100,000,000,000,000,000,000,000 | 15 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
TfLiteStatus PopulateQuantizedLstmParams8x8_16(
TfLiteContext* context, TfLiteNode* node,
lstm_eval::IntegerLstmParameter* integer_lstm_param) {
// Calculate quantized clip for projection and cell.
const auto* params =
static_cast<TfLiteUnidirectionalSequenceLSTMParams*>(node->builtin_data);
const f... | 0 | [
"CWE-908"
] | tensorflow | 4a91f2069f7145aab6ba2d8cfe41be8a110c18a5 | 165,003,359,041,602,810,000,000,000,000,000,000,000 | 336 | Fix a null pointer exception caused by branching on uninitialized data.
This is due to not checking that the params for the quantization exists. If there is no quantization, we should not access the `.params` field.
PiperOrigin-RevId: 385168337
Change-Id: I28661e4f12ba1c92cfeae23d22a3fb2df2a2c6a4 |
void AddBatchOffsets(Tensor* indices, const Tensor& params) {
int64_t batch_size = 1; // The size of all batch dimensions.
for (int idx = 0; idx < batch_dims_; ++idx) {
batch_size *= params.dim_size(idx);
}
auto indices_flat = indices->flat<Index>();
int64_t const index_inner_size = indice... | 1 | [
"CWE-369"
] | tensorflow | ac117ee8a8ea57b73d34665cdf00ef3303bc0b11 | 238,920,859,327,973,760,000,000,000,000,000,000,000 | 16 | Prevent division by 0 in `resource_variable_ops.cc`
PiperOrigin-RevId: 387939939
Change-Id: Ib04902d63756633999959a70613f2eaa30c2c151 |
void test_checkout_nasty__dot_backslash_dotcapitalgit_path(void)
{
#ifdef GIT_WIN32
test_checkout_fails("refs/heads/dot_backslash_dotcapitalgit_path", ".GIT/foobar");
#endif
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 182,945,488,036,518,460,000,000,000,000,000,000,000 | 6 | 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 ... |
TEST_F(ExprMatchTest, ConstantNegativeNumberExpressionMatchesCorrectly) {
createMatcher(fromjson("{$expr: -1}"));
ASSERT_TRUE(matches(BSON("x" << 2)));
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 47,463,158,394,066,400,000,000,000,000,000,000,000 | 5 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
simple_atof (const char *beg, const char *end, double *dest)
{
double result = 0;
bool negative = false;
bool seen_dot = false;
bool seen_digit = false;
double divider = 1;
const char *p = beg;
while (p < end && c_isspace (*p))
++p;
if (p < end && (*p == '-' || *p == '+'))
{
negative = ... | 0 | [
"CWE-22"
] | wget | 18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7 | 160,445,704,709,471,900,000,000,000,000,000,000,000 | 48 | CVE-2014-4877: Arbitrary Symlink Access
Wget was susceptible to a symlink attack which could create arbitrary
files, directories or symbolic links and set their permissions when
retrieving a directory recursively through FTP. This commit changes the
default settings in Wget such that Wget no longer creates local symbo... |
**/
bool is_sameXC(const unsigned int size_x, const unsigned int size_c) const {
return _width==size_x && _spectrum==size_c; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 250,401,292,812,615,320,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int rtc_dev_release(struct inode *inode, struct file *file)
{
struct rtc_device *rtc = file->private_data;
#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
clear_uie(rtc);
#endif
rtc_irq_set_state(rtc, NULL, 0);
if (rtc->ops->release)
rtc->ops->release(rtc->dev.parent);
clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
... | 1 | [] | linux-2.6 | 2e4a75cdcb89ff53bb182dda3a6dcdc14befe007 | 335,404,817,289,562,520,000,000,000,000,000,000,000 | 15 | rtc: fix kernel panic on second use of SIGIO nofitication
When userspace uses SIGIO notification and forgets to disable it before
closing file descriptor, rtc->async_queue contains stale pointer to struct
file. When user space enables again SIGIO notification in different
process, kernel dereferences this (poisoned) ... |
storagePoolCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
virStoragePoolObj *obj = NULL;
virStoragePoolDef *def;
virStoragePoolPtr pool = NULL;
virStorageBackend *backend;
virObjectEvent *event = NULL;
unsigned int build_flags = 0;
... | 0 | [] | libvirt | 447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87 | 140,693,085,400,091,980,000,000,000,000,000,000,000 | 87 | storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.
Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.co... |
__acquires(user->release_barrier)
{
struct ipmi_user *ruser;
*index = srcu_read_lock(&user->release_barrier);
ruser = srcu_dereference(user->self, &user->release_barrier);
if (!ruser)
srcu_read_unlock(&user->release_barrier, *index);
return ruser;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 96,196,200,892,911,370,000,000,000,000,000,000,000 | 10 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
i_alloc_byte_array(gs_memory_t * mem, uint num_elements, uint elt_size,
client_name_t cname)
{
gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem;
obj_header_t *obj;
#ifdef MEMENTO
if (Memento_failThisEvent())
return NULL;
#endif
obj = alloc_obj(imem, (ulong) num_elements... | 1 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 58,141,792,985,126,900,000,000,000,000,000,000,000 | 20 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
int LUKS2_reencrypt_digest_new(struct luks2_hdr *hdr)
{
return reencrypt_digest(hdr, 1);
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 150,461,948,966,834,250,000,000,000,000,000,000,000 | 4 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
Tfloat cubic_atX(const float fx, const int y=0, const int z=0, const int c=0) const {
if (is_empty())
throw CImgInstanceException(_cimg_instance
"cubic_atX(): Empty instance.",
cimg_instance);
return _cubic_atX(fx,y,z,c);
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 319,031,335,710,039,700,000,000,000,000,000,000,000 | 7 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void dx_sort_map (struct dx_map_entry *map, unsigned count)
{
struct dx_map_entry *p, *q, *top = map + count - 1;
int more;
/* Combsort until bubble sort doesn't suck */
while (count > 2) {
count = count*10/13;
if (count - 9 < 2) /* 9, 10 -> 11 */
count = 11;
for (p = top, q = p - count; q >= map; p... | 0 | [
"CWE-20"
] | linux-2.6 | e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f | 71,032,594,571,658,360,000,000,000,000,000,000,000 | 25 | ext4: Add sanity check to make_indexed_dir
Make sure the rec_len field in the '..' entry is sane, lest we overrun
the directory block and cause a kernel oops on a purposefully
corrupted filesystem.
Thanks to Sami Liedes for reporting this bug.
http://bugzilla.kernel.org/show_bug.cgi?id=12430
Signed-off-by: "Theodor... |
static struct netdev_queue *dev_pick_tx(struct net_device *dev,
struct sk_buff *skb)
{
u16 queue_index;
struct sock *sk = skb->sk;
if (sk_tx_queue_recorded(sk)) {
queue_index = sk_tx_queue_get(sk);
} else {
const struct net_device_ops *ops = dev->netdev_ops;
if (ops->ndo_select_queue) {
queue_index ... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 281,711,894,438,307,500,000,000,000,000,000,000,000 | 31 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
void ClientHandler::set_tls_sni(const StringRef &sni) {
sni_ = make_string_ref(balloc_, sni);
} | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 107,520,528,547,071,800,000,000,000,000,000,000,000 | 3 | Don't read too greedily |
static MonoMethodSignature*
dynamic_method_to_signature (MonoReflectionDynamicMethod *method) {
MonoMethodSignature *sig;
sig = parameters_to_signature (NULL, method->parameters);
sig->hasthis = method->attrs & METHOD_ATTRIBUTE_STATIC? 0: 1;
sig->ret = method->rtype? mono_reflection_type_get_handle (method->rtype)... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 42,144,494,311,722,976,000,000,000,000,000,000,000 | 9 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
dp_packet_hwol_set_csum_sctp(struct dp_packet *b OVS_UNUSED)
{
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 27,850,511,987,268,700,000,000,000,000,000,000,000 | 3 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
_hb_buffer_clear_output (HB_Buffer buffer)
{
buffer->out_length = 0;
buffer->out_pos = 0;
buffer->out_string = buffer->in_string;
buffer->separate_out = FALSE;
} | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 88,937,006,472,282,500,000,000,000,000,000,000,000 | 7 | [HB] Remove all references to the old code! |
static int put_addr_qdict(QDict *qdict, struct sockaddr_storage *sa,
socklen_t salen)
{
char host[NI_MAXHOST];
char serv[NI_MAXSERV];
int err;
if ((err = getnameinfo((struct sockaddr *)sa, salen,
host, sizeof(host),
serv, s... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 37,404,915,508,129,893,000,000,000,000,000,000,000 | 22 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
void btrfs_init_devices_late(struct btrfs_fs_info *fs_info)
{
struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs;
struct btrfs_device *device;
fs_devices->fs_info = fs_info;
mutex_lock(&fs_devices->device_list_mutex);
list_for_each_entry(device, &fs_devices->devices, dev_list)
device->fs_inf... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 70,595,791,220,562,710,000,000,000,000,000,000,000 | 19 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
static bool gfar_add_rx_frag(struct gfar_rx_buff *rxb, u32 lstatus,
struct sk_buff *skb, bool first)
{
int size = lstatus & BD_LENGTH_MASK;
struct page *page = rxb->page;
if (likely(first)) {
skb_put(skb, size);
} else {
/* the last fragments' length contains the full frame length */
if (lstatus & BD... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 311,448,106,823,358,140,000,000,000,000,000,000,000 | 33 | 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, *... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.