func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static unsigned long __init find_function64(struct lib64_elfinfo *lib,
const char *symname)
{
Elf64_Sym *sym = find_symbol64(lib, symname);
if (sym == NULL) {
printk(KERN_WARNING "vDSO64: function %s not found !\n",
symname);
return 0;
}
#ifdef VDS64_HAS_DESCRIPTORS
return *((u64 *)(vdso64_kb... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 35,674,181,713,356,490,000,000,000,000,000,000,000 | 17 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
WandExport void DrawSetFontSize(DrawingWand *wand,const double pointsize)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if ((wand->filter_off != MagickFalse) ||
... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 2,364,544,526,686,352,500,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/716 |
static URI_INLINE const URI_CHAR * URI_FUNC(ParseSegmentNz)(
URI_TYPE(ParserState) * state,
const URI_CHAR * first, const URI_CHAR * afterLast,
UriMemoryManager * memory) {
const URI_CHAR * const afterPchar
= URI_FUNC(ParsePchar)(state, first, afterLast, memory);
if (afterPchar == NULL) {
return NULL;
}
... | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 114,758,814,410,575,030,000,000,000,000,000,000,000 | 11 | Fix uriParse*Ex* out-of-bounds read |
virDomainDefParseNode(xmlDocPtr xml,
xmlNodePtr root,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
{
g_autoptr(xmlXPathContext) ctxt = NULL;
g_autoptr(virDomainDef) def = NULL;
if (!(ctxt = virXM... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 181,276,300,303,754,280,000,000,000,000,000,000,000 | 27 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
rb_allocate_cpu_buffer(struct ring_buffer *buffer, long nr_pages, int cpu)
{
struct ring_buffer_per_cpu *cpu_buffer;
struct buffer_page *bpage;
struct page *page;
int ret;
cpu_buffer = kzalloc_node(ALIGN(sizeof(*cpu_buffer), cache_line_size()),
GFP_KERNEL, cpu_to_node(cpu));
if (!cpu_buffer)
return NULL;... | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 207,681,978,101,802,300,000,000,000,000,000,000,000 | 59 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void **chunks) THROWSPEC
{
void **ret;
threadcache *tc;
int mymspace;
size_t i, *adjustedsizes=(size_t *) alloca(elems*sizeof(size_t));
if(!adjustedsizes) return 0;
for(i=0; i<elems; i++)
adjustedsizes[i]=sizes[i]<sizeof(threadcach... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 61,532,397,351,198,055,000,000,000,000,000,000,000 | 14 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
void Gfx::opImageData(Object args[], int numArgs) {
error(getPos(), "Internal: got 'ID' operator");
} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 339,902,847,776,675,960,000,000,000,000,000,000,000 | 3 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len)
{
return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | ccfe8c3f7e52ae83155cb038753f4c75b774ca8a | 114,465,877,174,191,790,000,000,000,000,000,000,000 | 5 | crypto: aesni - fix memory usage in GCM decryption
The kernel crypto API logic requires the caller to provide the
length of (ciphertext || authentication tag) as cryptlen for the
AEAD decryption operation. Thus, the cipher implementation must
calculate the size of the plaintext output itself and cannot simply use
cryp... |
//! Compute the structure tensor field of an image \newinstance.
CImg<Tfloat> get_structure_tensors(const bool is_fwbw_scheme=false) const {
if (is_empty()) return *this;
CImg<Tfloat> res;
if (_depth>1) { // 3D
res.assign(_width,_height,_depth,6,0);
if (!is_fwbw_scheme) { // Cl... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 132,932,532,998,322,200,000,000,000,000,000,000,000 | 84 | . |
static struct io_kiocb *io_alloc_req(struct io_ring_ctx *ctx,
struct io_submit_state *state)
{
gfp_t gfp = GFP_KERNEL | __GFP_NOWARN;
struct io_kiocb *req;
if (!state->free_reqs) {
size_t sz;
int ret;
sz = min_t(size_t, state->ios_left, ARRAY_SIZE(state->reqs));
ret = kmem_cache_alloc_bulk(req_cac... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 12,280,538,972,988,403,000,000,000,000,000,000,000 | 34 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
int raw_notifier_chain_register(struct raw_notifier_head *nh,
struct notifier_block *n)
{
return notifier_chain_register(&nh->head, n);
} | 0 | [
"CWE-20"
] | linux-2.6 | 9926e4c74300c4b31dee007298c6475d33369df0 | 6,148,366,596,652,815,000,000,000,000,000,000,000 | 5 | CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix
As discovered here today, the change in Kernel 2.6.17 intended to inhibit
users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by
"cheating" and setting it to 1 in such a case, does not make a difference,
as the check is done in the wrong pla... |
char* GetData(cmsIT8* it8, int nSet, int nField)
{
TABLE* t = GetTable(it8);
int nSamples = t -> nSamples;
int nPatches = t -> nPatches;
if (nSet >= nPatches || nField >= nSamples)
return NULL;
if (!t->Data) return NULL;
return t->Data [nSet * nSamples + nField];
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 319,361,401,660,178,550,000,000,000,000,000,000,000 | 12 | Fix some warnings from static analysis |
void LIRItem::load_nonconstant() {
LIR_Opr r = value()->operand();
if (r->is_constant()) {
_result = r;
} else {
load_item();
}
} | 0 | [] | jdk17u | 268c0159253b3de5d72eb826ef2329b27bb33fea | 82,093,978,755,070,870,000,000,000,000,000,000,000 | 8 | 8272014: Better array indexing
Reviewed-by: thartmann
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
static struct pending_op *pending_read_new(struct bt_att *att,
struct queue *owner_queue,
struct gatt_db_attribute *attrib,
unsigned int id, uint16_t offset)
{
struct pending_op *op;
op = new0(struct pending_op, 1);
op->owner_queue = owner_queue;
op->att = bt_att_ref(att);
op->attrib = attrib;
op... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 85,346,330,813,656,680,000,000,000,000,000,000,000 | 22 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
static int smk_curacc_msq(struct kern_ipc_perm *isp, int access)
{
struct smack_known *msp = smack_of_ipc(isp);
struct smk_audit_info ad;
int rc;
#ifdef CONFIG_AUDIT
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC);
ad.a.u.ipc_id = isp->id;
#endif
rc = smk_curacc(msp, access, &ad);
rc = smk_bu_current("msq", msp,... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 162,854,569,666,222,130,000,000,000,000,000,000,000 | 14 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static av_cold int lag_decode_init(AVCodecContext *avctx)
{
LagarithContext *l = avctx->priv_data;
l->avctx = avctx;
ff_dsputil_init(&l->dsp, avctx);
return 0;
} | 0 | [
"CWE-787"
] | FFmpeg | 4c3e1956ee35fdcc5ffdb28782050164b4623c0b | 146,777,800,793,734,980,000,000,000,000,000,000,000 | 9 | lagarith: reallocate rgb_planes when needed
Fixes invalid writes on pixel format changes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
static inline void conditional_sti(struct pt_regs *regs)
{
if (regs->flags & X86_EFLAGS_IF)
local_irq_enable();
} | 0 | [
"CWE-400"
] | linux-stable-rt | e5d4e1c3ccee18c68f23d62ba77bda26e893d4f0 | 76,471,287,186,636,070,000,000,000,000,000,000,000 | 5 | x86: Do not disable preemption in int3 on 32bit
Preemption must be disabled before enabling interrupts in do_trap
on x86_64 because the stack in use for int3 and debug is a per CPU
stack set by th IST. But 32bit does not have an IST and the stack
still belongs to the current task and there is no problem in scheduling
... |
bool tcf_queue_work(struct rcu_work *rwork, work_func_t func)
{
INIT_RCU_WORK(rwork, func);
return queue_rcu_work(tc_filter_wq, rwork);
} | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 197,109,703,494,167,870,000,000,000,000,000,000,000 | 5 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
static void restore_stack_limit (lua_State *L) {
lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1);
if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */
int inuse = cast_int(L->ci - L->base_ci);
if (inuse + 1 < LUAI_MAXCALLS) /* can `undo' overflow? */
luaD_reallocCI(L... | 0 | [
"CWE-200",
"CWE-17"
] | redis | fdf9d455098f54f7666c702ae464e6ea21e25411 | 49,078,328,733,304,600,000,000,000,000,000,000,000 | 8 | disable loading lua bytecode |
static inline u32 nfsd4_layoutget_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
{
return (op_encode_hdr_size +
1 /* logr_return_on_close */ +
op_encode_stateid_maxsz +
1 /* nr of layouts */ +
MAX_LAYOUT_SIZE) * sizeof(__be32);
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 285,169,419,852,103,160,000,000,000,000,000,000,000 | 8 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb)
{
struct macvlan_port *port;
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
const struct macvlan_dev *vlan;
const struct macvlan_dev *src;
struct net_device *dev;
unsigned int len = 0;
int ret = NET_RX_DROP;
port = m... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 6,547,248,474,717,421,000,000,000,000,000,000,000 | 62 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
open_socket(int domain, int type, int flags)
{
int sock_fd;
sock_fd = socket(domain, type | socket_flags, 0);
if (sock_fd < 0) {
DEBUG_LOG("Could not open %s socket : %s",
domain_to_string(domain), strerror(errno));
return INVALID_SOCK_FD;
}
/* Close the socket automatically on exec *... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 336,390,777,916,707,700,000,000,000,000,000,000,000 | 34 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static void rb_advance_iter(struct ring_buffer_iter *iter)
{
struct ring_buffer_per_cpu *cpu_buffer;
struct ring_buffer_event *event;
unsigned length;
cpu_buffer = iter->cpu_buffer;
/*
* Check if we are at the end of the buffer.
*/
if (iter->head >= rb_page_size(iter->head_page)) {
/* discarded commits ca... | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 59,782,448,114,575,220,000,000,000,000,000,000,000 | 41 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
static bool uac3_badd_func_has_valid_channels(struct usb_mixer_interface *mixer,
struct uac3_badd_profile *f,
int c_chmask, int p_chmask)
{
/*
* If both playback/capture channels are dynamic, make sure
* at least one channel is present
*/
if (f->c_chmask < 0 && f->p_chmask < 0) {
if (!c_... | 0 | [
"CWE-674"
] | sound | 19bce474c45be69a284ecee660aa12d8f1e88f18 | 152,443,692,254,761,650,000,000,000,000,000,000,000 | 31 | ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
`check_input_term` recursively calls itself with input from
device side (e.g., uac_input_terminal_descriptor.bCSourceID)
as argument (id). In `check_input_term`, if `check_input_term`
is called with the same `id` argument as the caller, it triggers
e... |
static void verbose(const char *fmt, ...)
{
va_list args;
if (!opt_verbose)
return;
/* Print the verbose message */
va_start(args, fmt);
if (fmt)
{
vfprintf(stdout, fmt, args);
fprintf(stdout, "\n");
fflush(stdout);
}
va_end(args);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 27,609,676,087,932,110,000,000,000,000,000,000,000 | 17 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static u32 iwl_trans_pcie_dump_rbs(struct iwl_trans *trans,
struct iwl_fw_error_dump_data **data,
int allocated_rb_nums)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
int max_len = PAGE_SIZE << trans_pcie->rx_page_order;
/* Dump RBs is supported only for pre-9000 devices (1 que... | 0 | [
"CWE-476"
] | linux | 8188a18ee2e48c9a7461139838048363bfce3fef | 48,052,916,241,687,250,000,000,000,000,000,000,000 | 42 | iwlwifi: pcie: fix rb_allocator workqueue allocation
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sig... |
static void Sp_split_string(js_State *J)
{
const char *str = checkstring(J, 0);
const char *sep = js_tostring(J, 1);
int limit = js_isdefined(J, 2) ? js_tointeger(J, 2) : 1 << 30;
int i, n;
js_newarray(J);
n = strlen(sep);
/* empty string */
if (n == 0) {
Rune rune;
for (i = 0; *str && i < limit; ++i) {
... | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | mujs | 00d4606c3baf813b7b1c176823b2729bf51002a2 | 226,417,596,395,341,000,000,000,000,000,000,000,000 | 36 | Bug 700937: Limit recursion in regexp matcher.
Also handle negative return code as an error in the JS bindings. |
static void keyring_clear_rcu_disposal(struct rcu_head *rcu)
{
struct keyring_list *klist;
int loop;
klist = container_of(rcu, struct keyring_list, rcu);
for (loop = klist->nkeys - 1; loop >= 0; loop--)
key_put(klist->keys[loop]);
kfree(klist);
} /* end keyring_clear_rcu_disposal() */ | 0 | [
"CWE-362"
] | linux-2.6 | cea7daa3589d6b550546a8c8963599f7c1a3ae5c | 237,859,381,478,419,140,000,000,000,000,000,000,000 | 13 | KEYS: find_keyring_by_name() can gain access to a freed keyring
find_keyring_by_name() can gain access to a keyring that has had its reference
count reduced to zero, and is thus ready to be freed. This then allows the
dead keyring to be brought back into use whilst it is being destroyed.
The following timeline illus... |
_pango_Is_Emoji_Keycap_Base (gunichar ch)
{
return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*';
} | 0 | [
"CWE-119",
"CWE-787"
] | pango | 71aaeaf020340412b8d012fe23a556c0420eda5f | 78,021,091,632,781,600,000,000,000,000,000,000,000 | 4 | Prevent an assertion with invalid Unicode sequences
Invalid Unicode sequences, such as 0x2665 0xfe0e 0xfe0f,
can trick the Emoji iter code into returning an empty
segment, which then triggers an assertion in the itemizer.
Prevent this by ensuring that we make progress.
This issue was reported by Jeffrey M. |
Item_string_with_introducer(THD *thd, const char *name_arg,
const char *str, uint length, CHARSET_INFO *tocs):
Item_string(thd, name_arg, str, length, tocs)
{ } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 93,234,717,829,768,760,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
select_result_interceptor(THD *thd_arg):
select_result(thd_arg), suppress_my_ok(false)
{
DBUG_ENTER("select_result_interceptor::select_result_interceptor");
DBUG_PRINT("enter", ("this %p", this));
DBUG_VOID_RETURN;
} /* Remove gcc warning */ | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 181,918,461,408,663,900,000,000,000,000,000,000,000 | 7 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
int epo_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int width, int height,
gx_color_index color0, gx_color_index color1,
int phase_x, int phase_y)
{
int code = epo_handle_erase_page(dev);
if (code != 0)
return code;
return dev_proc(dev, strip_tile_rectan... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 254,008,100,665,016,920,000,000,000,000,000,000,000 | 10 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
void macvlan_dellink(struct net_device *dev, struct list_head *head)
{
struct macvlan_dev *vlan = netdev_priv(dev);
list_del(&vlan->list);
unregister_netdevice_queue(dev, head);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 135,653,384,527,046,620,000,000,000,000,000,000,000 | 7 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
m4_sinclude (struct obstack *obs, int argc, token_data **argv)
{
include (argc, argv, true);
} | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 3,573,179,064,320,760,000,000,000,000,000,000,000 | 4 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
TEST_F(ExpressionNaryTest, GroupingOptimizationOnAssociativeOnlyMiddleOperands) {
BSONArray spec = BSON_ARRAY("$path1" << 55 << 66 << "$path");
addOperandArrayToExpr(_associativeOnly, spec);
assertContents(_associativeOnly, spec);
intrusive_ptr<Expression> optimized = _associativeOnly->optimize();
A... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 79,566,253,899,496,210,000,000,000,000,000,000,000 | 8 | SERVER-38070 fix infinite loop in agg expression |
void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
{
/* keep them as 32bits */
long x, y, inc, frac;
long dx, dy,tmp;
/* 2.0.10: Nick Atty: clip to edges of drawing rectangle, return if no points need to be drawn */
if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2... | 0 | [
"CWE-119"
] | php-src | 863d37ea66d5c960db08d6f4a2cbd2518f0f80d1 | 5,532,047,134,493,946,000,000,000,000,000,000,000 | 75 | Fix #72696: imagefilltoborder stackoverflow on truecolor images
We must not allow negative color values be passed to
gdImageFillToBorder(), because that can lead to infinite recursion
since the recursion termination condition will not necessarily be met. |
struct request *blk_fetch_request(struct request_queue *q)
{
struct request *rq;
lockdep_assert_held(q->queue_lock);
WARN_ON_ONCE(q->mq_ops);
rq = blk_peek_request(q);
if (rq)
blk_start_request(rq);
return rq;
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 135,610,674,776,093,650,000,000,000,000,000,000,000 | 12 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
static void fromRGB(unsigned char *src, unsigned char *dst, int width,
int pitch, int height, int pixelFormat)
{
switch(pixelFormat)
{
case TJPF_RGB:
#if RGB_RED!=0 || RGB_GREEN!=1 || RGB_BLUE!=2 || RGB_PIXELSIZE!=3
FROMRGB(3, 0, 1, 2,);
#endif
break;
case TJPF_BGR:
#if RGB_RED!=2 || RGB_GREEN!=1 ... | 0 | [] | libjpeg-turbo | dab6be4cfb2f9307b5378d2d1dc74d9080383dc2 | 298,219,110,309,098,580,000,000,000,000,000,000,000 | 57 | tjDecompressToYUV*(): Fix OOB write/double free
... when attempting to decompress grayscale JPEG images with sampling
factors != 1.
Fixes #387 |
static vpx_codec_err_t ctrl_set_decryptor(vpx_codec_alg_priv_t *ctx,
va_list args) {
vpx_decrypt_init *init = va_arg(args, vpx_decrypt_init *);
ctx->decrypt_cb = init ? init->decrypt_cb : NULL;
ctx->decrypt_state = init ? init->decrypt_state : NULL;
return VPX_CODEC_OK;... | 0 | [
"CWE-125"
] | libvpx | 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 | 245,230,712,120,476,040,000,000,000,000,000,000,000 | 7 | vp9: fix OOB read in decoder_peek_si_internal
Profile 1 or 3 bitstreams may require 11 bytes for the header in the
intra-only case.
Additionally add a check on the bit reader's error handler callback to
ensure it's non-NULL before calling to avoid future regressions.
This has existed since at least (pre-1.4.0):
09bf... |
get_voter(const networkstatus_t *vote)
{
tor_assert(vote);
tor_assert(vote->type == NS_TYPE_VOTE);
tor_assert(vote->voters);
tor_assert(smartlist_len(vote->voters) == 1);
return smartlist_get(vote->voters, 0);
} | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 314,950,944,240,518,770,000,000,000,000,000,000,000 | 8 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static inline struct file *io_file_from_index(struct io_ring_ctx *ctx,
int index)
{
struct fixed_file_table *table;
table = &ctx->file_table[index >> IORING_FILE_TABLE_SHIFT];
return table->files[index & IORING_FILE_TABLE_MASK];
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 132,857,840,229,349,150,000,000,000,000,000,000,000 | 8 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
int ldb_kv_init_store(struct ldb_kv_private *ldb_kv,
const char *name,
struct ldb_context *ldb,
const char *options[],
struct ldb_module **_module)
{
if (getenv("LDB_WARN_UNINDEXED")) {
ldb_kv->warn_unindexed = true;
}
if (getenv("LDB_WARN_REINDEX")) {
ldb_kv->warn_reindex = true... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 310,151,946,624,489,370,000,000,000,000,000,000,000 | 152 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
static int sisusb_handle_command(struct sisusb_usb_data *sisusb,
struct sisusb_command *y, unsigned long arg)
{
int retval, port, length;
u32 address;
/* All our commands require the device
* to be initialized.
*/
if (!sisusb->devinit)
return -ENODEV;
port = y->data3 -
SISUSB_PCI_PSEUDO_IOPORTBASE +
... | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 336,159,616,442,773,120,000,000,000,000,000,000,000 | 117 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
Luv32toXYZ(LogLuvState* sp, uint8* op, tmsize_t n)
{
uint32* luv = (uint32*) sp->tbuf;
float* xyz = (float*) op;
while (n-- > 0) {
LogLuv32toXYZ(*luv++, xyz);
xyz += 3;
}
} | 0 | [
"CWE-787"
] | libtiff | aaab5c3c9d2a2c6984f23ccbc79702610439bc65 | 97,852,161,962,862,570,000,000,000,000,000,000,000 | 10 | * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
functions in non debug builds by replacing assert()s by regular if
checks (bugzilla #2522).
Fix potential out-of-bound reads in case of short input data. |
hwaddr virtio_queue_get_used_addr(VirtIODevice *vdev, int n)
{
return vdev->vq[n].vring.used;
} | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 79,164,392,941,475,840,000,000,000,000,000,000,000 | 4 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
static void php_snmp_error(zval *object, const char *docref, int type, const char *format, ...)
{
va_list args;
php_snmp_object *snmp_object = NULL;
if (object) {
snmp_object = Z_SNMP_P(object);
if (type == PHP_SNMP_ERRNO_NOERROR) {
memset(snmp_object->snmp_errstr, 0, sizeof(snmp_object->snmp_errstr));
} e... | 0 | [
"CWE-20"
] | php-src | 6e25966544fb1d2f3d7596e060ce9c9269bbdcf8 | 50,137,582,989,292,400,000,000,000,000,000,000,000 | 29 | Fixed bug #71704 php_snmp_error() Format String Vulnerability |
Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null,
bool *null_value, LEX_CSTRING *name)
{
DBUG_ENTER("Item_sp::init_result_field");
DBUG_ASSERT(m_sp != NULL);
DBUG_ASSERT(sp_result_field == NULL);
/*
A Field needs to be attached to a Table.
Below we "cr... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 146,692,330,730,077,480,000,000,000,000,000,000,000 | 39 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static void check_process_timers(struct task_struct *tsk,
struct list_head *firing)
{
int maxfire;
struct signal_struct *const sig = tsk->signal;
cputime_t utime, stime, ptime, virt_expires, prof_expires;
unsigned long long sum_sched_runtime, sched_expires;
struct task_struct *t;
struct list_head *timers = s... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 202,358,851,445,080,300,000,000,000,000,000,000,000 | 198 | 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 ... |
static int do_lstat(int follow, const char *file_name, struct stat *buf)
{
WIN32_FILE_ATTRIBUTE_DATA fdata;
wchar_t wfilename[MAX_PATH];
if (xutftowcs_path(wfilename, file_name) < 0)
return -1;
if (GetFileAttributesExW(wfilename, GetFileExInfoStandard, &fdata)) {
buf->st_ino = 0;
buf->st_gid = 0;
buf->st_u... | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 248,802,539,431,396,950,000,000,000,000,000,000,000 | 65 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
struct net_device *dev_get_by_index(int ifindex)
{
struct net_device *dev;
read_lock(&dev_base_lock);
dev = __dev_get_by_index(ifindex);
if (dev)
dev_hold(dev);
read_unlock(&dev_base_lock);
return dev;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 275,145,990,441,122,800,000,000,000,000,000,000,000 | 11 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
ZEND_API void zend_objects_store_del_ref_by_handle_ex(zend_object_handle handle, const zend_object_handlers *handlers TSRMLS_DC) /* {{{ */
{
struct _store_object *obj;
int failure = 0;
if (!EG(objects_store).object_buckets) {
return;
}
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
/* Make sure ... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43 | 304,551,905,314,056,420,000,000,000,000,000,000,000 | 62 | Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction |
static inline void put_page(struct page *page)
{
page = compound_head(page);
if (put_page_testzero(page))
__put_page(page);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 46,858,604,995,122,430,000,000,000,000,000,000,000 | 7 | 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 ... |
get_provider_type (GoaProvider *provider)
{
return "owncloud";
} | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 61,812,901,978,881,770,000,000,000,000,000,000,000 | 4 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
static OnigEncoding _php_mb_regex_name2mbctype(const char *pname)
{
const char *p;
php_mb_regex_enc_name_map_t *mapping;
if (pname == NULL || !*pname) {
return ONIG_ENCODING_UNDEF;
}
for (mapping = enc_name_map; mapping->names != NULL; mapping++) {
for (p = mapping->names; *p != '\0'; p += (strlen(p) + 1)) {... | 0 | [
"CWE-415"
] | php-src | 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 | 180,714,713,837,024,400,000,000,000,000,000,000,000 | 19 | Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free |
PHP_FUNCTION(xmlrpc_server_call_method)
{
XMLRPC_REQUEST xRequest;
xmlrpc_callback_data data;
STRUCT_XMLRPC_REQUEST_INPUT_OPTIONS input_opts;
xmlrpc_server_data* server;
zval *caller_params, *handle, *output_opts = NULL;
char *rawxml;
size_t rawxml_len;
php_output_options out;
int argc = ZEND_NUM_ARGS();
if ... | 0 | [] | php-src | f3c1863aa2721343245b63ac7bd68cfdc3dd41f3 | 293,948,566,610,533,130,000,000,000,000,000,000,000 | 100 | Fixed #70728
Conflicts:
ext/xmlrpc/xmlrpc-epi-php.c |
GF_Err udta_box_dump(GF_Box *a, FILE * trace)
{
GF_UserDataBox *p;
GF_UserDataMap *map;
u32 i;
p = (GF_UserDataBox *)a;
gf_isom_box_dump_start(a, "UserDataBox", trace);
gf_fprintf(trace, ">\n");
i=0;
while ((map = (GF_UserDataMap *)gf_list_enum(p->recordList, &i))) {
gf_isom_box_array_dump(map->boxes, trace... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 99,271,736,085,217,170,000,000,000,000,000,000,000 | 17 | fixed #2138 |
static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
{
__prep_new_huge_page(h, page);
spin_lock_irq(&hugetlb_lock);
__prep_account_new_huge_page(h, nid);
spin_unlock_irq(&hugetlb_lock);
} | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 151,685,062,480,279,160,000,000,000,000,000,000,000 | 7 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
static void change_pageblock_range(struct page *pageblock_page,
int start_order, int migratetype)
{
int nr_pageblocks = 1 << (start_order - pageblock_order);
while (nr_pageblocks--) {
set_pageblock_migratetype(pageblock_page, migratetype);
pageblock_page += pageblock_nr_pages;
}
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 139,600,862,338,430,740,000,000,000,000,000,000,000 | 10 | 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... |
int ha_partition::open(const char *name, int mode, uint test_if_locked)
{
char *name_buffer_ptr;
int error= HA_ERR_INITIALIZATION;
handler **file;
char name_buff[FN_REFLEN];
bool is_not_tmp_table= (table_share->tmp_table == NO_TMP_TABLE);
ulonglong check_table_flags;
DBUG_ENTER("ha_partition::open");
D... | 1 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 139,158,733,725,566,210,000,000,000,000,000,000,000 | 193 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
xfs_create(
xfs_inode_t *dp,
struct xfs_name *name,
umode_t mode,
xfs_dev_t rdev,
xfs_inode_t **ipp)
{
int is_dir = S_ISDIR(mode);
struct xfs_mount *mp = dp->i_mount;
struct xfs_inode *ip = NULL;
struct xfs_trans *tp = NULL;
int error;
xfs_bmap_free_t free_list;
xfs_fsblock_t first_block;
bool ... | 0 | [
"CWE-19"
] | linux | fc0561cefc04e7803c0f6501ca4f310a502f65b8 | 263,235,256,789,298,720,000,000,000,000,000,000,000 | 185 | xfs: optimise away log forces on timestamp updates for fdatasync
xfs: timestamp updates cause excessive fdatasync log traffic
Sage Weil reported that a ceph test workload was writing to the
log on every fdatasync during an overwrite workload. Event tracing
showed that the only metadata modification being made was the... |
void ib_uverbs_free_async_event_file(struct ib_uverbs_file *file)
{
kref_put(&file->async_file->ref, ib_uverbs_release_event_file);
file->async_file = NULL;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 41,640,832,859,893,175,000,000,000,000,000,000,000 | 5 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... |
void do_item_unlinktail_q(item *it) {
item **head, **tail;
head = &heads[it->slabs_clsid];
tail = &tails[it->slabs_clsid];
if (*head == it) {
assert(it->prev == 0);
*head = it->next;
}
if (*tail == it) {
assert(it->next == 0);
*tail = it->prev;
}
assert(i... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 143,696,639,929,657,150,000,000,000,000,000,000,000 | 20 | CVE reported by cisco talos |
static inline u32 skb_mac_header_len(const struct sk_buff *skb)
{
return skb->network_header - skb->mac_header; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 120,851,615,685,049,530,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static GF_Err nhmldmx_send_sample(GF_Filter *filter, GF_NHMLDmxCtx *ctx)
{
GF_XMLNode *node, *childnode;
u64 sample_duration = 0;
char szMediaTemp[GF_MAX_PATH], szXmlFrom[1000], szXmlTo[1000];
char *szSubSampleName = ctx->is_dims ? "DIMSSubUnit" : "NHNTSubSample";
while ((node = (GF_XMLNode *) gf_list_enum(ctx->... | 1 | [
"CWE-787"
] | gpac | 74695dea7278e78af3db467e586233fe8773c07e | 329,361,782,851,468,400,000,000,000,000,000,000,000 | 383 | fixed #1910 #1911 |
static bool ldm_get_vblks(struct parsed_partitions *state, unsigned long base,
struct ldmdb *ldb)
{
int size, perbuf, skip, finish, s, v, recs;
u8 *data = NULL;
Sector sect;
bool result = false;
LIST_HEAD (frags);
BUG_ON(!state || !ldb);
size = ldb->vm.vblk_size;
perbuf = 512 / size;
skip = ldb->vm.... | 0 | [
"CWE-119",
"CWE-787"
] | linux | cae13fe4cc3f24820ffb990c09110626837e85d4 | 270,777,262,757,548,760,000,000,000,000,000,000,000 | 51 | Fix for buffer overflow in ldm_frag_add not sufficient
As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer
overflow in ldm_frag_add) is not sufficient. The original patch in
commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted
partition table") does not consider that, for subsequen... |
static int __init unittest_data_add(void)
{
void *unittest_data;
struct device_node *unittest_data_node, *np;
/*
* __dtb_testcases_begin[] and __dtb_testcases_end[] are magically
* created by cmd_dt_S_dtb in scripts/Makefile.lib
*/
extern uint8_t __dtb_testcases_begin[];
extern uint8_t __dtb_testcases_end[];... | 0 | [
"CWE-401"
] | linux | e13de8fe0d6a51341671bbe384826d527afe8d44 | 118,906,857,361,485,700,000,000,000,000,000,000,000 | 67 | of: unittest: fix memory leak in unittest_data_add
In unittest_data_add, a copy buffer is created via kmemdup. This buffer
is leaked if of_fdt_unflatten_tree fails. The release for the
unittest_data buffer is added.
Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
Signed-off-by: Navid ... |
DEFUN (no_bgp_bestpath_compare_router_id,
no_bgp_bestpath_compare_router_id_cmd,
"no bgp bestpath compare-routerid",
NO_STR
"BGP specific commands\n"
"Change the default bestpath selection\n"
"Compare router-id for identical EBGP paths\n")
{
struct bgp *bgp;
bgp = vty->ind... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 221,332,138,560,741,500,000,000,000,000,000,000,000 | 14 | [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... |
RGWOpType get_type() override { return RGW_OP_STAT_ACCOUNT; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 36,286,794,549,540,076,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
int test_gf2m_mod_solve_quad(BIO *bp, BN_CTX *ctx)
{
BIGNUM *a, *b[2], *c, *d, *e;
int i, j, s = 0, t, ret = 0;
int p0[] = { 163, 7, 6, 3, 0, -1 };
int p1[] = { 193, 15, 0, -1 };
a = BN_new();
b[0] = BN_new();
b[1] = BN_new();
c = BN_new();
d = BN_new();
e = BN_new();
BN_GF... | 0 | [
"CWE-200"
] | openssl | d73cc256c8e256c32ed959456101b73ba9842f72 | 205,324,323,049,658,600,000,000,000,000,000,000,000 | 83 | bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193).
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107) |
GF_Err stbl_AppendDependencyType(GF_SampleTableBox *stbl, u32 isLeading, u32 dependsOn, u32 dependedOn, u32 redundant)
{
GF_SampleDependencyTypeBox *sdtp;
u32 flags;
if (stbl->SampleDep == NULL) {
stbl->SampleDep = (GF_SampleDependencyTypeBox *) gf_isom_box_new_parent(&stbl->child_boxes, GF_ISOM_BOX_TYPE_SDTP);
... | 0 | [
"CWE-120",
"CWE-787"
] | gpac | 77ed81c069e10b3861d88f72e1c6be1277ee7eae | 265,230,314,458,990,830,000,000,000,000,000,000,000 | 26 | fixed #1774 (fuzz) |
R_API bool r_io_bank_map_priorize(RIO *io, const ut32 bankid, const ut32 mapid) {
RIOBank *bank = r_io_bank_get (io, bankid);
r_return_val_if_fail (io && bank, false);
RListIter *iter;
RIOMapRef *mapref;
r_list_foreach (bank->maprefs, iter, mapref) {
if (mapref->id == mapid) {
goto found;
}
}
return false... | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 117,651,972,486,356,930,000,000,000,000,000,000,000 | 71 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
static void rebase_bytes_v1(RDyldRebaseInfo1 *rebase_info, ut8 *buf, ut64 offset, int count, ut64 start_of_write) {
int in_buf = 0;
while (in_buf < count) {
ut64 offset_in_data = offset - rebase_info->start_of_data;
ut64 page_index = offset_in_data / rebase_info->page_size;
ut64 page_offset = offset_in_data % r... | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 210,430,018,820,059,800,000,000,000,000,000,000,000 | 35 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
static int MP4_ReadBox_ctts( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_READBOX_ENTER( MP4_Box_data_ctts_t );
MP4_GETVERSIONFLAGS( p_box->data.p_ctts );
MP4_GET4BYTES( p_box->data.p_ctts->i_entry_count );
p_box->data.p_ctts->pi_sample_count =
calloc( p_box->data.p_ctts->i_entry_count, sizeo... | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 112,317,038,075,252,370,000,000,000,000,000,000,000 | 34 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
int init_sets(REP_SETS *sets,uint states)
{
bzero((char*) sets,sizeof(*sets));
sets->size_of_bits=((states+7)/8);
if (!(sets->set_buffer=(REP_SET*) my_malloc(sizeof(REP_SET)*SET_MALLOC_HUNC,
MYF(MY_WME))))
return 1;
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 169,307,353,285,327,800,000,000,000,000,000,000,000 | 15 | WL#9072: Backport WL#8785 to 5.5 |
R_API char *r_sys_whoami (char *buf) {
char _buf[32];
int pid = getpid ();
int hasbuf = (buf)? 1: 0;
if (!hasbuf) {
buf = _buf;
}
sprintf (buf, "pid%d", pid);
return hasbuf? buf: strdup (buf);
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 133,964,017,693,492,670,000,000,000,000,000,000,000 | 10 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
bool Table_period_info::check_field(const Create_field* f,
const Lex_ident& f_name) const
{
bool res= false;
if (!f)
{
my_error(ER_BAD_FIELD_ERROR, MYF(0), f_name.str, name.str);
res= true;
}
else if (f->type_handler()->mysql_timestamp_type() != MYSQL_TIMESTAMP_DATE... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 41,589,492,636,135,420,000,000,000,000,000,000,000 | 24 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
static int cm_alloc_id(struct cm_id_private *cm_id_priv)
{
unsigned long flags;
int id;
idr_preload(GFP_KERNEL);
spin_lock_irqsave(&cm.lock, flags);
id = idr_alloc_cyclic(&cm.local_id_table, cm_id_priv, 0, 0, GFP_NOWAIT);
spin_unlock_irqrestore(&cm.lock, flags);
idr_preload_end();
cm_id_priv->id.local_id = ... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 86,999,411,318,629,890,000,000,000,000,000,000,000 | 16 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg, opt;
rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
str = rb_str_new2("Mon, 1 Jan -4712 00:00:00 +0000");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
int... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 212,363,243,975,621,000,000,000,000,000,000,000,000 | 24 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static DexString *dex_string_new(RzBuffer *buf, ut64 offset, st64 *pread) {
ut64 size = 0;
char *data = NULL;
st64 read;
DexString *string = NULL;
read = rz_buf_uleb128(buf, &size);
if (UT64_ADD_OVFCHK(size, 1)) {
return NULL;
}
data = malloc(size + 1);
if (!data || rz_buf_read(buf, (ut8 *)data, size) != s... | 0 | [
"CWE-787"
] | rizin | 1524f85211445e41506f98180f8f69f7bf115406 | 279,822,009,400,425,500,000,000,000,000,000,000,000 | 30 | fix #2969 - oob write (1 byte) in dex.c |
GF_Err dinf_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_write_header(s, bs);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 306,749,206,380,530,100,000,000,000,000,000,000,000 | 4 | fixed #1587 |
Version GetVersion()
{
return Version("Provides support for IRC Authentication Layer (aka: SASL) via AUTHENTICATE.", VF_VENDOR);
} | 0 | [
"CWE-284",
"CWE-264"
] | inspircd | 74fafb7f11b06747f69f182ad5e3769b665eea7a | 299,702,587,319,850,330,000,000,000,000,000,000,000 | 4 | m_sasl: don't allow AUTHENTICATE with mechanisms with a space |
_asn1_find_up (asn1_node node)
{
asn1_node p;
if (node == NULL)
return NULL;
p = node;
while ((p->left != NULL) && (p->left->right == p))
p = p->left;
return p->left;
} | 0 | [
"CWE-119"
] | libtasn1 | 4d4f992826a4962790ecd0cce6fbba4a415ce149 | 174,619,929,132,141,430,000,000,000,000,000,000,000 | 14 | increased size of LTOSTR_MAX_SIZE to account for sign and null byte
This address an overflow found by Hanno Böck in DER decoding. |
GC_INNER ptr_t GC_get_register_stack_base(void)
{
ptr_t result;
# ifdef USE_LIBC_PRIVATES
if (0 != &__libc_ia64_register_backing_store_base
&& 0 != __libc_ia64_register_backing_store_base) {
/* Glibc 2.2.4 has a bug such that for dynamically linked */
/* ex... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 107,550,834,508,001,080,000,000,000,000,000,000,000 | 23 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
bool unmap_file(void *start, size_t size)
{
#ifdef HAVE_MMAP
if (munmap( start, size ) != 0) {
DEBUG( 1, ("map_file: Failed to unmap address %p "
"of size %u - %s\n",
start, (unsigned int)size, strerror(errno) ));
return false;
}
return true;
#else
talloc_free(start);
return true;
#endif
} | 0 | [] | samba | 63d98ed90466295d0e946f79868d3d7aad6e7589 | 192,993,838,253,426,960,000,000,000,000,000,000,000 | 15 | CVE-2013-4476: lib-util: split out file_save_mode() from file_save()
file_save_mode() writes files with specified mode.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org> |
static void MapStr( ctmbstr str, uint code )
{
while ( *str )
{
uint i = (byte) *str++;
lexmap[i] |= code;
}
} | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 97,080,684,411,278,750,000,000,000,000,000,000,000 | 8 | Issue #217 - avoid len going negative, ever... |
static int fanout_set_data(struct packet_sock *po, char __user *data,
unsigned int len)
{
switch (po->fanout->type) {
case PACKET_FANOUT_CBPF:
return fanout_set_data_cbpf(po, data, len);
case PACKET_FANOUT_EBPF:
return fanout_set_data_ebpf(po, data, len);
default:
return -EINVAL;
};
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 337,163,748,553,227,950,000,000,000,000,000,000,000 | 12 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
mbed_connect_step3(struct Curl_easy *data, struct connectdata *conn,
int sockindex)
{
CURLcode retcode = CURLE_OK;
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
struct ssl_backend_data *backend = connssl->backend;
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
if(SSL... | 1 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 86,823,954,761,901,300,000,000,000,000,000,000,000 | 49 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data)
{
security_ops->sb_post_remount(mnt, flags, data);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 253,122,157,010,745,670,000,000,000,000,000,000,000 | 4 | 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... |
DEFUN (no_bgp_graceful_restart,
no_bgp_graceful_restart_cmd,
"no bgp graceful-restart",
NO_STR
"BGP specific commands\n"
"Graceful restart capability parameters\n")
{
struct bgp *bgp;
bgp = vty->index;
bgp_flag_unset (bgp, BGP_FLAG_GRACEFUL_RESTART);
return CMD_SUCCESS;
} | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 76,405,696,082,535,010,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 int check_func_proto(const struct bpf_func_proto *fn)
{
return check_raw_mode_ok(fn) &&
check_arg_pair_ok(fn) &&
check_refcount_ok(fn) ? 0 : -EINVAL;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 6,144,434,531,126,352,000,000,000,000,000,000,000 | 6 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
__u32 ext4_used_dirs_count(struct super_block *sb,
struct ext4_group_desc *bg)
{
return le16_to_cpu(bg->bg_used_dirs_count_lo) |
(EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
(__u32)le16_to_cpu(bg->bg_used_dirs_count_hi) << 16 : 0);
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 83,267,144,488,466,040,000,000,000,000,000,000,000 | 7 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
close_server_connection (TestConnection *test)
{
g_io_stream_close_async (test->server_connection, G_PRIORITY_DEFAULT, NULL,
on_server_close_finish, test);
} | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 184,928,177,289,579,500,000,000,000,000,000,000,000 | 5 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
is_period_char(unsigned char *ch)
{
switch (*ch) {
case ',':
case '.':
case ':':
case ';':
case '?':
case '!':
case ')':
case ']':
case '}':
case '>':
return 1;
default:
return 0;
}
} | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 165,703,954,349,770,520,000,000,000,000,000,000,000 | 18 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
static bool is_legal_file(const std::string &filename)
{
DBG_FS << "Looking for '" << filename << "'.\n";
if (filename.empty()) {
LOG_FS << " invalid filename\n";
return false;
}
if (filename.find("..") != std::string::npos) {
ERR_FS << "Illegal path '" << filename << "' (\"..\" not allowed).\n";
return ... | 1 | [
"CWE-200"
] | wesnoth | b2738ffb2fdd2550ececb74f76f75583c43c8b59 | 147,893,667,955,613,820,000,000,000,000,000,000,000 | 21 | Use looks_like_pbl() to disallow .pbl file inclusion (bug #23504)
This function is implemented using case-insensitive pattern matching,
unlike filesystem::ends_with(). I missed this when writing my original
fix, so the vulnerability still applied to .pbl files on a
case-insensitive filesystem (e.g. NTFS and FAT* on Wi... |
const char *gf_filter_get_author(GF_Filter *filter)
{
return filter ? filter->instance_author : NULL;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 32,428,508,244,151,240,000,000,000,000,000,000,000 | 4 | fixed crashes for very long path - cf #1908 |
static int _fp_exptmod(fp_int * G, fp_int * X, int digits, fp_int * P,
fp_int * Y)
{
fp_digit buf, mp;
int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize;
#ifdef WOLFSSL_SMALL_STACK
fp_int *res;
fp_int *M;
#else
fp_int res[1];
fp_int M[64];
#endif
(void)digits;... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 60,345,858,198,670,230,000,000,000,000,000,000,000 | 257 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
bool Inflator::DecodeBody()
{
bool blockEnd = false;
switch (m_blockType)
{
case 0: // stored
CRYPTOPP_ASSERT(m_reader.BitsBuffered() == 0);
while (!m_inQueue.IsEmpty() && !blockEnd)
{
size_t size;
const byte *block = m_inQueue.Spy(size);
size = UnsignedMin(m_storedLen, size);
CRYPTOPP... | 1 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 274,552,578,991,427,140,000,000,000,000,000,000,000 | 116 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
epass2003_select_file(struct sc_card *card, const sc_path_t * in_path,
sc_file_t ** file_out)
{
int r;
char pbuf[SC_MAX_PATH_STRING_SIZE];
LOG_FUNC_CALLED(card->ctx);
r = sc_path_print(pbuf, sizeof(pbuf), &card->cache.current_path);
if (r != SC_SUCCESS)
pbuf[0] = '\0';
sc_log(card->ctx,
"current pa... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 56,514,870,063,610,980,000,000,000,000,000,000,000 | 32 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
pk11_return_session(pk11_context_t *ctx) {
pk11_session_t *sp = (pk11_session_t *) ctx->handle;
if (sp == NULL)
return;
ctx->handle = NULL;
ctx->session = CK_INVALID_HANDLE;
LOCK(&sessionlock);
ISC_LIST_UNLINK(actives, sp, link);
UNLOCK(&sessionlock);
if (sp->session == CK_INVALID_HANDLE) {
pk11_mem_put(s... | 0 | [
"CWE-617"
] | bind9 | 8d807cc21655eaa6e6a08afafeec3682c0f3f2ab | 162,097,111,069,771,420,000,000,000,000,000,000,000 | 20 | Fix crash in pk11_numbits() when native-pkcs11 is used
When pk11_numbits() is passed a user provided input that contains all
zeroes (via crafted DNS message), it would crash with assertion
failure. Fix that by properly handling such input. |
static inline void AssociateAlphaPixel(const CubeInfo *cube_info,
const PixelPacket *pixel,DoublePixelPacket *alpha_pixel)
{
MagickRealType
alpha;
alpha_pixel->index=0;
if ((cube_info->associate_alpha == MagickFalse) ||
(pixel->opacity == OpaqueOpacity))
{
alpha_pixel->red=(MagickRealType) ... | 0 | [
"CWE-125"
] | ImageMagick6 | e2a21735e3a3f3930bd431585ec36334c4c2eb77 | 220,983,441,108,292,000,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/1540 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.