func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void xen_load_idt(const struct desc_ptr *desc)
{
static DEFINE_SPINLOCK(lock);
static struct trap_info traps[257];
trace_xen_cpu_load_idt(desc);
spin_lock(&lock);
memcpy(this_cpu_ptr(&idt_desc), desc, sizeof(idt_desc));
xen_convert_trap_info(desc, traps);
xen_mc_flush();
if (HYPERVISOR_set_trap_tabl... | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 166,742,304,886,514,160,000,000,000,000,000,000,000 | 19 | 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 ("... |
sendNotifications(int notif_type, const struct device * dev, const struct service * serv)
{
struct reqelem * req;
unsigned int m;
unsigned char rbuf[RESPONSE_BUFFER_SIZE];
unsigned char * rp;
for(req = reqlisthead.lh_first; req; req = req->entries.le_next) {
if(!req->is_notify) continue;
rbuf[0] = '\xff'; /* ... | 0 | [
"CWE-416"
] | miniupnp | cd506a67e174a45c6a202eff182a712955ed6d6f | 58,213,695,544,414,460,000,000,000,000,000,000,000 | 59 | updateDevice() remove element from the list when realloc fails |
static void curl_free_string(void **string)
{
efree((char *)*string);
} | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 82,942,890,975,364,880,000,000,000,000,000,000,000 | 4 | Fixed bug #68739 #68740 #68741 |
static int imap_compile_search (const pattern_t* pat, BUFFER* buf)
{
if (! do_search (pat, 0))
return 0;
if (pat->not)
mutt_buffer_addstr (buf, "NOT ");
if (pat->child)
{
int clauses;
if ((clauses = do_search (pat->child, 1)) > 0)
{
const pattern_t* clause = pat->child;
mutt_... | 0 | [
"CWE-78"
] | mutt | 185152818541f5cdc059cbff3f3e8b654fc27c1d | 124,000,235,671,289,370,000,000,000,000,000,000,000 | 82 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
co... |
static void free_pages_check_bad(struct page *page)
{
const char *bad_reason;
unsigned long bad_flags;
bad_reason = NULL;
bad_flags = 0;
if (unlikely(atomic_read(&page->_mapcount) != -1))
bad_reason = "nonzero mapcount";
if (unlikely(page->mapping != NULL))
bad_reason = "non-NULL mapping";
if (unlikely(pag... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 59,503,411,341,331,360,000,000,000,000,000,000,000 | 24 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
static int ssl_write_new_session_ticket( mbedtls_ssl_context *ssl )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t tlen;
uint32_t lifetime;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write new session ticket" ) );
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
ssl->out_msg[0] = MBEDTLS_SSL_HS_... | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 267,022,872,606,686,450,000,000,000,000,000,000,000 | 52 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
void cpu_single_step(CPUState *cpu, int enabled)
{
if (cpu->singlestep_enabled != enabled) {
cpu->singlestep_enabled = enabled;
if (kvm_enabled()) {
kvm_update_guest_debug(cpu, 0);
} else {
/* must flush all the translated code to avoid inconsistencies */
... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 68,124,419,550,512,215,000,000,000,000,000,000,000 | 13 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv,
struct cfg80211_ssid *req_ssid)
{
struct mwifiex_adapter *adapter = priv->adapter;
int ret;
struct mwifiex_user_scan_cfg *scan_cfg;
if (adapter->scan_processing) {
mwifiex_dbg(adapter, WARN,
"cmd: Scan already in process...\n");... | 0 | [
"CWE-269",
"CWE-787"
] | linux | b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d | 10,415,443,168,480,946,000,000,000,000,000,000,000 | 31 | mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking
the destination size may trigger a buffer overflower,
which a local user could use to cause denial of service
or the execution of arbitrary code.
Fix it by putting the length check befo... |
int luaRedisBreakpointCommand(lua_State *lua) {
if (ldb.active) {
ldb.luabp = 1;
lua_pushboolean(lua,1);
} else {
lua_pushboolean(lua,0);
}
return 1;
} | 0 | [
"CWE-703",
"CWE-125"
] | redis | 6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd | 112,622,827,739,713,930,000,000,000,000,000,000,000 | 9 | Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672)
The protocol parsing on 'ldbReplParseCommand' (LUA debugging)
Assumed protocol correctness. This means that if the following
is given:
*1
$100
test
The parser will try to read additional 94 unallocated bytes after
the client buffer.
This commit fixes this ... |
ofputil_decode_meter_mod(const struct ofp_header *oh,
struct ofputil_meter_mod *mm,
struct ofpbuf *bands)
{
struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length));
ofpraw_pull_assert(&b);
const struct ofp13_meter_mod *omm = ofpbuf_pull(&b, sizeof ... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 181,844,300,548,186,660,000,000,000,000,000,000,000 | 38 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static void vmx_sync_pir_to_irr(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (!pi_test_and_clear_on(&vmx->pi_desc))
return;
kvm_apic_update_irr(vcpu, vmx->pi_desc.pir);
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 116,518,255,766,430,780,000,000,000,000,000,000,000 | 9 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
struct ev_loop *ClientHandler::get_loop() const {
return conn_.loop;
} | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 149,851,969,315,372,550,000,000,000,000,000,000,000 | 3 | Don't read too greedily |
static int handle_uid_request(enum request_types request_type, uid_t uid,
const char *domain_name, struct berval **berval)
{
int ret;
struct passwd pwd;
struct passwd *pwd_result = NULL;
char *sid_str = NULL;
enum sss_id_type id_type;
size_t buf_len;
char *buf =... | 1 | [
"CWE-19"
] | freeipa | 50c8f0c80175c7812bb523ab2387b19a94245b59 | 109,119,356,644,814,800,000,000,000,000,000,000,000 | 67 | extdom: handle ERANGE return code for getXXYYY_r() calls
The getXXYYY_r() calls require a buffer to store the variable data of
the passwd and group structs. If the provided buffer is too small ERANGE
is returned and the caller can try with a larger buffer again.
Cmocka/cwrap based unit-tests for get*_r_wrapper() are ... |
int ext4_register_li_request(struct super_block *sb,
ext4_group_t first_not_zeroed)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_li_request *elr = NULL;
ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count;
int ret = 0;
mutex_lock(&ext4_li_mtx);
if (sbi->s_li_request != NULL) {
/*
* Reset tim... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 136,310,217,624,101,100,000,000,000,000,000,000,000 | 58 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
QPDFObjectHandle::getNumericValue()
{
double result = 0.0;
if (isInteger())
{
result = static_cast<double>(getIntValue());
}
else if (isReal())
{
result = atof(getRealValue().c_str());
}
else
{
throw std::logic_error("getNumericValue called for non-numeric object");
}
retu... | 0 | [
"CWE-835"
] | qpdf | afe0242b263a9e1a8d51dd81e42ab6de2e5127eb | 229,892,846,192,484,400,000,000,000,000,000,000,000 | 17 | Handle object ID 0 (fixes #99)
This is CVE-2017-9208.
The QPDF library uses object ID 0 internally as a sentinel to
represent a direct object, but prior to this fix, was not blocking
handling of 0 0 obj or 0 0 R as a special case. Creating an object in
the file with 0 0 obj could cause various infinite loops. The PDF... |
void CLASS parse_makernote (int base, int uptag)
{
unsigned offset=0, entries, tag, type, len, save, c;
unsigned ver97=0, serial=0, i, wbi=0, wb[4]={0,0,0,0};
uchar buf97[324], ci, cj, ck;
short morder, sorder=order;
char buf[10];
unsigned SamsungKey[11];
static const double rgb_adobe[3][3] = // inv(sRGB... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 120,673,670,715,741,660,000,000,000,000,000,000,000 | 1,217 | fixed two more problems found by fuzzer |
_gcry_dsa_modify_k (gcry_mpi_t k, gcry_mpi_t q, int qbits)
{
gcry_mpi_t k1 = mpi_new (qbits+2);
mpi_resize (k, (qbits+2+BITS_PER_MPI_LIMB-1) / BITS_PER_MPI_LIMB);
k->nlimbs = k->alloced;
mpi_add (k, k, q);
mpi_add (k1, k, q);
mpi_set_cond (k, k1, !mpi_test_bit (k, qbits));
mpi_free (k1);
} | 0 | [
"CWE-203"
] | libgcrypt | 7c2943309d14407b51c8166c4dcecb56a3628567 | 298,060,546,766,932,800,000,000,000,000,000,000,000 | 12 | dsa,ecdsa: Fix use of nonce, use larger one.
* cipher/dsa-common.c (_gcry_dsa_modify_k): New.
* cipher/pubkey-internal.h (_gcry_dsa_modify_k): New.
* cipher/dsa.c (sign): Use _gcry_dsa_modify_k.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise.
* cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise.
CVE-id: CVE-201... |
static void vrend_hw_emit_blend(struct vrend_sub_context *sub_ctx, struct pipe_blend_state *state)
{
if (state->logicop_enable != sub_ctx->hw_blend_state.logicop_enable) {
sub_ctx->hw_blend_state.logicop_enable = state->logicop_enable;
if (vrend_state.use_gles) {
if (can_emulate_logicop(state->l... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 275,982,779,668,466,820,000,000,000,000,000,000,000 | 100 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
void Huff_Init(huffman_t *huff) {
Com_Memset(&huff->compressor, 0, sizeof(huff_t));
Com_Memset(&huff->decompressor, 0, sizeof(huff_t));
// Initialize the tree & list with the NYT node
huff->decompressor.tree = huff->decompressor.lhead = huff->decompressor.ltail = huff->decompressor.loc[NYT] = &(huff->decompresso... | 0 | [
"CWE-119"
] | ioq3 | d2b1d124d4055c2fcbe5126863487c52fd58cca1 | 238,918,912,814,944,440,000,000,000,000,000,000,000 | 19 | Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read past
end of msg->data buffer (16348 bytes) the engine could SEGFAULT.
Make MSG_WriteBits use an exact buffer overflow check instead of
possibly failing with a few bytes left. |
tape_empty_output_buffer (int out_des)
{
int bytes_written;
#ifdef BROKEN_LONG_TAPE_DRIVER
static long output_bytes_before_lseek = 0;
/* Some tape drivers seem to have a signed internal seek pointer and
they lose if it overflows and becomes negative (e.g. when writing
tapes > 2Gb). Doing an lseek (d... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 197,958,053,892,543,960,000,000,000,000,000,000,000 | 47 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
control_pcsc_wrapped (int slot, pcsc_dword_t ioctl_code,
const unsigned char *cntlbuf, size_t len,
unsigned char *buffer, pcsc_dword_t *buflen)
{
long err = PCSC_E_NOT_TRANSACTED;
reader_table_t slotp;
unsigned char msgbuf[9];
int i, n;
size_t full_len;
slotp = r... | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 298,736,382,482,413,740,000,000,000,000,000,000,000 | 99 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static int cdrom_ioctl_closetray(struct cdrom_device_info *cdi)
{
cd_dbg(CD_DO_IOCTL, "entering CDROMCLOSETRAY\n");
if (!CDROM_CAN(CDC_CLOSE_TRAY))
return -ENOSYS;
return cdi->ops->tray_move(cdi, 0);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 339,637,315,936,965,000,000,000,000,000,000,000,000 | 8 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence)
{
struct nfs_open_dir_context *dir_ctx = filp->private_data;
dfprintk(FILE, "NFS: llseek dir(%pD2, %lld, %d)\n",
filp, offset, whence);
switch (whence) {
default:
return -EINVAL;
case SEEK_SET:
if (offset < 0)
return -EINVAL;
... | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 41,966,474,211,209,873,000,000,000,000,000,000,000 | 38 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
i915_gem_userptr_release__mmu_notifier(struct drm_i915_gem_object *obj)
{
} | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 184,537,401,920,558,040,000,000,000,000,000,000,000 | 3 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
void KrecipesView::pasteAsSubcategory()
{
QWidget * vis_panel = rightPanel->visiblePanel();
if ( vis_panel == categoriesPanel)
categoriesPanel->getActionsHandler()->pasteAsSub();
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 134,568,465,166,637,150,000,000,000,000,000,000,000 | 6 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
bool cleanup_is_expensive_cache_processor(void *arg)
{
is_expensive_cache= (int8)(-1);
return 0;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 167,242,420,689,538,240,000,000,000,000,000,000,000 | 5 | 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.... |
logger_get_mask_expanded (struct t_gui_buffer *buffer, const char *mask)
{
char *mask2, *mask3, *mask4, *mask5, *mask6, *mask7;
const char *dir_separator;
int length;
time_t seconds;
struct tm *date_tmp;
mask2 = NULL;
mask3 = NULL;
mask4 = NULL;
mask5 = NULL;
mask6 = NULL;
m... | 0 | [
"CWE-119",
"CWE-787"
] | weechat | f105c6f0b56fb5687b2d2aedf37cb1d1b434d556 | 122,293,827,647,504,800,000,000,000,000,000,000,000 | 92 | logger: call strftime before replacing buffer local variables |
int fxUint16Compare(const void* p, const void* q)
{
txU2 a = *((txU2*)p);
txU2 b = *((txU2*)q);
return (a < b) ? -1 : (a > b) ? 1 : 0;
} | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 81,709,177,911,464,970,000,000,000,000,000,000,000 | 6 | XS: #896 |
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
{
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 40);
/* Initialize most of wc. */
flow_wildcards_init_catchall(wc);
if (!(ofpfw & OFPFW10_IN_PORT)) {
wc->masks.in_port.ofp_port = u16_to_ofp(UINT16_MAX);
}
if (!(ofpfw & OFPFW1... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 221,561,176,975,979,100,000,000,000,000,000,000,000 | 48 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
jio_snprintf(char * str, int n, const char * format, ...)
{
va_list args;
int result;
Trc_SC_snprintf_Entry();
va_start(args, format);
#if defined(WIN32) && !defined(WIN32_IBMC)
result = _vsnprintf( str, n, format, args );
#else
result = vsprintf( str, format, args );
#endif
va_end(args);
Trc_SC_snprintf_Exi... | 1 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 334,074,899,355,913,080,000,000,000,000,000,000,000 | 20 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
void run() {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
intrusive_ptr<Expression> expression = ExpressionFieldPath::create(expCtx, "a.b");
assertBinaryEqual(fromjson("{}"),
toBson(expression->evaluate(fromBson(BSON("a" << BSONObj... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 153,288,729,589,357,700,000,000,000,000,000,000,000 | 6 | SERVER-38070 fix infinite loop in agg expression |
static bool gfar_new_page(struct gfar_priv_rx_q *rxq, struct gfar_rx_buff *rxb)
{
struct page *page;
dma_addr_t addr;
page = dev_alloc_page();
if (unlikely(!page))
return false;
addr = dma_map_page(rxq->dev, page, 0, PAGE_SIZE, DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(rxq->dev, addr))) {
__free_page... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 256,833,762,943,890,270,000,000,000,000,000,000,000 | 22 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
void HttpIntegrationTest::testRouterUpstreamDisconnectBeforeResponseComplete(
ConnectionCreationFunction* create_connection) {
initialize();
codec_client_ = makeHttpConnection(
create_connection ? ((*create_connection)()) : makeClientConnection((lookupPort("http"))));
auto response = codec_client_->make... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 184,395,690,829,779,960,000,000,000,000,000,000,000 | 25 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void irias_seq_stop(struct seq_file *seq, void *v)
{
spin_unlock_irq(&irias_objects->hb_spinlock);
} | 0 | [] | linux-2.6 | d370af0ef7951188daeb15bae75db7ba57c67846 | 23,605,587,590,266,813,000,000,000,000,000,000,000 | 4 | irda: validate peer name and attribute lengths
Length fields provided by a peer for names and attributes may be longer
than the destination array sizes. Validate lengths to prevent stack
buffer overflows.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <da... |
finish_exception(except_T *excp)
{
if (excp != caught_stack)
internal_error("finish_exception()");
caught_stack = caught_stack->caught;
if (caught_stack != NULL)
{
set_vim_var_string(VV_EXCEPTION, (char_u *)caught_stack->value, -1);
if (*caught_stack->throw_name != NUL)
{
if (caught_stack->thro... | 0 | [
"CWE-787"
] | vim | 96b9bf8f74af8abf1e30054f996708db7dc285be | 308,192,577,290,657,550,000,000,000,000,000,000,000 | 33 | patch 9.0.0577: buffer underflow with unexpected :finally
Problem: Buffer underflow with unexpected :finally.
Solution: Check CSF_TRY can be found. |
create_durable_v2_buf(struct cifs_open_parms *oparms)
{
struct cifs_fid *pfid = oparms->fid;
struct create_durable_v2 *buf;
buf = kzalloc(sizeof(struct create_durable_v2), GFP_KERNEL);
if (!buf)
return NULL;
buf->ccontext.DataOffset = cpu_to_le16(offsetof
(struct create_durable_v2, dcontext));
buf->ccont... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 217,999,906,829,091,800,000,000,000,000,000,000,000 | 35 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
get_options(int *argc,char ***argv)
{
int ho_error;
char *tmp_string;
MY_STAT sbuf; /* Stat information for the data file */
DBUG_ENTER("get_options");
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
if (debug_info_flag)
my_end_arg= MY_CHECK_ERROR | MY_... | 0 | [] | mysql-server | 044e3b1d07c0854c39178d3054ab0cd0a3188436 | 205,217,643,943,793,480,000,000,000,000,000,000,000 | 363 | Bug #20605441 : BUFFER OVERFLOW IN MYSQLSLAP
Description:- mysqlslap is a diagnostic utility designed to
emulate client load for a MySQL server and to report the
timing of each stage. This utility crashes when invalid
values are passed to the options 'num_int_cols_opt' or
'num_chars_cols_opt' or 'engine'.
Analysis:- ... |
TEST_F(QueryPlannerTest, CannotSnapshotWithGeoNear) {
// Snapshot is skipped with geonear queries.
addIndex(BSON("a"
<< "2d"));
runQuerySnapshot(fromjson("{a: {$near: [0,0]}}"));
ASSERT_EQUALS(getNumSolutions(), 1U);
assertSolutionExists("{geoNear2d: {a: '2d'}}");
} | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 174,758,414,770,418,900,000,000,000,000,000,000,000 | 9 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
Status SetElementToOne(int i, Tensor* t) {
switch (t->dtype()) {
case DT_INT32:
t->flat<int32>()(i) = 1;
return Status::OK();
case DT_INT64:
t->flat<int64>()(i) = 1L;
return Status::OK();
case DT_FLOAT:
t->flat<float>()(i) = 1.0f;
return Status::OK... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 90,707,411,912,024,060,000,000,000,000,000,000,000 | 24 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
render_icon_from_home (GdmUser *user,
int icon_size)
{
GdkPixbuf *retval;
char *path;
gboolean is_local;
gboolean is_autofs;
gboolean res;
char *filesystem_type;
is_local = FALSE;
/* special case: look at... | 1 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 99,492,356,848,916,130,000,000,000,000,000,000,000 | 129 | Store the face and dmrc files in a cache. Refer to bug #565151. |
static void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix) {
_cleanup_free_ char *cmd = NULL;
const char *prefix2;
assert(c);
assert(f);
prefix = strempty(prefix);
prefix2 = strjoina(prefix, "\t");
cmd = exec_command_line(c->argv);
fprin... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 45,941,554,473,427,370,000,000,000,000,000,000,000 | 17 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
static MagickBooleanType WritePCDImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
Image
*pcd_image;
MagickBooleanType
status;
register ssize_t
i;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(image != ... | 0 | [
"CWE-772"
] | ImageMagick | 12a43437fec6f9245327636dc2730863bb9fdd8b | 299,234,586,834,901,950,000,000,000,000,000,000,000 | 84 | https://github.com/ImageMagick/ImageMagick/issues/809 |
static int dsa_do_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa)
{
BN_CTX *ctx;
BIGNUM u1, u2, t1;
BN_MONT_CTX *mont = NULL;
int ret = -1, i;
if (!dsa->p || !dsa->q || !dsa->g) {
DSAerr(DSA_F_DSA_DO_VERIFY, DSA_R_MISSING_PARAMETERS);
... | 0 | [
"CWE-327",
"CWE-320"
] | openssl | 43e6a58d4991a451daf4891ff05a48735df871ac | 126,644,986,451,757,300,000,000,000,000,000,000,000 | 95 | Merge DSA reallocation timing fix CVE-2018-0734.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7513) |
static int dx_make_map(struct ext4_dir_entry_2 *de, unsigned blocksize,
struct dx_hash_info *hinfo,
struct dx_map_entry *map_tail)
{
int count = 0;
char *base = (char *) de;
struct dx_hash_info h = *hinfo;
while ((char *) de < base + blocksize) {
if (de->name_len && de->inode) {
ext4fs_dirha... | 0 | [
"CWE-20"
] | linux | c9b92530a723ac5ef8e352885a1862b18f31b2f5 | 127,601,831,575,175,520,000,000,000,000,000,000,000 | 23 | ext4: make orphan functions be no-op in no-journal mode
Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.
Signe... |
vncProperties::SaveDSMPluginName(HKEY key, char *buffer)
{
RegSetValueEx(key, "DSMPlugin", 0, REG_BINARY, (LPBYTE) buffer, MAXPATH);
}
| 0 | [
"CWE-787"
] | UltraVNC | 36a31b37b98f70c1db0428f5ad83170d604fb352 | 172,913,627,850,323,500,000,000,000,000,000,000,000 | 4 | security fix |
int ha_maria::index_init(uint idx, bool sorted)
{
active_index=idx;
if (pushed_idx_cond_keyno == idx)
ma_set_index_cond_func(file, handler_index_cond_check, this);
return 0;
} | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 200,659,836,535,115,430,000,000,000,000,000,000,000 | 7 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
BOOL region16_intersects_rect(const REGION16* src, const RECTANGLE_16* arg2)
{
const RECTANGLE_16* rect, *endPtr, *srcExtents;
UINT32 nbRects;
if (!src || !src->data || !arg2)
return FALSE;
rect = region16_rects(src, &nbRects);
if (!nbRects)
return FALSE;
srcExtents = region16_extents(src);
if (nbRects ... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 217,979,309,927,362,560,000,000,000,000,000,000,000 | 29 | Fixed #5645: realloc return handling |
FLAC__bool frame_sync_(FLAC__StreamDecoder *decoder)
{
FLAC__uint32 x;
FLAC__bool first = true;
/* If we know the total number of samples in the stream, stop if we've read that many. */
/* This will stop us, for example, from wasting time trying to sync on an ID3V1 tag. */
if(FLAC__stream_decoder_get_total_sample... | 0 | [
"CWE-119"
] | flac | 5b3033a2b355068c11fe637e14ac742d273f076e | 12,771,559,995,252,900,000,000,000,000,000,000,000 | 54 | src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.
Reported-by: Michele Spagnuolo,
Google Security Team <mikispag@google.com> |
void BinaryProtocolReader::readMessageEnd() {} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 223,694,926,715,077,950,000,000,000,000,000,000,000 | 1 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
CImg<Tuchar> get_RGBtoYCbCr() const {
return CImg<Tuchar>(*this,false).RGBtoYCbCr();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 77,815,848,527,691,050,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 int rtp_packetize_mp4a( sout_stream_id_sys_t *id, block_t *in )
{
int i_max = rtp_mtu (id) - 4; /* payload max in one packet */
int i_count = ( in->i_buffer + i_max - 1 ) / i_max;
uint8_t *p_data = in->p_buffer;
int i_data = in->i_buffer;
int i;
for( i = 0; i < i_coun... | 0 | [
"CWE-119",
"CWE-787"
] | vlc | 204291467724867b79735c0ee3aeb0dbc2200f97 | 77,039,221,804,274,670,000,000,000,000,000,000,000 | 38 | stream_out: rtp: don't use VLA for user controlled data
It should fix a possible invalid memory access
When streaming ogg-files via rtp, an ogg-file can trigger an invalid
write access using an overly long 'configuration' string.
The original code attemps to allocate space to hold the string on the stack
and hence, ... |
void ndpi_md5(const u_char *data, size_t data_len, u_char hash[16]) {
ndpi_MD5_CTX ctx;
ndpi_MD5Init(&ctx);
ndpi_MD5Update(&ctx, data, data_len);
ndpi_MD5Final(hash, &ctx);
} | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 47,865,912,480,809,140,000,000,000,000,000,000,000 | 7 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
u32 gf_hinter_track_get_flags(GF_RTPHinter *tkHinter)
{
return tkHinter->rtp_p->flags;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 318,146,888,536,972,600,000,000,000,000,000,000,000 | 4 | fixed #1706 |
unsigned int scalar4(const mp_func op,
const unsigned int arg1, const unsigned int arg2, const unsigned int arg3,
const unsigned int arg4) {
const unsigned int pos =
arg1>_cimg_mp_slot_c && _cimg_mp_is_comp(arg1)?arg1:
arg2>_cimg_m... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 55,104,171,098,791,370,000,000,000,000,000,000,000 | 11 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void __split_huge_zero_page_pmd(struct vm_area_struct *vma,
unsigned long haddr, pmd_t *pmd)
{
struct mm_struct *mm = vma->vm_mm;
pgtable_t pgtable;
pmd_t _pmd;
int i;
/*
* Leave pmd empty until pte is filled note that it is fine to delay
* notification until mmu_notifier_invalidate_range_end() as we... | 0 | [
"CWE-459"
] | linux | eb66ae030829605d61fbef1909ce310e29f78821 | 167,667,627,358,408,610,000,000,000,000,000,000,000 | 33 | mremap: properly flush TLB before releasing the page
Jann Horn points out that our TLB flushing was subtly wrong for the
mremap() case. What makes mremap() special is that we don't follow the
usual "add page to list of pages to be freed, then flush tlb, and then
free pages". No, mremap() obviously just _moves_ the p... |
static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri,
unsigned char *key, int keylen)
{
EVP_PKEY_CTX *pctx = NULL;
EVP_PKEY *pkey = NULL;
unsigned char *ek = NULL;
int ret = 0;
size_t eklen;
pkey = X509_get0_pubkey(ri->cert);
if (!pkey)
return 0;
pc... | 0 | [
"CWE-311",
"CWE-327"
] | openssl | 08229ad838c50f644d7e928e2eef147b4308ad64 | 219,148,279,744,803,560,000,000,000,000,000,000,000 | 51 | Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the mess... |
int smb_vfs_call_rename(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname_src,
const struct smb_filename *smb_fname_dst)
{
VFS_FIND(rename);
return handle->fns->rename(handle, smb_fname_src, smb_fname_dst);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 211,376,353,859,731,900,000,000,000,000,000,000,000 | 7 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
evdev_device_calibrate(struct evdev_device *device,
const float calibration[6])
{
struct matrix scale,
translate,
transform;
double sx, sy;
matrix_from_farray6(&transform, calibration);
device->abs.apply_calibration = !matrix_is_identity(&transform);
/* back up the user matrix so we can ... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 234,633,202,507,634,300,000,000,000,000,000,000,000 | 62 | 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 int nft_value_init(const struct nft_ctx *ctx,
struct nft_data *data, unsigned int size,
struct nft_data_desc *desc, const struct nlattr *nla)
{
unsigned int len;
len = nla_len(nla);
if (len == 0)
return -EINVAL;
if (len > size)
return -EOVERFLOW;
nla_memcpy(data->data, nla, len);
desc->type... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 232,012,821,023,043,870,000,000,000,000,000,000,000 | 17 | 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: ... |
cpio_create_dir (struct cpio_file_stat *file_hdr, int existing_dir)
{
int res; /* Result of various function calls. */
int setstat_delayed = 0;
if (to_stdout_option)
return 0;
/* Strip any trailing `/'s off the filename; tar puts
them on. We might as well do it here in case anybody
else ... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 118,686,966,401,153,610,000,000,000,000,000,000,000 | 60 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
pkinit_init_kdc_profile(krb5_context context, pkinit_kdc_context plgctx)
{
krb5_error_code retval;
char *eku_string = NULL;
pkiDebug("%s: entered for realm %s\n", __FUNCTION__, plgctx->realmname);
retval = pkinit_kdcdefault_string(context, plgctx->realmname,
KRB5_C... | 0 | [
"CWE-284",
"CWE-264"
] | krb5 | e3b5a5e5267818c97750b266df50b6a3d4649604 | 257,542,681,547,073,730,000,000,000,000,000,000,000 | 86 | Prevent requires_preauth bypass [CVE-2015-2694]
In the OTP kdcpreauth module, don't set the TKT_FLG_PRE_AUTH bit until
the request is successfully verified. In the PKINIT kdcpreauth
module, don't respond with code 0 on empty input or an unconfigured
realm. Together these bugs could cause the KDC preauth framework to... |
static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
ext4_fsblk_t blk)
{
struct buffer_head *bh;
int err;
bh = sb_getblk(sb, blk);
if (!bh)
return ERR_PTR(-EIO);
if ((err = ext4_journal_get_write_access(handle, bh))) {
brelse(bh);
bh = ERR_PTR(err);
} else {
lock_buffer(bh);
... | 0 | [
"CWE-20"
] | linux-2.6 | fdff73f094e7220602cc3f8959c7230517976412 | 203,880,727,479,701,820,000,000,000,000,000,000,000 | 21 | ext4: Initialize the new group descriptor when resizing the filesystem
Make sure all of the fields of the group descriptor are properly
initialized. Previously, we allowed bg_flags field to be contain
random garbage, which could trigger non-deterministic behavior,
including a kernel OOPS.
http://bugzilla.kernel.org/... |
static void Ins_SCANTYPE( INS_ARG )
{
/* For compatibility with future enhancements, */
/* we must ignore new modes */
if ( args[0] >= 0 && args[0] <= 5 )
{
if ( args[0] == 3 )
args[0] = 2;
CUR.GS.scan_type = (Int)args[0];
}
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 34,437,711,157,417,916,000,000,000,000,000,000,000 | 13 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static ssize_t clear_refs_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task;
char buffer[PROC_NUMBUF];
struct mm_struct *mm;
struct vm_area_struct *vma;
enum clear_refs_types type;
int itype;
int rv;
memset(buffer, 0, sizeof(buffer));
if (count > sizeo... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 155,944,978,435,035,920,000,000,000,000,000,000,000 | 84 | 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 int ql3xxx_open(struct net_device *ndev)
{
struct ql3_adapter *qdev = netdev_priv(ndev);
return ql_adapter_up(qdev); | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 4,372,006,157,890,027,600,000,000,000,000,000,000 | 5 | 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... |
inline void writeS8( S8 s) { writeU8((U8)s); } | 0 | [
"CWE-20",
"CWE-787"
] | tigervnc | 0943c006c7d900dfc0281639e992791d6c567438 | 179,540,084,614,858,900,000,000,000,000,000,000,000 | 1 | Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects. |
static inline void range_start_decoding(APEContext *ctx)
{
ctx->rc.buffer = bytestream_get_byte(&ctx->ptr);
ctx->rc.low = ctx->rc.buffer >> (8 - EXTRA_BITS);
ctx->rc.range = (uint32_t) 1 << EXTRA_BITS;
} | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 278,404,590,904,153,300,000,000,000,000,000,000,000 | 6 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
sub_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
&opline->op2.u.constant TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 177,457,976,564,698,750,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void CWebServer::Cmd_SetPlanDeviceCoords(WebEmSession & session, const request& req, Json::Value &root)
{
std::string idx = request::findValue(&req, "idx");
std::string planidx = request::findValue(&req, "planidx");
std::string xoffset = request::findValue(&req, "xoffset");
std::string yoffset = request... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 259,713,787,102,821,570,000,000,000,000,000,000,000 | 16 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
static void untag_chunk(struct audit_chunk *chunk, struct node *p)
{
struct audit_chunk *new;
struct audit_tree *owner;
int size = chunk->count - 1;
int i, j;
mutex_lock(&chunk->watch.inode->inotify_mutex);
if (chunk->dead) {
mutex_unlock(&chunk->watch.inode->inotify_mutex);
return;
}
owner = p->owner;
... | 1 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 50,917,876,832,060,690,000,000,000,000,000,000,000 | 84 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
static inline void pipe_truncate(struct iov_iter *i)
{
struct pipe_inode_info *pipe = i->pipe;
unsigned int p_tail = pipe->tail;
unsigned int p_head = pipe->head;
unsigned int p_mask = pipe->ring_size - 1;
if (!pipe_empty(p_head, p_tail)) {
struct pipe_buffer *buf;
unsigned int i_head = i->head;
size_t off ... | 0 | [
"CWE-665",
"CWE-284"
] | linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 178,315,808,205,596,520,000,000,000,000,000,000,000 | 25 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... |
lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
{
LSEG s,
t;
int i;
bool res = true,
intersection = false;
t.p[0] = *a;
t.p[1] = *b;
s.p[0] = poly->p[(start == 0) ? (poly->npts - 1) : (start - 1)];
for (i = start; i < poly->npts && res; i++)
{
Point *interpt;
s.p[1] = poly->... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 236,436,041,632,024,320,000,000,000,000,000,000,000 | 63 | 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... |
grub_ext2_open (struct grub_file *file, const char *name)
{
struct grub_ext2_data *data;
struct grub_fshelp_node *fdiro = 0;
grub_err_t err;
grub_dl_ref (my_mod);
data = grub_ext2_mount (file->device->disk);
if (! data)
{
err = grub_errno;
goto fail;
}
err = grub_fshelp_find_file (n... | 0 | [
"CWE-119"
] | grub | ac8cac1dac50daaf1c390d701cca3b55e16ee768 | 134,981,053,136,534,680,000,000,000,000,000,000,000 | 47 | * grub-core/fs/ext2.c: Remove variable length arrays. |
on_user_session_died (GdmSession *session,
int signal_number,
GdmManager *manager)
{
g_debug ("GdmManager: session died with signal %s", strsignal (signal_number));
remove_user_session (manager, session);
} | 0 | [] | gdm | ff98b2817014684ae1acec78ff06f0f461a56a9f | 275,275,772,755,554,470,000,000,000,000,000,000,000 | 7 | manager: if falling back to X11 retry autologin
Right now, we get one shot to autologin. If it fails, we fall back to
the greeter. We should give it another go if the reason for the failure
was wayland fallback to X.
https://bugzilla.gnome.org/show_bug.cgi?id=780520 |
static int init_ssl_socket(pn_transport_t* transport, pni_ssl_t *ssl)
{
if (ssl->ssl) return 0;
if (!ssl->domain) return -1;
ssl->ssl = SSL_new(ssl->domain->ctx);
if (!ssl->ssl) {
pn_transport_logf(transport, "SSL socket setup failure." );
ssl_log_flush(transport);
return -1;
}
// store backpo... | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 289,019,899,946,296,000,000,000,000,000,000,000,000 | 52 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
long
x,
y;
MagickBooleanType
status;
MagickOffsetType
scene;
struct heif_context
*heif_context;
struct heif_encoder
*heif_encoder;
struct heif_image
*heif_image;
... | 1 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 103,389,841,718,399,800,000,000,000,000,000,000,000 | 188 | Fix ultra rare but potential memory-leak |
static int canonicalize_directory_path(
git_index *index,
git_index_entry *entry,
git_index_entry *existing)
{
const git_index_entry *match, *best = NULL;
char *search, *sep;
size_t pos, search_len, best_len;
if (!index->ignore_case)
return 0;
/* item already exists in the index, simply re-use the existing ... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 8,164,303,627,955,469,000,000,000,000,000,000,000 | 69 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
xfs_fs_dirty_inode(
struct inode *inode,
int flag)
{
struct xfs_inode *ip = XFS_I(inode);
struct xfs_mount *mp = ip->i_mount;
struct xfs_trans *tp;
if (!(inode->i_sb->s_flags & SB_LAZYTIME))
return;
if (flag != I_DIRTY_SYNC || !(inode->i_state & I_DIRTY_TIME))
return;
if (xfs_trans_alloc(mp, &M_RE... | 0 | [
"CWE-416"
] | linux | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 | 309,095,686,293,611,200,000,000,000,000,000,000,000 | 20 | xfs: clear sb->s_fs_info on mount failure
We recently had an oops reported on a 4.14 kernel in
xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage
and so the m_perag_tree lookup walked into lala land.
Essentially, the machine was under memory pressure when the mount
was being run, xfs_fs_fill_super() fa... |
bool Item_sum::check_sum_func(THD *thd, Item **ref)
{
SELECT_LEX *curr_sel= thd->lex->current_select;
nesting_map allow_sum_func= (thd->lex->allow_sum_func &
curr_sel->name_visibility_map);
bool invalid= FALSE;
DBUG_ASSERT(curr_sel->name_visibility_map); // should be set already
... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 30,037,494,598,888,696,000,000,000,000,000,000,000 | 165 | 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... |
static void clean_supplementary_groups(gid_t gid) {
assert(cfg.username);
gid_t groups[MAX_GROUPS];
int ngroups = MAX_GROUPS;
if (arg_nogroups && check_can_drop_all_groups()) {
if (setgroups(0, NULL) < 0)
errExit("setgroups");
if (arg_debug)
printf("No supplementary groups\n");
return;
}
int rv = ge... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 16,094,948,264,043,945,000,000,000,000,000,000,000 | 90 | fixing CVE-2022-31214 |
blk_status_t blk_insert_cloned_request(struct request_queue *q, struct request *rq)
{
if (blk_cloned_rq_check_limits(q, rq))
return BLK_STS_IOERR;
if (rq->rq_disk &&
should_fail_request(&rq->rq_disk->part0, blk_rq_bytes(rq)))
return BLK_STS_IOERR;
if (blk_queue_io_stat(q))
blk_account_io_start(rq, true)... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 120,509,556,687,280,860,000,000,000,000,000,000,000 | 19 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
yEncBegin(message *m)
{
return m->yenc;
} | 0 | [
"CWE-125"
] | clamav-devel | 586a5180287262070637c8943f2f7efd652e4a2c | 81,532,238,932,423,550,000,000,000,000,000,000,000 | 4 | bb11797 - fix invalid read in fuzzed mail file. |
static int ext4_set_context(struct inode *inode, const void *ctx, size_t len,
void *fs_data)
{
handle_t *handle = fs_data;
int res, res2, credits, retries = 0;
/*
* Encrypting the root directory is not allowed because e2fsck expects
* lost+found to exist and be unencrypted, and encrypting the root
* di... | 0 | [] | linux | a45403b51582a87872927a3e0fc0a389c26867f1 | 171,715,913,038,590,500,000,000,000,000,000,000,000 | 83 | ext4: always initialize the crc32c checksum driver
The extended attribute code now uses the crc32c checksum for hashing
purposes, so we should just always always initialize it. We also want
to prevent NULL pointer dereferences if one of the metadata checksum
features is enabled after the file sytsem is originally mou... |
ppp_unregister_channel(struct ppp_channel *chan)
{
struct channel *pch = chan->ppp;
struct ppp_net *pn;
if (!pch)
return; /* should never happen */
chan->ppp = NULL;
/*
* This ensures that we have returned from any calls into the
* the channel's start_xmit or ioctl routine before we proceed.
*/
down_w... | 0 | [
"CWE-416"
] | linux | 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 | 181,885,697,102,114,130,000,000,000,000,000,000,000 | 33 | ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.
======... |
void HttpDownstreamConnection::detach_downstream(Downstream *downstream) {
if (LOG_ENABLED(INFO)) {
DCLOG(INFO, this) << "Detaching from DOWNSTREAM:" << downstream;
}
downstream_ = nullptr;
ev_set_cb(&conn_.rev, idle_readcb);
ioctrl_.force_resume_read();
auto &downstreamconf = *worker_->get_downstream... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 250,372,570,390,860,100,000,000,000,000,000,000,000 | 22 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
void ParallelSplitByInputData(OpKernelContext* context,
const InputReshapedType& input_reshaped,
const TensorShape& input_shape,
const std::vector<Tlen>& split_sizes_vec,
const int32_t split... | 0 | [
"CWE-703"
] | tensorflow | 25d622ffc432acc736b14ca3904177579e733cc6 | 87,706,716,104,018,250,000,000,000,000,000,000,000 | 49 | A negative size in one of the split sizes allowed the computed size of another
to exceed the total dimension, leading to a segfault and security vulnerability.
Adding a check for negative sizes prevents this.
PiperOrigin-RevId: 401035665
Change-Id: I79bbe329787dac82aa4bf60397a9129b716aedab |
static int vxlan_igmp_join(struct vxlan_dev *vxlan)
{
struct sock *sk;
union vxlan_addr *ip = &vxlan->default_dst.remote_ip;
int ifindex = vxlan->default_dst.remote_ifindex;
int ret = -EINVAL;
if (ip->sa.sa_family == AF_INET) {
struct vxlan_sock *sock4 = rtnl_dereference(vxlan->vn4_sock);
struct ip_mreqn mreq... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 305,765,569,239,312,850,000,000,000,000,000,000,000 | 32 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
dfafree (struct dfa *d)
{
size_t i;
struct dfamust *dm, *ndm;
free(d->charclasses);
free(d->tokens);
if (d->mb_cur_max > 1)
free_mbdata(d);
for (i = 0; i < d->sindex; ++i) {
free(d->states[i].elems.elems);
if (MBS_SUPPORT)
free(d->states[i].mbps.elems);
}
free(d->states);
for (i =... | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 173,564,072,238,247,900,000,000,000,000,000,000,000 | 36 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
static void disconnect_and_exit(int code)
{
if (conn != NULL)
PQfinish(conn);
#ifndef WIN32
/*
* On windows, our background thread dies along with the process.
* But on Unix, if we have started a subprocess, we want to kill
* it off so it doesn't remain running trying to stream data.
*/
if (bgchild> 0)
... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 292,139,017,994,544,200,000,000,000,000,000,000,000 | 17 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
int X509_add_certs(STACK_OF(X509) *sk, STACK_OF(X509) *certs, int flags)
/* compiler would allow 'const' for the list of certs, yet they are up-ref'ed */
{
int n = sk_X509_num(certs); /* certs may be NULL */
int i;
for (i = 0; i < n; i++) {
int j = (flags & X509_ADD_FLAG_PREPEND) == 0 ? i : n - 1 -... | 0 | [
"CWE-476"
] | openssl | 8130d654d1de922ea224fa18ee3bc7262edc39c0 | 229,166,078,857,884,000,000,000,000,000,000,000,000 | 15 | Fix Null pointer deref in X509_issuer_and_serial_hash()
The OpenSSL public API function X509_issuer_and_serial_hash() attempts
to create a unique hash value based on the issuer and serial number data
contained within an X509 certificate. However it fails to correctly
handle any errors that may occur while parsing the ... |
void traverse_commit_list(struct rev_info *revs,
show_commit_fn show_commit,
show_object_fn show_object,
void *data)
{
int i;
struct commit *commit;
struct strbuf base;
strbuf_init(&base, PATH_MAX);
while ((commit = get_revision(revs)) != NULL) {
/*
* an uninteresting boundary commit may not h... | 1 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 208,763,179,589,853,770,000,000,000,000,000,000,000 | 49 | 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 ... |
void inotify_evict_watch(struct inotify_watch *watch)
{
get_inotify_watch(watch);
mutex_lock(&watch->ih->mutex);
inotify_remove_watch_locked(watch->ih, watch);
mutex_unlock(&watch->ih->mutex);
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 297,782,909,170,877,170,000,000,000,000,000,000,000 | 7 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
int MAIN(int argc, char **argv)
{
int build_chain = 0;
SSL *con=NULL;
#ifndef OPENSSL_NO_KRB5
KSSL_CTX *kctx;
#endif
int s,k,width,state=0;
char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
int cbuf_len,cbuf_off;
int sbuf_len,sbuf_off;
fd_set readfds,writefds;
short port=PORT;
int full_log=1;
char *host=SSL_HOST_NAME;... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 46,638,837,190,669,780,000,000,000,000,000,000,000 | 1,597 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
krb5_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
gss_const_OID mech,
gss_OID_set *mech_attrs,
gss_OID_set *known_mech_attrs)
{
OM_uint32 major, tmpMinor;
if (mech_attrs == NULL) {
*minor_status = 0;
... | 0 | [
"CWE-703"
] | krb5 | 82dc33da50338ac84c7b4102dc6513d897d0506a | 285,656,625,960,282,800,000,000,000,000,000,000,000 | 50 | Fix gss_process_context_token() [CVE-2014-5352]
[MITKRB5-SA-2015-001] The krb5 gss_process_context_token() should not
actually delete the context; that leaves the caller with a dangling
pointer and no way to know that it is invalid. Instead, mark the
context as terminated, and check for terminated contexts in the GSS... |
static int tipc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct net *net = sock_net(sock->sk);
struct tipc_sioc_nodeid_req nr = {0};
struct tipc_sioc_ln_req lnr;
void __user *argp = (void __user *)arg;
switch (cmd) {
case SIOCGETLINKNAME:
if (copy_from_user(&lnr, argp, sizeof(lnr)))
... | 0 | [
"CWE-200",
"CWE-909"
] | linux | d6d86830705f173fca6087a3e67ceaf68db80523 | 51,360,791,013,631,550,000,000,000,000,000,000,000 | 31 | net ticp:fix a kernel-infoleak in __tipc_sendmsg()
struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently
copying it to user space,causing kernel-infoleak.
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in instrument_c... |
uint32_t ndp_msg_opt_rdnss_lifetime(struct ndp_msg *msg, int offset)
{
struct __nd_opt_rdnss *rdnss =
ndp_msg_payload_opts_offset(msg, offset);
return ntohl(rdnss->nd_opt_rdnss_lifetime);
} | 0 | [
"CWE-284"
] | libndp | a4892df306e0532487f1634ba6d4c6d4bb381c7f | 281,710,254,223,217,900,000,000,000,000,000,000,000 | 7 | libndp: validate the IPv6 hop limit
None of the NDP messages should ever come from a non-local network; as
stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA),
and 8.1. (redirect):
- The IP Hop Limit field has a value of 255, i.e., the packet
could not possibly have been forwarded by a router.
T... |
COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo,
compat_pid_t, tgid,
compat_pid_t, pid,
int, sig,
struct compat_siginfo __user *, uinfo)
{
kernel_siginfo_t info;
int ret = __copy_siginfo_from_user32(sig, &info, uinfo);
if (unlikely(ret))
return ret;
return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
} | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 129,110,984,812,650,200,000,000,000,000,000,000,000 | 12 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
inline long gcd(long a, long b) {
while (a) { const long c = a; a = b%a; b = c; }
return b;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 31,110,140,869,206,544,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void iucv_sock_link(struct iucv_sock_list *l, struct sock *sk)
{
write_lock_bh(&l->lock);
sk_add_node(sk, &l->head);
write_unlock_bh(&l->lock);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 276,325,679,730,462,200,000,000,000,000,000,000,000 | 6 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
int ha_maria::delete_row(const uchar * buf)
{
CHECK_UNTIL_WE_FULLY_IMPLEMENTED_VERSIONING("DELETE in WRITE CONCURRENT");
return maria_delete(file, buf);
} | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 330,989,904,209,262,440,000,000,000,000,000,000,000 | 5 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.