func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
mech_rpa_auth_free(struct auth_request *auth_request) { struct rpa_auth_request *request = (struct rpa_auth_request *)auth_request; safe_memset(request->pwd_md5, 0, sizeof(request->pwd_md5)); pool_unref(&auth_request->pool); }
0
[ "CWE-125" ]
core
69ad3c902ea4bbf9f21ab1857d8923f975dc6145
274,937,357,003,237,000,000,000,000,000,000,000,000
9
auth: mech-rpa - Fail on zero len buffer
unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen=0; unsigned char *ret = p; /* don't add extensions for SSLv3 unless doing secure renegotiation */ if (s->client_version == SSL3_VERSION && !s->s3->send_connection_binding) return p; ret+=2; if (re...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
46,571,019,241,456,650,000,000,000,000,000,000,000
242
Add SRP support.
static UINT gdi_SurfaceToCache(RdpgfxClientContext* context, const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache) { const RECTANGLE_16* rect; gdiGfxSurface* surface; gdiGfxCacheEntry* cacheEntry; UINT rc = ERROR_INTERNAL_ERROR; EnterCriticalSection(&context->mux); rect = &(surfaceToCa...
1
[ "CWE-190" ]
FreeRDP
e08a23f93136f59a52651f66d064b8d4303872e1
122,354,673,517,067,820,000,000,000,000,000,000,000
45
Fixed missing input sanitation for GFX surfaces. Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
ast_for_binop(struct compiling *c, const node *n) { /* Must account for a sequence of expressions. How should A op B op C by represented? BinOp(BinOp(A, op, B), op, C). */ int i, nops; expr_ty expr1, expr2, result; operator_ty newoperator; expr1 = ast_for_expr(c, CHILD(n, 0)); ...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
132,454,283,559,732,120,000,000,000,000,000,000,000
53
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
void mmput(struct mm_struct *mm) { might_sleep(); if (atomic_dec_and_test(&mm->mm_users)) { exit_aio(mm); exit_mmap(mm); set_mm_exe_file(mm, NULL); if (!list_empty(&mm->mmlist)) { spin_lock(&mmlist_lock); list_del(&mm->mmlist); spin_unlock(&mmlist_lock); } put_swap_token(mm); mmdrop(mm); } }
0
[ "CWE-264" ]
linux-2.6
2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205
162,450,430,633,976,570,000,000,000,000,000,000,000
17
copy_process: fix CLONE_PARENT && parent_exec_id interaction CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we re-use the old parent, we must also re-use ->parent_exec_id to make sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed task exits. Also, move down the "p->parent_ex...
const CString& CZNC::GetZNCPath() const { if (!CFile::Exists(m_sZNCPath)) { CDir::MakeDir(m_sZNCPath); } return m_sZNCPath; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
182,314,504,018,170,450,000,000,000,000,000,000,000
6
Don't crash if user specified invalid encoding. This is CVE-2019-9917
xmlParseDocument(xmlParserCtxtPtr ctxt) { xmlChar start[4]; xmlCharEncoding enc; xmlInitParser(); if ((ctxt == NULL) || (ctxt->input == NULL)) return(-1); GROW; /* * SAX: detecting the level. */ xmlDetectSAX2(ctxt); /* * SAX: beginning of the document processi...
1
[ "CWE-119" ]
libxml2
afd27c21f6b36e22682b7da20d726bce2dcb2f43
154,376,946,456,433,360,000,000,000,000,000,000,000
175
Avoid processing entities after encoding conversion failures For https://bugzilla.gnome.org/show_bug.cgi?id=756527 and was also raised by Chromium team in the past When we hit a convwersion failure when switching encoding it is bestter to stop parsing there, this was treated as a fatal error but the parser was contin...
PHP_FUNCTION( locale_get_region ) { get_icu_value_src_php( LOC_REGION_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); }
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
186,067,247,541,669,530,000,000,000,000,000,000,000
4
Fix bug #72241: get_icu_value_internal out-of-bounds read
int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align) { BUG_ON(ptr == NULL); ptr[0] = __alloc_percpu(mibsize, align); if (!ptr[0]) goto err0; ptr[1] = __alloc_percpu(mibsize, align); if (!ptr[1]) goto err1; return 0; err1: free_percpu(ptr[0]); ptr[0] = NULL; err0: return -ENOMEM; }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
26,798,479,745,032,706,000,000,000,000,000,000,000
16
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
*/ MYSQL_PLUGIN_EXPORT char *mysql_authentication_dialog_ask(MYSQL *mysql, int type, const char *prompt, char *buf, int buf_len) { char *s=buf; fputs(prompt, stdout); fputs(" ", stdout); if (!fgets(buf, buf_len-1, stdin)) buf[0]= ...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
235,995,646,170,607,400,000,000,000,000,000,000,000
21
mysqltest: don't eat new lines in --exec pass them through as is
int shmem_unuse(swp_entry_t entry, struct page *page) { struct list_head *p, *next; struct shmem_inode_info *info; int found = 0; spin_lock(&shmem_swaplist_lock); list_for_each_safe(p, next, &shmem_swaplist) { info = list_entry(p, struct shmem_inode_info, swaplist); if (!info->swapped) list_del_init(&info-...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
96,979,594,786,785,090,000,000,000,000,000,000,000
21
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
int manager_rtnl_enumerate_addresses(Manager *m) { _cleanup_netlink_message_unref_ sd_netlink_message *req = NULL, *reply = NULL; sd_netlink_message *addr; int r; assert(m); assert(m->rtnl); r = sd_rtnl_message_new_addr(m->rtnl, &req, RTM_GETADDR, 0, 0); if (r <...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
95,524,917,251,682,790,000,000,000,000,000,000,000
34
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
__fastcall TOwnConsole::~TOwnConsole() { TGuard Guard(FSection.get()); delete FTrayIcon; delete FWindowStateTimer; // deliberately do not remove ConsoleCtrlHandler as it causes // failures while exiting FreeConsole(); DebugAssert(FInstance == this); FInstance = NULL; }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
108,936,288,084,091,080,000,000,000,000,000,000,000
15
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
static int qeth_clear_halt_card(struct qeth_card *card, int halt) { int rc = 0; QETH_CARD_TEXT(card, 3, "clhacrd"); if (halt) rc = qeth_halt_channels(card); if (rc) return rc; return qeth_clear_channels(card); }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
284,870,284,025,805,860,000,000,000,000,000,000,000
12
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
GF_Err tfdt_box_read(GF_Box *s,GF_BitStream *bs) { GF_TFBaseMediaDecodeTimeBox *ptr = (GF_TFBaseMediaDecodeTimeBox *)s; if (ptr->version==1) { ISOM_DECREASE_SIZE(ptr, 8); ptr->baseMediaDecodeTime = gf_bs_read_u64(bs); } else { ISOM_DECREASE_SIZE(ptr, 4); ptr->baseMediaDecodeTime = (u32) gf_bs_read_u32(bs); ...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
16,776,301,756,914,781,000,000,000,000,000,000,000
13
fixed #2255
int32_t cli_bcapi_read(struct cli_bc_ctx* ctx, uint8_t *data, int32_t size) { int n; if (!ctx->fmap) { API_MISUSE(); return -1; } if (size < 0 || size > CLI_MAX_ALLOCATION) { cli_warnmsg("bytecode: negative read size: %d\n", size); API_MISUSE(); return -1; } n = fmap_readn(ctx->fmap, data, ...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
295,693,595,649,776,650,000,000,000,000,000,000,000
24
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
select_export(THD *thd_arg, sql_exchange *ex): select_to_file(thd_arg, ex) {}
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
257,393,075,951,830,570,000,000,000,000,000,000,000
1
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
struct MACH0_(obj_t)* MACH0_(mach0_new)(const char* file, bool verbose) { ut8 *buf; struct MACH0_(obj_t) *bin; if (!(bin = malloc (sizeof (struct MACH0_(obj_t))))) { return NULL; } memset (bin, 0, sizeof (struct MACH0_(obj_t))); bin->verbose = verbose; bin->file = file; if (!(buf = (ut8*)r_file_slurp(file, &b...
0
[ "CWE-416" ]
radare2
d1e8ac62c6d978d4662f69116e30230d43033c92
58,108,841,372,347,980,000,000,000,000,000,000,000
25
Fix null deref and uaf in mach0 parser
g_sprintf(char* dest, const char* format, ...) { va_list ap; va_start(ap, format); vsprintf(dest, format, ap); va_end(ap); }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
132,633,406,566,680,620,000,000,000,000,000,000,000
8
move temp files from /tmp to /tmp/.xrdp
static int coroutine_fn copy_sectors(BlockDriverState *bs, uint64_t start_sect, uint64_t cluster_offset, int n_start, int n_end) { BDRVQcowState *s = bs->opaque; QEMUIOVector qiov; struct iovec iov...
0
[ "CWE-190" ]
qemu
cab60de930684c33f67d4e32c7509b567f8c445b
149,413,727,380,887,000,000,000,000,000,000,000,000
67
qcow2: Fix new L1 table size check (CVE-2014-0143) The size in bytes is assigned to an int later, so check that instead of the number of entries. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev) { inode->i_mode = mode; if (S_ISCHR(mode)) { inode->i_fop = &def_chr_fops; inode->i_rdev = rdev; } else if (S_ISBLK(mode)) { inode->i_fop = &def_blk_fops; inode->i_rdev = rdev; } else if (S_ISFIFO(mode)) inode->i_fop = &pipefifo_fops; ...
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
84,151,866,576,052,870,000,000,000,000,000,000,000
18
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
help() { extern char *__progname; fprintf(stderr, "iodine IP over DNS tunneling server\n"); fprintf(stderr, "Usage: %s [-v] [-h] [-c] [-s] [-f] [-D] [-u user] " "[-t chrootdir] [-d device] [-m mtu] [-z context] " "[-l ip address to listen on] [-p port] [-n external ip] [-b dnsport] [-P password] " "[-F pidfil...
0
[]
iodine
b715be5cf3978fbe589b03b09c9398d0d791f850
339,236,695,972,806,480,000,000,000,000,000,000,000
34
Fix authentication bypass bug The client could bypass the password check by continuing after getting error from the server and guessing the network parameters. The server would still accept the rest of the setup and also network traffic. Add checks for normal and raw mode that user has authenticated before allowing a...
static inline unsigned short ScaleQuantumToShort(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((unsigned short) ((quantum+MagickULLConstant(32768))/ MagickULLConstant(65537))); #else if ((IsNaN(quantum) != MagickFalse) || (quantum <= 0.0)) return(0); if ((quantum/65537.0) >= 65535....
0
[ "CWE-190" ]
ImageMagick
95d4e94e0353e503b71a53f5e6fad173c7c70c90
87,436,306,035,683,320,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1751
snmp_reset_var_buffers(netsnmp_variable_list * var) { while (var) { if (var->name != var->name_loc) { if(NULL != var->name) free(var->name); var->name = var->name_loc; var->name_length = 0; } if (var->val.string != var->buf) { i...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
77,727,178,788,410,870,000,000,000,000,000,000,000
18
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
parse_enclose(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r = 0, num; Node *target, *work1 = NULL, *work2 = NULL; OnigOptionType option; OnigCodePoint c; OnigEncoding enc = env->enc; #ifdef USE_NAMED_GROUP int list_capture; #endif UChar* p = *src; PFETCH_RE...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
108,739,292,922,405,140,000,000,000,000,000,000,000
421
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
void license_write_binary_blob(wStream* s, LICENSE_BLOB* blob) { Stream_EnsureRemainingCapacity(s, blob->length + 4); Stream_Write_UINT16(s, blob->type); /* wBlobType (2 bytes) */ Stream_Write_UINT16(s, blob->length); /* wBlobLen (2 bytes) */ if (blob->length > 0) Stream_Write(s, blob->data, blob->length); /* ...
0
[]
FreeRDP
f1d6afca6ae620f9855a33280bdc6f3ad9153be0
73,542,989,058,843,305,000,000,000,000,000,000,000
10
Fix CVE-2014-0791 This patch fixes CVE-2014-0791, the remaining length in the stream is checked before doing some malloc().
struct net_device *rtnl_create_link(struct net *net, const char *ifname, unsigned char name_assign_type, const struct rtnl_link_ops *ops, struct nlattr *tb[]) { int err; struct net_device *dev; unsigned int num_tx_queues = 1; unsigned int num_rx_queues = 1; if (tb[IFLA_NUM_TX_QUEUES]) num_tx_queues = nla_get_...
0
[ "CWE-200" ]
net
5f8e44741f9f216e33736ea4ec65ca9ac03036e6
130,314,067,285,226,500,000,000,000,000,000,000,000
53
net: fix infoleak in rtnetlink The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
void CL_InitRef( void ) { refimport_t ri; refexport_t *ret; #ifdef USE_RENDERER_DLOPEN GetRefAPI_t GetRefAPI; char dllName[MAX_OSPATH]; #endif Com_Printf( "----- Initializing Renderer ----\n" ); #ifdef USE_RENDERER_DLOPEN cl_renderer = Cvar_Get("cl_renderer", "opengl2", CVAR_ARCHIVE | CVAR_LATCH | CVAR_PROTE...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
130,551,150,978,879,250,000,000,000,000,000,000,000
108
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
virtual ~AbstractSqlMigrator() {}
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
256,660,873,961,134,560,000,000,000,000,000,000,000
1
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static inline void dma_issue_pending_all(void) { }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
2,064,528,431,422,172,300,000,000,000,000,000,000
3
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static int set_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 data) { switch (msr) { case HV_X64_MSR_APIC_ASSIST_PAGE: { u64 gfn; unsigned long addr; if (!(data & HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE)) { vcpu->arch.hv_vapic = data; if (kvm_lapic_enable_pv_eoi(vcpu, 0)) return 1; break; } gfn = d...
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
106,890,767,040,844,630,000,000,000,000,000,000,000
39
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
HEnvironment* HEnvironment::Copy() const { return new(zone()) HEnvironment(this, zone()); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
65,644,867,007,556,260,000,000,000,000,000,000,000
3
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...
gs_remove_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, const char *path, size_t len, int flags) { gs_path_control_set_t *control; unsigned int n, i; gs_lib_ctx_core_t *core; char *buffer; uint rlen; if (path == NULL || len == 0) return 0; if (mem == NULL |...
0
[ "CWE-20" ]
ghostpdl
a9bd3dec9fde03327a4a2c69dad1036bf9632e20
202,368,484,672,134,400,000,000,000,000,000,000,000
56
Bug 704342: Include device specifier strings in access validation for the "%pipe%", %handle%" and %printer% io devices. We previously validated only the part after the "%pipe%" Postscript device specifier, but this proved insufficient. This rebuilds the original file name string, and validates it complete. The sligh...
fn_format_relative_to_data_home(char * to, const char *name, const char *dir, const char *extension) { char tmp_path[FN_REFLEN]; if (!test_if_hard_path(dir)) { strxnmov(tmp_path,sizeof(tmp_path)-1, mysql_real_data_home, dir, NullS); dir=tmp_path; } return !fn_format(to, name, dir, extension,...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
157,837,847,434,608,470,000,000,000,000,000,000,000
13
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static void __attribute__((destructor)) _nm_singleton_instance_destroy(void) { _singletons_shutdown = TRUE; while (_singletons) { GObject *instance = _singletons->data; _singletons = g_slist_delete_link(_singletons, _singletons); g_object_weak_unref(instance, _nm_singleton_instance_we...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
314,038,227,734,781,440,000,000,000,000,000,000,000
21
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
int smb_vfs_call_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype) { VFS_FIND(linux_setlease); return handle->fns->linux_setlease_fn(handle, fsp, leasetype); }
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
46,187,677,463,137,060,000,000,000,000,000,000,000
6
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
rndr_double_emphasis(struct buf *ob, const struct buf *text, void *opaque) { if (!text || !text->size) return 0; BUFPUTSL(ob, "<strong>"); bufput(ob, text->data, text->size); BUFPUTSL(ob, "</strong>"); return 1; }
0
[ "CWE-79", "CWE-74" ]
redcarpet
a699c82292b17c8e6a62e1914d5eccc252272793
267,463,547,727,178,350,000,000,000,000,000,000,000
11
Fix a security issue using `:quote` with `:escape_html` Reported by @johan-smits.
static int findLeafNode( Rtree *pRtree, /* RTree to search */ i64 iRowid, /* The rowid searching for */ RtreeNode **ppLeaf, /* Write the node here */ sqlite3_int64 *piNode /* Write the node-id here */ ){ int rc; *ppLeaf = 0; sqlite3_bind_int64(pRtree->pReadRowid,...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
240,785,855,811,246,720,000,000,000,000,000,000,000
19
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
yang_read_description(struct lys_module *module, void *node, char *value, char *where, enum yytokentype type) { int ret; char *dsc = "description"; switch (type) { case MODULE_KEYWORD: ret = yang_check_string(module, &module->dsc, dsc, "module", value, NULL); break; case REVISION_KE...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
121,848,757,434,961,020,000,000,000,000,000,000,000
27
yang parser BUGFIX double free Fixes #742
nextvar( int *datalen, const char **datap, char **vname, char **vvalue ) { const char *cp; const char *np; const char *cpend; size_t srclen; size_t len; static char name[MAXVARLEN]; static char value[MAXVALLEN]; cp = *datap; cpend = cp + *datalen; /* * Space past commas and white space */ while (c...
1
[ "CWE-119" ]
ntp
12f1323d18c8d74eb14fb5ac5574183d779794c5
277,004,010,070,536,400,000,000,000,000,000,000,000
92
[Bug 2937] (NTPQ) nextvar() missing length check
void RGWDeleteMultiObj_ObjStore_S3::begin_response() { if (!status_dumped) { send_status(); } dump_start(s); // Explicitly use chunked transfer encoding so that we can stream the result // to the user without having to wait for the full length of it. end_header(s, this, "application/xml", CHUNKED_TRAN...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
332,660,078,588,225,230,000,000,000,000,000,000,000
15
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static unsigned int selinux_ipv6_postroute(const struct nf_hook_ops *ops, struct sk_buff *skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { return selinux_ip_postroute(skb, out->ifindex, PF_INET6); }
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
146,594,109,213,546,210,000,000,000,000,000,000,000
8
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
form_auth_data_new (const char *form_username, const char *form_password, const char *username) { EphyEmbedSingleFormAuthData *data; data = g_slice_new (EphyEmbedSingleFormAuthData); data->form_username = g_strdup (form_username); data->form_password = g_strdup (form_pas...
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
223,126,569,702,387,800,000,000,000,000,000,000,000
13
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663
void Magick::Image::textEncoding(const std::string &encoding_) { modifyImage(); options()->textEncoding(encoding_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
257,659,494,551,157,700,000,000,000,000,000,000,000
5
Added missing return to avoid use after free.
PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ { zval **ppid; zval **data; char *p, *value; int nrand; int lensess; if (PS(use_only_cookies)) { PS(apply_trans_sid) = 0; } else { PS(apply_trans_sid) = PS(use_trans_sid); } switch (PS(session_status)) { case php_session_active: php_error(E_NOTICE, "...
1
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
221,584,279,927,308,380,000,000,000,000,000,000,000
148
Strict session
int unit_fork_helper_process(Unit *u, const char *name, pid_t *ret) { int r; assert(u); assert(ret); /* Forks off a helper process and makes sure it is a member of the unit's cgroup. Returns == 0 in the child, * and > 0 in the parent. The pid parameter is always filled in with...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
88,843,536,889,463,770,000,000,000,000,000,000,000
30
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static inline void *ResizeBlock(void *block,size_t size) { register void *memory; if (block == (void *) NULL) return(AcquireBlock(size)); memory=AcquireBlock(size); if (memory == (void *) NULL) return((void *) NULL); if (size <= (SizeOfBlock(block)-sizeof(size_t))) (void) memcpy(memory,block,...
0
[ "CWE-190", "CWE-189", "CWE-703" ]
ImageMagick
0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734
218,978,932,062,787,060,000,000,000,000,000,000,000
17
TfLiteRegistration* Register_AVERAGE_POOL_GENERIC_OPT() { static TfLiteRegistration r = { pooling::Init, pooling::Free, pooling::GenericPrepare<pooling::kAverage>, pooling::AverageEval<pooling::kGenericOptimized>}; return &r; }
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
123,450,906,273,544,850,000,000,000,000,000,000,000
6
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
PHP_FUNCTION(pcntl_wexitstatus) { #ifdef WEXITSTATUS long status_word; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &status_word) == FAILURE) { return; } RETURN_LONG(WEXITSTATUS(status_word)); #else RETURN_FALSE; #endif }
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
168,258,757,937,401,630,000,000,000,000,000,000,000
14
Fixed bug #69418 - more s->p fixes for filenames
static Image *ReadOnePNGImage(MngInfo *mng_info, const ImageInfo *image_info, ExceptionInfo *exception) { /* Read one PNG image */ /* To do: Read the tEXt/Creation Time chunk into the date:create property */ Image *image; int intent, /* "PNG Rendering intent", which is ICC intent + 1 */ num_r...
0
[ "CWE-416" ]
ImageMagick
916d7bbd2c66a286d379dbd94bc6035c8fab937c
192,636,317,977,091,060,000,000,000,000,000,000,000
2,103
Removed invalid free reported in #1791.
static int process_slave_message_reply(struct virtio_net *dev, const struct VhostUserMsg *msg) { struct VhostUserMsg msg_reply; int ret; if ((msg->flags & VHOST_USER_NEED_REPLY) == 0) return 0; ret = read_vhost_message(dev->slave_req_fd, &msg_reply); if (ret <= 0) { if (ret < 0) VHOST_LOG_CONFI...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
287,981,445,151,995,050,000,000,000,000,000,000,000
36
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
self_t& port(std::uint16_t port) { port_ = port; return *this; }
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
234,382,903,422,574,740,000,000,000,000,000,000,000
5
Prevent HTTP pipelining which Crow doesn't support.
static void do_utfreadchar_invalid(compiler_common *common) { /* Slow decoding a UTF-8 character. TMP1 contains the first byte of the character (>= 0xc0). Return char value in TMP1. STR_PTR is undefined for invalid characters. */ DEFINE_COMPILER; sljit_s32 i; sljit_s32 has_cmov = sljit_has_cpu_feature(SLJIT_HAS_CMOV); ...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
29,594,324,541,678,095,000,000,000,000,000,000,000
158
Fixed a unicode properrty matching issue in JIT
bool check_vcol_func_processor(void *arg) { return mark_unsupported_function("copy", arg, VCOL_IMPOSSIBLE); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
290,498,615,044,617,750,000,000,000,000,000,000,000
4
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void schedule_deferred_open_smb_message(uint16 mid) { struct pending_message_list *pml; int i = 0; for (pml = deferred_open_queue; pml; pml = pml->next) { uint16 msg_mid = SVAL(pml->buf.data,smb_mid); DEBUG(10,("schedule_deferred_open_smb_message: [%d] msg_mid = %u\n", i++, (unsigned int)msg_mid )); if (...
0
[]
samba
25452a2268ac7013da28125f3df22085139af12d
58,252,281,498,870,060,000,000,000,000,000,000,000
47
s3: Fix a NULL pointer dereference Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
static int oidc_handle_logout(request_rec *r, oidc_cfg *c, oidc_session_t *session) { oidc_provider_t *provider = NULL; /* pickup the command or URL where the user wants to go after logout */ char *url = NULL; char *error_str = NULL; char *error_description = NULL; oidc_util_get_request_parameter(r, OIDC_REDI...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
281,638,391,906,422,440,000,000,000,000,000,000,000
65
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
void d_drop(struct dentry *dentry) { spin_lock(&dentry->d_lock); __d_drop(dentry); spin_unlock(&dentry->d_lock); }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
211,766,478,171,310,300,000,000,000,000,000,000,000
6
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
void SetInput(std::initializer_list<float> data) { QuantizeAndPopulate<int16_t>(input_, data); }
0
[ "CWE-369" ]
tensorflow
5f7975d09eac0f10ed8a17dbb6f5964977725adc
68,950,790,694,806,790,000,000,000,000,000,000,000
3
Prevent another div by 0 in optimized pooling implementations TFLite PiperOrigin-RevId: 370800091 Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b
static inline struct sock *netlink_lookup(struct net *net, int protocol, u32 pid) { struct nl_pid_hash *hash = &nl_table[protocol].hash; struct hlist_head *head; struct sock *sk; struct hlist_node *node; read_lock(&nl_table_lock); head = nl_pid_hashfn(hash, pid); sk_for_each(sk, node, head) { if (net_e...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
45,271,241,482,487,100,000,000,000,000,000,000,000
21
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
int expand_upwards(struct vm_area_struct *vma, unsigned long address) { struct mm_struct *mm = vma->vm_mm; struct vm_area_struct *next; unsigned long gap_addr; int error = 0; if (!(vma->vm_flags & VM_GROWSUP)) return -EFAULT; /* Guard against wrapping around to address 0. */ address &= PAGE_MASK; address +=...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
88,068,570,138,524,170,000,000,000,000,000,000,000
82
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static av_cold int decode_init(AVCodecContext *avctx) { Mpeg4DecContext *ctx = avctx->priv_data; MpegEncContext *s = &ctx->m; int ret; ctx->divx_version = ctx->divx_build = ctx->xvid_build = ctx->lavc_build = -1; if ((ret = ff_h263_decode_init(avctx)) < 0) return ret; ...
0
[ "CWE-476" ]
FFmpeg
2aa9047486dbff12d9e040f917e5f799ed2fd78b
68,774,466,605,271,330,000,000,000,000,000,000,000
28
avcodec/mpeg4videodec: Check read profile before setting it Fixes: null pointer dereference Fixes: ffmpeg_crash_7.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
mysql_declare_plugin(partition) { MYSQL_STORAGE_ENGINE_PLUGIN, &partition_storage_engine, "partition", "Mikael Ronstrom, MySQL AB", "Partition Storage Engine Helper", PLUGIN_LICENSE_GPL, partition_initialize, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100, /* 1.0 */ NULL, /...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
277,780,334,119,474,440,000,000,000,000,000,000,000
16
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
GF_Err gf_bs_reassign_buffer(GF_BitStream *bs, const u8 *buffer, u64 BufferSize) { if (!bs) return GF_BAD_PARAM; bs->total_bits_read = 0; if (bs->bsmode == GF_BITSTREAM_READ) { bs->original = (char*)buffer; bs->size = BufferSize; bs->position = 0; bs->current = 0; bs->nbBits = 8; bs->current = 0; bs->n...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
89,865,714,441,015,490,000,000,000,000,000,000,000
42
fixed #2165
save_and_apply_config_tree(void) { config_tree *ptree; #ifndef SAVECONFIG config_tree *punlinked; #endif /* * Keep all the configuration trees applied since startup in * a list that can be used to dump the configuration back to * a text file. */ ptree = emalloc(sizeof(*ptree)); memcpy(ptree, &cfgt, sizeof...
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
189,757,245,477,221,070,000,000,000,000,000,000,000
71
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
static inline unsigned long __read_cr3(void) { return PVOP_CALL0(unsigned long, mmu.read_cr3); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
214,188,416,986,490,800,000,000,000,000,000,000,000
4
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
skip_to_histexp (string, start, delims, flags) char *string; int start; char *delims; int flags; { int i, pass_next, backq, dquote, si, c, oldjmp; int histexp_comsub, histexp_backq, old_dquote; size_t slen; char *temp, open[3]; DECLARE_MBSTATE; slen = strlen (string + start) + start; ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
176,984,883,400,800,770,000,000,000,000,000,000,000
114
bash-4.4-rc2 release
static void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data) { int pad = ndisc_addr_option_pad(skb->dev->type); int data_len = skb->dev->addr_len; int space = ndisc_opt_addr_space(skb->dev); u8 *opt = skb_put(skb, space); opt[0] = type; opt[1] = space>>3; memset(opt + 2, 0, pad); opt += p...
0
[ "CWE-17" ]
linux
6fd99094de2b83d1d4c8457f2c83483b2828e75a
78,380,624,210,992,970,000,000,000,000,000,000,000
21
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be...
printable_func_name(ufunc_T *fp) { return fp->uf_name_exp != NULL ? fp->uf_name_exp : fp->uf_name; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
163,442,286,401,060,860,000,000,000,000,000,000,000
4
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
Item *Field_iterator_view::create_item(THD *thd) { return create_view_field(thd, view, &ptr->item, &ptr->name); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
326,756,666,828,832,540,000,000,000,000,000,000,000
4
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
box_same(PG_FUNCTION_ARGS) { BOX *box1 = PG_GETARG_BOX_P(0); BOX *box2 = PG_GETARG_BOX_P(1); PG_RETURN_BOOL(FPeq(box1->high.x, box2->high.x) && FPeq(box1->low.x, box2->low.x) && FPeq(box1->high.y, box2->high.y) && FPeq(box1->low.y, box2->low.y)); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
49,570,653,643,066,250,000,000,000,000,000,000,000
10
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...
is_alert_destination(struct ipmi_intf * intf, uint8_t channel, uint8_t alert) { struct lan_param * p; p = get_lan_param(intf, channel, IPMI_LANP_NUM_DEST); if (!p) return 0; if (!p->data) return 0; if (alert <= (p->data[0] & 0xf)) return 1; else return 0; }
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
65,592,113,968,187,515,000,000,000,000,000,000,000
15
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
XML_GetBase(XML_Parser parser) { return curBase; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
165,050,285,192,442,250,000,000,000,000,000,000,000
4
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
httpsCreate(const ConnStateData *connState, const Security::ContextPointer &ctx) { const auto conn = connState->clientConnection; if (Security::CreateServerSession(ctx, conn, connState->port->secure, "client https start")) { debugs(33, 5, "will negotiate TLS on " << conn); return true; } ...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
48,008,922,963,010,050,000,000,000,000,000,000,000
12
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
static inline int h2_recv_allowed(const struct h2c *h2c) { if (b_data(&h2c->dbuf) == 0 && (h2c->st0 >= H2_CS_ERROR || h2c->conn->flags & CO_FL_ERROR || conn_xprt_read0_pending(h2c->conn))) return 0; if (!(h2c->flags & H2_CF_DEM_DALLOC) && !(h2c->flags & H2_CF_DEM_BLOCK_ANY)) return 1; ret...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
86,689,108,366,346,750,000,000,000,000,000,000,000
14
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
static void ceph_x_validate_tickets(struct ceph_auth_client *ac, int *pneed) { int want = ac->want_keys; struct ceph_x_info *xi = ac->private; int service; *pneed = ac->want_keys & ~(xi->have_keys); for (service = 1; service <= want; service <<= 1) { struct ceph_x_ticket_handler *th; if (!(ac->want_keys & s...
0
[ "CWE-399", "CWE-119" ]
linux
c27a3e4d667fdcad3db7b104f75659478e0c68d8
112,104,672,791,914,680,000,000,000,000,000,000,000
30
libceph: do not hard code max auth ticket len We hard code cephx auth ticket buffer size to 256 bytes. This isn't enough for any moderate setups and, in case tickets themselves are not encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S...
void OSDService::clear_map_bl_cache_pins(epoch_t e) { Mutex::Locker l(map_cache_lock); map_bl_inc_cache.clear_pinned(e); map_bl_cache.clear_pinned(e); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
255,273,575,184,618,350,000,000,000,000,000,000,000
6
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 ...
Packet *StreamTcpPseudoSetup(Packet *parent, uint8_t *pkt, uint32_t len) { SCEnter(); if (len == 0) { SCReturnPtr(NULL, "Packet"); } Packet *p = PacketGetFromQueueOrAlloc(); if (p == NULL) { SCReturnPtr(NULL, "Packet"); } /* set the root ptr to the lowest layer */ if (...
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
284,107,500,423,775,880,000,000,000,000,000,000,000
41
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
static void nft_unregister_flowtable_net_hooks(struct net *net, struct list_head *hook_list) { struct nft_hook *hook; list_for_each_entry(hook, hook_list, list) nf_unregister_net_hook(net, &hook->ops); }
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
231,636,607,490,306,160,000,000,000,000,000,000,000
8
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
dissect_kafka_offset_for_leader_epoch_response_topic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { int topic_start, topic_len; proto_item *subti, *subsubti; proto_tree *subtree, *subsubtree; sub...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
1,205,084,003,830,758,400,000,000,000,000,000,000
23
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ { zval *id; xmlDoc *docp; dom_object *intern; char *source = NULL, *valid_file = NULL; int source_len = 0; xmlSchemaParserCtxtPtr parser; xmlSchemaPtr sptr; xmlSchemaValidCtxtPtr vptr; int ...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
219,266,726,837,239,080,000,000,000,000,000,000,000
77
Fix #69719 - more checks for nulls in paths
dwarf_formblock(Dwarf_Attribute attr, Dwarf_Block ** return_block, Dwarf_Error * error) { Dwarf_CU_Context cu_context = 0; Dwarf_Debug dbg = 0; Dwarf_Block local_block; Dwarf_Block *out_block = 0; int res = 0; memset(&local_block,0,sizeof(local_block)); res = get_attr_dbg(&dbg,&cu_cont...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
176,217,038,596,774,600,000,000,000,000,000,000,000
29
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
static void ipc_stream_message(struct snd_sof_dev *sdev, u32 msg_cmd) { /* get msg cmd type and msd id */ u32 msg_type = msg_cmd & SOF_CMD_TYPE_MASK; u32 msg_id = SOF_IPC_MESSAGE_ID(msg_cmd); switch (msg_type) { case SOF_IPC_STREAM_POSITION: ipc_period_elapsed(sdev, msg_id); break; case SOF_IPC_STREAM_TRIG_X...
0
[ "CWE-400", "CWE-401" ]
linux
45c1380358b12bf2d1db20a5874e9544f56b34ab
158,712,226,597,702,300,000,000,000,000,000,000,000
19
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data In the implementation of sof_set_get_large_ctrl_data() there is a memory leak in case an error. Release partdata if sof_get_ctrl_copy_params() fails. Fixes: 54d198d5019d ("ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly") Signed-off-by: Nav...
void outflush(const gs_memory_t *mem) { gs_lib_ctx_core_t *core = mem->gs_lib_ctx->core; if (core->stdout_is_redirected) { if (core->stdout_to_stderr) { if (!core->stderr_fn) fflush(core->fstderr); } else gp_fflush(core->fstdout2); } else i...
0
[ "CWE-20" ]
ghostpdl
a9bd3dec9fde03327a4a2c69dad1036bf9632e20
216,832,437,281,058,900,000,000,000,000,000,000,000
14
Bug 704342: Include device specifier strings in access validation for the "%pipe%", %handle%" and %printer% io devices. We previously validated only the part after the "%pipe%" Postscript device specifier, but this proved insufficient. This rebuilds the original file name string, and validates it complete. The sligh...
template<typename t> CImg<Tfloat> get_pow(const CImg<t>& img) const { return CImg<Tfloat>(*this,false).pow(img);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
205,477,203,305,074,600,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
R_API ut64 r_bin_java_get_method_code_size(RBinJavaField *fm_type) { RListIter *attr_iter = NULL, *attr_iter_tmp = NULL; RBinJavaAttrInfo *attr = NULL; ut64 sz = 0; r_list_foreach_safe (fm_type->attributes, attr_iter, attr_iter_tmp, attr) { if (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) { sz = attr->info.co...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
318,903,730,052,246,500,000,000,000,000,000,000,000
12
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static int copy_everything_to_user(struct ebt_table *t, void __user *user, const int *len, int cmd) { struct ebt_replace tmp; const struct ebt_counter *oldcounters; unsigned int entries_size, nentries; int ret; char *entries; if (cmd == EBT_SO_GET_ENTRIES) { entries_size = t->private->entries_size; nentr...
0
[ "CWE-20" ]
linux
d846f71195d57b0bbb143382647c2c6638b04c5a
140,888,799,685,620,840,000,000,000,000,000,000,000
51
bridge: netfilter: fix information leak Struct tmp is copied from userspace. It is not checked whether the "name" field is NULL terminated. This may lead to buffer overflow and passing contents of kernel stack as a module name to try_then_request_module() and, consequently, to modprobe commandline. It would be seen...
void set_key_image(const uchar *buff, uint length) { DBUG_ASSERT(0); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
152,516,370,986,392,430,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
*/ static inline void skb_orphan(struct sk_buff *skb) { if (skb->destructor) { skb->destructor(skb); skb->destructor = NULL; skb->sk = NULL; } else { BUG_ON(skb->sk); }
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
188,490,862,609,294,060,000,000,000,000,000,000,000
10
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 init_cpuset_if_needed(struct cgroup_mount_point *mp, const char *path) { /* the files we have to handle here are only in cpuset hierarchies */ if (!lxc_string_in_array("cpuset", (const char **)mp->hierarchy->subsystems)) return true; if (!mp->need_cpuset_init) return true; return (do_in...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
258,205,169,949,080,100,000,000,000,000,000,000,000
14
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void test_simple_delete() { MYSQL_STMT *stmt; int rc; char szData[30]= {0}; int nData= 1; MYSQL_RES *result; MYSQL_BIND my_bind[2]; ulong length[2]; char query[MAX_TEST_QUERY_LENGTH]; myheader("test_simple_delete"); rc= mysql_autocommit(mysql, TRUE); myquery(rc); r...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
318,085,105,231,404,870,000,000,000,000,000,000,000
79
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
cib_ipc_closed(qb_ipcs_connection_t *c) { cib_client_t *cib_client = qb_ipcs_context_get(c); crm_trace("Connection %p closed", c); CRM_ASSERT(cib_client != NULL); CRM_ASSERT(cib_client->id != NULL); if (!g_hash_table_remove(client_list, cib_client->id)) { crm_err("Client %s not found in t...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
163,997,538,381,040,750,000,000,000,000,000,000,000
14
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static ssize_t regulator_opmode_show(struct device *dev, struct device_attribute *attr, char *buf) { struct regulator_dev *rdev = dev_get_drvdata(dev); return regulator_print_opmode(buf, _regulator_get_mode(rdev)); }
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
208,889,016,112,727,140,000,000,000,000,000,000,000
7
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
void huge_pmd_set_accessed(struct vm_fault *vmf, pmd_t orig_pmd) { pmd_t entry; unsigned long haddr; bool write = vmf->flags & FAULT_FLAG_WRITE; vmf->ptl = pmd_lock(vmf->vma->vm_mm, vmf->pmd); if (unlikely(!pmd_same(*vmf->pmd, orig_pmd))) goto unlock; entry = pmd_mkyoung(orig_pmd); if (write) entry = pmd_m...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
55,367,891,405,810,430,000,000,000,000,000,000,000
20
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
int prepare_binprm(struct linux_binprm *bprm) { umode_t mode; struct inode * inode = bprm->file->f_path.dentry->d_inode; int retval; mode = inode->i_mode; if (bprm->file->f_op == NULL) return -EACCES; /* clear any previous set[ug]id data from a previous binary */ bprm->cred->euid = current_euid(); bprm->cre...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
203,576,155,179,512,320,000,000,000,000,000,000,000
43
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *policy) { /* Lower zones don't get a nodemask applied for MPOL_BIND */ if (unlikely(policy->mode == MPOL_BIND) && apply_policy_zone(policy, gfp_zone(gfp)) && cpuset_nodemask_valid_mems_allowed(&policy->v.nodes)) return &policy->v.nodes; return ...
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
219,457,239,344,713,480,000,000,000,000,000,000,000
10
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
_asn1_remove_node (asn1_node node, unsigned int flags) { if (node == NULL) return; if (node->value != NULL) { if (flags & ASN1_DELETE_FLAG_ZEROIZE) { safe_memset(node->value, 0, node->value_len); } if (node->value != node->small_value) free (node->value); ...
0
[ "CWE-119" ]
libtasn1
4d4f992826a4962790ecd0cce6fbba4a415ce149
63,054,949,792,131,980,000,000,000,000,000,000,000
17
increased size of LTOSTR_MAX_SIZE to account for sign and null byte This address an overflow found by Hanno Böck in DER decoding.
static int mov_write_uuid_tag_psp(AVIOContext *pb, MOVTrack *mov) { avio_wb32(pb, 0x34); /* size ... reports as 28 in mp4box! */ ffio_wfourcc(pb, "uuid"); ffio_wfourcc(pb, "USMT"); avio_wb32(pb, 0x21d24fce); avio_wb32(pb, 0xbb88695c); avio_wb32(pb, 0xfac9c740); avio_wb32(pb, 0x1c); // an...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
75,382,046,794,938,740,000,000,000,000,000,000,000
17
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
evbuffer_prepend_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf) { struct evbuffer_chain *pinned, *last; size_t in_total_len, out_total_len; int result = 0; EVBUFFER_LOCK2(inbuf, outbuf); in_total_len = inbuf->total_len; out_total_len = outbuf->total_len; if (!in_total_len || inbuf == outbuf) goto d...
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
230,064,338,056,002,860,000,000,000,000,000,000,000
44
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
void Http2Session::New(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); CHECK(args.IsConstructCall()); int val = args[0]->IntegerValue(env->context()).ToChecked(); nghttp2_session_type type = static_cast<nghttp2_session_type>(val); Http2Session* session = new Http2S...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
7,678,083,005,096,080,000,000,000,000,000,000,000
9
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
rpc_C_DestroyObject (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_OBJECT_HANDLE object; BEGIN_CALL (DestroyObject); IN_ULONG (session); IN_ULONG (object); PROCESS_CALL ((self, session, object)); END_CALL; }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
226,812,416,865,221,250,000,000,000,000,000,000,000
12
Check for arithmetic overflows before allocating