func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int sctp_inet6_supported_addrs(const struct sctp_sock *opt,
__be16 *types)
{
types[0] = SCTP_PARAM_IPV6_ADDRESS;
if (!opt || !ipv6_only_sock(sctp_opt2sk(opt))) {
types[1] = SCTP_PARAM_IPV4_ADDRESS;
return 2;
}
return 1;
} | 0 | [
"CWE-310"
] | net | 95ee62083cb6453e056562d91f597552021e6ae7 | 286,224,126,213,448,400,000,000,000,000,000,000,000 | 10 | net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
does not seem to have the desired effect:
SCTP + IPv4:
22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offse... |
struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
{
return container_of(ns, struct mnt_namespace, ns);
} | 0 | [
"CWE-703"
] | linux | cd4a40174b71acd021877341684d8bb1dc8ea4ae | 7,091,839,246,330,932,000,000,000,000,000,000,000 | 4 | mnt: Fail collect_mounts when applied to unmounted mounts
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_... |
static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi,
int trigger, int polarity)
{
int irq = gsi;
#ifdef CONFIG_X86_IO_APIC
int node;
struct irq_alloc_info info;
node = dev ? dev_to_node(dev) : NUMA_NO_NODE;
trigger = trigger == ACPI_EDGE_SENSITIVE ? 0 : 1;
polarity = polarity == ACPI_ACTIVE_H... | 0 | [
"CWE-120"
] | linux | dad5ab0db8deac535d03e3fe3d8f2892173fa6a4 | 57,839,921,046,051,430,000,000,000,000,000,000,000 | 24 | x86/acpi: Prevent out of bound access caused by broken ACPI tables
The bus_irq argument of mp_override_legacy_irq() is used as the index into
the isa_irq_to_gsi[] array. The bus_irq argument originates from
ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI
tables, but is nowhere sanity checked.
Th... |
bool tcp_alloc_md5sig_pool(void)
{
if (unlikely(!tcp_md5sig_pool_populated)) {
mutex_lock(&tcp_md5sig_mutex);
if (!tcp_md5sig_pool_populated)
__tcp_alloc_md5sig_pool();
mutex_unlock(&tcp_md5sig_mutex);
}
return tcp_md5sig_pool_populated;
} | 0 | [
"CWE-399",
"CWE-835"
] | linux | ccf7abb93af09ad0868ae9033d1ca8108bdaec82 | 81,215,710,765,209,870,000,000,000,000,000,000,000 | 12 | tcp: avoid infinite loop in tcp_splice_read()
Splicing from TCP socket is vulnerable when a packet with URG flag is
received and stored into receive queue.
__tcp_splice_read() returns 0, and sk_wait_data() immediately
returns since there is the problematic skb in queue.
This is a nice way to burn cpu (aka infinite l... |
static void sha256_update(SHA256_CTX *ctx, const char *s)
{
SHA256_Update(ctx, s, strlen(s));
} | 0 | [
"CWE-444"
] | mod_h2 | b8a8c5061eada0ce3339b24ba1d587134552bc0c | 158,593,772,460,851,900,000,000,000,000,000,000,000 | 4 | * Removing support for abandoned draft of http-wg regarding cache-digests. |
gql_intro_init(agooErr err) {
if (AGOO_ERR_OK != create_type_kind_type(err) ||
AGOO_ERR_OK != create_input_type(err) ||
AGOO_ERR_OK != create_type_type(err) ||
AGOO_ERR_OK != create_enum_type(err) ||
AGOO_ERR_OK != create_field_type(err) ||
AGOO_ERR_OK != create_directive_location_type(err) ||
AGOO_ERR_OK != ... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 187,729,021,836,516,360,000,000,000,000,000,000,000 | 17 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
static int decode_attr_space_free(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{
__be32 *p;
int status = 0;
*res = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_SPACE_FREE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_SPACE_FREE)) {
READ_BUF(8);
READ64(*res);
bitmap[1] &= ~FATTR4_WORD1_... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 335,389,014,805,069,670,000,000,000,000,000,000,000 | 16 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
link_free_heap_page(mrb_gc *gc, mrb_heap_page *page)
{
page->free_next = gc->free_heaps;
if (gc->free_heaps) {
gc->free_heaps->free_prev = page;
}
gc->free_heaps = page;
} | 0 | [
"CWE-415"
] | mruby | 97319697c8f9f6ff27b32589947e1918e3015503 | 324,391,796,705,517,300,000,000,000,000,000,000,000 | 8 | Cancel 9cdf439
Should not free the pointer in `realloc` since it can cause
use-after-free problem. |
gst_h264_pps_copy (GstH264PPS * dst_pps, const GstH264PPS * src_pps)
{
g_return_val_if_fail (dst_pps != NULL, FALSE);
g_return_val_if_fail (src_pps != NULL, FALSE);
gst_h264_pps_clear (dst_pps);
*dst_pps = *src_pps;
if (src_pps->slice_group_id)
dst_pps->slice_group_id = g_memdup (src_pps->slice_group_i... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 322,540,304,076,603,830,000,000,000,000,000,000,000 | 15 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
void kvm_arch_hardware_unsetup(void)
{
gmap_unregister_pte_notifier(&gmap_notifier);
gmap_unregister_pte_notifier(&vsie_gmap_notifier);
atomic_notifier_chain_unregister(&s390_epoch_delta_notifier,
&kvm_clock_notifier);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 118,410,648,668,929,950,000,000,000,000,000,000,000 | 7 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_in *addr = (struct sockaddr_in *) uaddr;
int ret = -EINVAL;
int chk_addr_ret;
if (sk->sk_state != TCP_CLOSE || addr_len < sizeof(struct sockaddr_in))
goto out;
chk_addr_ret = inet_... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 112,096,946,223,588,230,000,000,000,000,000,000,000 | 21 | 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... |
re_add_entry(struct iso9660 *iso9660, struct file_info *file)
{
file->re_next = NULL;
*iso9660->re_files.last = file;
iso9660->re_files.last = &(file->re_next);
} | 0 | [
"CWE-125"
] | libarchive | f9569c086ff29259c73790db9cbf39fe8fb9d862 | 196,801,705,403,383,680,000,000,000,000,000,000,000 | 6 | iso9660: validate directory record length |
static bool io_cancel_task_cb(struct io_wq_work *work, void *data)
{
struct io_kiocb *req = container_of(work, struct io_kiocb, work);
struct task_struct *task = data;
return req->task == task;
} | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 337,288,864,869,881,900,000,000,000,000,000,000,000 | 7 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
int ath_tx_init(struct ath_softc *sc, int nbufs)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
int error = 0;
spin_lock_init(&sc->tx.txbuflock);
error = ath_descdma_setup(sc, &sc->tx.txdma, &sc->tx.txbuf,
"tx", nbufs, 1, 1);
if (error != 0) {
ath_err(common,
"Failed to allocate tx descript... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 238,912,549,486,758,540,000,000,000,000,000,000,000 | 30 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
lexer_token_is_async (parser_context_t *context_p) /**< context */
{
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
|| context_p->token.type == LEXER_TEMPLATE_LITERAL);
return (context_p->token.keyword_type == LEXER_KEYW_ASYNC
&& !(context_p->token.lit_location.status_flags & LEXER_... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 20,998,422,364,687,446,000,000,000,000,000,000,000 | 8 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
TEE_Result syscall_authenc_init(unsigned long state, const void *nonce,
size_t nonce_len, size_t tag_len,
size_t aad_len, size_t payload_len)
{
TEE_Result res;
struct tee_cryp_state *cs;
struct tee_ta_session *sess;
struct tee_obj *o;
struct tee_cryp_obj_secret *key;
res = tee_ta_get_current_session(&sess)... | 1 | [
"CWE-327"
] | optee_os | 34a08bec755670ea0490cb53bbc68058cafc69b6 | 260,620,195,624,801,780,000,000,000,000,000,000,000 | 42 | cryp: prevent direct calls to update and final functions
With inconsistent or malformed data it has been possible to call
"update" and "final" crypto functions directly. Using a fuzzer tool [1]
we have seen that this results in asserts, i.e., a crash that
potentially could leak sensitive information.
By setting the s... |
bind_int_variable (lhs, rhs)
char *lhs, *rhs;
{
register SHELL_VAR *v;
int isint, isarr;
isint = isarr = 0;
#if defined (ARRAY_VARS)
if (valid_array_reference (lhs))
{
isarr = 1;
v = array_variable_part (lhs, (char **)0, (int *)0);
}
else
#endif
v = find_variable (lhs);
if (v)... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 274,452,326,357,087,760,000,000,000,000,000,000,000 | 35 | commit bash-20120224 snapshot |
nfs_opendir(struct inode *inode, struct file *filp)
{
int res;
dfprintk(VFS, "NFS: opendir(%s/%ld)\n",
inode->i_sb->s_id, inode->i_ino);
lock_kernel();
/* Call generic open code in order to cache credentials */
res = nfs_open(inode, filp);
unlock_kernel();
return res;
} | 0 | [
"CWE-20"
] | linux-2.6 | 54af3bb543c071769141387a42deaaab5074da55 | 230,621,074,010,847,580,000,000,000,000,000,000,000 | 13 | NFS: Fix an Oops in encode_lookup()
It doesn't look as if the NFS file name limit is being initialised correctly
in the struct nfs_server. Make sure that we limit whatever is being set in
nfs_probe_fsinfo() and nfs_init_server().
Also ensure that readdirplus and nfs4_path_walk respect our file name
limits.
Signed-of... |
static inline unsigned dx_node_limit(struct inode *dir)
{
unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0);
return entry_space / sizeof(struct dx_entry);
} | 0 | [
"CWE-20"
] | linux-2.6 | e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f | 165,459,507,282,607,750,000,000,000,000,000,000,000 | 5 | ext4: Add sanity check to make_indexed_dir
Make sure the rec_len field in the '..' entry is sane, lest we overrun
the directory block and cause a kernel oops on a purposefully
corrupted filesystem.
Thanks to Sami Liedes for reporting this bug.
http://bugzilla.kernel.org/show_bug.cgi?id=12430
Signed-off-by: "Theodor... |
void hnti_del(GF_Box *a)
{
gf_free(a);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 56,043,242,042,354,940,000,000,000,000,000,000,000 | 4 | prevent dref memleak on invalid input (#1183) |
void Huff_Decompress(msg_t *mbuf, int offset) {
int ch, cch, i, j, size;
byte seq[65536];
byte* buffer;
huff_t huff;
size = mbuf->cursize - offset;
buffer = mbuf->data + offset;
if ( size <= 0 ) {
return;
}
Com_Memset(&huff, 0, sizeof(huff_t));
// Initialize the tree & list with the NYT node
huff.... | 0 | [
"CWE-119"
] | ioq3 | d2b1d124d4055c2fcbe5126863487c52fd58cca1 | 214,021,153,861,216,530,000,000,000,000,000,000,000 | 51 | 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. |
static int are_comps_same_dimensions(opj_image_t * image)
{
unsigned int i;
for (i = 1; i < image->numcomps; i++) {
if (image->comps[0].dx != image->comps[i].dx ||
image->comps[0].dy != image->comps[i].dy) {
return OPJ_FALSE;
}
}
return OPJ_TRUE;
} | 0 | [
"CWE-119",
"CWE-787"
] | openjpeg | 2e5ab1d9987831c981ff05862e8ccf1381ed58ea | 153,109,963,138,815,230,000,000,000,000,000,000,000 | 11 | color_apply_icc_profile: avoid potential heap buffer overflow
Derived from a patch by Thuan Pham |
static void bnx2x_pbf_pN_buf_flushed(struct bnx2x *bp,
struct pbf_pN_buf_regs *regs,
u32 poll_count)
{
u32 init_crd, crd, crd_start, crd_freed, crd_freed_start;
u32 cur_cnt = poll_count;
crd_freed = crd_freed_start = REG_RD(bp, regs->crd_freed);
crd = crd_start = REG_RD(bp, regs->crd);
init_crd ... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 22,448,467,630,211,535,000,000,000,000,000,000,000 | 34 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static void xen_machine_power_off(void)
{
if (pm_power_off)
pm_power_off();
xen_reboot(SHUTDOWN_poweroff);
} | 0 | [] | linux | 8b87d8cec1b31ea710568ae49ba5f5146318da0d | 66,659,714,460,763,480,000,000,000,000,000,000,000 | 6 | x86/entry,xen: Early rewrite of restore_regs_and_return_to_kernel()
By doing an early rewrite of 'jmp native_iret` in
restore_regs_and_return_to_kernel() we can get rid of the last
INTERRUPT_RETURN user and paravirt_iret.
Suggested-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Peter Zijlstra (Intel) <p... |
static int io_run_task_work_sig(void)
{
if (io_run_task_work())
return 1;
if (!signal_pending(current))
return 0;
if (test_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL))
return -ERESTARTSYS;
return -EINTR; | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 151,631,078,351,224,900,000,000,000,000,000,000,000 | 10 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
int Lua::handle_script_request(struct mg_connection *conn,
const struct mg_request_info *request_info,
char *script_path) {
char buf[64], key[64], ifname[MAX_INTERFACE_NAME_LEN];
char *_cookies, user[64] = { '\0' }, outbuf[FILENAME_MAX];
AddressTree ptree;
int rc;
if(!L) return(-1);
lu... | 1 | [
"CWE-284",
"CWE-352"
] | ntopng | f91fbe3d94c8346884271838ae3406ae633f6f15 | 149,977,628,082,213,140,000,000,000,000,000,000,000 | 194 | Check for presence of crsf in admin scripts |
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
mod_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
&opline->op2.u.constant TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 82,199,326,275,101,580,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 |
static inline void __user *get_sigframe(struct k_sigaction *ka,
size_t frame_size)
{
unsigned long sp;
/* Default to using normal stack */
sp = __frame->sp;
/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
if (! sas_ss_flags(sp))
sp = current->sas_ss_sp +... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 131,367,068,229,462,200,000,000,000,000,000,000,000 | 17 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
symbol_make_alias (symbol *sym, symbol *str, location loc)
{
if (sym->content->class != token_sym)
complain (&loc, complaint,
_("nonterminals cannot be given a string alias"));
else if (str->alias)
complain (&loc, Wother,
_("symbol %s used more than once as a literal string"), st... | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 226,551,102,429,039,070,000,000,000,000,000,000,000 | 22 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
static const struct rtnl_af_ops *rtnl_af_lookup(const int family)
{
const struct rtnl_af_ops *ops;
list_for_each_entry(ops, &rtnl_af_ops, list) {
if (ops->family == family)
return ops;
}
return NULL;
} | 0 | [
"CWE-399"
] | linux-2.6 | 84d73cd3fb142bf1298a8c13fd4ca50fd2432372 | 210,357,099,257,580,670,000,000,000,000,000,000,000 | 11 | rtnl: fix info leak on RTM_GETLINK request for VF devices
Initialize the mac address buffer with 0 as the driver specific function
will probably not fill the whole buffer. In fact, all in-kernel drivers
fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible
bytes. Therefore we currently leak 26 bytes ... |
hybiDecodeCleanupForContinuation(ws_ctx_t *wsctx)
{
hybiDecodeCleanupBasics(wsctx);
ws_dbg("clean up frame, but expect continuation with opcode %d\n", wsctx->continuation_opcode);
} | 0 | [
"CWE-787"
] | libvncserver | 0cf1400c61850065de590d403f6d49e32882fd76 | 327,213,284,241,347,880,000,000,000,000,000,000,000 | 5 | fix crash because of unaligned accesses in hybiReadAndDecode() |
DEFUN (show_ip_bgp_instance_rsclient_summary,
show_ip_bgp_instance_rsclient_summary_cmd,
"show ip bgp view WORD rsclient summary",
SHOW_STR
IP_STR
BGP_STR
"BGP view\n"
"View name\n"
"Information about Route Server Clients\n"
"Summary of all Route Server Cli... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 271,352,759,764,654,460,000,000,000,000,000,000,000 | 13 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static void ctcp_msg_dcc_send(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr,
const char *target, CHAT_DCC_REC *chat)
{
GET_DCC_REC *dcc;
SEND_DCC_REC *temp_dcc;
IPADDR ip;
char *address, **params, *fname;
int paramcount, fileparams;
int port, len, quoted = FALSE;
... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 65,932,185,976,964,640,000,000,000,000,000,000,000 | 124 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
*/
void re_yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = _in_str ; | 0 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 99,487,370,066,897,770,000,000,000,000,000,000,000 | 5 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
static int __init setup_slub_nomerge(char *str)
{
slub_nomerge = 1;
return 1;
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 215,656,924,774,471,260,000,000,000,000,000,000,000 | 5 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
ActiveTcpSocket(ActiveTcpListener& listener, Network::ConnectionSocketPtr&& socket,
bool hand_off_restored_destination_connections)
: listener_(listener), socket_(std::move(socket)),
hand_off_restored_destination_connections_(hand_off_restored_destination_connections),
... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 134,189,455,663,802,860,000,000,000,000,000,000,000 | 7 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static void dw_spi_cleanup(struct spi_device *spi)
{
struct chip_data *chip = spi_get_ctldata(spi);
kfree(chip);
spi_set_ctldata(spi, NULL);
} | 0 | [
"CWE-662"
] | linux | 19b61392c5a852b4e8a0bf35aecb969983c5932d | 41,266,919,823,798,467,000,000,000,000,000,000,000 | 7 | spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls
dw_spi_irq() and dw_spi_transfer_one concurrent calls.
I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null,
dw->len==4, and dw->tx_end==1.
When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one
may concurrent... |
evbuffer_freeze(struct evbuffer *buffer, int start)
{
EVBUFFER_LOCK(buffer);
if (start)
buffer->freeze_start = 1;
else
buffer->freeze_end = 1;
EVBUFFER_UNLOCK(buffer);
return 0;
} | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 273,831,769,292,280,270,000,000,000,000,000,000,000 | 10 | 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 ... |
static inline i64 enc_loops(uchar b1, uchar b2)
{
return (i64)b2 << (i64)b1;
} | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 66,830,980,269,018,530,000,000,000,000,000,000,000 | 4 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
PHP_METHOD(Phar, unlinkArchive)
{
char *fname, *error, *zname, *arch, *entry;
int fname_len, zname_len, arch_len, entry_len;
phar_archive_data *phar;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
RETURN_FALSE;
}
if (!fname_len) {
zend_throw_exception_ex(phar_ce_... | 0 | [
"CWE-416"
] | php-src | b2cf3f064b8f5efef89bb084521b61318c71781b | 142,143,696,261,480,830,000,000,000,000,000,000,000 | 60 | Fixed bug #68901 (use after free) |
static void ahash_def_finup_done2(struct crypto_async_request *req, int err)
{
struct ahash_request *areq = req->data;
struct ahash_request_priv *priv = areq->priv;
crypto_completion_t complete = priv->complete;
void *data = priv->data;
ahash_def_finup_finish2(areq, err);
complete(data, err);
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 114,632,718,995,640,400,000,000,000,000,000,000,000 | 11 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
network_init ()
{
#ifdef HAVE_GNUTLS
char *ca_path, *ca_path2;
gnutls_global_init ();
gnutls_certificate_allocate_credentials (&gnutls_xcred);
ca_path = string_expand_home (CONFIG_STRING(config_network_gnutls_ca_file));
if (ca_path)
{
ca_path2 = string_replace (ca_path, "%h", weech... | 1 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 85,114,822,597,843,440,000,000,000,000,000,000,000 | 30 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
create_sim_script_info(
double duration,
attr_val_fifo * script_queue
)
{
#ifndef SIM
return NULL;
#else /* SIM follows */
script_info *my_info;
attr_val *my_attr_val;
my_info = emalloc_zero(sizeof(*my_info));
/* Initialize Script Info with default values*/
my_info->duration = duration;
my_info->prop_delay... | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 47,911,083,294,989,370,000,000,000,000,000,000,000 | 56 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
BOOL ber_read_application_tag(wStream* s, BYTE tag, int* length)
{
BYTE byte;
if (tag > 30)
{
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
Stream_Read_UINT8(s, byte);
if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK))
return FALSE;
if (Stream_GetRemainingLength(s) < 1)
return F... | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 236,712,904,544,977,140,000,000,000,000,000,000,000 | 36 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
call_yank_do_autocmd(int regname)
{
oparg_T oa;
yankreg_T *reg;
clear_oparg(&oa);
oa.regname = regname;
oa.op_type = OP_YANK;
oa.is_VIsual = TRUE;
reg = get_register(regname, TRUE);
yank_do_autocmd(&oa, reg);
free_register(reg);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 319,583,616,766,460,000,000,000,000,000,000,000,000 | 13 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
TileBufferTask::execute ()
{
try
{
//
// Calculate information about the tile
//
Box2i tileRange = OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile (
_ifd->tileDesc,
_ifd->minX, _ifd->maxX,
_ifd->minY, _ifd->maxY,
... | 0 | [
"CWE-125"
] | openexr | 467be80b75642efbbe6bdace558079f68c16acb1 | 40,411,461,661,688,637,000,000,000,000,000,000,000 | 189 | Fix overflow computing deeptile sample table size (#861)
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static inline unsigned long mmap_base(unsigned long rnd)
{
unsigned long gap = rlimit(RLIMIT_STACK);
if (gap < MIN_GAP)
gap = MIN_GAP;
else if (gap > MAX_GAP)
gap = MAX_GAP;
return PAGE_ALIGN(DEFAULT_MAP_WINDOW - gap - rnd);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 329,119,505,004,561,950,000,000,000,000,000,000,000 | 11 | 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 fts3CursorSeek(sqlite3_context *pContext, Fts3Cursor *pCsr){
int rc = SQLITE_OK;
if( pCsr->isRequireSeek ){
rc = fts3CursorSeekStmt(pCsr);
if( rc==SQLITE_OK ){
sqlite3_bind_int64(pCsr->pStmt, 1, pCsr->iPrevId);
pCsr->isRequireSeek = 0;
if( SQLITE_ROW==sqlite3_step(pCsr->pStmt) )... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 67,419,241,719,937,910,000,000,000,000,000,000,000 | 27 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
int8_t inode_bmap(struct inode *inode, sector_t block,
struct extent_position *pos, struct kernel_lb_addr *eloc,
uint32_t *elen, sector_t *offset)
{
unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits;
loff_t lbcount = 0, bcount = (loff_t) block << blocksize_bits;
int8_t etype;
struct udf_inode_inf... | 0 | [
"CWE-476"
] | linux | 7fc3b7c2981bbd1047916ade327beccb90994eee | 291,074,967,510,694,500,000,000,000,000,000,000,000 | 31 | udf: Fix NULL ptr deref when converting from inline format
udf_expand_file_adinicb() calls directly ->writepage to write data
expanded into a page. This however misses to setup inode for writeback
properly and so we can crash on inode->i_wb dereference when submitting
page for IO like:
BUG: kernel NULL pointer dere... |
GF_Err gf_isom_update_sample(GF_ISOFile *movie, u32 trackNumber, u32 sampleNumber, GF_ISOSample *sample, Bool data_only)
{
GF_Err e;
GF_TrackBox *trak;
e = CanAccessMovie(movie, GF_ISOM_OPEN_EDIT);
if (e) return e;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak) return GF_BAD_PARAM;
e = unp... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 82,559,204,070,410,570,000,000,000,000,000,000,000 | 33 | fixed #1706 |
NTSTATUS check_parent_access(struct connection_struct *conn,
struct smb_filename *smb_fname,
uint32_t access_mask)
{
NTSTATUS status;
char *parent_dir = NULL;
struct security_descriptor *parent_sd = NULL;
uint32_t access_granted = 0;
struct smb_filename *parent_smb_fname = NULL;
if (!parent_dirname(tallo... | 0 | [
"CWE-835"
] | samba | 10c3e3923022485c720f322ca4f0aca5d7501310 | 231,647,257,952,231,950,000,000,000,000,000,000,000 | 78 | s3: smbd: Don't loop infinitely on bad-symlink resolution.
In the FILE_OPEN_IF case we have O_CREAT, but not
O_EXCL. Previously we went into a loop trying first
~(O_CREAT|O_EXCL), and if that returned ENOENT
try (O_CREAT|O_EXCL). We kept looping indefinately
until we got an error, or the file was created or
opened.
T... |
ssize_t lxc_write_nointr(int fd, const void* buf, size_t count)
{
ssize_t ret;
again:
ret = write(fd, buf, count);
if (ret < 0 && errno == EINTR)
goto again;
return ret;
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 192,180,661,606,944,500,000,000,000,000,000,000,000 | 9 | 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... |
explicit RaggedTensorToTensorBaseOp(OpKernelConstruction* context)
: OpKernel(context) {
OP_REQUIRES_OK(context, GetRowPartitionTypes<OpKernelConstruction>(
context, &row_partition_types_));
ragged_rank_ = GetRaggedRank(row_partition_types_);
} | 0 | [
"CWE-131",
"CWE-369"
] | tensorflow | f94ef358bb3e91d517446454edff6535bcfe8e4a | 268,651,159,632,135,500,000,000,000,000,000,000,000 | 6 | Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`.
PiperOrigin-RevId: 368300502
Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64 |
sec_disconnect(void)
{
/* Perform a User-initiated disconnect sequence, see
[MS-RDPBCGR] 1.3.1.4 Disconnect Sequences */
mcs_disconnect(RN_USER_REQUESTED);
} | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 229,143,453,491,581,760,000,000,000,000,000,000,000 | 6 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
maybe_kill_dialog (GSWindow *window)
{
if (!window->priv->dialog_shake_in_progress
&& window->priv->dialog_quit_requested
&& window->priv->lock_pid > 0) {
kill (window->priv->lock_pid, SIGTERM);
}
} | 0 | [] | gnome-screensaver | a5f66339be6719c2b8fc478a1d5fc6545297d950 | 97,660,593,738,416,200,000,000,000,000,000,000,000 | 8 | Ensure keyboard grab and unlock dialog exist after monitor removal
gnome-screensaver currently doesn't deal with monitors getting
removed properly. If the unlock dialog is on the removed monitor
then the unlock dialog and its associated keyboard grab are not
moved to an existing monitor when the monitor removal is pr... |
static uint64_t sdhci_read(void *opaque, hwaddr offset, unsigned size)
{
SDHCIState *s = (SDHCIState *)opaque;
uint32_t ret = 0;
switch (offset & ~0x3) {
case SDHC_SYSAD:
ret = s->sdmasysad;
break;
case SDHC_BLKSIZE:
ret = s->blksize | (s->blkcnt << 16);
break;
c... | 0 | [
"CWE-119"
] | qemu | dfba99f17feb6d4a129da19d38df1bcd8579d1c3 | 221,379,154,170,072,000,000,000,000,000,000,000,000 | 89 | hw/sd/sdhci: Fix DMA Transfer Block Size field
The 'Transfer Block Size' field is 12-bit wide.
See section '2.2.2. Block Size Register (Offset 004h)' in datasheet.
Two different bug reproducer available:
- https://bugs.launchpad.net/qemu/+bug/1892960
- https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc... |
send_guid_cmd(struct ipmi_smi *intf, int chan)
{
struct kernel_ipmi_msg msg;
struct ipmi_system_interface_addr si;
si.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
si.channel = IPMI_BMC_CHANNEL;
si.lun = 0;
msg.netfn = IPMI_NETFN_APP_REQUEST;
msg.cmd = IPMI_GET_DEVICE_GUID_CMD;
msg.data = NULL;
msg... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 79,598,915,895,777,075,000,000,000,000,000,000,000 | 26 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
AvahiSDNSServerBrowser *avahi_s_dns_server_browser_prepare(
AvahiServer *server,
AvahiIfIndex interface,
AvahiProtocol protocol,
const char *domain,
AvahiDNSServerType type,
AvahiProtocol aprotocol,
AvahiLookupFlags flags,
AvahiSDNSServerBrowserCallback callback,
void* userdata) {
... | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 41,662,293,859,235,887,000,000,000,000,000,000,000 | 74 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
static void context_append(struct context *ctx,
struct descriptor *d, int z, int extra)
{
dma_addr_t d_bus;
struct descriptor_buffer *desc = ctx->buffer_tail;
d_bus = desc->buffer_bus + (d - desc->buffer) * sizeof(*d);
desc->used += (z + extra) * sizeof(*d);
ctx->prev->branch_address = cpu_to_le32(d_bus | ... | 0 | [
"CWE-399"
] | linux-2.6 | 8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54 | 31,548,130,068,440,126,000,000,000,000,000,000,000 | 15 | firewire: ohci: handle receive packets with a data length of zero
Queueing to receive an ISO packet with a payload length of zero
silently does nothing in dualbuffer mode, and crashes the kernel in
packet-per-buffer mode. Return an error in dualbuffer mode, because
the DMA controller won't let us do what we want, and... |
inline int mod(const unsigned char x, const unsigned char m) {
if (!m) throw CImgArgumentException("cimg::mod(): Specified modulo value is 0.");
return x%m;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 21,871,819,822,577,490,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. |
int crypto_register_algs(struct crypto_alg *algs, int count)
{
int i, ret;
for (i = 0; i < count; i++) {
ret = crypto_register_alg(&algs[i]);
if (ret)
goto err;
}
return 0;
err:
for (--i; i >= 0; --i)
crypto_unregister_alg(&algs[i]);
return ret;
} | 0 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | linux | 4943ba16bbc2db05115707b3ff7b4874e9e3c560 | 61,250,244,793,180,380,000,000,000,000,000,000,000 | 18 | crypto: include crypto- module prefix in template
This adds the module loading prefix "crypto-" to the template lookup
as well.
For example, attempting to load 'vfat(blowfish)' via AF_ALG now correctly
includes the "crypto-" prefix at every level, correctly rejecting "vfat":
net-pf-38
algif-hash
crypto-vfat(blowf... |
void HandShakeHeader::Process(input_buffer& input, SSL& ssl)
{
ssl.verifyState(*this);
if (ssl.GetError()) return;
if (input.get_error()) {
ssl.SetError(bad_input);
return;
}
const HandShakeFactory& hsf = ssl.getFactory().getHandShake();
mySTL::auto_ptr<HandShakeBase> hs(hsf.Crea... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 24,661,946,046,775,760,000,000,000,000,000,000,000 | 26 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
PHP_FUNCTION(openssl_seal)
{
zval *pubkeys, *pubkey, *sealdata, *ekeys, *iv = NULL;
HashTable *pubkeysht;
EVP_PKEY **pkeys;
zend_resource ** key_resources; /* so we know what to cleanup */
int i, len1, len2, *eksl, nkeys, iv_len;
unsigned char iv_buf[EVP_MAX_IV_LENGTH + 1], *buf = NULL, **eks;
char * data;
size... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 147,747,743,471,395,830,000,000,000,000,000,000,000 | 127 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
static void sub_layer_hrd_parameters(GF_BitStream *bs, int subLayerId, u32 cpb_cnt, Bool sub_pic_hrd_params_present_flag, u32 idx1, u32 idx2)
{
u32 i;
if (!gf_bs_available(bs)) return;
for (i = 0; i <= cpb_cnt; i++) {
gf_bs_read_ue_log_idx3(bs, "bit_rate_value_minus1", idx1, idx2, i);
gf_bs_read_ue_log_idx3(bs,... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 177,104,966,913,784,770,000,000,000,000,000,000,000 | 15 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
netlink_kernel_release(struct sock *sk)
{
if (sk == NULL || sk->sk_socket == NULL)
return;
sock_release(sk->sk_socket);
} | 0 | [
"CWE-362",
"CWE-415"
] | linux | 92964c79b357efd980812c4de5c1fd2ec8bb5520 | 32,951,550,186,418,802,000,000,000,000,000,000,000 | 7 | netlink: Fix dump skb leak/double free
When we free cb->skb after a dump, we do it after releasing the
lock. This means that a new dump could have started in the time
being and we'll end up freeing their skb instead of ours.
This patch saves the skb and module before we unlock so we free
the right memory.
Fixes: 16... |
crypt_pw_sha256_enc(const char *pwd)
{
return crypt_pw_enc_by_hash(pwd, CRYPT_SHA256);
} | 0 | [
"CWE-284"
] | 389-ds-base | aeb90eb0c41fc48541d983f323c627b2e6c328c7 | 240,615,000,906,403,240,000,000,000,000,000,000,000 | 4 | Issue 4817 - BUG - locked crypt accounts on import may allow all passwords (#4819)
Bug Description: Due to mishanding of short dbpwd hashes, the
crypt_r algorithm was misused and was only comparing salts
in some cases, rather than checking the actual content
of the password.
Fix Description: Stricter checks on d... |
tracing_set_trace_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{
struct trace_array *tr = filp->private_data;
char buf[MAX_TRACER_SIZE+2];
int r;
mutex_lock(&trace_types_lock);
r = sprintf(buf, "%s\n", tr->current_trace->name);
mutex_unlock(&trace_types_lock);
return simple_rea... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 230,408,723,867,890,900,000,000,000,000,000,000,000 | 13 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
get_run_dir_location (void)
{
static gsize path = 0;
if (g_once_init_enter (&path))
{
gsize setup_value = 0;
/* Note: $FLATPAK_RUN_DIR should only be set in the unit tests. At
* runtime, /run/flatpak is assumed by
* flatpak-create-sideload-symlinks.sh
*/
const char *confi... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 320,107,380,075,892,340,000,000,000,000,000,000,000 | 21 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
_rsvg_node_text_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts)
{
const char *klazz = NULL, *id = NULL, *value;
RsvgNodeText *text = (RsvgNodeText *) self;
if (rsvg_property_bag_size (atts)) {
if ((value = rsvg_property_bag_lookup (atts, "x")))
text->x = _rsvg_css_p... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 111,885,222,356,357,650,000,000,000,000,000,000,000 | 24 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static int __init tc_action_init(void)
{
struct rtnetlink_link *link_p = rtnetlink_links[PF_UNSPEC];
if (link_p) {
link_p[RTM_NEWACTION-RTM_BASE].doit = tc_ctl_action;
link_p[RTM_DELACTION-RTM_BASE].doit = tc_ctl_action;
link_p[RTM_GETACTION-RTM_BASE].doit = tc_ctl_action;
link_p[RTM_GETACTION-RTM_BASE].dump... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 159,191,975,760,048,450,000,000,000,000,000,000,000 | 15 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)
{
int ret;
pinst->kobj.kset = pcrypt_kset;
ret = kobject_add(&pinst->kobj, NULL, name);
if (!ret)
kobject_uevent(&pinst->kobj, KOBJ_ADD);
return ret;
} | 0 | [
"CWE-399",
"CWE-763"
] | linux | d76c68109f37cb85b243a1cf0f40313afd2bae68 | 49,992,910,293,318,420,000,000,000,000,000,000,000 | 11 | crypto: pcrypt - fix freeing pcrypt instances
pcrypt is using the old way of freeing instances, where the ->free()
method specified in the 'struct crypto_template' is passed a pointer to
the 'struct crypto_instance'. But the crypto_instance is being
kfree()'d directly, which is incorrect because the memory was actual... |
void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_str, const char **file,
const char **func, u_int32_t *line) {
*file = "";
*func = "";
if(ndpi_str->ndpi_debug_print_file != NULL)
*file = ndpi_str->ndpi_debug_print_file;
if(ndpi... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 101,764,893,079,851,150,000,000,000,000,000,000,000 | 13 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
inline static bool jas_safe_intfast32_mul(int_fast32_t x, int_fast32_t y,
int_fast32_t *result)
{
if (x > 0) {
/* x is positive */
if (y > 0) {
/* x and y are positive */
if (x > INT_FAST32_MAX / y) {
return false;
}
} else {
/* x positive, y nonpositive */
if (y < INT_FAST32_MIN / x) {
... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 43,328,201,422,392,610,000,000,000,000,000,000,000 | 35 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
drop_privs (void)
{
if (!is_privileged)
return;
/* Drop root uid */
if (setuid (opt_sandbox_uid) < 0)
die_with_error ("unable to drop root uid");
drop_all_caps ();
} | 0 | [
"CWE-20",
"CWE-703"
] | bubblewrap | d7fc532c42f0e9bf427923bab85433282b3e5117 | 280,733,133,913,759,200,000,000,000,000,000,000,000 | 11 | Call setsid() before executing sandboxed code (CVE-2017-5226)
This prevents the sandboxed code from getting a controlling tty,
which in turn prevents it from accessing the TIOCSTI ioctl and hence
faking terminal input.
Fixes: #142
Closes: #143
Approved by: cgwalters |
static void enriched_flush (struct enriched_state *stte, int wrap)
{
if (!stte->tag_level[RICH_NOFILL] && (stte->line_len + stte->word_len >
(stte->WrapMargin - (stte->tag_level[RICH_INDENT_RIGHT] * IndentSize) -
stte->indent_len)))
enriched_wrap (stte);
if (stte->buff_used)
{
stte->buffer[s... | 0 | [
"CWE-120"
] | mutt | e5ed080c00e59701ca62ef9b2a6d2612ebf765a5 | 320,090,511,119,991,080,000,000,000,000,000,000,000 | 25 | Fix uudecode buffer overflow.
mutt_decode_uuencoded() used each line's initial "length character"
without any validation. It would happily read past the end of the
input line, and with a suitable value even past the length of the
input buffer.
As I noted in ticket 404, there are several other changes that could
be a... |
static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement TSRMLS_DC)
{
int de, i=0, section_index = SECTION_MAKERNOTE;
int NumDirEntries, old_motorola_intel, offset_diff;
const maker_note_type *maker_note;
char *dir... | 1 | [] | php-src | 64043cb9e5d8bc5af719678893e38ee0290e0c0a | 160,712,639,531,944,270,000,000,000,000,000,000,000 | 79 | Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes) |
psf_decode_frame_count (SF_PRIVATE *psf)
{ sf_count_t count, readlen, total = 0 ;
BUF_UNION ubuf ;
/* If we're reading from a pipe or the file is too long, just return SF_COUNT_MAX. */
if (psf_is_pipe (psf) || psf->datalength > 0x1000000)
return SF_COUNT_MAX ;
psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
read... | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 61,682,446,470,839,050,000,000,000,000,000,000,000 | 20 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
g_NPN_UserAgent(NPP instance)
{
if (!thread_check()) {
npw_printf("WARNING: NPN_UserAgent not called from the main thread\n");
return NULL;
}
D(bugiI("NPN_UserAgent instance=%p\n", instance));
if (g_user_agent == NULL)
g_user_agent = invoke_NPN_UserAgent();
D(bugiD("NPN_UserAgent return: '%s'\n", g_user_a... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 154,679,490,071,675,160,000,000,000,000,000,000,000 | 13 | Support all the new variables added |
png_set_cHRM(png_const_structrp png_ptr, png_inforp info_ptr,
double white_x, double white_y, double red_x, double red_y,
double green_x, double green_y, double blue_x, double blue_y)
{
png_set_cHRM_fixed(png_ptr, info_ptr,
png_fixed(png_ptr, white_x, "cHRM White X"),
png_fixed(png_ptr, white_y, ... | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 180,600,422,807,451,500,000,000,000,000,000,000,000 | 14 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
rm_ac3_swap_bytes (AVStream *st, AVPacket *pkt)
{
uint8_t *ptr;
int j;
if (st->codecpar->codec_id == AV_CODEC_ID_AC3) {
ptr = pkt->data;
for (j=0;j<pkt->size;j+=2) {
FFSWAP(int, ptr[0], ptr[1]);
ptr += 2;
}
}
} | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 124eb202e70678539544f6268efc98131f19fa49 | 609,269,095,661,445,600,000,000,000,000,000,000 | 13 | avformat/rmdec: Fix DoS due to lack of eof check
Fixes: loop.ivr
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
int gridfs_store_file( gridfs *gfs, const char *filename,
const char *remotename, const char *contenttype ) {
char buffer[DEFAULT_CHUNK_SIZE];
FILE *fd;
bson_oid_t id;
int chunkNumber = 0;
gridfs_offset length = 0;
gridfs_offset chunkLen = 0;
bson *oChunk;
/* Ope... | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 176,740,180,959,245,770,000,000,000,000,000,000,000 | 48 | don't mix up int and size_t (first pass to fix that) |
void iriap_send_ack(struct iriap_cb *self)
{
struct sk_buff *tx_skb;
__u8 *frame;
IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
tx_skb = alloc_skb(LMP_MAX_HEADER + 1, GFP_ATOMIC);
if (!tx_skb)
return;
/* Reserve space for MUX and LAP... | 0 | [] | linux-2.6 | d370af0ef7951188daeb15bae75db7ba57c67846 | 272,526,378,705,650,300,000,000,000,000,000,000,000 | 24 | 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... |
const UUID& TopologyDescription::getId() const {
return _id;
} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 146,644,142,519,838,930,000,000,000,000,000,000,000 | 3 | SERVER-50170 fix max staleness read preference parameter for server selection |
Tfloat _linear_atX(const float fx, const int y=0, const int z=0, const int c=0) const {
const float
nfx = cimg::cut(fx,0,width() - 1);
const unsigned int
x = (unsigned int)nfx;
const float
dx = nfx - x;
const unsigned int
nx = dx>0?x + 1:x;
const Tfloat... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 270,179,499,552,112,800,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int cap_compare(cap_t acap, cap_t bcap)
{
int rc = 0;
size_t asize = cap_size(acap);
size_t bsize = cap_size(bcap);
if (asize != bsize) {
rc = 1;
} else {
char *abuf = xcalloc(asize, sizeof(*abuf));
char *bbuf = xcalloc(bsize, sizeof(*bbuf));
cap_copy_ext(abuf, acap, asize);
cap_copy_ex... | 0 | [
"CWE-59",
"CWE-61"
] | rpm | c815822c8bdb138066ff58c624ae83e3a12ebfa9 | 105,294,509,070,948,980,000,000,000,000,000,000,000 | 19 | Make verification match the new restricted directory symlink behavior
Only follow directory symlinks owned by target directory owner or root
during verification to match the behavior of fsmVerify() in the new
CVE-2017-7500 world order.
The code is klunkier than it should and the logic should use common code
with fsmV... |
void Gfx::opMoveShowText(Object args[], int numArgs) {
double tx, ty;
if (!state->getFont()) {
error(getPos(), "No font in move/show");
return;
}
if (fontChanged) {
out->updateFont(state);
fontChanged = gFalse;
}
tx = state->getLineX();
ty = state->getLineY() - state->getLeading();
stat... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 198,071,264,384,477,150,000,000,000,000,000,000,000 | 19 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
const char* oidc_util_hdr_in_authorization_get(const request_rec *r) {
return oidc_util_hdr_in_get(r, OIDC_HTTP_HDR_AUTHORIZATION);
} | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 206,411,102,486,116,240,000,000,000,000,000,000,000 | 3 | Add a function to escape Javascript characters |
JsVar *jspEvaluate(const char *str, bool stringIsStatic) {
/* using a memory area is more efficient, but the interpreter
* may use substrings from it for function code. This means that
* if the string goes away, everything gets corrupted - hence
* the option here.
*/
JsVar *evCode;
if (stringIsStatic... | 0 | [
"CWE-125",
"CWE-674"
] | Espruino | 51380baf17241728b6d48cdb84140b931e3e3cc5 | 82,239,544,063,778,690,000,000,000,000,000,000,000 | 21 | Fix stack overflow if interpreting a file full of '{' (fix #1448) |
void SELECT_LEX::increase_derived_records(ha_rows records)
{
SELECT_LEX_UNIT *unit= master_unit();
DBUG_ASSERT(unit->derived);
if (unit->with_element && unit->with_element->is_recursive)
{
st_select_lex *first_recursive= unit->with_element->first_recursive;
st_select_lex *sl= unit->first_select();
... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 164,128,290,325,006,340,000,000,000,000,000,000,000 | 36 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void process_touch_command(conn *c, token_t *tokens, const size_t ntokens) {
char *key;
size_t nkey;
int32_t exptime_int = 0;
item *it;
assert(c != NULL);
set_noreply_maybe(c, tokens, ntokens);
if (tokens[KEY_TOKEN].length > KEY_MAX_LENGTH) {
out_string(c, "CLIENT_ERROR bad... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 271,595,482,118,811,800,000,000,000,000,000,000,000 | 42 | CVE reported by cisco talos |
void hci_req_add_le_scan_disable(struct hci_request *req, bool rpa_le_conn)
{
struct hci_dev *hdev = req->hdev;
if (hdev->scanning_paused) {
bt_dev_dbg(hdev, "Scanning is paused for suspend");
return;
}
if (hdev->suspended)
set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks);
if (use_ext_scan(hdev)) {
st... | 0 | [
"CWE-362"
] | linux | e2cb6b891ad2b8caa9131e3be70f45243df82a80 | 132,528,992,851,937,870,000,000,000,000,000,000,000 | 36 | bluetooth: eliminate the potential race condition when removing the HCI controller
There is a possible race condition vulnerability between issuing a HCI
command and removing the cont. Specifically, functions hci_req_sync()
and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | th... |
PHP_FUNCTION(ldap_get_entries)
{
zval *link, *result;
LDAPMessage *ldap_result, *ldap_result_entry;
zval *tmp1, *tmp2;
ldap_linkdata *ld;
LDAP *ldap;
int num_entries, num_attrib, num_values, i;
BerElement *ber;
char *attribute;
size_t attr_len;
struct berval **ldap_value;
char *dn;
if (zend_parse_parameter... | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 118,525,424,390,835,160,000,000,000,000,000,000,000 | 95 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
static int nf_tables_newtable(struct sk_buff *skb, const struct nfnl_info *info,
const struct nlattr * const nla[])
{
struct nftables_pernet *nft_net = nft_pernet(info->net);
struct netlink_ext_ack *extack = info->extack;
u8 genmask = nft_genmask_next(info->net);
u8 family = info->nfmsg->nfgen_family;
str... | 0 | [
"CWE-400",
"CWE-703"
] | linux | e02f0d3970404bfea385b6edb86f2d936db0ea2b | 295,261,141,515,539,840,000,000,000,000,000,000,000 | 92 | netfilter: nf_tables: disallow binding to already bound chain
Update nft_data_init() to report EINVAL if chain is already bound.
Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Reported-by: Gwangun Jung <exsociety@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
static void vhost_enable_cross_endian_little(struct vhost_virtqueue *vq)
{
vq->user_be = false;
} | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 289,793,598,322,144,260,000,000,000,000,000,000,000 | 4 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
mouse_activate(SCREEN *sp, int on)
{
if (!on && !sp->_mouse_initialized)
return;
if (!_nc_mouse_init(sp))
return;
if (on) {
sp->_mouse_bstate = 0;
switch (sp->_mouse_type) {
case M_XTERM:
#if NCURSES_EXT_FUNCS
NCURSES_SP_NAME(keyok) (NCURSES_SP_ARGx KEY_MOUSE, on);
#endif
TPUTS_TRACE("xterm... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 228,122,921,798,640,000,000,000,000,000,000,000,000 | 77 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static int acquire_security_info(sd_bus *bus, const char *name, struct security_info *info, AnalyzeSecurityFlags flags) {
static const struct bus_properties_map security_map[] = {
{ "AmbientCapabilities", "t", NULL, offsetof(struct security_info, amb... | 1 | [
"CWE-269"
] | systemd | 9d880b70ba5c6ca83c82952f4c90e86e56c7b70c | 31,284,857,867,379,577,000,000,000,000,000,000,000 | 108 | analyze: check for RestrictSUIDSGID= in "systemd-analyze security"
And let's give it a heigh weight, since it pretty much can be used for
bad things only. |
__poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
{
__poll_t mask;
struct sock *sk = sock->sk;
const struct tcp_sock *tp = tcp_sk(sk);
int state;
sock_poll_wait(file, sock, wait);
state = inet_sk_state_load(sk);
if (state == TCP_LISTEN)
return inet_csk_listen_poll(sk);
/* Socket i... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 7,027,216,956,640,028,000,000,000,000,000,000,000 | 100 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static NTSTATUS open_file_ntcreate(connection_struct *conn,
struct smb_request *req,
uint32 access_mask, /* access bits (FILE_READ_DATA etc.) */
uint32 share_access, /* share constants (FILE_SHARE_READ etc) */
uint32 create_disposition, /* FILE_OPEN_IF etc. */
uint32 create_options, ... | 0 | [] | samba | 60f922bf1bd8816eacbb32c24793ad1f97a1d9f2 | 114,761,635,793,829,300,000,000,000,000,000,000,000 | 814 | Fix bug #10229 - No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10229
We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.
Signed-off-by: Jeremy Allison <jr... |
unsigned long netdev_boot_base(const char *prefix, int unit)
{
const struct netdev_boot_setup *s = dev_boot_setup;
char name[IFNAMSIZ];
int i;
sprintf(name, "%s%d", prefix, unit);
/*
* If device already registered then return base of 1
* to indicate not to probe for this interface
*/
if (__dev_get_by_name... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 204,217,768,635,721,540,000,000,000,000,000,000,000 | 20 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
print_subtree_oid_report(FILE * f, struct tree *tree, int count)
{
struct tree *tp;
count++;
/*
* sanity check
*/
if (!tree) {
return;
}
/*
* find the not reported peer with the lowest sub-identifier.
* if no more, break the loop and cleanup.
* set "report... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 37,297,047,248,766,965,000,000,000,000,000,000,000 | 70 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.