func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
run_client_script_output(
gpointer data,
gpointer user_data)
{
char *line = data;
script_output_t *so = user_data;
if (line && so->stream) {
g_fprintf(so->stream, "%s\n", line);
}
} | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 92,290,741,651,798,600,000,000,000,000,000,000,000 | 11 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
static MagickBooleanType DecodeLabImage(Image *image,ExceptionInfo *exception)
{
CacheView
*image_view;
MagickBooleanType
status;
ssize_t
y;
status=MagickTrue;
image_view=AcquireAuthenticCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
register Quantum
*magi... | 0 | [
"CWE-125"
] | ImageMagick | 803bc34ebe023f209f745baf8a112610ff77cc8c | 302,955,943,301,619,200,000,000,000,000,000,000,000 | 51 | Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team) |
static int ppr_get(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
&target->thread.ppr, 0, sizeof(u64));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 267,305,198,913,718,820,000,000,000,000,000,000,000 | 8 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
longlong Item_direct_ref::val_time_packed()
{
longlong tmp = (*ref)->val_time_packed();
null_value= (*ref)->null_value;
return tmp;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 129,056,178,761,759,160,000,000,000,000,000,000,000 | 6 | 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. |
megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
u8 alt_status)
{
int exception = 0;
struct megasas_header *hdr = &cmd->frame->hdr;
unsigned long flags;
struct fusion_context *fusion = instance->ctrl_context;
u32 opcode, status;
/* flag for the retry reset */
cmd->retry_fo... | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 231,376,215,238,488,460,000,000,000,000,000,000,000 | 207 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
int LZ4_decompress_safe_continue (void* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize)
{
LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode;
int result;
result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, e... | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 92,627,577,920,930,650,000,000,000,000,000,000,000 | 19 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static int task_get_unused_fd_flags(struct binder_proc *proc, int flags)
{
unsigned long rlim_cur;
unsigned long irqs;
int ret;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
ret = -ESRCH;
goto err;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
ret = -EMFILE;
goto err;
}
rlim_cur = task_rli... | 0 | [
"CWE-362"
] | linux | 5eeb2ca02a2f6084fc57ae5c244a38baab07033a | 68,252,241,989,377,560,000,000,000,000,000,000,000 | 23 | ANDROID: binder: synchronize_rcu() when using POLLFREE.
To prevent races with ep_remove_waitqueue() removing the
waitqueue at the same time.
Reported-by: syzbot+a2a3c4909716e271487e@syzkaller.appspotmail.com
Signed-off-by: Martijn Coenen <maco@android.com>
Cc: stable <stable@vger.kernel.org> # 4.14+
Signed-off-by: Gr... |
static int pix_abs8_x2_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
{
int s, i;
s = 0;
for(i=0;i<h;i++) {
s += abs(pix1[0] - avg2(pix2[0], pix2[1]));
s += abs(pix1[1] - avg2(pix2[1], pix2[2]));
s += abs(pix1[2] - avg2(pix2[2], pix2[3]));
s += abs(pix1[3] - ... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 185,042,538,393,934,080,000,000,000,000,000,000,000 | 19 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
ldns_zone_print_fmt(FILE *output,
const ldns_output_format *fmt, const ldns_zone *z)
{
if(ldns_zone_soa(z))
ldns_rr_print_fmt(output, fmt, ldns_zone_soa(z));
ldns_rr_list_print_fmt(output, fmt, ldns_zone_rrs(z));
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 103,942,884,446,827,900,000,000,000,000,000,000,000 | 7 | CAA and URI |
int ip_push_pending_frames(struct sock *sk)
{
struct sk_buff *skb, *tmp_skb;
struct sk_buff **tail_skb;
struct inet_sock *inet = inet_sk(sk);
struct ip_options *opt = NULL;
struct rtable *rt = inet->cork.rt;
struct iphdr *iph;
int df = 0;
__u8 ttl;
int err = 0;
if ((skb = __skb_dequeue(&sk->sk_write_queue)) ... | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 532,947,619,240,828,700,000,000,000,000,000,000 | 104 | [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... |
int php_mb_regex_set_default_mbctype(const char *encname TSRMLS_DC)
{
OnigEncoding mbctype = _php_mb_regex_name2mbctype(encname);
if (mbctype == ONIG_ENCODING_UNDEF) {
return FAILURE;
}
MBREX(default_mbctype) = mbctype;
return SUCCESS;
} | 0 | [
"CWE-415"
] | php-src | 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 | 233,296,821,425,560,700,000,000,000,000,000,000,000 | 9 | Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free |
pch_git_diff (void)
{
return p_git_diff;
} | 0 | [
"CWE-59"
] | patch | 44a987e02f04b9d81a0db4a611145cad1093a2d3 | 315,942,010,111,256,030,000,000,000,000,000,000,000 | 4 | Add line number overflow checking
* bootstrap.conf: use intprops module.
* src/common.h: Define LINENUM_MIN and LINENUM_MAX macros.
* src/pch.c (another_hunk): Add line number overflow checking. Based on Robert
C. Seacord's INT32-C document for integer overflow checking and Tobias
Stoeckmann's "integer overflows and ... |
longlong val_int()
{
illegal_method_call((const char*)"val_int");
return 0;
}; | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 66,424,967,360,335,210,000,000,000,000,000,000,000 | 5 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static int bpf_obj_pin(const union bpf_attr *attr)
{
if (CHECK_ATTR(BPF_OBJ) || attr->file_flags != 0)
return -EINVAL;
return bpf_obj_pin_user(attr->bpf_fd, u64_to_user_ptr(attr->pathname));
} | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 149,771,729,064,333,730,000,000,000,000,000,000,000 | 7 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
static void rtc_uie_task(struct work_struct *work)
{
struct rtc_device *rtc =
container_of(work, struct rtc_device, uie_task);
struct rtc_time tm;
int num = 0;
int err;
err = rtc_read_time(rtc, &tm);
local_irq_disable();
spin_lock(&rtc->irq_lock);
if (rtc->stop_uie_polling || err) {
rtc->uie_task_active =... | 0 | [] | linux-2.6 | 2e4a75cdcb89ff53bb182dda3a6dcdc14befe007 | 316,750,646,998,337,900,000,000,000,000,000,000,000 | 29 | rtc: fix kernel panic on second use of SIGIO nofitication
When userspace uses SIGIO notification and forgets to disable it before
closing file descriptor, rtc->async_queue contains stale pointer to struct
file. When user space enables again SIGIO notification in different
process, kernel dereferences this (poisoned) ... |
static void wav2Encode(
unsigned short *in, // io: values are transformed in place
int nx, // i : x size
int ox, // i : x offset
int ny, // i : y size
int oy, // i : y offset
unsigned short mx) // i : maximum in[x][y] value
{
bool w14 = (m... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 310,253,033,015,510,200,000,000,000,000,000,000,000 | 104 | Make line_no with too large value(2**20) invalid. Fixes #124 |
GF_Err ireftype_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_ItemReferenceTypeBox *p = (GF_ItemReferenceTypeBox *)a;
if (!p->reference_type) return GF_OK;
p->type = p->reference_type;
gf_isom_box_dump_start(a, "ItemReferenceBox", trace);
fprintf(trace, "from_item_id=\"%d\">\n", p->from_item_id);
for (i = 0; i < p-... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 6,649,026,193,546,959,000,000,000,000,000,000,000 | 20 | fixed 2 possible heap overflows (inc. #1088) |
static inline ut8 r_read_le8(const void *src) {
return r_read_ble8 (src);
} | 1 | [
"CWE-476"
] | radare2 | 1ea23bd6040441a21fbcfba69dce9a01af03f989 | 144,705,634,642,558,020,000,000,000,000,000,000,000 | 3 | Fix #6816 - null deref in r_read_* |
static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
{
const char *model;
const void *mac_addr;
int err = 0, i;
phy_interface_t interface;
struct net_device *dev = NULL;
struct gfar_private *priv = NULL;
struct device_node *np = ofdev->dev.of_node;
struct device_node *child = NULL;
... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 137,915,452,475,070,860,000,000,000,000,000,000,000 | 215 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
int __user *optlen)
{
if (len < sizeof(struct sctp_event_subscribe))
return -EINVAL;
len = sizeof(struct sctp_event_subscribe);
if (put_user(len, optlen))
return -EFAULT;
if (copy_to_user(optval, &sctp_sk(sk)->subscribe, len)... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 7,590,215,255,959,187,000,000,000,000,000,000,000 | 12 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
static void close_substream(struct snd_rawmidi *rmidi,
struct snd_rawmidi_substream *substream,
int cleanup)
{
if (--substream->use_count)
return;
if (cleanup) {
if (substream->stream == SNDRV_RAWMIDI_STREAM_INPUT)
snd_rawmidi_input_trigger(substream, 0);
else {
if (substream->active_sensin... | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 244,639,069,296,651,430,000,000,000,000,000,000,000 | 32 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... |
MagickPrivate MagickCLCacheInfo AcquireMagickCLCacheInfo(MagickCLDevice device,
Quantum *pixels,const MagickSizeType length)
{
cl_int
status;
MagickCLCacheInfo
info;
info=(MagickCLCacheInfo) AcquireMagickMemory(sizeof(*info));
if (info == (MagickCLCacheInfo) NULL)
ThrowFatalException(ResourceLim... | 0 | [
"CWE-476"
] | ImageMagick | cca91aa1861818342e3d072bb0fad7dc4ffac24a | 72,279,268,235,034,000,000,000,000,000,000,000,000 | 30 | https://github.com/ImageMagick/ImageMagick/issues/790 |
static int get_next_block(bunzip_data *bd)
{
struct group_data *hufGroup;
int dbufCount, dbufSize, groupCount, *base, *limit, selector,
i, j, runPos, symCount, symTotal, nSelectors, byteCount[256];
int runCnt = runCnt; /* for compiler */
uint8_t uc, symToByte[256], mtfSymbol[256], *selectors;
uint32_t *dbuf;
un... | 1 | [
"CWE-190"
] | busybox | 0402cb32df015d9372578e3db27db47b33d5c7b0 | 148,425,668,690,504,670,000,000,000,000,000,000,000 | 375 | bunzip2: fix runCnt overflow from bug 10431
This particular corrupted file can be dealth with by using "unsigned".
If there will be cases where it genuinely overflows, there is a disabled
code to deal with that too.
function old new delta
get_next_block ... |
int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks)
{
struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
if(connssl->connecting_state == ssl_connect_2_writing) {
/* write mode */
socks[0] = conn->sock[FIRSTSOCKET];
return GETSOCK_WRITESOCK(0);
}
if(connssl->connecting_stat... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 203,616,760,454,491,900,000,000,000,000,000,000,000 | 17 | 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 |
static int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x)
{
struct list_head *tmp;
struct mddev *mddev;
int need_delay = 0;
for_each_mddev(mddev, tmp) {
if (mddev_trylock(mddev)) {
if (mddev->pers)
__md_stop_writes(mddev);
if (mddev->persistent)
mddev->safemode = ... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 83,549,533,592,358,720,000,000,000,000,000,000,000 | 28 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
int crypt_init_by_name(struct crypt_device **cd, const char *name)
{
return crypt_init_by_name_and_header(cd, name, NULL);
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 167,091,114,419,907,200,000,000,000,000,000,000,000 | 4 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
file_ff_differs(buf_T *buf, int ignore_empty)
{
// In a buffer that was never loaded the options are not valid.
if (buf->b_flags & BF_NEVERLOADED)
return FALSE;
if (ignore_empty
&& (buf->b_flags & BF_NEW)
&& buf->b_ml.ml_line_count == 1
&& *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL)
return... | 0 | [
"CWE-120"
] | vim | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 | 300,358,125,017,924,100,000,000,000,000,000,000,000 | 20 | patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change. |
build_encrypt_ctxt(struct smb2_encryption_neg_context *pneg_ctxt)
{
pneg_ctxt->ContextType = SMB2_ENCRYPTION_CAPABILITIES;
pneg_ctxt->DataLength = cpu_to_le16(4); /* Cipher Count + le16 cipher */
pneg_ctxt->CipherCount = cpu_to_le16(1);
/* pneg_ctxt->Ciphers[0] = SMB2_ENCRYPTION_AES128_GCM;*/ /* not supported yet */... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 303,744,615,963,352,100,000,000,000,000,000,000,000 | 8 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
static int sched_group_set_rt_period(struct task_group *tg, long rt_period_us)
{
u64 rt_runtime, rt_period;
rt_period = (u64)rt_period_us * NSEC_PER_USEC;
rt_runtime = tg->rt_bandwidth.rt_runtime;
if (rt_period == 0)
return -EINVAL;
return tg_set_rt_bandwidth(tg, rt_period, rt_runtime);
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 291,997,560,422,778,000,000,000,000,000,000,000,000 | 12 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl) {
if (parser != NULL)
parser->m_elementDeclHandler = eldecl;
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 92,266,221,095,649,160,000,000,000,000,000,000,000 | 4 | xmlparse.c: Deny internal entities closing the doctype |
static void opj_j2k_cp_destroy(opj_cp_t *p_cp)
{
OPJ_UINT32 l_nb_tiles;
opj_tcp_t * l_current_tile = 00;
if (p_cp == 00) {
return;
}
if (p_cp->tcps != 00) {
OPJ_UINT32 i;
l_current_tile = p_cp->tcps;
l_nb_tiles = p_cp->th * p_cp->tw;
for (i = 0U; i < l_nb_ti... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | 4241ae6fbbf1de9658764a80944dc8108f2b4154 | 79,313,362,821,995,630,000,000,000,000,000,000,000 | 42 | Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985) |
int32_t yang_get_default_int32(const char *xpath_fmt, ...)
{
char xpath[XPATH_MAXLEN];
const char *value;
va_list ap;
va_start(ap, xpath_fmt);
vsnprintf(xpath, sizeof(xpath), xpath_fmt, ap);
va_end(ap);
value = yang_get_default_value(xpath);
return yang_str2int32(value);
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 81,550,234,612,590,680,000,000,000,000,000,000,000 | 13 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
static SDL_INLINE void BG(const TTF_Image *image, Uint8 *destination, Sint32 srcskip, Uint32 dstskip)
{
const Uint8 *src = image->buffer;
Uint8 *dst = destination;
Uint32 width = image->width;
Uint32 height = image->rows;
while (height--) {
/* *INDENT-OFF* */
... | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 124,446,981,282,989,290,000,000,000,000,000,000,000 | 17 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
static int wait_for_avail(struct snd_pcm_substream *substream,
snd_pcm_uframes_t *availp)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
wait_queue_t wait;
int err = 0;
snd_pcm_uframes_t avail = 0;
long wait_time, tout;
init_wai... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 98,243,415,414,844,100,000,000,000,000,000,000,000 | 85 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
static struct Curl_sh_entry *sh_getentry(struct curl_hash *sh,
curl_socket_t s)
{
if(s != CURL_SOCKET_BAD)
/* only look for proper sockets */
return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
return NULL;
} | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 234,296,542,423,272,600,000,000,000,000,000,000,000 | 8 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
void lodepng_clear_itext(LodePNGInfo* info)
{
LodePNGIText_cleanup(info);
} | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 72,595,810,223,026,700,000,000,000,000,000,000,000 | 4 | Fixed #5645: realloc return handling |
static int addrconf_ifdown(struct net_device *dev, int how)
{
struct net *net = dev_net(dev);
struct inet6_dev *idev;
struct inet6_ifaddr *ifa;
int state, i;
ASSERT_RTNL();
rt6_ifdown(net, dev);
neigh_ifdown(&nd_tbl, dev);
idev = __in6_dev_get(dev);
if (idev == NULL)
return -ENODEV;
/*
* Step 1: remov... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 115,657,981,680,539,690,000,000,000,000,000,000,000 | 119 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
proxy_C_DeriveKey (CK_X_FUNCTION_LIST *self,
CK_SESSION_HANDLE handle,
CK_MECHANISM_PTR mechanism,
CK_OBJECT_HANDLE base_key,
CK_ATTRIBUTE_PTR template,
CK_ULONG count,
CK_OBJECT_HANDLE_PTR key)
{
State *s... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 53,239,973,007,568,470,000,000,000,000,000,000,000 | 17 | Check for arithmetic overflows before allocating |
xsltCopyOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
#ifdef XSLT_REFACTORED
xsltStyleItemCopyOfPtr comp;
#else
xsltStylePreCompPtr comp;
#endif
if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
return;
#ifdef XSLT_REFACTORED
comp = (xsltStyleItemCopyOfPtr) xsltNewStyleP... | 0 | [] | libxslt | 7ca19df892ca22d9314e95d59ce2abdeff46b617 | 140,861,825,304,871,360,000,000,000,000,000,000,000 | 37 | Fix for type confusion in preprocessing attributes
CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
We need to check that the parent node is an element before dereferencing
its namespace |
static inline void io_uring_files_cancel(struct files_struct *files)
{
if (current->io_uring && !xa_empty(¤t->io_uring->xa))
__io_uring_files_cancel(files);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 199,146,071,822,392,580,000,000,000,000,000,000,000 | 5 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
PHP_METHOD(Phar, mount)
{
char *fname, *arch = NULL, *entry = NULL, *path, *actual;
int fname_len, arch_len, entry_len, path_len, actual_len;
phar_archive_data **pphar;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp", &path, &path_len, &actual, &actual_len) == FAILURE) {
return;
}
fname = (char*)zen... | 0 | [
"CWE-416"
] | php-src | d144590d38fa321b46b8e199c754006318985c84 | 8,841,945,888,319,507,000,000,000,000,000,000,000 | 80 | Fix bug #72321 - use efree() for emalloc allocation |
gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
const unsigned int new_height)
{
const unsigned int src_width = src->sx;
const unsigned int src_height = src->sy;
gdImagePtr tmp_im = NULL;
gdImagePtr dst = NULL;
/* First, handle the trivial case. */
if (src_... | 1 | [
"CWE-399"
] | libgd | 4751b606fa38edc456d627140898a7ec679fcc24 | 210,101,992,164,273,140,000,000,000,000,000,000,000 | 50 | gdImageScaleTwoPass memory leak fix
Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and
confirmed by @vapier. This bug actually bit me in production and I'm
very thankful that it was reported with an easy fix.
Fixes #173. |
static int v4l2loopback_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct v4l2_loopback_device *dev = container_of(ctrl->handler, struct v4l2_loopback_device, ctrl_handler);
return v4l2loopback_set_ctrl(dev, ctrl->id, ctrl->val);
} | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 28,447,205,902,378,900,000,000,000,000,000,000,000 | 5 | add explicit format specifier to printf() invocations
CWE-134 |
static void JS_DebugClearFailAt(v8::FunctionCallbackInfo<v8::Value> const& args) {
TRI_V8_TRY_CATCH_BEGIN(isolate);
v8::HandleScope scope(isolate);
// extract arguments
if (args.Length() != 0) {
TRI_V8_THROW_EXCEPTION_USAGE("debugClearFailAt()");
}
// if failure testing is not enabled, this is a no-op
#... | 0 | [
"CWE-918"
] | arangodb | d9b7f019d2435f107b19a59190bf9cc27d5f34dd | 75,196,819,838,367,310,000,000,000,000,000,000,000 | 34 | [APM-78] Disable installation from remote URL (#15292) |
int sctp_inet_connect(struct socket *sock, struct sockaddr *uaddr,
int addr_len, int flags)
{
if (addr_len < sizeof(uaddr->sa_family))
return -EINVAL;
if (uaddr->sa_family == AF_UNSPEC)
return -EOPNOTSUPP;
return sctp_connect(sock->sk, uaddr, addr_len, flags);
} | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 230,454,871,713,808,660,000,000,000,000,000,000,000 | 11 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
static int manager_dispatch_cgroups_agent_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
Manager *m = userdata;
char buf[PATH_MAX+1];
ssize_t n;
n = recv(fd, buf, sizeof(buf), 0);
if (n < 0)
return log_error_errno(errno, "Failed to read c... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 279,924,053,310,513,100,000,000,000,000,000,000,000 | 28 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
static unsigned int ext4_ext_check_overlap(struct ext4_sb_info *sbi,
struct inode *inode,
struct ext4_extent *newext,
struct ext4_ext_path *path)
{
ext4_lblk_t b1, b2;
unsigned int depth, len1;
unsigned int ret = 0;
b1 = le32_to_cpu(newext->ee_block);
len1 = ext4_ext_get_actual_len(newext)... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 51,527,998,521,954,640,000,000,000,000,000,000,000 | 42 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *ares)
{
struct ldb_context *ldb;
struct ldb_request *down_req;
struct ldb_message *msg;
const struct dsdb_attribute *rdn_attr;
const char *rdn_name;
const struct ldb_val *rdn_val;
const char *attrs[5] = { NULL, };
time_t t = time(NULL)... | 1 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 60,054,234,968,801,680,000,000,000,000,000,000,000 | 195 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
void ConnectionImpl::StreamImpl::pendingSendBufferLowWatermark() {
ENVOY_CONN_LOG(debug, "send buffer under limit ", parent_.connection_);
ASSERT(pending_send_buffer_high_watermark_called_);
pending_send_buffer_high_watermark_called_ = false;
runLowWatermarkCallbacks();
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 105,648,378,667,686,920,000,000,000,000,000,000,000 | 6 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
virDomainNetARPInterfaces(virDomainDefPtr def,
virDomainInterfacePtr **ifaces)
{
size_t i, j;
size_t ifaces_count = 0;
int ret = -1;
char macaddr[VIR_MAC_STRING_BUFLEN];
virDomainInterfacePtr *ifaces_ret = NULL;
virDomainInterfacePtr iface = NULL;
virArpTablePtr tab... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 293,935,329,729,133,300,000,000,000,000,000,000,000 | 55 | 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... |
static void xen_netbk_tx_submit(struct xen_netbk *netbk)
{
struct gnttab_copy *gop = netbk->tx_copy_ops;
struct sk_buff *skb;
while ((skb = __skb_dequeue(&netbk->tx_queue)) != NULL) {
struct xen_netif_tx_request *txp;
struct xenvif *vif;
u16 pending_idx;
unsigned data_len;
pending_idx = *((u16 *)skb->dat... | 0 | [
"CWE-399"
] | linux | 7d5145d8eb2b9791533ffe4dc003b129b9696c48 | 281,040,955,425,148,630,000,000,000,000,000,000,000 | 69 | xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
val_clear(struct module_qstate* qstate, int id)
{
if(!qstate)
return;
/* everything is allocated in the region, so assign NULL */
qstate->minfo[id] = NULL;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 53,301,255,034,183,260,000,000,000,000,000,000,000 | 7 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static void nf_tables_module_autoload_cleanup(struct net *net)
{
struct nftables_pernet *nft_net = nft_pernet(net);
struct nft_module_request *req, *next;
WARN_ON_ONCE(!list_empty(&nft_net->commit_list));
list_for_each_entry_safe(req, next, &nft_net->module_list, list) {
WARN_ON_ONCE(!req->done);
list_del(&req... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 122,530,958,427,151,730,000,000,000,000,000,000,000 | 12 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
TEST_F(ExprMatchTest, ComparisonThrowsWithUnboundVariable) {
ASSERT_THROWS(createMatcher(BSON("$expr" << BSON("$eq" << BSON_ARRAY("$a"
<< "$$var")))),
DBException);
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 125,570,378,381,834,710,000,000,000,000,000,000,000 | 5 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
ImagingConvertTransparent(Imaging imIn, const char *mode, int r, int g, int b) {
ImagingSectionCookie cookie;
ImagingShuffler convert;
Imaging imOut = NULL;
int y;
if (!imIn) {
return (Imaging)ImagingError_ModeError();
}
if (!((strcmp(imIn->mode, "RGB") == 0 || strcmp(imIn->mode, "... | 1 | [
"CWE-120"
] | Pillow | 5f4504bb03f4edeeef8c2633dc5ba03a4c2a8a97 | 339,647,103,689,921,700,000,000,000,000,000,000,000 | 57 | Limit sprintf modes to 10 characters |
typedef struct __attribute__((packed)) {
uint32_t mode; /* see above mode #defines */
uint32_t uid; /* */
uint32_t gid; /* */
uint64_t last_modified_time; /* "Second Time" since the Unix Epoch (00:00:00 UTC, January 1, 1970) */
} posix_file_information; | 0 | [
"CWE-476"
] | clamav-devel | 8bb3716be9c7ab7c6a3a1889267b1072f48af87b | 33,192,648,311,316,323,000,000,000,000,000,000,000 | 6 | fuzz-22348 null deref in egg utf8 conversion
Corrected memory leaks and a null dereference in the egg utf8 conversion. |
flatpak_deploy_data_get_commit (GVariant *deploy_data)
{
const char *commit;
g_variant_get_child (deploy_data, 1, "&s", &commit);
return commit;
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 222,861,104,705,598,240,000,000,000,000,000,000,000 | 7 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
// Reinterprete the opaque data provided by user.
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input1 = GetInput... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 291,964,266,231,001,830,000,000,000,000,000,000,000 | 33 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
xdr_cpol_arg(XDR *xdrs, cpol_arg *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!_xdr_kadm5_policy_ent_rec(xdrs, &objp->rec,
objp->api_version)) {
return (FALSE);
}
if (!xdr_long(xdrs, &objp->mask)) {
return (FALSE);
}
return (TRUE);
} | 0 | [
"CWE-703"
] | krb5 | a197e92349a4aa2141b5dff12e9dd44c2a2166e3 | 296,620,130,769,494,600,000,000,000,000,000,000,000 | 14 | Fix kadm5/gssrpc XDR double free [CVE-2014-9421]
[MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free
partial deserialization results upon failure to deserialize. This
responsibility belongs to the callers, svctcp_getargs() and
svcudp_getargs(); doing it in the unwrap function results in freeing
the result... |
*/
void __napi_schedule(struct napi_struct *n)
{
unsigned long flags;
local_irq_save(flags);
____napi_schedule(&__get_cpu_var(softnet_data), n);
local_irq_restore(flags); | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 130,525,915,877,272,130,000,000,000,000,000,000,000 | 8 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
void yang_str2mac(const char *value, struct ethaddr *mac)
{
(void)prefix_str2mac(value, mac);
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 90,962,471,771,996,980,000,000,000,000,000,000,000 | 4 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
virtual Type_std_attributes type_std_attributes() const
{
return Type_std_attributes(field_length, decimals(),
MY_TEST(flags & UNSIGNED_FLAG),
dtcollation());
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 182,665,839,209,573,430,000,000,000,000,000,000,000 | 6 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
cib_tls_signon(cib_t * cib, struct remote_connection_s *connection)
{
int sock;
cib_remote_opaque_t *private = cib->variant_opaque;
struct sockaddr_in addr;
int rc = 0;
char *server = private->server;
int ret_ga;
struct addrinfo *res;
struct addrinfo hints;
xmlNode *answer = NULL;
... | 1 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 5,133,430,200,211,532,600,000,000,000,000,000,000 | 138 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
cstrchr(char_u *s, int c)
{
char_u *p;
int cc;
if (!rex.reg_ic || (!enc_utf8 && mb_char2len(c) > 1))
return vim_strchr(s, c);
// tolower() and toupper() can be slow, comparing twice should be a lot
// faster (esp. when using MS Visual C++!).
// For UTF-8 need to use folded case.
if (enc_... | 1 | [
"CWE-125"
] | vim | f50940531dd57135fe60aa393ac9d3281f352d88 | 111,606,695,455,373,610,000,000,000,000,000,000,000 | 42 | patch 9.0.0105: illegal memory access when pattern starts with illegal byte
Problem: Illegal memory access when pattern starts with illegal byte.
Solution: Do not match a character with an illegal byte. |
intrusive_ptr<Expression> ExpressionArray::optimize() {
bool allValuesConstant = true;
for (auto&& expr : _children) {
expr = expr->optimize();
if (!dynamic_cast<ExpressionConstant*>(expr.get())) {
allValuesConstant = false;
}
}
// If all values in ExpressionArray a... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 280,088,699,441,487,250,000,000,000,000,000,000,000 | 17 | SERVER-49404 Enforce additional checks in $arrayToObject |
void WebPImage::decodeChunks(long filesize)
{
DataBuf chunkId(5);
byte size_buff[WEBP_TAG_SIZE];
bool has_canvas_data = false;
#ifdef EXIV2_DEBUG_MESSAGES
std::cout << "Reading metadata" << std::endl;
#endif
chunkId.pData_[4] = '\0' ;
while (!io_->eo... | 0 | [
"CWE-703",
"CWE-125"
] | exiv2 | 783b3a6ff15ed6f82a8f8e6c8a6f3b84a9b04d4b | 196,770,568,238,563,200,000,000,000,000,000,000,000 | 203 | Improve bound checking in WebPImage::doWriteMetadata() |
static ssize_t ucma_resolve_route(struct ucma_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_resolve_route cmd;
struct ucma_context *ctx;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
ctx = ucma_get_ctx_dev(file, cmd.id);
if (IS_ERR(ctx))
... | 0 | [
"CWE-416"
] | linux | f5449e74802c1112dea984aec8af7a33c4516af1 | 321,027,705,957,125,100,000,000,000,000,000,000,000 | 21 | RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy
ucma_destroy_id() assumes that all things accessing the ctx will do so via
the xarray. This assumption violated only in the case the FD is being
closed, then the ctx is reached via the ctx_list. Normally this is OK
since ucma_destroy_id() cannot run concu... |
static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
{
struct vm_area_struct *next = vma->vm_next;
might_sleep();
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
fput(vma->vm_file);
mpol_put(vma_policy(vma));
vm_area_free(vma);
return next;
} | 0 | [
"CWE-476"
] | linux | 0a1d52994d440e21def1c2174932410b4f2a98a1 | 319,609,368,860,747,900,000,000,000,000,000,000,000 | 13 | mm: enforce min addr even if capable() in expand_downwards()
security_mmap_addr() does a capability check with current_cred(), but
we can reach this code from contexts like a VFS write handler where
current_cred() must not be used.
This can be abused on systems without SMAP to make NULL pointer
dereferences exploitab... |
crl_issuer_matches(gnutls_x509_crl_t crl, gnutls_x509_crt_t cert)
{
if (_gnutls_x509_compare_raw_dn
(&crl->raw_issuer_dn, &cert->raw_issuer_dn) != 0)
return 1;
else
return 0;
} | 0 | [
"CWE-295"
] | gnutls | 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff | 222,022,471,578,484,100,000,000,000,000,000,000,000 | 8 | on certificate import check whether the two signature algorithms match |
zcurrentshowpagecount(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev1, *dev = gs_currentdevice(igs);
if ((*dev_proc(dev, get_page_device))(dev) == 0) {
push(1);
make_false(op);
} else {
dev1 = (*dev_proc(dev, get_page_device))(dev);
push(2);
make_int(op - 1,... | 0 | [] | ghostpdl | 5516c614dc33662a2afdc377159f70218e67bde5 | 146,711,949,448,075,880,000,000,000,000,000,000,000 | 16 | Improve restore robustness
Prompted by looking at Bug 699654:
There are two variants of the restore operator in Ghostscript: one is Level 1
(restoring VM), the other is Level 2+ (adding page device restoring to the
Level operator).
This was implemented by the Level 2+ version restoring the device in the
graphics sta... |
ReturnCode_t DataReaderImpl::get_liveliness_changed_status(
LivelinessChangedStatus& status)
{
if (reader_ == nullptr)
{
return ReturnCode_t::RETCODE_NOT_ENABLED;
}
std::lock_guard<RecursiveTimedMutex> lock(reader_->getMutex());
status = liveliness_changed_status_;
liveliness_c... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 33,803,558,759,266,534,000,000,000,000,000,000,000 | 16 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
TEST_P(ConnectTerminationIntegrationTest, UsingHostMatch) {
exact_match_ = true;
initialize();
connect_headers_.removePath();
connect_headers_.removeProtocol();
setUpConnection();
sendBidirectionalDataAndCleanShutdown();
} | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 294,362,313,963,232,700,000,000,000,000,000,000,000 | 10 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void HandShakeHeader::set_length(uint32 u32)
{
c32to24(u32, length_);
} | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 83,201,232,721,673,360,000,000,000,000,000,000,000 | 4 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int ndp_sock_open(struct ndp *ndp)
{
int sock;
//struct icmp6_filter flt;
int ret;
int err;
int val;
sock = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
if (sock == -1) {
err(ndp, "Failed to create ICMP6 socket.");
return -errno;
}
val = 1;
ret = setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO,
... | 0 | [
"CWE-284"
] | libndp | a4892df306e0532487f1634ba6d4c6d4bb381c7f | 261,978,860,680,959,500,000,000,000,000,000,000,000 | 47 | libndp: validate the IPv6 hop limit
None of the NDP messages should ever come from a non-local network; as
stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA),
and 8.1. (redirect):
- The IP Hop Limit field has a value of 255, i.e., the packet
could not possibly have been forwarded by a router.
T... |
void t_go_generator::generate_service(t_service* tservice) {
string test_suffix("_test");
string filename = lowercase(service_name_);
string f_service_name;
generate_service_interface(tservice);
generate_service_client(tservice);
generate_service_server(tservice);
generate_service_helpers(tservice);
ge... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 234,980,289,177,543,030,000,000,000,000,000,000,000 | 12 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
GF_Err mvcg_box_read(GF_Box *s,GF_BitStream *bs)
{
u32 i;
GF_MultiviewGroupBox *ptr = (GF_MultiviewGroupBox *) s;
ISOM_DECREASE_SIZE(s, 7)
ptr->multiview_group_id = gf_bs_read_u32(bs);
ptr->num_entries = gf_bs_read_u16(bs);
gf_bs_read_u8(bs);
ptr->entries = gf_malloc(ptr->num_entries * sizeof(MVCIEntry));
mems... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 114,451,966,139,496,360,000,000,000,000,000,000,000 | 38 | fixed #1757 |
fb_drift_timeout(void *arg)
{
assert(next_fb_drift >= fb_drift_min && next_fb_drift <= fb_drift_max);
fb_drift_timeout_id = 0;
DEBUG_LOG("Fallback drift %d active: %f ppm",
next_fb_drift, fb_drifts[next_fb_drift - fb_drift_min].freq);
LCL_SetAbsoluteFrequency(fb_drifts[next_fb_drift - fb_drift_min... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 113,728,882,823,643,140,000,000,000,000,000,000,000 | 11 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
void mono_thread_interruption_checkpoint ()
{
mono_thread_interruption_checkpoint_request (FALSE);
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 12,002,021,201,130,865,000,000,000,000,000,000,000 | 4 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
int tcp_abort(struct sock *sk, int err)
{
if (!sk_fullsock(sk)) {
if (sk->sk_state == TCP_NEW_SYN_RECV) {
struct request_sock *req = inet_reqsk(sk);
local_bh_disable();
inet_csk_reqsk_queue_drop(req->rsk_listener, req);
local_bh_enable();
return 0;
}
return -EOPNOTSUPP;
}
/* Don't race with us... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 238,454,580,999,005,250,000,000,000,000,000,000,000 | 42 | 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... |
PHPAPI void session_adapt_url(const char *url, size_t urllen, char **new, size_t *newlen) /* {{{ */
{
if (APPLY_TRANS_SID && (PS(session_status) == php_session_active)) {
*new = php_url_scanner_adapt_single_url(url, urllen, PS(session_name), ZSTR_VAL(PS(id)), newlen, 1);
}
} | 0 | [
"CWE-476"
] | php-src | d76f7c6c636b8240e06a1fa29eebb98ad005008a | 244,124,283,775,561,240,000,000,000,000,000,000,000 | 6 | Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress |
static void copy_chroma(AVFrame *dst, AVFrame *src, int width, int height)
{
int i, j;
for (j = 1; j < 3; j++) {
for (i = 0; i < height / 2; i++)
memcpy(dst->data[j] + i * dst->linesize[j],
src->data[j] + i * src->linesize[j], width / 2);
}
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 130,533,148,743,792,130,000,000,000,000,000,000,000 | 10 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
htmlParseComment(htmlParserCtxtPtr ctxt) {
xmlChar *buf = NULL;
int len;
int size = HTML_PARSER_BUFFER_SIZE;
int q, ql;
int r, rl;
int cur, l;
xmlParserInputState state;
/*
* Check that there is a comment right here.
*/
if ((RAW != '<') || (NXT(1) != '!') ||
(NXT(2... | 0 | [
"CWE-119"
] | libxml2 | e724879d964d774df9b7969fc846605aa1bac54c | 304,355,545,290,564,280,000,000,000,000,000,000,000 | 81 | Fix parsing short unclosed comment uninitialized access
For https://bugzilla.gnome.org/show_bug.cgi?id=746048
The HTML parser was too optimistic when processing comments and
didn't check for the end of the stream on the first 2 characters |
swf_type_find (GstTypeFind * tf, gpointer unused)
{
const guint8 *data = gst_type_find_peek (tf, 0, 4);
if (data && (data[0] == 'F' || data[0] == 'C') &&
data[1] == 'W' && data[2] == 'S') {
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SWF_CAPS);
}
} | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 319,347,974,155,700,220,000,000,000,000,000,000,000 | 9 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 |
nfs4_init_uniquifier_client_string(struct nfs_client *clp)
{
size_t len;
char *str;
len = 10 + 10 + 1 + 10 + 1 +
strlen(nfs4_client_id_uniquifier) + 1 +
strlen(clp->cl_rpcclient->cl_nodename) + 1;
if (len > NFS4_OPAQUE_LIMIT + 1)
return -EINVAL;
/*
* Since this string is allocated at mount time, and hel... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 123,700,907,025,249,150,000,000,000,000,000,000,000 | 28 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static inline bool nested_cpu_has_virt_x2apic_mode(struct vmcs12 *vmcs12)
{
return nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 67,044,964,536,111,930,000,000,000,000,000,000,000 | 4 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
is_simple_one_char_repeat(Node* node, Node** rquant, Node** rbody,
int* is_possessive, ScanEnv* env)
{
Node* quant;
Node* body;
*rquant = *rbody = 0;
*is_possessive = 0;
if (NODE_TYPE(node) == NODE_QUANT) {
quant = node;
}
else {
if (NODE_TYPE(node) == NODE_BAG) {
... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 74,329,338,078,111,845,000,000,000,000,000,000,000 | 65 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
void BMK_SetNbIterations(int nbLoops)
{
nbIterations = nbLoops;
DISPLAY("- %i iterations -\n", nbIterations);
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 274,445,513,186,898,480,000,000,000,000,000,000,000 | 5 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static int io_rsrc_node_switch_start(struct io_ring_ctx *ctx)
{
if (ctx->rsrc_backup_node)
return 0;
ctx->rsrc_backup_node = io_rsrc_node_alloc(ctx);
return ctx->rsrc_backup_node ? 0 : -ENOMEM; | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 124,476,896,966,925,300,000,000,000,000,000,000,000 | 7 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
int ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc)
{
/* We have all inode data except xattrs in memory here. */
return __ext4_get_inode_loc(inode, iloc,
!(EXT4_I(inode)->i_state & EXT4_STATE_XATTR));
} | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 322,029,092,253,848,550,000,000,000,000,000,000,000 | 6 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
pevent_find (char *name, int *i_i)
{
int i = *i_i, j;
j = i + 1;
while (1)
{
if (j == NUM_XP)
j = 0;
if (strcmp (te[j].name, name) == 0)
{
*i_i = j;
return j;
}
if (j == i)
return -1;
j++;
}
} | 0 | [
"CWE-22"
] | hexchat | 15600f405f2d5bda6ccf0dd73957395716e0d4d3 | 111,769,934,541,119,420,000,000,000,000,000,000,000 | 19 | Sanitize network name for scrollback files
This prevents using invalid chars on Windows or creating directories |
int hsr_create_self_node(struct list_head *self_node_db,
unsigned char addr_a[ETH_ALEN],
unsigned char addr_b[ETH_ALEN])
{
struct hsr_node *node, *oldnode;
node = kmalloc(sizeof(*node), GFP_KERNEL);
if (!node)
return -ENOMEM;
ether_addr_copy(node->MacAddressA, addr_a);
ether_addr_copy(node->MacAddressB... | 0 | [
"CWE-772",
"CWE-269",
"CWE-401"
] | linux | 6caabe7f197d3466d238f70915d65301f1716626 | 39,517,257,189,146,854,000,000,000,000,000,000,000 | 28 | net: hsr: fix memory leak in hsr_dev_finalize()
If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to
add port, it directly returns res and forgets to free the node
that allocated in hsr_create_self_node(), and forgets to delete
the node->mac_list linked in hsr->self_node_db.
BUG: memory leak
unreferenced object 0xf... |
handle_client_data_external_mech (DBusAuth *auth,
const DBusString *data)
{
return TRUE;
} | 0 | [
"CWE-59"
] | dbus | 47b1a4c41004bf494b87370987b222c934b19016 | 86,922,368,282,384,570,000,000,000,000,000,000,000 | 6 | auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner
The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership
of a shared home directory by having the server write a secret "cookie"
into a .dbus-keyrings subdirectory of the desired identity's home
directory with 0700 permissions, and having... |
double Field_datetime_with_dec::val_real(void)
{
MYSQL_TIME ltime;
get_date(<ime, 0);
return TIME_to_double(<ime);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 299,342,116,103,430,900,000,000,000,000,000,000,000 | 6 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
die (const char *format, ...)
{
va_list arg_ptr;
fflush (stdout);
fprintf (stderr, "%s: ", PGM);
va_start (arg_ptr, format);
vfprintf (stderr, format, arg_ptr);
va_end (arg_ptr);
putc ('\n', stderr);
exit (1);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 145,507,839,498,685,100,000,000,000,000,000,000,000 | 14 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
Status Command::checkAuthorization(Command* c,
OperationContext* opCtx,
const OpMsgRequest& request) {
Status status = _checkAuthorizationImpl(c, opCtx, request);
if (!status.isOK()) {
log(LogComponent::kAccessControl) << status;
... | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 180,563,612,610,494,800,000,000,000,000,000,000,000 | 10 | SERVER-38275 ban explain with UUID |
static int audit_field_compare(struct task_struct *tsk,
const struct cred *cred,
struct audit_field *f,
struct audit_context *ctx,
struct audit_names *name)
{
switch (f->val) {
/* process to file object comparisons */
case AUDIT_COMPARE_UID_TO_OBJ_UID:
return audit_compare_u... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 297,844,723,227,429,700,000,000,000,000,000,000,000 | 71 | audit: fix a double fetch in audit_log_single_execve_arg()
There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1]. Of course this leaves a... |
dbcs_ptr2cells(char_u *p)
{
// Number of cells is equal to number of bytes, except for euc-jp when
// the first byte is 0x8e.
if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
return 1;
return MB_BYTE2LEN(*p);
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 248,701,691,113,346,770,000,000,000,000,000,000,000 | 8 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
auth_delay(
struct parse *pcmd,
FILE *fp
)
{
int isneg;
u_long val;
if (pcmd->nargs == 0) {
val = delay_time.l_ui * 1000 + delay_time.l_uf / 4294967;
(void) fprintf(fp, "delay %lu ms\n", val);
} else {
if (pcmd->argval[0].ival < 0) {
isneg = 1;
val = (u_long)(-pcmd->argval[0].ival);
} else {
is... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 57,153,346,098,789,110,000,000,000,000,000,000,000 | 28 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
can_change_color(void)
{
return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN);
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 108,034,158,383,246,620,000,000,000,000,000,000,000 | 4 | 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... |
void TestJlCompress::extractFiles_data()
{
QTest::addColumn<QString>("zipName");
QTest::addColumn<QStringList>("fileNames");
QTest::addColumn<QStringList>("filesToExtract");
QTest::newRow("simple") << "jlextfiles.zip" << (
QStringList() << "test0.txt" << "testdir1/test1.txt"
<< "... | 0 | [
"CWE-22"
] | quazip | 5d2fc16a1976e5bf78d2927b012f67a2ae047a98 | 41,253,996,197,596,105,000,000,000,000,000,000,000 | 10 | Fixed the Zip Slip vulnerability in JlCompress
When extracting a file with a dangerous path like "../evil.exe"
from a ZIP archive with JlCompress::extractDir(), the target
file would be created outside of the target directory, potentially
even overwriting an existing file there. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.