func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
PHP_FUNCTION(xsl_xsltprocessor_get_parameter)
{
zval *id;
int name_len = 0, namespace_len = 0;
char *name, *namespace;
zval **value;
xsl_object *intern;
DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &namespace, &namespace_len, &name, &name_len) == FAILURE) {
RETURN_FALSE;
}
i... | 0 | [] | php-src | 1744be2d17befc69bf00033993f4081852a747d6 | 94,529,518,777,447,440,000,000,000,000,000,000,000 | 21 | Fix for bug #69782 |
int socket_create_unix(const char *filename)
{
struct sockaddr_un name;
int sock;
size_t size;
// remove if still present
unlink(filename);
/* Create the socket. */
sock = socket(PF_LOCAL, SOCK_STREAM, 0);
if (sock < 0) {
perror("socket");
return -1;
}
/* Bind a name to the socket. */
name.sun_family ... | 0 | [
"CWE-284"
] | libimobiledevice | df1f5c4d70d0c19ad40072f5246ca457e7f9849e | 33,946,370,850,561,860,000,000,000,000,000,000,000 | 45 | common: [security fix] Make sure sockets only listen locally |
const char *recovery_get_auto_completed_word(void)
{
return auto_completed_word;
} | 0 | [
"CWE-354"
] | keepkey-firmware | 769714fcb569e7a4faff9530a2d9ac1f9d6e5680 | 114,564,668,929,741,390,000,000,000,000,000,000,000 | 4 | firmware: stronger recovery state machine checks |
void ring_buffer_set_clock(struct trace_buffer *buffer,
u64 (*clock)(void))
{
buffer->clock = clock;
} | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 253,205,795,180,569,040,000,000,000,000,000,000,000 | 5 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
static void fits_delete_filestruct (FITS_FILE *ff)
{
if (ff == NULL) return;
fits_delete_hdulist (ff->hdu_list);
ff->hdu_list = NULL;
ff->fp = NULL;
free ((char *)ff);
} | 0 | [
"CWE-476"
] | gimp | ace45631595e8781a1420842582d67160097163c | 86,836,651,480,517,720,000,000,000,000,000,000,000 | 11 | Bug 676804 - file handling DoS for fit file format
Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on
broken/malicious fits files. |
static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoPtr, char **pszEncoding, char *szValuePtr, int ByteCount)
{
int a;
char *decode;
size_t len;
*pszEncoding = NULL;
/* Copy the comment */
if (ByteCount>=8) {
const zend_encoding *from, *to;
if (!memcmp(szValuePtr, "UNICODE\0", 8... | 0 | [
"CWE-125"
] | php-src | e648fa4699e8d072db6db34fcc09826e8127fab8 | 150,305,315,106,867,860,000,000,000,000,000,000,000 | 84 | Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
(cherry picked from commit aeb6d13185a2ea4f1496ede2697469faed98ce05) |
diff_set_topline(win_T *fromwin, win_T *towin)
{
buf_T *frombuf = fromwin->w_buffer;
linenr_T lnum = fromwin->w_topline;
int fromidx;
int toidx;
diff_T *dp;
int max_count;
int i;
fromidx = diff_buf_idx(frombuf);
if (fromidx == DB_COUNT)
return; // safety check
if (curtab-... | 0 | [
"CWE-787"
] | vim | c101abff4c6756db4f5e740fde289decb9452efa | 337,452,414,291,621,100,000,000,000,000,000,000,000 | 115 | patch 8.2.5164: invalid memory access after diff buffer manipulations
Problem: Invalid memory access after diff buffer manipulations.
Solution: Use zero offset when change removes all lines in a diff block. |
static int yam_siocdevprivate(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd)
{
struct yam_port *yp = netdev_priv(dev);
struct yamdrv_ioctl_cfg yi;
struct yamdrv_ioctl_mcs *ym;
int ioctl_cmd;
if (copy_from_user(&ioctl_cmd, data, sizeof(int)))
return -EFAULT;
if (yp->magic != YAM_MAGIC)
... | 1 | [
"CWE-401"
] | linux | 29eb31542787e1019208a2e1047bb7c76c069536 | 84,149,016,419,432,220,000,000,000,000,000,000,000 | 135 | yam: fix a memory leak in yam_siocdevprivate()
ym needs to be free when ym->cmd != SIOCYAMSMCS.
Fixes: 0781168e23a2 ("yam: fix a missing-check bug")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
MagickExport MagickBooleanType RegisterStaticModule(const char *module,
ExceptionInfo *exception)
{
char
module_name[MagickPathExtent];
PolicyRights
rights;
const CoderInfo
*p;
size_t
extent;
ssize_t
i;
/*
Assign module name from alias.
*/
assert(module != (const char *) N... | 0 | [
"CWE-200",
"CWE-362"
] | ImageMagick | 01faddbe2711a4156180c4a92837e2f23683cc68 | 196,456,907,810,022,900,000,000,000,000,000,000,000 | 47 | Use the correct rights. |
void mobi_free_opf_metadata(OPFmetadata *metadata) {
if (metadata) {
/* <meta/> */
mobi_free_opf_struct_2el(metadata->meta, name, content);
/* <dc-metadata/> */
mobi_free_opf_struct_3el(metadata->dc_meta->contributor, value, file_as, role);
mobi_free_opf_struct_3el(metadata->... | 0 | [
"CWE-476"
] | libmobi | c0699c8693c47f14a2e57dec7292e862ac7adf9c | 7,091,873,981,817,267,000,000,000,000,000,000,000 | 32 | Fix undefined behavior when passing null to strdup |
static inline int blkcipher_next_copy(struct blkcipher_walk *walk)
{
u8 *tmp = walk->page;
blkcipher_map_src(walk);
memcpy(tmp, walk->src.virt.addr, walk->nbytes);
blkcipher_unmap_src(walk);
walk->src.virt.addr = tmp;
walk->dst.virt.addr = tmp;
return 0;
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 57,224,363,257,191,180,000,000,000,000,000,000,000 | 13 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
cmsBool IsAvailableOnList(KEYVALUE* p, const char* Key, const char* Subkey, KEYVALUE** LastPtr)
{
if (LastPtr) *LastPtr = p;
for (; p != NULL; p = p->Next) {
if (LastPtr) *LastPtr = p;
if (*Key != '#') { // Comments are ignored
if (cmsstrcasecmp(Key, p->Keyword) == 0)
... | 0 | [
"CWE-190",
"CWE-787"
] | Little-CMS | 768f70ca405cd3159d990e962d54456773bb8cf8 | 271,369,939,249,444,650,000,000,000,000,000,000,000 | 33 | Upgrade Visual studio 2017 15.8
- Upgrade to 15.8
- Add check on CGATS memory allocation (thanks to Quang Nguyen for
pointing out this) |
int proc_match(int len, const char *name, struct proc_dir_entry *de)
{
if (de->namelen != len)
return 0;
return !memcmp(name, de->name, len);
} | 0 | [] | linux-2.6 | 8b90db0df7187a01fb7177f1f812123138f562cf | 183,973,834,761,717,400,000,000,000,000,000,000,000 | 6 | Insanity avoidance in /proc
The old /proc interfaces were never updated to use loff_t, and are just
generally broken. Now, we should be using the seq_file interface for
all of the proc files, but converting the legacy functions is more work
than most people care for and has little upside..
But at least we can make t... |
static noinline int mmc_ioctl_cdrom_read_audio(struct cdrom_device_info *cdi,
void __user *arg)
{
struct cdrom_read_audio ra;
int lba;
if (copy_from_user(&ra, (struct cdrom_read_audio __user *)arg,
sizeof(ra)))
return -EFAULT;
if (ra.addr_format == CDROM_MSF)
lba = msf_to_lba(ra.addr.msf.min... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 129,389,585,394,184,800,000,000,000,000,000,000,000 | 25 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
int prepare_revision_walk(struct rev_info *revs)
{
int nr = revs->pending.nr;
struct object_array_entry *e, *list;
e = list = revs->pending.objects;
revs->pending.nr = 0;
revs->pending.alloc = 0;
revs->pending.objects = NULL;
while (--nr >= 0) {
struct commit *commit = handle_commit(revs, e->item, e->name);
... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 126,267,795,494,624,200,000,000,000,000,000,000,000 | 30 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
vte_sequence_handler_full_reset (VteTerminal *terminal, GValueArray *params)
{
vte_terminal_reset(terminal, TRUE, TRUE);
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 293,384,036,369,657,900,000,000,000,000,000,000,000 | 4 | fix bug #548272
svn path=/trunk/; revision=2365 |
png_write_finish_row(png_structrp png_ptr)
{
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
static PNG... | 0 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 248,833,165,426,313,700,000,000,000,000,000,000,000 | 81 | [libpng16] Reject attempt to write over-length PLTE chunk |
static inline int balance_need_close(struct btrfs_fs_info *fs_info)
{
/* cancel requested || normal exit path */
return atomic_read(&fs_info->balance_cancel_req) ||
(atomic_read(&fs_info->balance_pause_req) == 0 &&
atomic_read(&fs_info->balance_cancel_req) == 0);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 170,290,357,769,904,500,000,000,000,000,000,000,000 | 7 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
static BOOL clear_decompress_subcode_rlex(wStream* s, UINT32 bitmapDataByteCount, UINT32 width,
UINT32 height, BYTE* pDstData, UINT32 DstFormat,
UINT32 nDstStep, UINT32 nXDstRel, UINT32 nYDstRel,
... | 0 | [
"CWE-125"
] | FreeRDP | 363d7046dfec4003b91aecf7867e3b05905f3843 | 241,001,505,274,535,700,000,000,000,000,000,000,000 | 189 | Fixed oob read in clear_decompress_subcode_rlex
Fixed length checks before stream read.
Thanks to hac425 CVE-2020-11040 |
TEST_F(QueryPlannerTest, ExistsTrueOnUnindexedField) {
addIndex(BSON("x" << 1));
runQuery(fromjson("{x: 1, y: {$exists: true}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists("{fetch: {node: {ixscan: {pattern: {x: 1}}}}}");
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 173,077,958,261,379,420,000,000,000,000,000,000,000 | 9 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval tmp, *varname;
HashTable *target_symbol_table;
zend_free_op free_op1;
if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
if (EG(active_symbol_table)) {
zend_execute_da... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 185,571,171,876,027,300,000,000,000,000,000,000,000 | 83 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static gboolean avrcp_handle_set_volume(struct avctp *conn, uint8_t code,
uint8_t subunit, uint8_t transaction,
uint8_t *operands, size_t operand_count,
void *user_data)
{
struct avrcp *session = user_data;
struct avrcp_player *player = target_get_player(session);
struct avrcp_header *pdu = (void *) o... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 263,975,895,026,887,530,000,000,000,000,000,000,000 | 24 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
MagickExport Image *StreamImage(const ImageInfo *image_info,
StreamInfo *stream_info,ExceptionInfo *exception)
{
Image
*image;
ImageInfo
*read_info;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void... | 0 | [
"CWE-119"
] | ImageMagick | 4e8c2ed53fcb54a34b3a6185b2584f26cf6874a3 | 139,638,465,011,137,570,000,000,000,000,000,000,000 | 30 | https://github.com/ImageMagick/ImageMagick/issues/312 |
static inline void clear_timeout(struct aio_timeout *to)
{
del_singleshot_timer_sync(&to->timer);
} | 0 | [
"CWE-190"
] | linux-2.6 | 75e1c70fc31490ef8a373ea2a4bea2524099b478 | 148,939,268,055,268,320,000,000,000,000,000,000,000 | 4 | aio: check for multiplication overflow in do_io_submit
Tavis Ormandy pointed out that do_io_submit does not do proper bounds
checking on the passed-in iocb array:
if (unlikely(nr < 0))
return -EINVAL;
if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))
retu... |
struct bpf_prog *bpf_prog_inc_not_zero(struct bpf_prog *prog)
{
int refold;
refold = atomic64_fetch_add_unless(&prog->aux->refcnt, 1, 0);
if (!refold)
return ERR_PTR(-ENOENT);
return prog;
} | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 326,352,597,560,898,130,000,000,000,000,000,000,000 | 11 | 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... |
int Field_float::store(longlong nr, bool unsigned_val)
{
return Field_float::store(unsigned_val ? ulonglong2double((ulonglong) nr) :
(double) nr);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 273,018,131,438,756,650,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int prepare_or_error(handlerton *ht, THD *thd, bool all)
{
#ifdef WITH_WSREP
const bool run_wsrep_hooks= wsrep_run_commit_hook(thd, all);
if (run_wsrep_hooks && ht->flags & HTON_WSREP_REPLICATION &&
wsrep_before_prepare(thd, all))
{
return(1);
}
#endif /* WITH_WSREP */
int err= ht->prepare(h... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 95,658,512,555,245,490,000,000,000,000,000,000,000 | 27 | 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 |
resolve_base_ident_sub(const struct lys_module *module, struct lys_ident *ident, const char *basename,
struct unres_schema *unres, struct lys_ident **ret)
{
uint32_t i, j;
struct lys_ident *base = NULL;
struct ly_ctx *ctx = module->ctx;
assert(ret);
/* search module */
f... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 322,592,767,676,630,300,000,000,000,000,000,000,000 | 70 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
QUtil::int_to_string(long long num, int length)
{
return int_to_string_base(num, 10, length);
} | 0 | [
"CWE-125"
] | qpdf | 6d46346eb93d5032c08cf1e39023b5d57260a766 | 335,218,856,802,499,700,000,000,000,000,000,000,000 | 4 | Detect integer overflow/underflow |
static struct sock *__raw_v4_lookup(struct net *net, struct sock *sk,
unsigned short num, __be32 raddr, __be32 laddr, int dif)
{
sk_for_each_from(sk) {
struct inet_sock *inet = inet_sk(sk);
if (net_eq(sock_net(sk), net) && inet->inet_num == num &&
!(inet->inet_daddr && inet->inet_daddr != raddr) &&
... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 57,955,928,500,855,190,000,000,000,000,000,000,000 | 16 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
int64_t get_uid() { return _uid++; } | 0 | [
"CWE-476",
"CWE-908"
] | tensorflow | 237822b59fc504dda2c564787f5d3ad9c4aa62d9 | 259,840,219,381,266,060,000,000,000,000,000,000,000 | 1 | Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types.
When iterating through the tensor to extract shape values, an underlying missing kernel
(`StridedSlice` for quantized types) causes an error, which then results in a `nullptr`
being passed to `ParseDimensionValue()`, causing a segfault.
The... |
wireless_menu_item_info_destroy (gpointer data)
{
WirelessMenuItemInfo *info = (WirelessMenuItemInfo *) data;
g_object_unref (G_OBJECT (info->device));
g_object_unref (G_OBJECT (info->ap));
if (info->connection)
g_object_unref (G_OBJECT (info->connection));
g_slice_free (WirelessMenuItemInfo, data);
} | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 15,409,265,821,891,909,000,000,000,000,000,000,000 | 12 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static int selinux_dentry_open(struct file *file, const struct cred *cred)
{
struct file_security_struct *fsec;
struct inode *inode;
struct inode_security_struct *isec;
inode = file->f_path.dentry->d_inode;
fsec = file->f_security;
isec = inode->i_security;
/*
* Save inode label and policy sequence number
*... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 121,363,439,399,438,980,000,000,000,000,000,000,000 | 28 | 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... |
static void lag_pred_line_yuy2(LagarithContext *l, uint8_t *buf,
int width, int stride, int line,
int is_luma)
{
int L, TL;
if (!line) {
int i, align_width;
if (is_luma) {
buf++;
width--;
}
al... | 0 | [
"CWE-787"
] | FFmpeg | 4c3e1956ee35fdcc5ffdb28782050164b4623c0b | 232,017,909,670,231,560,000,000,000,000,000,000,000 | 43 | 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 ssize_t pause_once_data_source_read_callback(
nghttp2_session *session, int32_t stream_id, uint8_t *buf, size_t len,
uint32_t *data_flags, nghttp2_data_source *source, void *user_data) {
my_user_data *ud = user_data;
if (ud->data_source_read_cb_paused == 0) {
++ud->data_source_read_cb_paused;
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 202,831,824,765,061,600,000,000,000,000,000,000,000 | 12 | Add nghttp2_option_set_max_outbound_ack |
int tls1_check_curve(SSL *s, const unsigned char *p, size_t len)
{
const unsigned char *curves;
size_t num_curves, i;
unsigned int suiteb_flags = tls1_suiteb(s);
if (len != 3 || p[0] != NAMED_CURVE_TYPE)
return 0;
/* Check curve matches Suite B preferences */
if (suiteb_flags) {
... | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 151,262,694,666,287,680,000,000,000,000,000,000,000 | 29 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c |
usage(void)
{
static const char *msg[] =
{
"Usage: dots_curses [options]"
,""
,"Options:"
," -T TERM override $TERM"
#if HAVE_USE_DEFAULT_COLORS
," -d invoke use_default_colors()"
#endif
#if HAVE_USE_ENV
," -e allow environment $LINES / $COLUMNS"
#endif
," -m SIZE set margin (default: 2)"
... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 99,226,245,999,914,140,000,000,000,000,000,000,000 | 25 | 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... |
XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing peParsing) {
if (parser == NULL)
return 0;
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (parser->m_parsingStatus.parsing == XML_PARSING
|| parser->m_parsingStatus.parsing == XML_SUSPE... | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 201,317,641,508,858,840,000,000,000,000,000,000,000 | 15 | xmlparse.c: Deny internal entities closing the doctype |
u32 gf_isom_has_track_reference(GF_ISOFile *movie, u32 trackNumber, u32 referenceType, GF_ISOTrackID refTrackID)
{
u32 i;
GF_TrackBox *trak;
GF_TrackReferenceTypeBox *dpnd;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak) return 0;
if (!trak->References) return 0;
dpnd = NULL;
if ( (movie->La... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 179,580,474,779,494,930,000,000,000,000,000,000,000 | 17 | fixed #1706 |
void show_submodule_inline_diff(FILE *f, const char *path,
const char *line_prefix,
struct object_id *one, struct object_id *two,
unsigned dirty_submodule, const char *meta,
const char *del, const char *add, const char *reset,
const struct diff_options *o)
{
const struct object_id *old = &empty_tree_oid, *ne... | 0 | [] | git | a8dee3ca610f5a1d403634492136c887f83b59d2 | 217,389,270,659,199,700,000,000,000,000,000,000,000 | 70 | Disallow dubiously-nested submodule git directories
Currently it is technically possible to let a submodule's git
directory point right into the git dir of a sibling submodule.
Example: the git directories of two submodules with the names `hippo`
and `hippo/hooks` would be `.git/modules/hippo/` and
`.git/modules/hipp... |
auth_request_want_skip_passdb(struct auth_request *request,
struct auth_passdb *passdb)
{
/* if mechanism is not supported, skip */
const char *const *mechs = passdb->mechanisms;
const char *const *username_filter = passdb->username_filter;
const char *username;
username = request->fields.user;
if (!au... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 295,394,450,798,309,080,000,000,000,000,000,000,000 | 41 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
char* problem_data_save(problem_data_t *pd)
{
load_abrt_conf();
struct dump_dir *dd = NULL;
if (g_settings_privatereports)
dd = create_dump_dir_from_problem_data_ext(pd, g_settings_dump_location, 0);
else
dd = create_dump_dir_from_problem_data(pd, g_settings_dump_location);
char *... | 0 | [
"CWE-59"
] | abrt | 7417505e1d93cc95ec648b74e3c801bc67aacb9f | 146,926,340,269,001,140,000,000,000,000,000,000,000 | 21 | daemon, dbus: allow only root to create CCpp, Koops, vmcore and xorg
Florian Weimer <fweimer@redhat.com>:
This prevents users from feeding things that are not actually
coredumps and excerpts from /proc to these analyzers.
For example, it should not be possible to trigger a rule with
“EVENT=post-create... |
xfs_file_splice_read(
struct file *infilp,
loff_t *ppos,
struct pipe_inode_info *pipe,
size_t count,
unsigned int flags)
{
struct xfs_inode *ip = XFS_I(infilp->f_mapping->host);
int ioflags = 0;
ssize_t ret;
XFS_STATS_INC(xs_read_calls);
if (infilp->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 264,353,747,223,395,050,000,000,000,000,000,000,000 | 30 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
psutil_raise_for_pid(long pid, char *syscall_name) {
// Set exception to AccessDenied if pid exists else NoSuchProcess.
if (errno != 0) {
// Unlikely we get here.
PyErr_SetFromErrno(PyExc_OSError);
return 0;
}
else if (psutil_pid_exists(pid) == 0) {
psutil_debug("%s sysca... | 0 | [
"CWE-415"
] | psutil | 3a9bccfd2c6d2e6538298cd3892058b1204056e0 | 238,944,567,179,707,320,000,000,000,000,000,000,000 | 17 | psutil/_psutil_posix.c: better clear variables to ensure they are NULL (#1624) |
AP4_AvccAtom::GetProfileName(AP4_UI08 profile)
{
switch (profile) {
case AP4_AVC_PROFILE_BASELINE: return "Baseline";
case AP4_AVC_PROFILE_MAIN: return "Main";
case AP4_AVC_PROFILE_EXTENDED: return "Extended";
case AP4_AVC_PROFILE_HIGH: return "High";
case AP4_AVC_... | 0 | [
"CWE-125",
"CWE-787"
] | Bento4 | 53499d8d4c69142137c7c7f0097a444783fdeb90 | 272,348,950,357,089,330,000,000,000,000,000,000,000 | 14 | fix for #188 |
static int mov_write_tmpo_tag(AVIOContext *pb, AVFormatContext *s)
{
AVDictionaryEntry *t = av_dict_get(s->metadata, "tmpo", NULL, 0);
int size = 0, tmpo = t ? atoi(t->value) : 0;
if (tmpo) {
size = 26;
avio_wb32(pb, size);
ffio_wfourcc(pb, "tmpo");
avio_wb32(pb, size-8); /* ... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 158,069,289,184,002,440,000,000,000,000,000,000,000 | 16 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts,
u32 rcv_nxt)
{
struct tcp_sock *tp = tcp_sk(sk);
if (unlikely(tp->compressed_ack > TCP_FASTRETRANS_THRESH)) {
NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPACKCOMPRESSED,
tp->compressed_ack - TCP_FASTRETRANS_THRESH);
tp->comp... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 42,705,179,727,510,270,000,000,000,000,000,000,000 | 18 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static int fetch_db_collation(const char *db_name,
char *db_cl_name,
int db_cl_size)
{
my_bool err_status= FALSE;
char query[QUERY_LENGTH];
MYSQL_RES *db_cl_res;
MYSQL_ROW db_cl_row;
char quoted_database_buf[NAME_LEN*2+3];
char *qdatabase= quote_na... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 160,778,654,373,363,700,000,000,000,000,000,000,000 | 43 | 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... |
int ipa_extdom_init(Slapi_PBlock *pb)
{
int ret;
struct ipa_extdom_ctx *extdom_ctx;
ret = ipa_extdom_init_ctx(pb, &extdom_ctx);
if (ret) {
LOG_FATAL("Failed ot initialize external domain extended operation.\n");
/* do not cause DS to stop, simply do nothing */
return 0;
}
... | 0 | [
"CWE-19"
] | freeipa | c15a407cbfaed163a933ab137eed16387efe25d2 | 207,297,033,441,098,530,000,000,000,000,000,000,000 | 43 | extdom: make nss buffer configurable
The get*_r_wrapper() calls expect a maximum buffer size to avoid memory
shortage if too many threads try to allocate buffers e.g. for large
groups. With this patch this size can be configured by setting
ipaExtdomMaxNssBufSize in the plugin config object
cn=ipa_extdom_extop,cn=plugi... |
replace_write_f2d (SF_PRIVATE *psf, const float *ptr, sf_count_t len)
{ BUF_UNION ubuf ;
int bufferlen, writecount ;
sf_count_t total = 0 ;
bufferlen = ARRAY_LEN (ubuf.dbuf) ;
while (len > 0)
{ if (len < bufferlen)
bufferlen = (int) len ;
f2d_array (ptr + total, ubuf.dbuf, bufferlen) ;
bd2d_write (ubuf... | 0 | [
"CWE-369"
] | libsndfile | 85c877d5072866aadbe8ed0c3e0590fbb5e16788 | 136,546,278,536,542,520,000,000,000,000,000,000,000 | 26 | double64_init: Check psf->sf.channels against upper bound
This prevents division by zero later in the code.
While the trivial case to catch this (i.e. sf.channels < 1) has already
been covered, a crafted file may report a number of channels that is
so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
miscal... |
static inline int ape_decode_value_3990(APEContext *ctx, APERice *rice)
{
unsigned int x, overflow;
int base, pivot;
pivot = rice->ksum >> 5;
if (pivot == 0)
pivot = 1;
overflow = range_get_symbol(ctx, counts_3980, counts_diff_3980);
if (overflow == (MODEL_ELEMENTS - 1)) {
ove... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 201,583,163,566,223,850,000,000,000,000,000,000,000 | 42 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
fetch_interval_quantifier(UChar** src, UChar* end, PToken* tok, ScanEnv* env)
{
int low, up, syn_allow, non_low = 0;
int r = 0;
OnigCodePoint c;
OnigEncoding enc = env->enc;
UChar* p = *src;
PFETCH_READY;
syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL);
if (PEND) {
if (syn_a... | 1 | [
"CWE-125"
] | oniguruma | 6eb4aca6a7f2f60f473580576d86686ed6a6ebec | 266,872,487,805,502,770,000,000,000,000,000,000,000 | 100 | fix #162: heap-buffer-overflow in fetch_interval_quantifier due to double PFETCH |
int unhandled_signal(struct task_struct *tsk, int sig)
{
void __user *handler = tsk->sighand->action[sig-1].sa.sa_handler;
if (is_global_init(tsk))
return 1;
if (handler != SIG_IGN && handler != SIG_DFL)
return 0;
return !tracehook_consider_fatal_signal(tsk, sig);
} | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 44,822,963,078,534,430,000,000,000,000,000,000,000 | 9 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
static void vmx_set_tsc_khz(struct kvm_vcpu *vcpu, u32 user_tsc_khz, bool scale)
{
if (!scale)
return;
if (user_tsc_khz > tsc_khz) {
vcpu->arch.tsc_catchup = 1;
vcpu->arch.tsc_always_catchup = 1;
} else
WARN(1, "user requested TSC rate below hardware speed\n");
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 294,283,931,466,379,030,000,000,000,000,000,000,000 | 11 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
static inline void debug_hrtimer_deactivate(struct hrtimer *timer) { } | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 151,614,501,683,280,580,000,000,000,000,000,000,000 | 1 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
RefreshLine(y, from, to, isblank)
int y, from, to, isblank;
{
struct viewport *vp, *lvp;
struct canvas *cv, *lcv, *cvlist, *cvlnext;
struct layer *oldflayer;
int xx, yy, l;
char *buf;
struct win *p;
ASSERT(display);
debug2("RefreshLine %d %d", y, from);
debug2(" %d %d\n", to, isblank);
if (D_stat... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 103,976,507,966,031,980,000,000,000,000,000,000,000 | 150 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static int audit_set_loginuid_perm(kuid_t loginuid)
{
/* if we are unset, we don't need privs */
if (!audit_loginuid_set(current))
return 0;
/* if AUDIT_FEATURE_LOGINUID_IMMUTABLE means never ever allow a change*/
if (is_audit_feature_set(AUDIT_FEATURE_LOGINUID_IMMUTABLE))
return -EPERM;
/* it is set, you need... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 64,072,036,486,347,460,000,000,000,000,000,000,000 | 16 | 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... |
Item *create_item_ident_nosp(THD *thd, Lex_ident_sys_st *name)
{
return create_item_ident_field(thd, NullS, NullS, name);
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 298,866,559,794,247,200,000,000,000,000,000,000,000 | 4 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
*/
static void io_submit_state_end(struct io_submit_state *state,
struct io_ring_ctx *ctx)
{
if (state->link.head)
io_queue_sqe(state->link.head);
if (state->comp.nr)
io_submit_flush_completions(&state->comp, ctx);
if (state->plug_started)
blk_finish_plug(&state->plug);
io_state_file_put(state); | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 139,708,897,664,320,920,000,000,000,000,000,000,000 | 11 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static void stbi__rewind(stbi__context *s)
{
// conceptually rewind SHOULD rewind to the beginning of the stream,
// but we just rewind to the beginning of the initial buffer, because
// we only use it after doing 'test', which only ever looks at at most 92 bytes
s->img_buffer = s->img_buffer_original;
s... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 22,698,971,145,808,702,000,000,000,000,000,000,000 | 8 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
int am_read_post_data(request_rec *r, char **data, apr_size_t *length)
{
apr_size_t bytes_read;
apr_size_t bytes_left;
apr_size_t len;
long read_length;
int rc;
/* Prepare to receive data from the client. We request that apache
* dechunks data if it is chunked.
*/
rc = ap_setup_cl... | 0 | [
"CWE-284",
"CWE-601"
] | mod_auth_mellon | 62041428a32de402e0be6ba45fe12df6a83bedb8 | 170,605,764,408,376,100,000,000,000,000,000,000,000 | 80 | Fix redirect URL validation bypass
It turns out that browsers silently convert backslash characters into
forward slashes, while apr_uri_parse() does not.
This mismatch allows an attacker to bypass the redirect URL validation
by using an URL like:
https://sp.example.org/mellon/logout?ReturnTo=https:%5c%5cmalicious.... |
print_table_data_vertically(MYSQL_RES *result)
{
MYSQL_ROW cur;
uint max_length=0;
MYSQL_FIELD *field;
while ((field = mysql_fetch_field(result)))
{
uint length= field->name_length;
if (length > max_length)
max_length= length;
field->max_length=length;
}
mysql_field_seek(result,0);
... | 0 | [] | mysql-server | 20addb05e58fdf822896f490fcaaf2ec5ed4bcb5 | 279,661,196,368,080,900,000,000,000,000,000,000,000 | 55 | Bug# 25998635: Client does not escape the USE statement
When there are quotes in the USE statement, the mysql client does
not correctly escape them.
The USE statement is processed line by line from the client's parser,
and cannot handle multi-line commands as the server.
The fix is to escape the USE parameters whene... |
void die(const char *str, struct pt_regs *regs, int err)
{
enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE;
unsigned long flags = oops_begin();
int sig = SIGSEGV;
if (!user_mode(regs))
bug_type = report_bug(regs->ARM_pc, regs);
if (bug_type != BUG_TRAP_TYPE_NONE)
str = "Oops - BUG";
if (__die(str, err, reg... | 0 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 52,326,436,643,001,640,000,000,000,000,000,000,000 | 16 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
int __hid_register_driver(struct hid_driver *hdrv, struct module *owner,
const char *mod_name)
{
int ret;
hdrv->driver.name = hdrv->name;
hdrv->driver.bus = &hid_bus_type;
hdrv->driver.owner = owner;
hdrv->driver.mod_name = mod_name;
INIT_LIST_HEAD(&hdrv->dyn_list);
spin_lock_init(&hdrv->dyn_lock);
ret = d... | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 248,422,441,104,767,060,000,000,000,000,000,000,000 | 23 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
smb2_echo_callback(struct mid_q_entry *mid)
{
struct TCP_Server_Info *server = mid->callback_data;
struct smb2_echo_rsp *rsp = (struct smb2_echo_rsp *)mid->resp_buf;
unsigned int credits_received = 1;
if (mid->mid_state == MID_RESPONSE_RECEIVED)
credits_received = le16_to_cpu(rsp->hdr.sync_hdr.CreditRequest);
... | 0 | [
"CWE-476"
] | linux | cabfb3680f78981d26c078a26e5c748531257ebb | 195,718,749,269,255,970,000,000,000,000,000,000,000 | 14 | CIFS: Enable encryption during session setup phase
In order to allow encryption on SMB connection we need to exchange
a session key and generate encryption and decryption keys.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> |
pdf14_put_image(gx_device * dev, gs_gstate * pgs, gx_device * target)
{
const pdf14_device * pdev = (pdf14_device *)dev;
int code;
gs_image1_t image;
gx_image_enum_common_t *info;
pdf14_buf *buf = pdev->ctx->stack;
gs_int_rect rect = buf->rect;
int y;
int num_comp = buf->n_chan - 1;
... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 292,318,874,671,443,480,000,000,000,000,000,000,000 | 200 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
static void set_bar_num(void)
{
struct SYMBOL *s, *s2, *s3;
int bar_time, wmeasure, tim;
int bar_num, bar_rep;
wmeasure = voice_tb[cursys->top_voice].meter.wmeasure;
bar_rep = nbar;
/* don't count a bar at start of line */
for (s = tsfirst; ; s = s->ts_next) {
if (!s)
return;
switch (s->type) {
case T... | 0 | [
"CWE-787"
] | abcm2ps | dc0372993674d0b50fedfbf7b9fad1239b8efc5f | 103,489,485,019,224,760,000,000,000,000,000,000,000 | 185 | fix: crash when too many accidentals in K: (signature + explicit)
Issue #17. |
int AsioFrontend::init_ssl()
{
boost::system::error_code ec;
auto& config = conf->get_config_map();
// ssl configuration
auto cert = config.find("ssl_certificate");
const bool have_cert = cert != config.end();
if (have_cert) {
// only initialize the ssl context if it's going to be used
ssl_context ... | 0 | [
"CWE-400"
] | ceph | ff72c50a2c43c57aead933eb4903ad1ca6d1748a | 123,323,650,529,320,250,000,000,000,000,000,000,000 | 83 | rgw: improve beast
Avoid leaking connections that had partially-consumed
client data on unexpected disconnect.
Resolves CVE-2020-1700 (moderate impact flaw).
Fixes: https://tracker.ceph.com/issues/42531
Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> |
static void ssl_update_checksum_sha384( ssl_context *ssl, unsigned char *buf,
size_t len )
{
sha4_update( &ssl->handshake->fin_sha4, buf, len );
} | 0 | [
"CWE-310"
] | polarssl | 4582999be608c9794d4518ae336b265084db9f93 | 200,513,083,741,202,500,000,000,000,000,000,000,000 | 5 | Fixed timing difference resulting from badly formatted padding. |
get_register_name_from_address(guint64 addr, gboolean* is_custom_register, u3v_conv_info_t * u3v_conv_info)
{
const gchar* address_string = NULL;
guint32 offset_address;
if (is_custom_register != NULL) {
*is_custom_register = FALSE;
}
/* check if this is the access to one of the base addre... | 0 | [
"CWE-476"
] | wireshark | 2cb5985bf47bdc8bea78d28483ed224abdd33dc6 | 30,579,100,504,452,893,000,000,000,000,000,000,000 | 36 | Make class "type" for USB conversations.
USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match.
Bug: 12356
Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338... |
void Option::dump_value(const char *field_name,
const Option::value_t &v, Formatter *f) const
{
if (boost::get<boost::blank>(&v)) {
// This should be nil but Formatter doesn't allow it.
f->dump_string(field_name, "");
return;
}
switch (type) {
case TYPE_INT:
f->dump_int(field_name, boost::ge... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 304,923,266,450,346,720,000,000,000,000,000,000,000 | 23 | 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 <... |
static inline struct dump_dir *dd_init(void)
{
return (struct dump_dir*)xzalloc(sizeof(struct dump_dir));
} | 0 | [
"CWE-264"
] | libreport | 3bbf961b1884dd32654dd39b360dd78ef294b10a | 164,111,017,186,800,540,000,000,000,000,000,000,000 | 4 | never follow symlinks rhbz#887866
- use lchown instead chown and O_NOFOLLOW where we use open |
filter_free_x( Operation *op, Filter *f, int freeme )
{
Filter *p, *next;
if ( f == NULL ) {
return;
}
f->f_choice &= SLAPD_FILTER_MASK;
switch ( f->f_choice ) {
case LDAP_FILTER_PRESENT:
if ( f->f_desc->ad_flags & SLAP_DESC_TEMPORARY )
op->o_tmpfree( f->f_desc, op->o_tmpmemctx );
break;
case LDAP_F... | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 5,107,766,729,613,886,000,000,000,000,000,000,000 | 62 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
DEFUN(msgs, MSGS, "Display error messages")
{
cmd_loadBuffer(message_list_panel(), BP_NO_URL, LB_NOLINK);
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 288,861,089,537,490,850,000,000,000,000,000,000,000 | 4 | Make temporary directory safely when ~/.w3m is unwritable |
void PrintDASHUsage()
{
u32 i=0;
gf_sys_format_help(helpout, help_flags, "# DASH Options\n"
"Also see:\n"
"- the [dasher `gpac -h dash`](dasher) filter documentation\n"
"- [[DASH wiki|DASH-intro]].\n"
"\n"
"# Specifying input files\n"
"Input media files to dash can use the following modifiers\n"
"- #tra... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 155,729,523,129,967,300,000,000,000,000,000,000,000 | 50 | fixed #1734 |
void __init acpi_debugfs_init(void)
{
acpi_debugfs_dir = debugfs_create_dir("acpi", NULL);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 526b4af47f44148c9d665e57723ed9f86634c6e3 | 52,892,811,723,174,610,000,000,000,000,000,000,000 | 4 | ACPI: Split out custom_method functionality into an own driver
With /sys/kernel/debug/acpi/custom_method root can write
to arbitrary memory and increase his priveleges, even if
these are restricted.
-> Make this an own debug .config option and warn about the
security issue in the config description.
-> Still keep ac... |
output_message_handler (j_common_ptr cinfo)
{
/* This method keeps libjpeg from dumping crap to stderr */
/* do nothing */
} | 0 | [
"CWE-787"
] | gdk-pixbuf | c2a40a92fe3df4111ed9da51fe3368c079b86926 | 76,478,632,803,147,890,000,000,000,000,000,000,000 | 6 | jpeg: Throw error when number of color components is unsupported
Explicitly check "3" or "4" output color components.
gdk-pixbuf assumed that the value of output_components to be either
3 or 4, but not an invalid value (9) or an unsupported value (1).
The way the buffer size was deduced was using a naive "== 4" chec... |
PHP_FUNCTION(odbc_exec)
{
zval *pv_conn;
long pv_flags;
char *query;
int numArgs, query_len;
odbc_result *result = NULL;
odbc_connection *conn;
RETCODE rc;
#ifdef HAVE_SQL_EXTENDED_FETCH
SQLUINTEGER scrollopts;
#endif
numArgs = ZEND_NUM_ARGS();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|... | 0 | [
"CWE-20"
] | php-src | 16db4d1462bf3eacb93c0cd940f799160a284b24 | 138,672,222,242,365,630,000,000,000,000,000,000,000 | 79 | Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
The SQL Server Native Client 11.0 and maybe other ODBC drivers report
NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0. This causes too small a
buffer to be emalloc'd, likely causing a segfault in the following. As we don't
know the real size of t... |
static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf)
{
uint8_t *unescaped;
const uint8_t *start, *next, *end = track->vos_data + track->vos_len;
int unescaped_size, seq_found = 0;
int level = 0, interlace = 0;
int packet_seq = track->vc1_info.packet_seq;
int packet_entry = track->v... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 138,879,822,762,523,880,000,000,000,000,000,000,000 | 82 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
//! Convert 3D object into a CImg3d representation \overloading.
CImg<floatT> get_object3dtoCImg3d(const bool full_check=true) const {
CImgList<T> opacities, colors;
CImgList<uintT> primitives(width(),1,1,1,1);
cimglist_for(primitives,p) primitives(p,0) = p;
return get_object3dtoCImg3d(p... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 178,847,173,949,888,000,000,000,000,000,000,000,000 | 6 | . |
static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,
union sctp_params param,
struct sctp_chunk *chunk,
struct sctp_chunk **errp)
{
int retval = SCTP_IERROR_NO_ERROR;
switch (param.p->type & SCTP_PARAM_ACTION_MASK) {
case SCTP_PARAM_ACTION_DISCARD:
retval = ... | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 206,722,250,971,917,500,000,000,000,000,000,000,000 | 45 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
static int clone_submodule(const char *path, const char *gitdir, const char *url,
const char *depth, struct string_list *reference,
int quiet, int progress)
{
struct child_process cp = CHILD_PROCESS_INIT;
argv_array_push(&cp.args, "clone");
argv_array_push(&cp.args, "--no-checkout");
if (quiet)
argv_... | 1 | [
"CWE-88"
] | git | 98afac7a7cefdca0d2c4917dd8066a59f7088265 | 300,413,517,493,460,870,000,000,000,000,000,000,000 | 32 | submodule--helper: use "--" to signal end of clone options
When we clone a submodule, we call "git clone $url $path".
But there's nothing to say that those components can't begin
with a dash themselves, confusing git-clone into thinking
they're options. Let's pass "--" to make it clear what we
expect.
There's no test... |
PHP_FUNCTION(touch)
{
char *filename;
int filename_len;
long filetime = 0, fileatime = 0;
int ret, argc = ZEND_NUM_ARGS();
FILE *file;
struct utimbuf newtimebuf;
struct utimbuf *newtime = &newtimebuf;
if (zend_parse_parameters(argc TSRMLS_CC, "s|ll", &filename, &filename_len, &filetime, &fileatime) == FAILURE)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 60,631,377,324,961,330,000,000,000,000,000,000,000 | 65 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
zsetcolor(i_ctx_t * i_ctx_p)
{
os_ptr op = osp;
es_ptr ep;
const gs_color_space * pcs = gs_currentcolorspace(igs);
gs_client_color cc;
int n_comps, n_numeric_comps, num_offset = 0, code, depth;
PS_colour_space_t *space;
/* initialize the client ... | 1 | [
"CWE-704"
] | ghostpdl | 693baf02152119af6e6afd30bb8ec76d14f84bbf | 16,843,743,520,586,073,000,000,000,000,000,000,000 | 95 | PS interpreter - check the Implementation of a Pattern before use
Bug #700141 "Type confusion in setpattern"
As the bug thread says, we were not checking that the Implementation
of a pattern dictionary was a structure type, leading to a crash when
we tried to treat it as one.
Here we make the st_pattern1_instance an... |
static inline int fm10k_maybe_stop_tx(struct fm10k_ring *tx_ring, u16 size)
{
if (likely(fm10k_desc_unused(tx_ring) >= size))
return 0;
return __fm10k_maybe_stop_tx(tx_ring, size);
} | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 37,301,416,616,711,130,000,000,000,000,000,000,000 | 6 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
static inline bool key_is_instantiated(const struct key *key)
{
return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) &&
!test_bit(KEY_FLAG_NEGATIVE, &key->flags);
} | 1 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 121,846,752,444,782,050,000,000,000,000,000,000,000 | 5 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
QPDFWriter::getTrimmedTrailer()
{
// Remove keys from the trailer that necessarily have to be
// replaced when writing the file.
QPDFObjectHandle trailer = pdf.getTrailer().shallowCopy();
// Remove encryption keys
trailer.removeKey("/ID");
trailer.removeKey("/Encrypt");
// Remove modifica... | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 278,808,253,493,749,280,000,000,000,000,000,000,000 | 26 | Fix infinite loop in QPDFWriter (fixes #143) |
String *Item::val_string_from_date(String *str)
{
MYSQL_TIME ltime;
if (get_temporal_with_sql_mode(<ime) ||
str->alloc(MAX_DATE_STRING_REP_LENGTH))
{
null_value= 1;
return (String *) 0;
}
str->length(my_TIME_to_str(<ime, const_cast<char*>(str->ptr()), decimals));
str->set_charset(&my_chars... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 74,585,978,144,540,900,000,000,000,000,000,000,000 | 13 | 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. |
int ssl_cert_set1_chain(SSL *s, SSL_CTX *ctx, STACK_OF(X509) *chain)
{
STACK_OF(X509) *dchain;
if (!chain)
return ssl_cert_set0_chain(s, ctx, NULL);
dchain = X509_chain_up_ref(chain);
if (!dchain)
return 0;
if (!ssl_cert_set0_chain(s, ctx, dchain)) {
sk_X509_pop_free(dchain, ... | 0 | [
"CWE-835"
] | openssl | 758754966791c537ea95241438454aa86f91f256 | 3,471,089,488,152,479,500,000,000,000,000,000,000 | 14 | Fix invalid handling of verify errors in libssl
In the event that X509_verify() returned an internal error result then
libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This
subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY.
That return code is supposed to only ever be returned i... |
create_subscriptions(
cupsd_client_t *con, /* I - Client connection */
ipp_attribute_t *uri) /* I - Printer URI */
{
http_status_t status; /* Policy status */
int i; /* Looping var */
ipp_attribute_t *attr; /* Current attribute */
cups_ptype_t dtype; /* Destination type (printer/class) */
c... | 0 | [
"CWE-20"
] | cups | 49fa4983f25b64ec29d548ffa3b9782426007df3 | 101,787,502,833,377,100,000,000,000,000,000,000,000 | 360 | DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8. |
void fmtutil_macbitmap_read_baseaddr(deark *c, dbuf *f, struct fmtutil_macbitmap_info *bi, i64 pos)
{
i64 n;
de_dbg(c, "baseAddr part of PixMap, at %d", (int)pos);
de_dbg_indent(c, 1);
n = dbuf_getu32be(f, pos);
de_dbg(c, "baseAddr: 0x%08x", (unsigned int)n);
de_dbg_indent(c, -1);
} | 0 | [
"CWE-369"
] | deark | 62acb7753b0e3c0d3ab3c15057b0a65222313334 | 154,913,764,099,233,040,000,000,000,000,000,000,000 | 9 | pict,macrsrc: Fixed a bug that could cause division by 0
Found by F. Çelik. |
njs_encode_base64_length(const njs_str_t *src, size_t *out_size)
{
size_t size;
size = (src->length == 0) ? 0 : njs_base64_encoded_length(src->length);
if (out_size != NULL) {
*out_size = size;
}
return size;
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 279,616,328,303,416,600,000,000,000,000,000,000,000 | 12 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
ppp_hdlc(netdissect_options *ndo,
const u_char *p, int length)
{
u_char *b, *t, c;
const u_char *s;
int i, proto;
const void *se;
if (length <= 0)
return;
b = (u_char *)malloc(length);
if (b == NULL)
return;
/*
* Unescape all the data into a temporary, private, buffer.
*... | 1 | [
"CWE-703",
"CWE-770"
] | tcpdump | 32027e199368dad9508965aae8cd8de5b6ab5231 | 218,541,153,447,491,200,000,000,000,000,000,000,000 | 77 | PPP: When un-escaping, don't allocate a too-large buffer.
The buffer should be big enough to hold the captured data, but it
doesn't need to be big enough to hold the entire on-the-network packet,
if we haven't captured all of it.
(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334) |
static int mirror_flush(MirrorBlockJob *s)
{
int ret = blk_flush(s->target);
if (ret < 0) {
if (mirror_error_action(s, false, -ret) == BLOCK_ERROR_ACTION_REPORT) {
s->ret = ret;
}
}
return ret;
} | 0 | [
"CWE-476"
] | qemu | 66fed30c9cd11854fc878a4eceb507e915d7c9cd | 60,031,623,761,112,040,000,000,000,000,000,000,000 | 10 | block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()
In mirror_iteration() we call mirror_wait_on_conflicts() with
`self` parameter set to NULL.
Starting from commit d44dae1a7c we dereference `self` pointer in
mirror_wait_on_conflicts() without checks if it is not NULL.
Backtrace:
Program termi... |
static int pfkey_can_dump(const struct sock *sk)
{
if (3 * atomic_read(&sk->sk_rmem_alloc) <= 2 * sk->sk_rcvbuf)
return 1;
return 0;
} | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 308,312,997,818,549,200,000,000,000,000,000,000,000 | 6 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
TEST_F(HttpConnectionManagerImplTest, RequestTimeoutIsDisarmedOnCompleteRequestWithTrailers) {
request_timeout_ = std::chrono::milliseconds(10);
setup(false, "");
EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance& data) -> Http::Status {
Event::MockTimer* request_timer = setUpTimer();
... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 275,392,740,454,664,100,000,000,000,000,000,000,000 | 28 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int snd_msnd_isa_match(struct device *pdev, unsigned int i)
{
if (io[i] == SNDRV_AUTO_PORT)
return 0;
if (irq[i] == SNDRV_AUTO_PORT || mem[i] == SNDRV_AUTO_PORT) {
printk(KERN_WARNING LOGNAME ": io, irq and mem must be set\n");
return 0;
}
#ifdef MSND_CLASSIC
if (!(io[i] == 0x290 ||
io[i] == 0... | 0 | [
"CWE-125",
"CWE-401"
] | linux | 20e2b791796bd68816fa115f12be5320de2b8021 | 312,630,944,969,963,520,000,000,000,000,000,000,000 | 69 | ALSA: msnd: Optimize / harden DSP and MIDI loops
The ISA msnd drivers have loops fetching the ring-buffer head, tail
and size values inside the loops. Such codes are inefficient and
fragile.
This patch optimizes it, and also adds the sanity check to avoid the
endless loops.
Bugzilla: https://bugzilla.kernel.org/sho... |
bool general_log_write(THD *thd, enum enum_server_command command,
const char *query, uint query_length)
{
/* Write the message to the log if we want to log this king of commands */
if (logger.log_command(thd, command))
return logger.general_log_write(thd, command, query, query_length);
... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 146,502,928,228,537,500,000,000,000,000,000,000,000 | 9 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
write_information_block(struct archive_write *a)
{
struct iso9660 *iso9660;
char buf[128];
const char *v;
int opt, r;
struct archive_string info;
size_t info_size = LOGICAL_BLOCK_SIZE *
NON_ISO_FILE_SYSTEM_INFORMATION_BLOCK;
iso9660 = (struct iso9660 *)a->format_data;
if (info_size > wb_remaining(a))... | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 246,536,221,051,874,540,000,000,000,000,000,000,000 | 123 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
//! Compute distance function to 0-valued isophotes, using the Eikonal PDE \newinstance.
CImg<Tfloat> get_distance_eikonal(const unsigned int nb_iterations, const float band_size=0,
const float time_step=0.5f) const {
return CImg<Tfloat>(*this,false).distance_eikonal(... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 250,102,366,340,627,060,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.