func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void test_prepare_simple()
{
MYSQL_STMT *stmt;
int rc;
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_prepare_simple");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prepare_simple");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_prepare_simple("
"... | 0 | [
"CWE-416"
] | mysql-server | 4797ea0b772d5f4c5889bc552424132806f46e93 | 124,711,353,316,853,270,000,000,000,000,000,000,000 | 66 | BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST()
Analysis:
---------
Invalid memory access maybe observed when using prepared statements if:
a) The mysql client connection is lost after statement preparation
is complete and
b) There is at least one statement which is in initialized state but
not ... |
GF_Err infe_box_dump(GF_Box *a, FILE * trace)
{
GF_ItemInfoEntryBox *p = (GF_ItemInfoEntryBox *)a;
gf_isom_box_dump_start(a, "ItemInfoEntryBox", trace);
gf_fprintf(trace, "item_ID=\"%d\" item_protection_index=\"%d\" item_name=\"%s\" content_type=\"%s\" content_encoding=\"%s\" item_type=\"%s\">\n", p->item_ID, p->ite... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 181,372,791,140,404,250,000,000,000,000,000,000,000 | 8 | fixed #2138 |
void msg_init_ns(struct ipc_namespace *ns)
{
ns->msg_ctlmax = MSGMAX;
ns->msg_ctlmnb = MSGMNB;
ns->msg_ctlmni = MSGMNI;
atomic_set(&ns->msg_bytes, 0);
atomic_set(&ns->msg_hdrs, 0);
ipc_init_ids(&ns->ids[IPC_MSG_IDS]);
} | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 336,341,826,235,566,560,000,000,000,000,000,000,000 | 10 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
void ion_free(struct ion_client *client, struct ion_handle *handle)
{
bool valid_handle;
BUG_ON(client != handle->client);
mutex_lock(&client->lock);
valid_handle = ion_handle_validate(client, handle);
if (!valid_handle) {
WARN(1, "%s: invalid handle passed to free.\n", __func__);
mutex_unlock(&client->lock... | 1 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 240,783,402,793,755,230,000,000,000,000,000,000,000 | 17 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
class HuffmanCoder *Scan::ACHuffmanCoderOf(UBYTE idx) const
{
class HuffmanTemplate *t;
ScanType sc = m_pFrame->ScanTypeOf();
assert(idx < 4);
t = m_pHuffman->ACTemplateOf(m_ucACTable[idx],sc,m_pFrame->PrecisionOf(),
m_pFrame->HiddenPrecisionOf(),m_ucScanIndex);
if (t == NUL... | 0 | [
"CWE-476"
] | libjpeg | ea6315164b1649ff932a396b7600eac4bffcfaba | 157,176,700,337,266,980,000,000,000,000,000,000,000 | 16 | Added a check whether all components in a scan are actually present. |
static int selinux_setprocattr(const char *name, void *value, size_t size)
{
struct task_security_struct *tsec;
struct cred *new;
u32 mysid = current_sid(), sid = 0, ptsid;
int error;
char *str = value;
/*
* Basic control over ability to set these attributes at all.
*/
if (!strcmp(name, "exec"))
error = a... | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 333,632,423,070,542,800,000,000,000,000,000,000,000 | 142 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
TEST_F(HttpHealthCheckerImplTest, ServiceCheckRuntimeOff) {
setupServiceValidationHC();
EXPECT_CALL(runtime_.snapshot_, featureEnabled("health_check.verify_cluster", 100))
.WillOnce(Return(false));
EXPECT_CALL(*this, onHostStatus(_, HealthTransition::Unchanged));
cluster_->prioritySet().getMockHostSet(0... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 204,982,273,998,066,250,000,000,000,000,000,000,000 | 25 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static int unprogram_rcvarray(struct hfi1_filedata *fd, u32 tidinfo,
struct tid_group **grp)
{
struct hfi1_ctxtdata *uctxt = fd->uctxt;
struct hfi1_devdata *dd = uctxt->dd;
struct tid_rb_node *node;
u8 tidctrl = EXP_TID_GET(tidinfo, CTRL);
u32 tididx = EXP_TID_GET(tidinfo, IDX) << 1, rcventry;
if (tidid... | 0 | [
"CWE-416"
] | linux | 3d2a9d642512c21a12d19b9250e7a835dcb41a79 | 252,503,031,447,771,260,000,000,000,000,000,000,000 | 33 | IB/hfi1: Ensure correct mm is used at all times
Two earlier bug fixes have created a security problem in the hfi1
driver. One fix aimed to solve an issue where current->mm was not valid
when closing the hfi1 cdev. It attempted to do this by saving a cached
value of the current->mm pointer at file open time. This is a ... |
void gx_ttfReader__set_font(gx_ttfReader *self, gs_font_type42 *pfont)
{
self->pfont = pfont;
self->super.get_metrics = gx_ttfReader__default_get_metrics;
} | 0 | [
"CWE-125"
] | ghostpdl | 937ccd17ac65935633b2ebc06cb7089b91e17e6b | 10,807,271,168,023,730,000,000,000,000,000,000,000 | 5 | Bug 698056: make bounds check in gx_ttfReader__Read more robust |
cmdline_init(void)
{
CLEAR_FIELD(ccline);
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 85b6747abc15a7a81086db31289cf1b8b17e6cb1 | 213,272,162,205,884,460,000,000,000,000,000,000,000 | 4 | patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem: Illegal memory access with large 'tabstop' in Ex mode.
Solution: Allocate enough memory. |
process_exit_signal (status)
WAIT status;
{
return (WIFSIGNALED (status) ? WTERMSIG (status) : 0);
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 125,306,569,842,022,240,000,000,000,000,000,000,000 | 5 | bash-4.4-rc2 release |
static int js_hasvar(js_State *J, const char *name)
{
js_Environment *E = J->E;
do {
js_Property *ref = jsV_getproperty(J, E->variables, name);
if (ref) {
if (ref->getter) {
js_pushobject(J, ref->getter);
js_pushobject(J, E->variables);
js_call(J, 0);
} else {
js_pushvalue(J, ref->value);
... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 243,566,378,406,209,270,000,000,000,000,000,000,000 | 19 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
GF_Err dimm_Read(GF_Box *s, GF_BitStream *bs)
{
GF_DIMMBox *ptr = (GF_DIMMBox *)s;
ptr->nbBytes = gf_bs_read_u64(bs);
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 174,339,557,826,754,000,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
GF_Err tfxd_dump(GF_Box *a, FILE * trace)
{
GF_MSSTimeExtBox *ptr = (GF_MSSTimeExtBox*)a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "MSSTimeExtensionBox", trace);
fprintf(trace, "AbsoluteTime=\""LLU"\" FragmentDuration=\""LLU"\">\n", ptr->absolute_time_in_track_timescale, ptr->fragment_duration_in_trac... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 239,141,470,210,965,900,000,000,000,000,000,000,000 | 10 | fixed 2 possible heap overflows (inc. #1088) |
static void CopyOpenCLBuffer(CacheInfo *magick_restrict cache_info)
{
assert(cache_info != (CacheInfo *) NULL);
assert(cache_info->signature == MagickCoreSignature);
if ((cache_info->type != MemoryCache) ||
(cache_info->opencl == (MagickCLCacheInfo) NULL))
return;
/*
Ensure single threaded access ... | 0 | [
"CWE-476"
] | ImageMagick | 76f94fa2d9ae5d96e15929b6b6ce0c866fc44c69 | 72,643,247,611,907,060,000,000,000,000,000,000,000 | 15 | https://github.com/ImageMagick/ImageMagick/issues/746
https://github.com/ImageMagick/ImageMagick/issues/741 |
static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr)
{
u8 rc = LLC_PDU_LEN_U;
if (addr->sllc_test)
rc = LLC_PDU_LEN_U;
else if (addr->sllc_xid)
/* We need to expand header to sizeof(struct llc_xid_info)
* since llc_pdu_init_as_xid_cmd() sets 4,5,6 bytes of LLC header
* as XID PDU... | 0 | [
"CWE-703"
] | linux | 764f4eb6846f5475f1244767d24d25dd86528a4a | 285,400,539,329,879,600,000,000,000,000,000,000,000 | 18 | llc: fix netdevice reference leaks in llc_ui_bind()
Whenever llc_ui_bind() and/or llc_ui_autobind()
took a reference on a netdevice but subsequently fail,
they must properly release their reference
or risk the infamous message from unregister_netdevice()
at device dismantle.
unregister_netdevice: waiting for eth0 to ... |
static int tomoyo_audit_mount_log(struct tomoyo_request_info *r)
{
const char *dev = r->param.mount.dev->name;
const char *dir = r->param.mount.dir->name;
const char *type = r->param.mount.type->name;
const unsigned long flags = r->param.mount.flags;
if (r->granted)
return 0;
if (!strcmp(type, TOMOYO_MOUNT_REMO... | 0 | [
"CWE-20"
] | linux | 4e78c724d47e2342aa8fde61f6b8536f662f795f | 200,022,117,991,866,500,000,000,000,000,000,000,000 | 28 | TOMOYO: Fix oops in tomoyo_mount_acl().
In tomoyo_mount_acl() since 2.6.36, kern_path() was called without checking
dev_name != NULL. As a result, an unprivileged user can trigger oops by issuing
mount(NULL, "/", "ext3", 0, NULL) request.
Fix this by checking dev_name != NULL before calling kern_path(dev_name).
Signe... |
zfs_ace_v0_set_flags(void *acep, uint16_t flags)
{
((zfs_oldace_t *)acep)->z_flags = flags;
} | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 247,210,296,718,329,200,000,000,000,000,000,000,000 | 4 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *oldset, struct pt_regs *regs)
{
unsigned short inst;
/* Are we from a system call? */
if (regs->syscall_nr >= 0) {
/* If so, check system call restarting.. */
switch (regs->r0) {
case -ERESTART_RESTARTBLOCK:
... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 108,318,865,563,564,640,000,000,000,000,000,000,000 | 40 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
HttpTransact::is_server_negative_cached(State* s)
{
if (s->host_db_info.app.http_data.last_failure != 0 &&
s->host_db_info.app.http_data.last_failure + s->txn_conf->down_server_timeout > s->client_request_time) {
return true;
} else {
// Make sure some nasty clock skew has not happened
// Use the... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 322,359,371,086,056,950,000,000,000,000,000,000,000 | 19 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
static void __mark_reg_unknown(struct bpf_reg_state *reg)
{
reg->type = SCALAR_VALUE;
reg->id = 0;
reg->off = 0;
reg->var_off = tnum_unknown;
reg->frameno = 0;
__mark_reg_unbounded(reg);
} | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 45,256,367,886,831,490,000,000,000,000,000,000,000 | 9 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
static int __rb_allocate_pages(struct ring_buffer_per_cpu *cpu_buffer,
long nr_pages, struct list_head *pages)
{
struct buffer_page *bpage, *tmp;
bool user_thread = current->mm != NULL;
gfp_t mflags;
long i;
/*
* Check if the available memory is there first.
* Note, si_mem_available() only gives us a rough ... | 0 | [
"CWE-835"
] | linux | 67f0d6d9883c13174669f88adac4f0ee656cc16a | 335,291,856,045,876,070,000,000,000,000,000,000,000 | 73 | tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
The "rb_per_cpu_empty()" misinterpret the condition (as not-empty) when
"head_page" and "commit_page" of "struct ring_buffer_per_cpu" points to
the same buffer page, whose "buffer_data_page" is empty and "read" field
is non-zero.
An error scenario coul... |
newVar_N2(char *var,char *var2, char *var3,char *var4,int pop_counter,char *final)
{
struct SWF_ACTIONPUSHPARAM *v;
int psize=PARAM_STRSIZE;
int i;
int slen=strlen(var)+strlen(var2)+strlen(var3)+strlen(var4)+strlen(final);
v=malloc(sizeof(struct SWF_ACTIONPUSHPARAM));
v->p.String = malloc(psize + slen);
v->Typ... | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 93,405,224,327,915,580,000,000,000,000,000,000,000 | 33 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
static void apply_wqattrs_unlock(void)
{
mutex_unlock(&wq_pool_mutex);
put_online_cpus();
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 92,318,239,978,841,320,000,000,000,000,000,000,000 | 5 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip,
mz_zip_array *pArray,
const void *pElements,
size_t n) {
size_t orig_size = pArray->... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 277,872,745,388,986,900,000,000,000,000,000,000,000 | 11 | Make line_no with too large value(2**20) invalid. Fixes #124 |
TORRENT_TEST(list_at_reverse)
{
// int
// string
// list
// dict
char b[] = "li1e3:fooli1ei2eed1:xi1eee";
bdecode_node e;
error_code ec;
int ret = bdecode(b, b + sizeof(b)-1, e, ec);
TEST_EQUAL(ret, 0);
printf("%s\n", print_entry(e).c_str());
TEST_EQUAL(e.type(), bdecode_node::list_t);
TEST_EQUAL(e.list_a... | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 51,135,271,109,331,290,000,000,000,000,000,000,000 | 23 | fix out-of-bounds read in bdecode
Fixes #2099 |
fr_window_archive_is_present (FrWindow *window)
{
g_return_val_if_fail (window != NULL, FALSE);
return window->priv->archive_present;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 131,519,703,042,402,820,000,000,000,000,000,000,000 | 6 | libarchive: sanitize filenames before extracting |
KaxBlockGroup::operator KaxInternalBlock &() {
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
return theBlock;
} | 0 | [
"CWE-200",
"CWE-399",
"CWE-119"
] | libmatroska | 0a2d3e3644a7453b6513db2f9bc270f77943573f | 238,624,811,517,797,300,000,000,000,000,000,000,000 | 4 | KaxBlockInternal: check EBML lace sizes against available buffer space |
int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
unsigned int id_len)
{
/*
* A quick examination of SSL_SESSION_hash and SSL_SESSION_cmp shows how
* we can "construct" a session to give us the desired check - ie. to
* find if there's a session i... | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 269,718,957,354,792,850,000,000,000,000,000,000,000 | 35 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
static void dma_rx(struct b43_dmaring *ring, int *slot)
{
const struct b43_dma_ops *ops = ring->ops;
struct b43_dmadesc_generic *desc;
struct b43_dmadesc_meta *meta;
struct b43_rxhdr_fw4 *rxhdr;
struct sk_buff *skb;
u16 len;
int err;
dma_addr_t dmaaddr;
desc = ops->idx2desc(ring, *slot, &meta);
sync_descbuf... | 1 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 296,287,435,790,796,100,000,000,000,000,000,000,000 | 85 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
static NTSTATUS pdb_samba_dsdb_enum_trusted_domains(struct pdb_methods *m,
TALLOC_CTX *mem_ctx,
uint32_t *_num_domains,
struct pdb_trusted_domain ***_domains)
{
struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
m->private_data, struct pdb_samba_dsdb_state);
TALLOC_CTX *tmp_ct... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 218,702,088,911,433,800,000,000,000,000,000,000,000 | 73 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
CImg<T>& operator|=(const char *const expression) {
return *this|=(+*this)._fill(expression,true,1,0,0,"operator|=",this);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 196,254,291,167,830,160,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void ext4_inc_count(handle_t *handle, struct inode *inode)
{
inc_nlink(inode);
if (is_dx(inode) &&
(inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2))
set_nlink(inode, 1);
} | 0 | [
"CWE-125"
] | linux | 5872331b3d91820e14716632ebb56b1399b34fe1 | 44,231,159,672,465,830,000,000,000,000,000,000,000 | 7 | ext4: fix potential negative array index in do_split()
If for any reason a directory passed to do_split() does not have enough
active entries to exceed half the size of the block, we can end up
iterating over all "count" entries without finding a split point.
In this case, count == move, and split will be zero, and w... |
QPDFWriter::enqueueObject(QPDFObjectHandle object)
{
if (object.isIndirect())
{
if (object.getOwningQPDF() != &(this->pdf))
{
QTC::TC("qpdf", "QPDFWriter foreign object");
throw std::logic_error(
"QPDFObjectHandle from different QPDF found while writing."
... | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 239,307,433,929,556,430,000,000,000,000,000,000,000 | 86 | Fix infinite loop in QPDFWriter (fixes #143) |
void Magick::Image::opaque(const Color &opaqueColor_,const Color &penColor_,
const bool invert_)
{
std::string
opaqueColor,
penColor;
PixelInfo
opaque,
pen;
if (!opaqueColor_.isValid())
throwExceptionExplicit(MagickCore::OptionError,
"Opaque color argument is invalid");
if (!penCo... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 165,437,739,170,752,130,000,000,000,000,000,000,000 | 32 | Added missing return to avoid use after free. |
gs_lib_ctx_set_icc_directory(const gs_memory_t *mem_gc, const char* pname,
int dir_namelen)
{
char *result;
gs_lib_ctx_t *p_ctx = mem_gc->gs_lib_ctx;
gs_memory_t *p_ctx_mem = p_ctx->memory;
/* If it is already set and the incoming is the default then don't set
as we are c... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 148,258,288,371,496,930,000,000,000,000,000,000,000 | 29 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
__be32 saddr)
{
atomic_set(&inc->i_refcount, 1);
INIT_LIST_HEAD(&inc->i_item);
inc->i_conn = conn;
inc->i_saddr = saddr;
inc->i_rdma_cookie = 0;
inc->i_rx_tstamp.tv_sec = 0;
inc->i_rx_tstamp.tv_usec = 0;
} | 0 | [
"CWE-200"
] | net | 4116def2337991b39919f3b448326e21c40e0dbb | 258,896,110,165,500,430,000,000,000,000,000,000,000 | 11 | rds: fix an infoleak in rds_inc_info_copy
The last field "flags" of object "minfo" is not initialized.
Copying this object out may leak kernel stack data.
Assign 0 to it to avoid leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller... |
sctp_disposition_t sctp_sf_do_9_2_shutdown(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
sctp_shutdownhdr_t *sdh;
sctp_disposition_t disposition;
struct sctp_ulpev... | 0 | [
"CWE-119"
] | linux-2.6 | 9fcb95a105758b81ef0131cd18e2db5149f13e95 | 42,214,475,741,399,960,000,000,000,000,000,000,000 | 73 | sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
validity check, this may cause memory overflow when overwrite the TSN of
the stream ID.
The FORWARD-TSN chunk is like this:
FORWARD-TSN chunk
Type ... |
empty_trash_task_done (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
EmptyTrashJob *job;
job = user_data;
g_list_free_full (job->trash_dirs, g_object_unref);
if (job->done_callback)
{
job->done_callback (!job_abort... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 173,346,636,552,506,750,000,000,000,000,000,000,000 | 18 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
Cues* GetCues() { return &cues_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 275,426,503,056,377,760,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 |
static Quantum *QueueAuthenticPixelsStream(Image *image,const ssize_t x,
const ssize_t y,const size_t columns,const size_t rows,
ExceptionInfo *exception)
{
CacheInfo
*cache_info;
MagickBooleanType
status;
MagickSizeType
number_pixels;
size_t
length;
StreamHandler
stream_handler;
... | 0 | [
"CWE-119"
] | ImageMagick | 4e8c2ed53fcb54a34b3a6185b2584f26cf6874a3 | 13,132,736,558,882,046,000,000,000,000,000,000,000 | 92 | https://github.com/ImageMagick/ImageMagick/issues/312 |
sanitize_filename (const char *file_name)
{
size_t prefix_len;
char const *p;
prefix_len = 0;
for (p = file_name; *p; ) {
if (ISDOT (p[0]) && ISDOT (p[1]) && (ISSLASH (p[2]) || !p[2]))
prefix_len = p + 2 - file_name;
do {
char c = *p++;
if (ISSLASH (c))
break;
}
while (*p);
}
p = file... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 294,063,874,873,623,400,000,000,000,000,000,000,000 | 24 | libarchive: sanitize filenames before extracting |
static void ql_write_page1_reg(struct ql3_adapter *qdev,
u32 __iomem *reg, u32 value)
{
if (qdev->current_page != 1)
ql_set_register_page(qdev, 1);
writel(value, reg);
readl(reg);
} | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 303,813,877,240,015,400,000,000,000,000,000,000,000 | 8 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
_gnutls_encrypt (gnutls_session_t session, const uint8_t * headers,
size_t headers_size, const uint8_t * data,
size_t data_size, uint8_t * ciphertext,
size_t ciphertext_size, content_type_t type,
record_parameters_st * params)
{
gnutls_datum_t comp;... | 0 | [
"CWE-310"
] | gnutls | 8dc2822966f64dd9cf7dde9c7aacd80d49d3ffe5 | 195,972,151,176,674,700,000,000,000,000,000,000,000 | 58 | Fixes to avoid a timing attack in TLS CBC record parsing. |
zcopy(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int type = r_type(op);
if (type == t_integer)
return zcopy_integer(i_ctx_p);
check_op(2);
switch (type) {
case t_array:
case t_string:
return zcopy_interval(i_ctx_p);
case t_dictionary:
return zcopy_d... | 0 | [] | ghostpdl | d683d1e6450d74619e6277efeebfc222d9a5cb91 | 260,397,046,494,062,900,000,000,000,000,000,000,000 | 18 | Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps.
We were under the impression that the Windows driver 'PScript5.dll' used
superexec, but after testing with our extensive suite of PostScript file,
and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear
that this operator is ... |
png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
png_uint_32 num_pal)
{
png_uint_32 i;
png_const_colorp pal_ptr;
png_byte buf[3];
png_debug(1, "in png_write_PLTE");
if ((
#ifdef PNG_MNG_FEATURES_SUPPORTED
(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 &&
#endi... | 1 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 123,311,444,179,758,440,000,000,000,000,000,000,000 | 67 | [libpng16] Reject attempt to write over-length PLTE chunk |
static void check_anynewline(compiler_common *common)
{
/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
DEFINE_COMPILER;
sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
O... | 0 | [
"CWE-125"
] | pcre2 | 50a51cb7e67268e6ad417eb07c9de9bfea5cc55a | 41,893,095,351,626,604,000,000,000,000,000,000,000 | 26 | Fixed a unicode properrty matching issue in JIT |
ves_icall_System_IO_DriveInfo_GetDiskFreeSpace (MonoString *path_name, guint64 *free_bytes_avail,
guint64 *total_number_of_bytes, guint64 *total_number_of_free_bytes,
gint32 *error)
{
gboolean result;
ULARGE_INTEGER wapi_free_bytes_avail;
ULARGE_INTEGER wapi_total_number_of_bytes;
ULARGE_INTEGER wapi_to... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 76,778,988,220,681,800,000,000,000,000,000,000,000 | 28 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
ins_compl_used_match(void)
{
return compl_used_match;
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 313,792,262,271,889,540,000,000,000,000,000,000,000 | 4 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
bluetooth_client_setup_device_finish (BluetoothClient *client,
GAsyncResult *res,
char **path,
GError **error)
{
GSimpleAsyncResult *simple;
simple = (GSimpleAsyncResult *) res;
g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == bluetooth_client_... | 0 | [] | gnome-bluetooth | 6b5086d42ea64d46277f3c93b43984f331d12f89 | 107,873,164,830,603,800,000,000,000,000,000,000,000 | 19 | lib: Fix Discoverable being reset when turned off
Work-around race in bluetoothd which would reset the discoverable
flag if a timeout change was requested before discoverable finished
being set to off:
See https://bugzilla.redhat.com/show_bug.cgi?id=1602985 |
MagickExport PixelInfo *ClonePixelInfo(const PixelInfo *pixel)
{
PixelInfo
*pixel_info;
pixel_info=(PixelInfo *) AcquireQuantumMemory(1,sizeof(*pixel_info));
if (pixel_info == (PixelInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
*pixel_info=(*pixel);
return(pixel... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 128,080,268,310,193,800,000,000,000,000,000,000,000 | 11 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
static BooleanVal null() {
BooleanVal result;
result.is_null = true;
return result;
} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 86,227,625,195,432,780,000,000,000,000,000,000,000 | 5 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static unsigned long xol_take_insn_slot(struct xol_area *area)
{
unsigned long slot_addr;
int slot_nr;
do {
slot_nr = find_first_zero_bit(area->bitmap, UINSNS_PER_PAGE);
if (slot_nr < UINSNS_PER_PAGE) {
if (!test_and_set_bit(slot_nr, area->bitmap))
break;
slot_nr = UINSNS_PER_PAGE;
continue;
}
... | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 59,059,900,293,916,050,000,000,000,000,000,000,000 | 22 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
{
CERT *cert;
cert=ctx->cert;
switch (cmd)
{
#ifndef OPENSSL_NO_RSA
case SSL_CTRL_NEED_TMP_RSA:
if ( (cert->rsa_tmp == NULL) &&
((cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) ||
(EVP_PKEY_size(cert->pkeys[SSL_PKEY_RSA_ENC].privateke... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 248,280,640,408,257,160,000,000,000,000,000,000,000 | 304 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
write_v3_votes_to_disk(const smartlist_t *pending_votes)
{
smartlist_t *votestrings = smartlist_new();
char *votefile = NULL;
SMARTLIST_FOREACH(pending_votes, pending_vote_t *, v,
{
sized_chunk_t *c = tor_malloc(sizeof(sized_chunk_t));
c->bytes = v->vote_body->dir;
c->len = v->vote_body->di... | 0 | [] | tor | a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4 | 216,782,683,521,324,470,000,000,000,000,000,000,000 | 21 | Prevent int underflow in dirvote.c compare_vote_rs_.
This should be "impossible" without making a SHA1 collision, but
let's not keep the assumption that SHA1 collisions are super-hard.
This prevents another case related to 21278. There should be no
behavioral change unless -ftrapv is on. |
void tm_reclaim_current(uint8_t cause)
{
tm_enable();
tm_reclaim_thread(¤t->thread, cause);
} | 0 | [
"CWE-862"
] | linux | 8205d5d98ef7f155de211f5e2eb6ca03d95a5a60 | 3,900,871,289,520,690,000,000,000,000,000,000,000 | 5 | powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
When we take an FP unavailable exception in a transaction we have to
account for the hardware FP TM checkpointed registers being
incorrect. In this case for this process we know the current and
checkpointed FP registers must be the same (since FP wasn'... |
void* Type_LUTB2A_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return (void*) cmsPipelineDup((cmsPipeline*) Ptr);
cmsUNUSED_PARAMETER(n);
cmsUNUSED_PARAMETER(self);
} | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 332,282,088,001,905,480,000,000,000,000,000,000,000 | 7 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
litest_utils_suite(void)
{
TCase *tc;
Suite *s;
s = suite_create("litest:utils");
tc = tcase_create("utils");
tcase_add_test(tc, bitfield_helpers);
tcase_add_test(tc, matrix_helpers);
tcase_add_test(tc, ratelimit_helpers);
tcase_add_test(tc, dpi_parser);
tcase_add_test(tc, wheel_click_parser);
tcase_add_tes... | 0 | [
"CWE-134"
] | libinput | 562157f2a56537f353ca49b194efeb770004ba63 | 96,002,252,664,802,450,000,000,000,000,000,000,000 | 51 | 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 void destroy_fixed_file_ref_node(struct fixed_file_ref_node *ref_node)
{
percpu_ref_exit(&ref_node->refs);
kfree(ref_node);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 101,482,757,325,821,650,000,000,000,000,000,000,000 | 5 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static void add_preferred_base(unsigned char *sha1)
{
struct pbase_tree *it;
void *data;
unsigned long size;
unsigned char tree_sha1[20];
if (window <= num_preferred_base++)
return;
data = read_object_with_reference(sha1, tree_type, &size, tree_sha1);
if (!data)
return;
for (it = pbase_tree; it; it = it-... | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 91,337,478,908,719,030,000,000,000,000,000,000,000 | 29 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio)
{
struct sock *sk;
struct iucv_sock *iucv;
sk = sk_alloc(&init_net, PF_IUCV, prio, &iucv_proto);
if (!sk)
return NULL;
iucv = iucv_sk(sk);
sock_init_data(sock, sk);
INIT_LIST_HEAD(&iucv->accept_q);
spin_lock_init(&iucv->accept_q... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 104,913,525,024,523,160,000,000,000,000,000,000,000 | 43 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static int cac_get_serial_nr_from_CUID(sc_card_t* card, sc_serial_number_t* serial)
{
cac_private_data_t * priv = CAC_DATA(card);
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
if (card->serialnr.len) {
*serial = card->serialnr;
SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 288,146,733,853,968,600,000,000,000,000,000,000,000 | 16 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
miniflow_equal_flow_in_minimask(const struct miniflow *a, const struct flow *b,
const struct minimask *mask)
{
const uint64_t *p = miniflow_get_values(&mask->masks);
size_t idx;
FLOWMAP_FOR_EACH_INDEX(idx, mask->masks.map) {
if ((miniflow_get(a, idx) ^ flow_u64_value... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 186,949,911,252,325,140,000,000,000,000,000,000,000 | 14 | 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... |
static bool block_rtas_call(int token, int nargs,
struct rtas_args *args)
{
int i;
for (i = 0; i < ARRAY_SIZE(rtas_filters); i++) {
struct rtas_filter *f = &rtas_filters[i];
u32 base, size, end;
if (token != f->token)
continue;
if (f->buf_idx1 != -1) {
base = be32_to_cpu(args->args[f->buf_idx1... | 0 | [
"CWE-862"
] | linux | bd59380c5ba4147dcbaad3e582b55ccfd120b764 | 209,274,414,298,384,600,000,000,000,000,000,000,000 | 57 | powerpc/rtas: Restrict RTAS requests from userspace
A number of userspace utilities depend on making calls to RTAS to retrieve
information and update various things.
The existing API through which we expose RTAS to userspace exposes more
RTAS functionality than we actually need, through the sys_rtas syscall,
which al... |
static inline unsigned char *skb_network_header(const struct sk_buff *skb)
{
return skb->head + skb->network_header; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 298,421,934,828,668,280,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static bool set_reg_profile(RAnal *anal) {
const char *p =
"=PC pc\n"
"=SP r14\n" // XXX
"=BP srp\n" // XXX
"=SN r0\n"
"=A0 r0\n"
"=A1 r1\n"
"=A2 r2\n"
"=A3 r3\n"
"gpr sp .32 56 0\n" // r14
"gpr acr .32 60 0\n" // r15
"gpr pc .32 64 0\n" // r16 // out of context
"gpr srp .32 68 0\n" // like rbp... | 0 | [
"CWE-125"
] | radare2 | 605785b65dd356d46d4487faa41dbf90943b8bc1 | 198,321,811,177,822,800,000,000,000,000,000,000,000 | 37 | Fix 1 byte oobread in the cris analysis plugin ##crash |
bool MaybeGetRenderFrame(v8::Isolate* isolate,
const std::string& method_name,
content::RenderFrame** render_frame_ptr) {
std::string error_msg;
if (!MaybeGetRenderFrame(&error_msg, method_name, render_frame_ptr)) {
gin_helper::ErrorThrower(isolate).... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 36,387,429,210,373,760,000,000,000,000,000,000,000 | 10 | 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
... |
ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
int frag_threshold = tx->local->hw.wiphy->frag_threshold;
int hdrlen;
int fragnum;
/* no matter what happens, tx->skb move... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 141,393,393,841,273,660,000,000,000,000,000,000,000 | 73 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
iter_add_prepend_answer(struct module_qstate* qstate, struct iter_qstate* iq,
struct ub_packed_rrset_key* rrset)
{
struct iter_prep_list* p = (struct iter_prep_list*)regional_alloc(
qstate->region, sizeof(struct iter_prep_list));
if(!p)
return 0;
p->rrset = rrset;
p->next = NULL;
/* add at end */
if(iq->an_p... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 213,099,598,087,847,700,000,000,000,000,000,000,000 | 16 | - 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 int udp_chr_read_poll(void *opaque)
{
CharDriverState *chr = opaque;
NetCharDriver *s = chr->opaque;
s->max_size = qemu_chr_be_can_write(chr);
/* If there were any stray characters in the queue process them
* first
*/
while (s->max_size > 0 && s->bufptr < s->bufcnt) {
qemu... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 171,826,985,257,123,460,000,000,000,000,000,000,000 | 17 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
static DBusMessage *get_discovery_filters(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
DBusMessage *reply;
DBusMessageIter iter, array;
struct filter_parser *parser;
reply = dbus_message_new_method_return(msg);
dbus_message_iter_init_append(reply, &iter);
dbus_message_iter_open_container(&it... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 313,966,980,580,123,500,000,000,000,000,000,000,000 | 23 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock *pb, int primary_file)
{
Slapi_Entry *e = NULL;
char *entrystr = NULL;
char *buf = NULL;
char *lastp = NULL;
int rc = 0; /* Fail */
PRInt32 nr = 0;
PRFileInfo64 prfinfo;
PRFileDesc *prfd = 0;
int schema_flags = 0;... | 0 | [
"CWE-200",
"CWE-203"
] | 389-ds-base | b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32 | 146,537,561,270,233,700,000,000,000,000,000,000,000 | 142 | Issue 4609 - CVE - info disclosure when authenticating
Description: If you bind as a user that does not exist. Error 49 is returned
instead of error 32. As error 32 discloses that the entry does
not exist. When you bind as an entry that does not have userpassword
set then ... |
ssize_t sendfile_short_send(struct smbXsrv_connection *xconn,
files_struct *fsp,
ssize_t nread,
size_t headersize,
size_t smb_maxcnt)
{
#define SHORT_SEND_BUFSIZE 1024
if (nread < headersize) {
DEBUG(0,("sendfile_short_send: sendfile failed to send "
"header for file %s (%s). Terminati... | 0 | [
"CWE-200"
] | samba | 3ddc9344c2fa7461336899fbddb0bb80995e9170 | 262,580,989,667,786,850,000,000,000,000,000,000,000 | 61 | CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro.
Fixes the raw.write.bad-write test.
NB. We need the two (==0) changes in source3/smbd/smb2_reply.c
as the gcc optimizer now knows that the return from
smbreq_bufrem() can never be less than zero.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085
Remove... |
bool HGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr, bool drop_extra) {
if (!expr->target()->shared()->HasBuiltinFunctionId()) return false;
BuiltinFunctionId id = expr->target()->shared()->builtin_function_id();
switch (id) {
case kMathRound:
case kMathAbs:
case kMathSqrt:
case kMathLog:
... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 186,522,526,366,438,450,000,000,000,000,000,000,000 | 29 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static int pause_interception(struct kvm_vcpu *vcpu)
{
bool in_kernel;
/*
* CPL is not made available for an SEV-ES guest, therefore
* vcpu->arch.preempted_in_kernel can never be true. Just
* set in_kernel to false as well.
*/
in_kernel = !sev_es_guest(vcpu->kvm) && svm_get_cpl(vcpu) == 0;
if (!kvm_pause... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 195,671,274,197,899,150,000,000,000,000,000,000,000 | 17 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
ves_icall_MonoType_get_Name (MonoReflectionType *type)
{
MonoDomain *domain = mono_domain_get ();
MonoClass *class = mono_class_from_mono_type (type->type);
MONO_ARCH_SAVE_REGS;
if (type->type->byref) {
char *n = g_strdup_printf ("%s&", class->name);
MonoString *res = mono_string_new (domain, n);
g_free (... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 246,778,331,407,412,830,000,000,000,000,000,000,000 | 18 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
parse_ipsecrequests(struct xfrm_policy *xp, struct sadb_x_policy *pol)
{
int err;
int len = pol->sadb_x_policy_len*8 - sizeof(struct sadb_x_policy);
struct sadb_x_ipsecrequest *rq = (void*)(pol+1);
if (pol->sadb_x_policy_len * 8 < sizeof(struct sadb_x_policy))
return -EINVAL;
while (len >= sizeof(*rq)) {
if ... | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 204,659,846,787,031,750,000,000,000,000,000,000,000 | 21 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
static inline void slave_disable_netpoll(struct slave *slave)
{
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 105cd17a866017b45f3c45901b394c711c97bf40 | 325,324,798,695,542,900,000,000,000,000,000,000,000 | 3 | bonding: fix null dereference in bond_ipsec_add_sa()
If bond doesn't have real device, bond->curr_active_slave is null.
But bond_ipsec_add_sa() dereferences bond->curr_active_slave without
null checking.
So, null-ptr-deref would occur.
Test commands:
ip link add bond0 type bond
ip link set bond0 up
ip x s... |
String *Item_str_conv::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res;
if (!(res=args[0]->val_str(str)))
{
null_value=1; /* purecov: inspected */
return 0; /* purecov: inspected */
}
null_value=0;
if (multiply == 1)
{
uint len;
if (res->uses_buffer_owned_by(str))
{
... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 179,859,959,793,913,560,000,000,000,000,000,000,000 | 42 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
PHP_MSHUTDOWN_FUNCTION(ps_mm)
{
if (ps_mm_instance) {
ps_mm_destroy(ps_mm_instance);
return SUCCESS;
}
return FAILURE;
} | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 90,894,322,932,642,900,000,000,000,000,000,000,000 | 8 | Strict session |
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci,
BIO *out, int indent)
{
BIO_printf(out, "%*sPath Length Constraint: ", indent, "");
if (pci->pcPathLengthConstraint)
i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint);
else
BIO_printf(out, "infi... | 1 | [
"CWE-125"
] | openssl | 23446958685a593d4d9434475734b99138902ed2 | 193,903,187,053,858,000,000,000,000,000,000,000,000 | 17 | Fix printing of PROXY_CERT_INFO_EXTENSION to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
setup_key_sizes(void) {
memset(&keySizes, 0, sizeof(struct key_sizes));
keySizes.sym_sig_keyLen = DEFAULT_SYM_SIGNING_KEY_LENGTH;
keySizes.sym_enc_blockSize = DEFAULT_SYM_ENCRYPTION_BLOCK_SIZE;
keySizes.sym_enc_keyLen = DEFAULT_SYM_ENCRYPTION_KEY_LENGTH;
keySizes.sym_sig_size = DEFAULT_SYM_SIGNATUR... | 0 | [
"CWE-703",
"CWE-770"
] | open62541 | b79db1ac78146fc06b0b8435773d3967de2d659c | 243,242,731,960,716,020,000,000,000,000,000,000,000 | 16 | fix(plugin): Add default limits for chunks and message size
Based on a reported DoS vulnerability reported by Team82 (Claroty
Research). |
int zmq::curve_client_t::process_ready (
const uint8_t *msg_data, size_t msg_size)
{
if (msg_size < 30) {
errno = EPROTO;
return -1;
}
const size_t clen = (msg_size - 14) + crypto_box_BOXZEROBYTES;
uint8_t ready_nonce [crypto_box_NONCEBYTES];
uint8_t ready_plaintext [crypto... | 1 | [] | libzmq | 0900a489213d74feb86fc0b343308fe7884a2a3c | 198,841,497,935,373,920,000,000,000,000,000,000,000 | 36 | Problem: curve messages can be replayed
Solution: ensure message short nonces are strictly increasing and validate them |
_XimCheckAuthNextData(
Xim im,
XPointer buf)
{
/*
* Not yet
*/
return True;
} | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 23,130,753,033,343,065,000,000,000,000,000,000,000 | 9 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
void btrfs_bio_counter_inc_noblocked(struct btrfs_fs_info *fs_info)
{
percpu_counter_inc(&fs_info->dev_replace.bio_counter);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 225,340,413,604,563,600,000,000,000,000,000,000,000 | 4 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
*/
static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts)
{
st_entry ent;
wddx_stack *stack = (wddx_stack *)user_data;
if (!strcmp((char *)name, EL_PACKET)) {
int i;
if (atts) for (i=0; atts[i]; i++) {
if (!strcmp((char *)atts[i], EL_VERSION)) {
/* nothing for no... | 0 | [
"CWE-476"
] | php-src | 8d2539fa0faf3f63e1d1e7635347c5b9e777d47b | 143,719,631,286,696,670,000,000,000,000,000,000,000 | 155 | Fix bug #73831 - NULL Pointer Dereference while unserialize php object |
Item_sum_int::val_str(String *str)
{
return val_string_from_int(str);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 246,759,162,359,185,560,000,000,000,000,000,000,000 | 4 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
stack_init (VerifyContext *ctx, ILCodeDesc *state)
{
if (state->flags & IL_CODE_FLAG_STACK_INITED)
return;
state->size = 0;
state->flags |= IL_CODE_FLAG_STACK_INITED;
if (!state->stack)
state->stack = g_new0 (ILStackDesc, ctx->max_stack);
} | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 186,739,402,044,332,230,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 |
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth)
{
STACK_OF(SSL_CIPHER) *sk;
ctx->method = meth;
sk = ssl_create_cipher_list(ctx->method, &(ctx->cipher_list),
&(ctx->cipher_list_by_id),
meth->version ==
... | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 319,943,180,915,907,100,000,000,000,000,000,000,000 | 18 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
static int ldapsrv_rename_with_controls(struct ldapsrv_call *call,
struct ldb_dn *olddn,
struct ldb_dn *newdn,
struct ldb_control **controls,
struct ldb_result *res)
{
struct ldb_context *ldb = call->conn->ldb;
struct ldb_request *req;
int ret;
ret = ldb_build_rename_req(&req, ldb, ldb,
ol... | 0 | [] | samba | 86fe9d48883f87c928bf31ccbd275db420386803 | 133,608,312,861,803,260,000,000,000,000,000,000,000 | 51 | CVE-2021-3670 ldap_server: Set timeout on requests based on MaxQueryDuration
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> |
static int ati_remote2_submit_urbs(struct ati_remote2 *ar2)
{
int r;
r = usb_submit_urb(ar2->urb[0], GFP_KERNEL);
if (r) {
dev_err(&ar2->intf[0]->dev,
"%s(): usb_submit_urb() = %d\n", __func__, r);
return r;
}
r = usb_submit_urb(ar2->urb[1], GFP_KERNEL);
if (r) {
usb_kill_urb(ar2->urb[0]);
dev_err(&ar... | 0 | [
"CWE-703"
] | linux | 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d | 59,889,702,151,235,740,000,000,000,000,000,000,000 | 20 | Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious descriptor that specify one
interface or no endpoints, it will crash in the probe function.
Ensure there is at least two interfaces and one endp... |
static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
__be16 sport, __be16 dport,
struct udp_table *udptable)
{
const struct iphdr *iph = ip_hdr(skb);
return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport,
iph->daddr, dport, inet_iif(skb),
udptable);
} | 0 | [
"CWE-358"
] | linux | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | 80,836,854,984,191,350,000,000,000,000,000,000,000 | 10 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, s... |
explicit QuantizedBiasAddOp(OpKernelConstruction* context)
: OpKernel(context) {} | 0 | [
"CWE-369"
] | tensorflow | 67784700869470d65d5f2ef20aeb5e97c31673cb | 19,713,044,069,844,792,000,000,000,000,000,000,000 | 2 | Prevent division by 0 in `QuantizedBiasAdd`.
PiperOrigin-RevId: 370117454
Change-Id: I3804e2ac8dcc6d3afcc92e27853e2325a017ca4d |
TEST_F(HttpConnectionManagerImplTest, HitRequestBufferLimits) {
initial_buffer_limit_ = 10;
streaming_filter_ = false;
setup(false, "");
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
// Set the filter to be a buffering filter. Sending any data will hit the
// watermark limit and resu... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 52,365,750,287,731,210,000,000,000,000,000,000,000 | 21 | 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... |
MagickExport StringInfo *DestroyStringInfo(StringInfo *string_info)
{
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickCoreSignature);
if (string_info->datum != (unsigned char *) NULL)
string_info->datum=(unsigned char *) RelinquishMagickMemory(
string_info->datum);
i... | 0 | [
"CWE-190"
] | ImageMagick | be90a5395695f0d19479a5d46b06c678be7f7927 | 245,037,538,256,914,500,000,000,000,000,000,000,000 | 15 | https://github.com/ImageMagick/ImageMagick/issues/1721 |
static inline struct sockaddr *cma_src_addr(struct rdma_id_private *id_priv)
{
return (struct sockaddr *) &id_priv->id.route.addr.src_addr;
} | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 181,718,802,433,676,630,000,000,000,000,000,000,000 | 4 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
_equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b)
{
COMPARE_SCALAR_FIELD(objectType);
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(object);
COMPARE_NODE_FIELD(objarg);
COMPARE_STRING_FIELD(newowner);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 176,724,484,361,413,680,000,000,000,000,000,000,000 | 10 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static unsigned int selinux_ip_postroute(struct sk_buff *skb,
const struct net_device *outdev,
u16 family)
{
u32 secmark_perm;
u32 peer_sid;
int ifindex = outdev->ifindex;
struct sock *sk;
struct common_audit_data ad;
struct lsm_network_audit net = {0,};
char *addrp;
u8 secmark_active;
u8 peerlbl_a... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 310,852,192,344,091,460,000,000,000,000,000,000,000 | 136 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
bool call(std::string admin_command, cmdmap_t& cmdmap, std::string format,
bufferlist& out) override {
stringstream ss;
bool r = osd->asok_command(admin_command, cmdmap, format, ss);
out.append(ss);
return r;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 185,204,352,300,896,240,000,000,000,000,000,000,000 | 7 | 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 ... |
linetabsize(char_u *s)
{
return linetabsize_col(0, s);
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | 94f3192b03ed27474db80b4d3a409e107140738b | 3,880,011,142,336,702,000,000,000,000,000,000,000 | 4 | patch 8.2.3950: going beyond the end of the line with /\%V
Problem: Going beyond the end of the line with /\%V.
Solution: Check for valid column in getvcol(). |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.