func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
struct r_bin_pe_export_t* PE_(r_bin_pe_get_exports)(RBinPEObj* pe) {
r_return_val_if_fail (pe, NULL);
struct r_bin_pe_export_t* exp, * exports = NULL;
PE_Word function_ordinal = 0;
PE_VWord functions_paddr, names_paddr, ordinals_paddr, function_rva, name_vaddr, name_paddr;
char function_name[PE_NAME_LENGTH + 1], f... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 173,330,934,323,411,300,000,000,000,000,000,000,000 | 130 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
sendtomaster(dns_forward_t *forward) {
isc_result_t result;
isc_sockaddr_t src;
isc_dscp_t dscp = -1;
LOCK_ZONE(forward->zone);
if (DNS_ZONE_FLAG(forward->zone, DNS_ZONEFLG_EXITING)) {
UNLOCK_ZONE(forward->zone);
return (ISC_R_CANCELED);
}
if (forward->which >= forward->zone->masterscnt) {
UNLOCK_ZONE(f... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 331,258,949,062,043,020,000,000,000,000,000,000,000 | 53 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
void conv_localetodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
{
gchar *tmpstr;
codeconv_set_strict(TRUE);
tmpstr = conv_iconv_strdup(inbuf, conv_get_locale_charset_str(),
CS_INTERNAL);
codeconv_set_strict(FALSE);
if (tmpstr && g_utf8_validate(tmpstr, -1, NULL)) {
strncpy2(outbuf, tmpstr, outlen)... | 0 | [
"CWE-119"
] | claws | d390fa07f5548f3173dd9cc13b233db5ce934c82 | 132,071,139,811,362,160,000,000,000,000,000,000,000 | 29 | Make sure we don't run out of the output buffer. Maybe fixes bug #3557 |
static void paging64_init_context(struct kvm_mmu *context)
{
context->page_fault = paging64_page_fault;
context->gva_to_gpa = paging64_gva_to_gpa;
context->sync_page = paging64_sync_page;
context->invlpg = paging64_invlpg;
context->direct_map = false;
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 329,627,066,367,916,100,000,000,000,000,000,000,000 | 8 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
MockUdpReadFilterCallbacks::MockUdpReadFilterCallbacks() {
ON_CALL(*this, udpListener()).WillByDefault(ReturnRef(udp_listener_));
} | 0 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 142,805,761,333,548,200,000,000,000,000,000,000,000 | 3 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
MagickExport MagickBooleanType XComponentGenesis(void)
{
return(MagickTrue);
} | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 188,095,668,179,847,640,000,000,000,000,000,000,000 | 4 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static int mem_cgroup_can_attach(struct cgroup_subsys *ss,
struct cgroup *cgroup,
struct cgroup_taskset *tset)
{
return 0;
} | 0 | [
"CWE-476",
"CWE-415"
] | linux | 371528caec553785c37f73fa3926ea0de84f986f | 185,759,552,288,089,520,000,000,000,000,000,000,000 | 6 | mm: memcg: Correct unregistring of events attached to the same eventfd
There is an issue when memcg unregisters events that were attached to
the same eventfd:
- On the first call mem_cgroup_usage_unregister_event() removes all
events attached to a given eventfd, and if there were no events left,
thresholds->prima... |
static struct stream_encoder *dce100_stream_encoder_create(
enum engine_id eng_id,
struct dc_context *ctx)
{
struct dce110_stream_encoder *enc110 =
kzalloc(sizeof(struct dce110_stream_encoder), GFP_KERNEL);
if (!enc110)
return NULL;
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
&str... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 27,476,797,395,229,130,000,000,000,000,000,000,000 | 14 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
GF_Err url_Read(GF_Box *s, GF_BitStream *bs)
{
GF_DataEntryURLBox *ptr = (GF_DataEntryURLBox *)s;
if (ptr->size) {
ptr->location = (char*)gf_malloc((u32) ptr->size);
if (! ptr->location) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->location, (u32)ptr->size);
}
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 236,633,599,569,611,500,000,000,000,000,000,000,000 | 11 | prevent dref memleak on invalid input (#1183) |
GF_Err metx_AddBox(GF_Box *s, GF_Box *a)
{
GF_MetaDataSampleEntryBox *ptr = (GF_MetaDataSampleEntryBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_SINF:
gf_list_add(ptr->protections, a);
break;
case GF_ISOM_BOX_TYPE_TXTC:
//we allow the config box on metx
if (ptr->config) ERROR_ON_DUPLICATED_BOX(a, ptr)
... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 37,529,383,283,799,058,000,000,000,000,000,000,000 | 17 | fixed 2 possible heap overflows (inc. #1088) |
void PackLinuxElf64::unpack(OutputFile *fo)
{
if (e_phoff != sizeof(Elf64_Ehdr)) {// Phdrs not contiguous with Ehdr
throwCantUnpack("bad e_phoff");
}
unsigned const c_phnum = get_te16(&ehdri.e_phnum);
upx_uint64_t old_data_off = 0;
upx_uint64_t old_data_len = 0;
upx_uint64_t old_dtinit =... | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 30,450,425,629,754,828,000,000,000,000,000,000,000 | 244 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
void __user *argp)
{
struct vdpa_device *vdpa = v->vdpa;
const struct vdpa_config_ops *ops = vdpa->config;
struct vdpa_vq_state vq_state;
struct vdpa_callback cb;
struct vhost_virtqueue *vq;
struct vhost_vring_state s;
u32 idx;
lo... | 0 | [
"CWE-190"
] | linux | 870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 | 75,251,201,261,594,340,000,000,000,000,000,000,000 | 75 | vdpa: clean up get_config_size ret value handling
The return type of get_config_size is size_t so it makes
sense to change the type of the variable holding its result.
That said, this already got taken care of (differently, and arguably
not as well) by commit 3ed21c1451a1 ("vdpa: check that offsets are
within bounds"... |
R_API char *retrieve_class_method_access_string(ut16 flags) {
return retrieve_access_string (flags, CLASS_ACCESS_FLAGS);
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 13,952,336,418,156,332,000,000,000,000,000,000,000 | 3 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb)
{ } | 0 | [] | linux-2.6 | 6209344f5a3795d34b7f2c0061f49802283b6bdd | 139,732,483,862,251,860,000,000,000,000,000,000,000 | 2 | net: unix: fix inflight counting bug in garbage collector
Previously I assumed that the receive queues of candidates don't
change during the GC. This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may s... |
GF_Box *mfhd_New()
{
ISOM_DECL_BOX_ALLOC(GF_MovieFragmentHeaderBox, GF_ISOM_BOX_TYPE_MFHD);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 72,878,659,139,446,720,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, enum_column_usage column_usage,
List<Item> *sum_func_list, List<Item> *pre_fix,
bool allow_sum_func)
{
Item *item;
enum_column_usage saved_column_usage= thd->column_usage;
nesting... | 0 | [
"CWE-416"
] | server | 0beed9b5e933f0ff79b3bb346524f7a451d14e38 | 334,495,340,346,571,860,000,000,000,000,000,000,000 | 110 | MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
when resolving WHERE and ON clauses, do not look in
SELECT list/aliases. |
static int cmpBitmap(unsigned char *buf, int width, int pitch, int height,
int pf, int flags, int gray2rgb)
{
int roffset = tjRedOffset[pf];
int goffset = tjGreenOffset[pf];
int boffset = tjBlueOffset[pf];
int aoffset = tjAlphaOffset[pf];
int ps = tjPixelSize[pf];
int i, j;
for (j = ... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 274,841,222,890,135,900,000,000,000,000,000,000,000 | 49 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
struct dentry *d_instantiate_unique(struct dentry *entry, struct inode *inode)
{
struct dentry *result;
BUG_ON(!hlist_unhashed(&entry->d_u.d_alias));
if (inode)
spin_lock(&inode->i_lock);
result = __d_instantiate_unique(entry, inode);
if (inode)
spin_unlock(&inode->i_lock);
if (!result) {
security_d_inst... | 0 | [
"CWE-401",
"CWE-254"
] | linux | cde93be45a8a90d8c264c776fab63487b5038a65 | 87,195,470,472,394,740,000,000,000,000,000,000,000 | 21 | dcache: Handle escaped paths in prepend_path
A rename can result in a dentry that by walking up d_parent
will never reach it's mnt_root. For lack of a better term
I call this an escaped path.
prepend_path is called by four different functions __d_path,
d_absolute_path, d_path, and getcwd.
__d_path only wants to see... |
returncmd(int argc, char **argv)
{
int skip;
int status;
/*
* If called outside a function, do what ksh does;
* skip the rest of the file.
*/
if (argv[1]) {
skip = SKIPFUNC;
status = number(argv[1]);
} else {
skip = SKIPFUNCDEF;
status = exitstatus;
}
evalskip = skip;
return status;
} | 0 | [] | dash | 29d6f2148f10213de4e904d515e792d2cf8c968e | 146,153,103,188,811,850,000,000,000,000,000,000,000 | 20 | eval: Check nflag in evaltree instead of cmdloop
This patch moves the nflag check from cmdloop into evaltree. This
is so that nflag will be in force even if we enter the shell via a
path other than cmdloop, e.g., through sh -c.
Reported-by: Joey Hess <id@joeyh.name>
Signed-off-by: Herbert Xu <herbert@gondor.apana.or... |
bool allowed_new_user_problem_entry(uid_t uid, const char *name, const char *value)
{
/* Allow root to create everything */
if (uid == 0)
return true;
/* Permit non-root users to create everything except: analyzer and type */
if (strcmp(name, FILENAME_ANALYZER) != 0
&& strcmp(name, FILENAM... | 0 | [
"CWE-59"
] | abrt | 7417505e1d93cc95ec648b74e3c801bc67aacb9f | 164,183,507,613,390,470,000,000,000,000,000,000,000 | 23 | daemon, dbus: allow only root to create CCpp, Koops, vmcore and xorg
Florian Weimer <fweimer@redhat.com>:
This prevents users from feeding things that are not actually
coredumps and excerpts from /proc to these analyzers.
For example, it should not be possible to trigger a rule with
“EVENT=post-create... |
open_io(const char *hostname, int port)
{
IPAddr ip;
/* Note, this call could block for a while */
if (DNS_Name2IPAddress(hostname, &ip) != DNS_Success) {
fprintf(stderr, "Could not get IP address for %s\n", hostname);
exit(1);
}
memset(&his_addr, 0, sizeof (his_addr));
switch (ip.family) {
c... | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 87,275,271,899,853,120,000,000,000,000,000,000,000 | 41 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
msgparse_bucket_remove(struct msg_parse* msg, struct rrset_parse* rrset)
{
struct rrset_parse** p;
p = &msg->hashtable[ rrset->hash & (PARSE_TABLE_SIZE-1) ];
while(*p) {
if(*p == rrset) {
*p = rrset->rrset_bucket_next;
return;
}
p = &( (*p)->rrset_bucket_next );
}
} | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 35,593,536,133,140,220,000,000,000,000,000,000,000 | 12 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
static void init_header(struct ctl_table_header *head,
struct ctl_table_root *root, struct ctl_table_set *set,
struct ctl_node *node, struct ctl_table *table)
{
head->ctl_table = table;
head->ctl_table_arg = table;
head->used = 0;
head->count = 1;
head->nreg = 1;
head->unregistering = NULL;
head->root = root;
... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 141,111,821,754,644,130,000,000,000,000,000,000,000 | 20 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
PHP_FUNCTION(mb_eregi_replace)
{
_php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, ONIG_OPTION_IGNORECASE, 0);
} | 0 | [
"CWE-415"
] | php-src | 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 | 270,890,334,185,320,400,000,000,000,000,000,000,000 | 4 | Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free |
__acquires(bitlock)
{
struct va_format vaf;
va_list args;
struct ext4_super_block *es = EXT4_SB(sb)->s_es;
es->s_last_error_ino = cpu_to_le32(ino);
es->s_last_error_block = cpu_to_le64(block);
__save_error_info(sb, function, line);
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk(KERN_CRIT "EXT4-... | 0 | [
"CWE-703"
] | linux | 0449641130f5652b344ef6fa39fa019d7e94660a | 193,792,844,946,714,850,000,000,000,000,000,000,000 | 44 | ext4: init timer earlier to avoid a kernel panic in __save_error_info
During mount, when we fail to open journal inode or root inode, the
__save_error_info will mod_timer. But actually s_err_report isn't
initialized yet and the kernel oops. The detailed information can
be found https://bugzilla.kernel.org/show_bug.cgi... |
static int checkout_blob(
checkout_data *data,
const git_diff_file *file)
{
git_buf *fullpath;
struct stat st;
int error = 0;
if (checkout_target_fullpath(&fullpath, data, file->path) < 0)
return -1;
if ((data->strategy & GIT_CHECKOUT_UPDATE_ONLY) != 0) {
int rval = checkout_safe_for_update_only(
data, ... | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 285,484,738,749,676,940,000,000,000,000,000,000,000 | 32 | Protect against 8.3 "short name" attacks also on Linux/macOS
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).
... |
MagickPrivate const Quantum *GetVirtualPixelsFromNexus(const Image *image,
const VirtualPixelMethod virtual_pixel_method,const ssize_t x,const ssize_t y,
const size_t columns,const size_t rows,NexusInfo *nexus_info,
ExceptionInfo *exception)
{
CacheInfo
*magick_restrict cache_info;
MagickOffsetType
o... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | aecd0ada163a4d6c769cec178955d5f3e9316f2f | 133,478,555,662,816,800,000,000,000,000,000,000,000 | 397 | Set pixel cache to undefined if any resource limit is exceeded |
njs_promise_prototype_then(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
njs_int_t ret;
njs_value_t *promise, *fulfilled, *rejected, constructor;
njs_function_t *function;
njs_promise_capability_t *capability;
promise = njs_ar... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 145,600,589,468,990,930,000,000,000,000,000,000,000 | 42 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
void HttpIntegrationTest::testRetryAttemptCountHeader() {
auto host = config_helper_.createVirtualHost("host", "/test_retry");
host.set_include_request_attempt_count(true);
host.set_include_attempt_count_in_response(true);
config_helper_.addVirtualHost(host);
initialize();
codec_client_ = makeHttpConnectio... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 56,546,620,001,992,890,000,000,000,000,000,000,000 | 41 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int tls_starttls_close (CONNECTION* conn)
{
int rc;
rc = tls_socket_close (conn);
conn->conn_read = raw_socket_read;
conn->conn_write = raw_socket_write;
conn->conn_close = raw_socket_close;
conn->conn_poll = raw_socket_poll;
return rc;
} | 0 | [
"CWE-74"
] | mutt | c547433cdf2e79191b15c6932c57f1472bfb5ff4 | 167,040,711,258,695,880,000,000,000,000,000,000,000 | 12 | Fix STARTTLS response injection attack.
Thanks again to Damian Poddebniak and Fabian Ising from the Münster
University of Applied Sciences for reporting this issue. Their
summary in ticket 248 states the issue clearly:
We found another STARTTLS-related issue in Mutt. Unfortunately, it
affects SMTP, POP3 and IMAP... |
SYSCALL_DEFINE3(set_mempolicy, int, mode, unsigned long __user *, nmask,
unsigned long, maxnode)
{
int err;
nodemask_t nodes;
unsigned short flags;
flags = mode & MPOL_MODE_FLAGS;
mode &= ~MPOL_MODE_FLAGS;
if ((unsigned int)mode >= MPOL_MAX)
return -EINVAL;
if ((flags & MPOL_F_STATIC_NODES) && (flags & MPOL... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 35,434,516,713,631,035,000,000,000,000,000,000,000 | 18 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static inline bool tcp_synq_no_recent_overflow(const struct sock *sk)
{
unsigned long last_overflow = tcp_sk(sk)->rx_opt.ts_recent_stamp;
return time_after(jiffies, last_overflow + TCP_SYNCOOKIE_VALID);
} | 0 | [
"CWE-416",
"CWE-269"
] | linux | bb1fceca22492109be12640d49f5ea5a544c6bb4 | 249,036,796,002,121,340,000,000,000,000,000,000,000 | 6 | tcp: fix use after free in tcp_xmit_retransmit_queue()
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()
Then it attempts to copy user data into this fresh skb.
If the copy fails, we undo the work and remove the fresh skb.
Unfortunately, t... |
static WERROR dnsserver_query_server(struct dnsserver_state *dsstate,
TALLOC_CTX *mem_ctx,
const char *operation,
const unsigned int client_version,
enum DNS_RPC_TYPEID *typeid,
union DNSSRV_RPC_UNION *r)
{
uint8_t is_integer, is_addresses, is_string, is_wstring, is_stringlist;
uint32_t answe... | 0 | [] | samba | 4cbf95e731b39b2dbfec02f33fd6b195d0b0f7a8 | 249,301,536,284,720,060,000,000,000,000,000,000,000 | 628 | CVE-2020-14383: s4/dns: Ensure variable initialization with NULL.
Based on patches from Francis Brosnan Blázquez <francis@aspl.es>
and Jeremy Allison <jra@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14472
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795
Signed-off-by: Douglas Bagnall <douglas.bag... |
void clear_pending(ConnectionRef con) {
Mutex::Locker l(lock);
for (list<uint64_t>::iterator it = conn_sent[con].begin();
it != conn_sent[con].end(); ++it)
sent.erase(*it);
conn_sent.erase(con);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 7,364,896,654,945,257,000,000,000,000,000,000,000 | 8 | 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 ... |
Status GetMatchingPaths(FileSystem* fs, Env* env, const string& pattern,
std::vector<string>* results) {
// Check that `fs`, `env` and `results` are non-null.
if (fs == nullptr || env == nullptr || results == nullptr) {
return Status(tensorflow::error::INVALID_ARGUMENT,
... | 0 | [
"CWE-125"
] | tensorflow | 8b5b9dc96666a3a5d27fad7179ff215e3b74b67c | 336,337,959,098,913,650,000,000,000,000,000,000,000 | 144 | Completely rewrite `GetMatchingPaths`.
The current parallel implementation is too complex (lambda inside lambda, two levels of parallelism) and has a read outside of bounds issue.
The new implementation cleans up artifacts from the previous implementations that were left in the code as it evolves. We add multiple hel... |
ZEND_VM_HELPER(zend_fetch_static_prop_helper, ANY, ANY, int type)
{
USE_OPLINE
zval *prop;
SAVE_OPLINE();
if (UNEXPECTED(zend_fetch_static_property_address(&prop, NULL, opline->extended_value & ~ZEND_FETCH_OBJ_FLAGS, type, opline->extended_value & ZEND_FETCH_OBJ_FLAGS OPLINE_CC EXECUTE_DATA_CC) != SUCCESS)) {
Z... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 169,729,605,314,922,770,000,000,000,000,000,000,000 | 19 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
getname_kernel(const char * filename)
{
struct filename *result;
int len = strlen(filename) + 1;
result = __getname();
if (unlikely(!result))
return ERR_PTR(-ENOMEM);
if (len <= EMBEDDED_NAME_MAX) {
result->name = (char *)result->iname;
} else if (len <= PATH_MAX) {
const size_t size = offsetof(struct fil... | 0 | [
"CWE-416",
"CWE-284"
] | linux | d0cb50185ae942b03c4327be322055d622dc79f6 | 111,715,560,362,180,390,000,000,000,000,000,000,000 | 34 | do_last(): fetch directory ->i_mode and ->i_uid before it's too late
may_create_in_sticky() call is done when we already have dropped the
reference to dir.
Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
TEST_P(SslIntegrationTest, RouterHeaderOnlyRequestAndResponse) {
ConnectionCreationFunction creator = [&]() -> Network::ClientConnectionPtr {
return makeSslClientConnection({});
};
testRouterHeaderOnlyRequestAndResponse(&creator);
checkStats();
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 127,068,150,251,135,330,000,000,000,000,000,000,000 | 7 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void _gdImageFilledVRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
int color)
{
int x, y;
if (x1 == x2 && y1 == y2) {
gdImageSetPixel(im, x1, y1, color);
return;
}
if (x1 > x2) {
x = x1;
x1 = x2;
x2 = x;
}
if (y1 > y2) {
y = y1;
y1 = y2;
y2 = y;
}
if (x1 < 0) {
x1 = 0;
... | 0 | [
"CWE-20"
] | libgd | 1846f48e5fcdde996e7c27a4bbac5d0aef183e4b | 122,877,112,046,292,050,000,000,000,000,000,000,000 | 44 | Fix #340: System frozen
gdImageCreate() doesn't check for oversized images and as such is prone
to DoS vulnerabilities. We fix that by applying the same overflow check
that is already in place for gdImageCreateTrueColor().
CVE-2016-9317 |
ConnStateData::notes()
{
if (!theNotes)
theNotes = new NotePairs;
return theNotes;
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 194,642,148,063,063,150,000,000,000,000,000,000,000 | 6 | Handle more Range requests (#790)
Also removed some effectively unused code. |
int SSL_read(SSL *s,void *buf,int num)
{
if (s->handshake_func == 0)
{
SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
return -1;
}
if (s->shutdown & SSL_RECEIVED_SHUTDOWN)
{
s->rwstate=SSL_NOTHING;
return(0);
}
return(s->method->ssl_read(s,buf,num));
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 180,322,880,982,963,440,000,000,000,000,000,000,000 | 15 | Add Next Protocol Negotiation. |
static inline void sk_stream_moderate_sndbuf(struct sock *sk)
{
if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) {
sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1);
sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF);
}
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 223,752,641,741,173,030,000,000,000,000,000,000,000 | 7 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static void prb_setup_retire_blk_timer(struct packet_sock *po, int tx_ring)
{
struct tpacket_kbdq_core *pkc;
if (tx_ring)
BUG();
pkc = tx_ring ? &po->tx_ring.prb_bdqc : &po->rx_ring.prb_bdqc;
prb_init_blk_timer(po, pkc, prb_retire_rx_blk_timer_expired);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 90,144,678,087,458,060,000,000,000,000,000,000,000 | 10 | 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 __exit packet_exit(void)
{
unregister_netdevice_notifier(&packet_netdev_notifier);
unregister_pernet_subsys(&packet_net_ops);
sock_unregister(PF_PACKET);
proto_unregister(&packet_proto);
} | 0 | [
"CWE-909"
] | linux-2.6 | 67286640f638f5ad41a946b9a3dc75327950248f | 242,404,079,203,349,430,000,000,000,000,000,000,000 | 7 | net: packet: fix information leak to userland
packet_getname_spkt() doesn't initialize all members of sa_data field of
sockaddr struct if strlen(dev->name) < 13. This structure is then copied
to userland. It leads to leaking of contents of kernel stack memory.
We have to fully fill sa_data with strncpy() instead of ... |
static int find_and_clear_dirty_height(struct VncState *vs,
int y, int last_x, int x, int height)
{
int h;
for (h = 1; h < (height - y); h++) {
if (!test_bit(last_x, vs->dirty[y + h])) {
break;
}
bitmap_clear(vs->dirty[y + h], last_x, x... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 279,212,404,541,612,860,000,000,000,000,000,000,000 | 14 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
TfLiteStatus NotEqualEval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input1;
TF_LITE_ENSURE_OK(context,
GetInputSafe(context, node, kInputTensor1, &input1));
const TfLiteTensor* input2;
TF_LITE_ENSURE_OK(context,
GetInputSafe(context, node, kInputTens... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 216,887,393,596,596,130,000,000,000,000,000,000,000 | 49 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void sixel_advance(sixel_output_t *context, int nwrite)
{
if ((context->pos += nwrite) >= SIXEL_OUTPUT_PACKET_SIZE) {
WriteBlob(context->image,SIXEL_OUTPUT_PACKET_SIZE,context->buffer);
memmove(context->buffer,
context->buffer + SIXEL_OUTPUT_PACKET_SIZE,
(context... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick | 748a03651e5b138bcaf160d15133de2f4b1b89ce | 245,659,084,026,229,170,000,000,000,000,000,000,000 | 9 | https://github.com/ImageMagick/ImageMagick/issues/1452 |
ulonglong timer_now(void)
{
return my_micro_time() / 1000;
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 320,717,958,158,807,400,000,000,000,000,000,000,000 | 4 | 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... |
xmlFAParseCharGroup(xmlRegParserCtxtPtr ctxt) {
int n = ctxt->neg;
while ((CUR != ']') && (ctxt->error == 0)) {
if (CUR == '^') {
int neg = ctxt->neg;
NEXT;
ctxt->neg = !ctxt->neg;
xmlFAParsePosCharGroup(ctxt);
ctxt->neg = neg;
} else if ((CUR == '-') && (NXT(1) == '[')) {
int n... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 15,145,369,310,050,955,000,000,000,000,000,000,000 | 30 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
wc_any_to_ucs(wc_wchar_t cc)
{
int f;
wc_uint16 *map = NULL;
wc_uint32 map_size = 0x80;
wc_map *map2;
f = WC_CCS_INDEX(cc.ccs);
switch (WC_CCS_TYPE(cc.ccs)) {
case WC_CCS_A_CS94:
if (cc.ccs == WC_CCS_US_ASCII)
return cc.code;
if (f < WC_F_ISO_BASE || f > WC_F_CS94_END)
return WC... | 0 | [
"CWE-119"
] | w3m | 716bc126638393c733399d11d3228edb82877faa | 59,358,180,654,881,260,000,000,000,000,000,000,000 | 177 | Prevent global-buffer-overflow in wc_any_to_ucs()
Bug-Debian: https://github.com/tats/w3m/issues/43 |
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution) /* {{{ */
{
if (EXPECTED(generator->execute_data)) {
zend_execute_data *execute_data = generator->execute_data;
if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
zend_clean_and_cache_symbol_table(execute_data->symbol_t... | 0 | [] | php-src | 83e2b9e2202da6cc25bdaac67a58022b90be88e7 | 57,591,406,541,438,520,000,000,000,000,000,000,000 | 45 | Fixed bug #76946 |
static int verify_stack(unsigned long sp)
{
if (sp < PAGE_OFFSET ||
(sp > (unsigned long)high_memory && high_memory != NULL))
return -EFAULT;
return 0;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 213,844,285,129,440,620,000,000,000,000,000,000,000 | 8 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
*/
static void sock_spd_release(struct splice_pipe_desc *spd, unsigned int i)
{
put_page(spd->pages[i]); | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 184,467,390,935,991,900,000,000,000,000,000,000,000 | 4 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
EIGEN_STRONG_INLINE QInt32 operator-(const QInt16 a, const QInt32 b) {
return QInt32(static_cast<int32_t>(a.value) - b.value);
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 330,935,712,980,802,450,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
void controller::reload_urls_file() {
urlcfg->reload();
std::vector<std::shared_ptr<rss_feed>> new_feeds;
unsigned int i = 0;
for (auto url : urlcfg->get_urls()) {
bool found = false;
for (auto feed : feeds) {
if (url == feed->rssurl()) {
found = true;
feed->set_tags(urlcfg->get_tags(url));
feed... | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 11,591,879,367,346,108,000,000,000,000,000,000,000 | 42 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
//! Load gif file, using ImageMagick or GraphicsMagick's external tools.
/**
\param filename Filename to read data from.
**/
CImgList<T>& load_gif_external(const char *const filename) {
if (!filename)
throw CImgArgumentException(_cimglist_instance
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 160,301,249,085,232,000,000,000,000,000,000,000,000 | 15 | Fix other issues in 'CImg<T>::load_bmp()'. |
*/
static void php_wddx_process_data(void *user_data, const XML_Char *s, int len)
{
st_entry *ent;
wddx_stack *stack = (wddx_stack *)user_data;
TSRMLS_FETCH();
if (!wddx_stack_is_empty(stack) && !stack->done) {
wddx_stack_top(stack, (void**)&ent);
switch (Z_TYPE_P(ent)) {
case ST_STRING:
if (Z_STRLEN_P... | 1 | [
"CWE-119"
] | php-src | b1bd4119bcafab6f9a8f84d92cd65eec3afeface | 102,684,035,101,466,200,000,000,000,000,000,000,000 | 78 | Fixed bug #71587 - Use-After-Free / Double-Free in WDDX Deserialize |
Status buildCredentials(BSONObjBuilder* builder, const auth::CreateOrUpdateUserArgs& args) {
if (!args.hasPassword) {
// Must be external user.
builder->append("external", true);
return Status::OK();
}
bool buildSCRAMSHA1 = false, buildSCRAMSHA256 = false;
if (args.mechanisms.em... | 0 | [
"CWE-613"
] | mongo | 6dfb92b1299de04677d0bd2230e89a52eb01003c | 223,339,671,733,135,300,000,000,000,000,000,000,000 | 67 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
bool Animation::operator==(const Animation &other) const {
return this->channels == other.channels &&
this->extensions == other.extensions && this->extras == other.extras &&
this->name == other.name && this->samplers == other.samplers;
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 300,751,785,727,685,300,000,000,000,000,000,000,000 | 5 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
static unsigned gen_handle(struct tcf_proto *tp, unsigned salt)
{
struct rsvp_head *data = tp->root;
int i = 0xFFFF;
while (i-- > 0) {
u32 h;
if ((data->hgenerator += 0x10000) == 0)
data->hgenerator = 0x10000;
h = data->hgenerator|salt;
if (rsvp_get(tp, h) == 0)
return h;
}
return 0;
} | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 170,101,137,156,179,410,000,000,000,000,000,000,000 | 15 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void gfar_set_mac_for_addr(struct net_device *dev, int num,
const u8 *addr)
{
struct gfar_private *priv = netdev_priv(dev);
struct gfar __iomem *regs = priv->gfargrp[0].regs;
u32 tempval;
u32 __iomem *macptr = ®s->macstnaddr1;
macptr += num*2;
/* For a station address of 0x12345678ABCD in transm... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 102,045,871,381,247,820,000,000,000,000,000,000,000 | 23 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
static bool needs_preempt_context(struct drm_i915_private *i915)
{
return HAS_LOGICAL_RING_PREEMPTION(i915);
} | 0 | [
"CWE-416"
] | linux | 7dc40713618c884bf07c030d1ab1f47a9dc1f310 | 250,983,897,934,429,100,000,000,000,000,000,000,000 | 4 | drm/i915: Introduce a mutex for file_priv->context_idr
Define a mutex for the exclusive use of interacting with the per-file
context-idr, that was previously guarded by struct_mutex. This allows us
to reduce the coverage of struct_mutex, with a view to removing the last
bits coordinating GEM context later. (In the sho... |
static inline void __pipe_unlock(struct pipe_inode_info *pipe)
{
mutex_unlock(&pipe->mutex);
} | 0 | [
"CWE-17"
] | linux | f0d1bec9d58d4c038d0ac958c9af82be6eb18045 | 85,256,338,212,680,860,000,000,000,000,000,000,000 | 4 | new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
virtual absl::optional<int> checkHeaderNameForUnderscores(absl::string_view /* header_name */) {
return absl::nullopt;
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 96,731,260,838,229,540,000,000,000,000,000,000,000 | 3 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
delete_first_msg(void)
{
struct msg_hist *p;
if (msg_hist_len <= 0)
return FAIL;
p = first_msg_hist;
first_msg_hist = p->next;
if (first_msg_hist == NULL)
last_msg_hist = NULL; // history is empty
vim_free(p->msg);
vim_free(p);
--msg_hist_len;
return OK;
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 132,798,593,641,334,060,000,000,000,000,000,000,000 | 15 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
static int r_bin_dwarf_expand_die(RBinDwarfDIE* die) {
RBinDwarfAttrValue *tmp = NULL;
if (!die || die->capacity == 0) {
return -EINVAL;
}
if (die->capacity != die->length) {
return -EINVAL;
}
tmp = (RBinDwarfAttrValue*)realloc (die->attr_values,
die->capacity * 2 * sizeof (RBinDwarfAttrValue));
if (!tmp)... | 0 | [
"CWE-119",
"CWE-125"
] | radare2 | d37d2b858ac47f2f108034be0bcecadaddfbc8b3 | 49,962,107,548,861,560,000,000,000,000,000,000,000 | 18 | Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478) |
lquery_out(PG_FUNCTION_ARGS)
{
lquery *in = PG_GETARG_LQUERY(0);
char *buf,
*ptr;
int i,
j,
totallen = 1;
lquery_level *curqlevel;
lquery_variant *curtlevel;
curqlevel = LQUERY_FIRST(in);
for (i = 0; i < in->numlevel; i++)
{
totallen++;
if (curqlevel->numvar)
totallen += 1 + (curql... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 10,057,431,745,202,907,000,000,000,000,000,000,000 | 99 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static inline void ahash_request_complete(struct ahash_request *req, int err)
{
req->base.complete(&req->base, err);
} | 0 | [
"CWE-835"
] | linux | ef0579b64e93188710d48667cb5e014926af9f1b | 259,282,722,504,487,100,000,000,000,000,000,000,000 | 4 | crypto: ahash - Fix EINPROGRESS notification callback
The ahash API modifies the request's callback function in order
to clean up after itself in some corner cases (unaligned final
and missing finup).
When the request is complete ahash will restore the original
callback and everything is fine. However, when the requ... |
ut64 Elf_(r_bin_elf_get_section_offset)(ELFOBJ *bin, const char *section_name) {
RBinElfSection *section = get_section_by_name (bin, section_name);
if (!section) return UT64_MAX;
return section->offset;
} | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 269,576,554,429,609,400,000,000,000,000,000,000,000 | 5 | Fix #8731 - Crash in ELF parser with negative 32bit number |
static void edge_unthrottle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status;
if (edge_port == NULL)
return;
/* if we are implementing XON/XOFF, send the start character */
if (I_IXOFF(tty)) {
unsigned cha... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1ee0a224bc9aad1de496c795f96bc6ba2c394811 | 140,981,126,526,286,330,000,000,000,000,000,000,000 | 28 | USB: io_ti: Fix NULL dereference in chase_port()
The tty is NULL when the port is hanging up.
chase_port() needs to check for this.
This patch is intended for stable series.
The behavior was observed and tested in Linux 3.2 and 3.7.1.
Johan Hovold submitted a more elaborate patch for the mainline kernel.
[ 56.277... |
R_API ut8 *r_bin_java_cp_get_idx_bytes(RBinJavaObj *bin, ut16 idx, ut32 *out_sz) {
RBinJavaCPTypeObj *cp_obj = r_bin_java_get_item_from_bin_cp_list (bin, idx);
if (!cp_obj || !out_sz) {
return NULL;
}
if (out_sz) {
*out_sz = 0;
}
switch (cp_obj->tag) {
case R_BIN_JAVA_CP_INTEGER:
case R_BIN_JAVA_CP_FLOAT:
... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 12,354,823,805,894,273,000,000,000,000,000,000,000 | 24 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static int table_do_fn_check_lengths(void *r_, const char *key,
const char *value)
{
request_rec *r = r_;
if (value == NULL || r->server->limit_req_fieldsize >= strlen(value) )
return 1;
r->status = HTTP_BAD_REQUEST;
apr_table_setn(r->notes, "error-notes",
... | 0 | [
"CWE-703"
] | httpd | be0f5335e3e73eb63253b050fdc23f252f5c8ae3 | 193,647,843,161,062,470,000,000,000,000,000,000,000 | 18 | *) SECURITY: CVE-2015-0253 (cve.mitre.org)
core: Fix a crash introduced in with ErrorDocument 400 pointing
to a local URL-path with the INCLUDES filter active, introduced
in 2.4.11. PR 57531. [Yann Ylavic]
Submitted By: ylavic
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/http... |
void ext4_dirty_inode(struct inode *inode)
{
handle_t *handle;
handle = ext4_journal_start(inode, 2);
if (IS_ERR(handle))
goto out;
ext4_mark_inode_dirty(handle, inode);
ext4_journal_stop(handle);
out:
return;
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 187,567,033,159,412,260,000,000,000,000,000,000,000 | 14 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
void kvm_arch_mmu_enable_log_dirty_pt_masked(struct kvm *kvm,
struct kvm_memory_slot *slot,
gfn_t gfn_offset, unsigned long mask)
{
/*
* Huge pages are NOT write protected when we start dirty logging in
* initially-all-set mode; must write protect them here so that they
* are split to 4K on the first wri... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 160,965,462,667,174,600,000,000,000,000,000,000,000 | 35 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
Field *Field::new_key_field(MEM_ROOT *root, TABLE *new_table,
uchar *new_ptr, uint32 length,
uchar *new_null_ptr, uint new_null_bit)
{
Field *tmp;
if ((tmp= make_new_field(root, new_table, table == new_table)))
{
tmp->ptr= new_ptr;
tmp->null_ptr... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 133,152,752,778,428,050,000,000,000,000,000,000,000 | 13 | 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... |
Colour* colour() { return colour_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 332,394,686,896,294,500,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
void loadServerConfig(char *filename, char *options) {
sds config = sdsempty();
char buf[CONFIG_MAX_LINE+1];
/* Load the file content */
if (filename) {
FILE *fp;
if (filename[0] == '-' && filename[1] == '\0') {
fp = stdin;
} else {
if ((fp = fopen(filen... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 6d9f8e2462fc2c426d48c941edeb78e5df7d2977 | 229,262,902,582,077,680,000,000,000,000,000,000,000 | 29 | Security: CONFIG SET client-output-buffer-limit overflow fixed.
This commit fixes a vunlerability reported by Cory Duplantis
of Cisco Talos, see TALOS-2016-0206 for reference.
CONFIG SET client-output-buffer-limit accepts as client class "master"
which is actually only used to implement CLIENT KILL. The "master" clas... |
void perf_event_wakeup(struct perf_event *event)
{
ring_buffer_wakeup(event);
if (event->pending_kill) {
kill_fasync(perf_event_fasync(event), SIGIO, event->pending_kill);
event->pending_kill = 0;
}
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 218,848,324,919,489,830,000,000,000,000,000,000,000 | 9 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
void CWebServer::Cmd_SendNotification(WebEmSession & session, const request& req, Json::Value &root)
{
std::string subject = request::findValue(&req, "subject");
std::string body = request::findValue(&req, "body");
std::string subsystem = request::findValue(&req, "subsystem");
if (
(subject.empty())... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 150,422,528,159,140,270,000,000,000,000,000,000,000 | 17 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
bool ignore_errors, bool update)
{
List_iterator_fast<Item> f(fields),v(values);
Item *value, *fld;
Item_field *field;
Field *rfield;
TABLE *table;
bool only_unvers_fields= update && table_arg->versioned();
bool sa... | 0 | [
"CWE-416"
] | server | 0beed9b5e933f0ff79b3bb346524f7a451d14e38 | 75,904,534,340,429,490,000,000,000,000,000,000,000 | 108 | MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
when resolving WHERE and ON clauses, do not look in
SELECT list/aliases. |
static int compat_rawv6_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
case SIOCOUTQ:
case SIOCINQ:
return -ENOIOCTLCMD;
default:
#ifdef CONFIG_IPV6_MROUTE
return ip6mr_compat_ioctl(sk, cmd, compat_ptr(arg));
#else
return -ENOIOCTLCMD;
#endif
}
} | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 76,222,585,402,839,270,000,000,000,000,000,000,000 | 14 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
ldns_rr_list2str(const ldns_rr_list *list)
{
return ldns_rr_list2str_fmt(ldns_output_format_default, list);
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 277,636,280,360,992,580,000,000,000,000,000,000,000 | 4 | CAA and URI |
static SVG_Element *svg_parse_element(GF_SVG_Parser *parser, const char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes, SVG_NodeStack *parent, Bool *has_ns)
{
GF_FieldInfo info;
u32 tag, i, count, ns, xmlns;
Bool needs_init, has_id;
SVG_Element *elt = NULL;
const char *node_nam... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 153,623,684,625,074,010,000,000,000,000,000,000,000 | 439 | fixed #2138 |
static void clear_tables(JOIN *join)
{
/*
must clear only the non-const tables, as const tables
are not re-calculated.
*/
for (uint i= 0 ; i < join->table_count ; i++)
{
if (!(join->table[i]->map & join->const_table_map))
mark_as_null_row(join->table[i]); // All fields are NULL
}
} | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 338,639,917,636,372,080,000,000,000,000,000,000,000 | 12 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
static int eaptls_initiate(void *type_arg, EAP_HANDLER *handler)
{
int status;
tls_session_t *ssn;
eap_tls_t *inst;
VALUE_PAIR *vp;
int client_cert = TRUE;
int verify_mode = 0;
REQUEST *request = handler->request;
inst = (eap_tls_t *)type_arg;
handler->tls = TRUE;
handler->finished = FALSE;
/*
* Man... | 0 | [
"CWE-295"
] | freeradius-server | 5e698b407dcac2bc45cf03484bac4398109d25c3 | 75,692,422,881,160,880,000,000,000,000,000,000,000 | 180 | Set X509_V_FLAG_CRL_CHECK_ALL |
run_sigchld_trap (nchild)
int nchild;
{
char *trap_command;
int i;
/* Turn off the trap list during the call to parse_and_execute ()
to avoid potentially infinite recursive calls. Preserve the
values of last_command_exit_value, last_made_pid, and the_pipeline
around the execution of the trap... | 1 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 250,530,469,649,440,000,000,000,000,000,000,000,000 | 46 | bash-4.4-rc2 release |
static ssize_t nr_addr_filters_show(struct device *dev,
struct device_attribute *attr,
char *page)
{
struct pmu *pmu = dev_get_drvdata(dev);
return snprintf(page, PAGE_SIZE - 1, "%d\n", pmu->nr_addr_filters);
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 34,025,716,666,320,146,000,000,000,000,000,000,000 | 8 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
gdImagePtr gdImageCreate (int sx, int sy)
{
int i;
gdImagePtr im;
if (overflow2(sx, sy)) {
return NULL;
}
if (overflow2(sizeof(unsigned char *), sy)) {
return NULL;
}
if (overflow2(sizeof(unsigned char *), sx)) {
return NULL;
}
im = (gdImage *) gdCalloc(1, sizeof(gdImage));
/* Row-major ever since ... | 0 | [
"CWE-190"
] | php-src | c395c6e5d7e8df37a21265ff76e48fe75ceb5ae6 | 21,404,625,845,625,904,000,000,000,000,000,000,000 | 56 | iFixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow |
void MainWindow::on_actionLayoutRemove_triggered()
{
// Setup the dialog.
ListSelectionDialog dialog(Settings.layouts(), this);
dialog.setWindowModality(QmlApplication::dialogModality());
dialog.setWindowTitle(tr("Remove Layout"));
// Show the dialog.
if (dialog.exec() == QDialog::Accepted) {
... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 314,937,902,334,631,050,000,000,000,000,000,000,000 | 40 | fix upgrade check is not using TLS correctly |
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
{ return get_item_copy<Item_direct_view_ref>(thd, mem_root, this); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 254,686,870,084,318,440,000,000,000,000,000,000,000 | 2 | 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.... |
ar6000_rx(void *Context, struct htc_packet *pPacket)
{
struct ar6_softc *ar = (struct ar6_softc *)Context;
struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext;
int minHdrLen;
u8 containsDot11Hdr = 0;
int status = pPacket->Status;
HTC_ENDPOINT_ID ept = pPacket->Endpoint;
A_... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 142,386,016,796,346,590,000,000,000,000,000,000,000 | 289 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
int sx_sasl_init(sx_env_t env, sx_plugin_t p, va_list args) {
const char *appname;
sx_sasl_callback_t cb;
void *cbarg;
_sx_sasl_t ctx;
int ret, i;
_sx_debug(ZONE, "initialising sasl plugin");
appname = va_arg(args, const char *);
if(appname == NULL) {
_sx_debug(ZONE, "appname w... | 0 | [
"CWE-287",
"CWE-703"
] | jabberd2 | 8416ae54ecefa670534f27a31db71d048b9c7f16 | 125,452,413,031,757,060,000,000,000,000,000,000,000 | 51 | Fixed offered SASL mechanism check |
int _gnutls13_handshake_client(gnutls_session_t session)
{
int ret = 0;
switch (STATE) {
case STATE99:
case STATE100:
#ifdef TLS13_APPENDIX_D4
/* We send it before keys are generated. That works because CCS
* is always being cached and queued and not being sent directly */
ret = _gnutls_send_change_cipher_s... | 0 | [
"CWE-824"
] | gnutls | 96e07075e8f105b13e76b11e493d5aa2dd937226 | 206,215,370,797,422,500,000,000,000,000,000,000,000 | 139 | handshake: add missing initialization of local variable
Resolves: #704
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com> |
static int avr_custom_spm_page_erase(RAnalEsil *esil) {
CPU_MODEL *cpu;
ut8 c;
ut64 addr, page_size_bits, i;
// sanity check
if (!esil || !esil->anal || !esil->anal->reg) {
return false;
}
// get target address
if (!__esil_pop_argument(esil, &addr)) {
return false;
}
// get details about current MCU an... | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 139,725,794,612,183,800,000,000,000,000,000,000,000 | 32 | Fix crash in anal.avr |
Section* Binary::add_section(const SegmentCommand& segment, const Section& section) {
const auto it_segment = std::find_if(
std::begin(segments_), std::end(segments_),
[&segment] (const SegmentCommand* s) {
return segment == *s;
});
if (it_segment == std::end(segments_)) {
LIEF_ERR("... | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 44,183,895,631,288,960,000,000,000,000,000,000,000 | 70 | Resolve #764 |
IOBuf IOBuf::cloneCoalescedAsValue() const {
const std::size_t newHeadroom = headroom();
const std::size_t newTailroom = prev()->tailroom();
return cloneCoalescedAsValueWithHeadroomTailroom(newHeadroom, newTailroom);
} | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 157,314,337,617,903,000,000,000,000,000,000,000,000 | 5 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
XMLRPC_VALUE XMLRPC_RequestSetError (XMLRPC_REQUEST request, XMLRPC_VALUE error) {
if (request && error) {
if (request->error) {
XMLRPC_CleanupValue (request->error);
}
request->error = XMLRPC_CopyValue (error);
return request->error;
}
return NULL;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 307,704,951,996,269,960,000,000,000,000,000,000,000 | 10 | Fix bug #68027 - fix date parsing in XMLRPC lib |
static int kvm_x86_dev_get_attr(struct kvm_device_attr *attr)
{
u64 __user *uaddr = kvm_get_attr_addr(attr);
if (attr->group)
return -ENXIO;
if (IS_ERR(uaddr))
return PTR_ERR(uaddr);
switch (attr->attr) {
case KVM_X86_XCOMP_GUEST_SUPP:
if (put_user(supported_xcr0, uaddr))
return -EFAULT;
return 0;
d... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 6,915,412,508,659,703,000,000,000,000,000,000,000 | 20 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
add_rotation_items_for_output (GsdXrandrManager *manager, GnomeOutputInfo *output)
{
int num_rotations;
GnomeRRRotation rotations;
get_allowed_rotations_for_output (manager, output, &num_rotations, &rotations);
if (num_rotations == 1)
add_unsupported_rotation_item (mana... | 0 | [] | gnome-settings-daemon | be513b3c7d80d0b7013d79ce46d7eeca929705cc | 54,112,876,698,762,690,000,000,000,000,000,000,000 | 12 | Implement autoconfiguration of the outputs
This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes.
Instead, we lay out the outputs left-to-right.
Signed-off-by: Federico Mena Quintero <federico@novell.com> |
DEFINE_RUN_ONCE_STATIC_ALT(ossl_init_no_register_atexit,
ossl_init_register_atexit)
{
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: ossl_init_no_register_atexit ok!\n");
#endif
/* Do nothing in this case */
return 1;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 148,612,842,470,450,510,000,000,000,000,000,000,000 | 9 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.