func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
virDomainDiskGetSource(virDomainDiskDef const *def)
{
return def->src->path;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 138,299,759,775,045,370,000,000,000,000,000,000,000 | 4 | 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... |
virDomainDiskDefValidate(const virDomainDef *def,
const virDomainDiskDef *disk)
{
virStorageSourcePtr next;
/* Validate LUN configuration */
if (disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {
/* volumes haven't been translated at this point, so accept them */
if (!(d... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 71,471,904,414,283,360,000,000,000,000,000,000,000 | 77 | 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 close_table_device(struct table_device *td, struct mapped_device *md)
{
if (!td->dm_dev.bdev)
return;
bd_unlink_disk_holder(td->dm_dev.bdev, dm_disk(md));
blkdev_put(td->dm_dev.bdev, td->dm_dev.mode | FMODE_EXCL);
put_dax(td->dm_dev.dax_dev);
td->dm_dev.bdev = NULL;
td->dm_dev.dax_dev = NULL;
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 135,549,370,139,340,800,000,000,000,000,000,000,000 | 11 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
static int mem_cgroup_move_account(struct page *page,
unsigned int nr_pages,
struct page_cgroup *pc,
struct mem_cgroup *from,
struct mem_cgroup *to,
bool uncharge)
{
unsigned long flags;
int ret;
VM_BUG_ON(from == to);
VM_BUG_ON(PageLRU(page));
/*
* The page is isolated from L... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 259,177,654,743,594,240,000,000,000,000,000,000,000 | 64 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
{
int error = -ESRCH;
struct task_struct *p;
rcu_read_lock();
retry:
p = pid_task(pid, PIDTYPE_PID);
if (p) {
error = group_send_sig_info(sig, info, p);
if (unlikely(error == -ESRCH))
/*
* The task was unhashed in between, try again.
... | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 162,303,995,348,564,700,000,000,000,000,000,000,000 | 23 | 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 int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
bool remount)
{
char *this_char, *value, *rest;
while (options != NULL) {
this_char = options;
for (;;) {
/*
* NUL-terminate this option: unfortunately,
* mount options form a comma-separated list,
* but mpol's n... | 0 | [
"CWE-400"
] | linux-2.6 | 14fcc23fdc78e9d32372553ccf21758a9bd56fa1 | 119,150,973,764,219,140,000,000,000,000,000,000,000 | 89 | tmpfs: fix kernel BUG in shmem_delete_inode
SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814
on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage
method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages
to a tmpfs directory, incrementing i_blocks ... |
kvm_deassign_ioeventfd_idx(struct kvm *kvm, enum kvm_bus bus_idx,
struct kvm_ioeventfd *args)
{
struct _ioeventfd *p, *tmp;
struct eventfd_ctx *eventfd;
struct kvm_io_bus *bus;
int ret = -ENOENT;
eventfd = eventfd_ctx_fdget(args->fd);
if (IS_ERR(eventfd))
return PTR_ER... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | 105,989,006,066,220,830,000,000,000,000,000,000,000 | 42 | KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
kvm_set_irq_routing(). Hence, there is no sense in accepting them
via KVM_IRQFD. Prevent them from entering the system in the first
place.
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Si... |
collect_timing(struct recvbuf *rb, const char *tag, int count, l_fp *dts)
{
char buf[256];
snprintf(buf, sizeof(buf), "%s %d %s %s",
(rb != NULL)
? ((rb->dstadr != NULL)
? stoa(&rb->recv_srcadr)
: "-REFCLOCK-")
: "-",
count, lfptoa(dts, 9), tag);
record_timing_stats(buf);
} | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 270,014,626,578,668,270,000,000,000,000,000,000,000 | 13 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
Try<JWT, JWTError> JWT::parse(const std::string& token)
{
const vector<string> components = strings::split(token, ".");
if (components.size() != 3) {
return JWTError(
"Expected 3 components in token, got " + stringify(components.size()),
JWTError::Type::INVALID_TOKEN);
}
Try<JWT::Header> h... | 0 | [
"CWE-200"
] | mesos | 2c282f19755ea7518caf6f43e729524b1c6bdb23 | 99,080,298,781,307,160,000,000,000,000,000,000,000 | 37 | Added constant time comparison of JWT signatures.
A vulnerability in our JWT implementation allows an unauthenticated
remote attacker to execute to execute timing attacks [1].
This patch removes the vulnerability by adding a constant time
comparison of hashes, where the whole message is visited during
the comparison ... |
virDomainGraphicsAuthDefParseXML(xmlNodePtr node,
virDomainGraphicsAuthDefPtr def,
int type)
{
g_autofree char *validTo = NULL;
g_autofree char *connected = virXMLPropString(node, "connected");
def->passwd = virXMLPropString(node, "passwd");... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 93,609,200,672,987,350,000,000,000,000,000,000,000 | 66 | 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... |
const USBDesc *usb_device_get_usb_desc(USBDevice *dev)
{
USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev);
if (dev->usb_desc) {
return dev->usb_desc;
}
return klass->usb_desc;
} | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 12,268,116,872,531,967,000,000,000,000,000,000,000 | 8 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
evutil_check_ifaddrs(void)
{
#if defined(EVENT__HAVE_GETIFADDRS)
/* Most free Unixy systems provide getifaddrs, which gives us a linked list
* of struct ifaddrs. */
struct ifaddrs *ifa = NULL;
const struct ifaddrs *i;
if (getifaddrs(&ifa) < 0) {
event_warn("Unable to call getifaddrs()");
return -1;
}
for (... | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 240,676,759,825,008,900,000,000,000,000,000,000,000 | 78 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
yang_read_extcomplex_str(struct lys_module *module, struct lys_ext_instance_complex *ext, const char *arg_name,
const char *parent_name, char *value, int parent_stmt, LY_STMT stmt)
{
int c;
const char **str, ***p = NULL;
void *reallocated;
struct lyext_substmt *info;
c = 0;... | 1 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 243,027,626,856,944,320,000,000,000,000,000,000,000 | 103 | yang parser BUGFIX double free
Fixes #742 |
MONGO_EXPORT int mongo_get_server_err(mongo* conn) {
return conn->lasterrcode;
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 247,679,914,369,562,280,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
static int check_bytes(const ut8 *buf, ut64 length) {
return length > 4 && !memcmp (buf, "bFLT", 4);
} | 0 | [
"CWE-119",
"CWE-787"
] | radare2 | 72794dc3523bbd5bb370de3c5857cb736c387e18 | 320,745,049,342,508,300,000,000,000,000,000,000,000 | 3 | Fix #6829 oob write because of using wrong struct |
struct http_reply *http_error_message(struct stream *s)
{
const int msgnum = http_get_status_idx(s->txn->status);
if (s->txn->http_reply)
return s->txn->http_reply;
else if (s->be->replies[msgnum])
return s->be->replies[msgnum];
else if (strm_fe(s)->replies[msgnum])
return strm_fe(s)->replies[msgnum];
else
... | 0 | [
"CWE-703",
"CWE-835"
] | haproxy | bfb15ab34ead85f64cd6da0e9fb418c9cd14cee8 | 275,565,148,897,154,230,000,000,000,000,000,000,000 | 13 | BUG/MAJOR: http/htx: prevent unbounded loop in http_manage_server_side_cookies
Ensure calls to http_find_header() terminate. If a "Set-Cookie2"
header is found then the while(1) loop in
http_manage_server_side_cookies() will never terminate, resulting in
the watchdog firing and the process terminating via SIGABRT.
Th... |
static void cgroup_migrate_add_task(struct task_struct *task,
struct cgroup_mgctx *mgctx)
{
struct css_set *cset;
lockdep_assert_held(&css_set_lock);
/* @task either already exited or can't exit until the end */
if (task->flags & PF_EXITING)
return;
/* cgroup_threadgroup_rwsem protects racing against ... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 116,534,113,951,526,550,000,000,000,000,000,000,000 | 28 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
static struct request *blk_mq_map_request(struct request_queue *q,
struct bio *bio,
struct blk_map_ctx *data)
{
struct blk_mq_hw_ctx *hctx;
struct blk_mq_ctx *ctx;
struct request *rq;
int rw = bio_data_dir(bio);
struct blk_mq_alloc_data alloc_data;
if (unlikely(blk_mq_queue_enter(q, GFP_KERNEL))) {... | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 36,809,138,335,354,787,000,000,000,000,000,000,000 | 44 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
int security_inode_removexattr(struct dentry *dentry, const char *name)
{
if (unlikely(IS_PRIVATE(dentry->d_inode)))
return 0;
return security_ops->inode_removexattr(dentry, name);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 138,687,086,073,712,030,000,000,000,000,000,000,000 | 6 | 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 const char *req_ap_auth_type_field(request_rec *r)
{
return r->ap_auth_type;
} | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 18,282,741,161,598,155,000,000,000,000,000,000,000 | 4 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
_equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
{
COMPARE_NODE_FIELD(opclassname);
COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname);
COMPARE_NODE_FIELD(datatype);
COMPARE_NODE_FIELD(items);
COMPARE_SCALAR_FIELD(isDefault);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 203,237,960,390,715,170,000,000,000,000,000,000,000 | 11 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
int AVI_get_audio_position_index(avi_t *AVI)
{
if(AVI->mode==AVI_MODE_WRITE) {
AVI_errno = AVI_ERR_NOT_PERM;
return -1;
}
if(!AVI->track[AVI->aptr].audio_index) {
AVI_errno = AVI_ERR_NO_IDX;
return -1;
}
return (AVI->track[AVI->aptr].audio_posc);
} | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 123,277,342,472,927,000,000,000,000,000,000,000,000 | 13 | fixed #2159 |
static int hns_roce_netdev_event(struct notifier_block *self,
unsigned long event, void *ptr)
{
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct hns_roce_ib_iboe *iboe = NULL;
struct hns_roce_dev *hr_dev = NULL;
u8 port = 0;
int ret = 0;
hr_dev = container_of(self, struct hns_roce_dev, iboe... | 0 | [
"CWE-665"
] | kernel | 72be029e947510dd6cbbbaf51879622af26e4200 | 101,528,122,646,009,010,000,000,000,000,000,000,000 | 23 | RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427
FATE#326416).
suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a |
get_tags(list_T *list, char_u *pat, char_u *buf_fname)
{
int num_matches, i, ret;
char_u **matches, *p;
char_u *full_fname;
dict_T *dict;
tagptrs_T tp;
long is_static;
ret = find_tags(pat, &num_matches, &matches,
TAG_REGEXP | TAG_NOIC, (int)MAXCOL, buf_fname);
if (ret == OK && num_... | 0 | [
"CWE-416"
] | vim | ccfde4d028e891a41e3548323c3d47b06fb0b83e | 148,902,735,142,379,240,000,000,000,000,000,000,000 | 101 | patch 9.0.0389: crash when 'tagfunc' closes the window
Problem: Crash when 'tagfunc' closes the window.
Solution: Bail out when the window was closed. |
static void test_derived()
{
MYSQL_STMT *stmt;
int rc, i;
MYSQL_BIND my_bind[1];
int32 my_val= 0;
ulong my_length= 0L;
my_bool my_null= FALSE;
const char *query=
"select count(1) from (select f.id from t1 f where f.id=?) as x";
myheader("test_derived");
rc= mysql... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 119,743,040,668,229,000,000,000,000,000,000,000,000 | 51 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static TIFFMethodType GetJPEGMethod(Image* image,TIFF *tiff,uint16 photometric,
uint16 bits_per_sample,uint16 samples_per_pixel)
{
#define BUFFER_SIZE 2048
MagickOffsetType
position,
offset;
register size_t
i;
TIFFMethodType
method;
#if defined(TIFF_VERSION_BIG)
uint64
#else
uint32
#endi... | 0 | [
"CWE-125"
] | ImageMagick | 803bc34ebe023f209f745baf8a112610ff77cc8c | 157,466,365,564,501,930,000,000,000,000,000,000,000 | 75 | Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team) |
ModuleExport size_t RegisterPSImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("PS","EPI",
"Encapsulated PostScript Interchange format");
entry->decoder=(DecodeImageHandler *) ReadPSImage;
entry->encoder=(EncodeImageHandler *) WritePSImage;
entry->magick=(IsImageFormatHandler *) IsPS;
entry... | 1 | [
"CWE-703",
"CWE-834"
] | ImageMagick | bdbbb13f1fe9b7e2465502c500561720f7456aac | 251,233,753,666,748,500,000,000,000,000,000,000,000 | 48 | https://github.com/ImageMagick/ImageMagick/issues/715 |
ofputil_encode_packet_out(const struct ofputil_packet_out *po,
enum ofputil_protocol protocol)
{
enum ofp_version ofp_version = ofputil_protocol_to_ofp_version(protocol);
struct ofpbuf *msg;
size_t size;
size = po->ofpacts_len;
if (po->buffer_id == UINT32_MAX) {
si... | 0 | [
"CWE-617",
"CWE-703"
] | ovs | 4af6da3b275b764b1afe194df6499b33d2bf4cde | 32,475,602,275,242,570,000,000,000,000,000,000,000 | 62 | ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the current code validates the group type and
command after the whole group mod has been decoded. The OF1.5 decoder,
however, tries to use the type and command earlier, when it might still be
invalid. This caused an... |
hash_blob_rawdata (KEYBOXBLOB blob, unsigned char *digest)
{
const unsigned char *buffer;
size_t n, length;
int type;
ulong rawdata_off, rawdata_len;
buffer = _keybox_get_blob_image (blob, &length);
if (length < 32)
return -1;
n = get32 (buffer);
if (n < length)
length = n; /* Blob larger tha... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 258,601,671,760,909,400,000,000,000,000,000,000,000 | 42 | 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 ... |
void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb)
{
sock_recv_timestamp(msg, sk, skb);
sock_recv_drops(msg, sk, skb);
} | 0 | [
"CWE-264"
] | net | 4de930efc23b92ddf88ce91c405ee645fe6e27ea | 5,857,951,922,038,600,000,000,000,000,000,000,000 | 6 | net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
TfLiteStatus SetTensorSizes(TfLiteContext* context, TfLiteTensor* tensor,
std::initializer_list<int> values) {
TfLiteIntArray* size = TfLiteIntArrayCreate(values.size());
int index = 0;
for (const auto& v : values) {
size->data[index++] = v;
}
return context->ResizeTensor(conte... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 154,085,589,431,693,410,000,000,000,000,000,000,000 | 9 | [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... |
ImagingResampleHorizontal(Imaging imIn, int xsize, int filter)
{
ImagingSectionCookie cookie;
Imaging imOut;
struct filter *filterp;
float support, scale, filterscale;
float center, ww, ss, ss0, ss1, ss2, ss3;
int xx, yy, x, kmax, xmin, xmax;
int *xbounds;
float *k, *kk;
/* check fi... | 1 | [
"CWE-119",
"CWE-787"
] | Pillow | 4e0d9b0b9740d258ade40cce248c93777362ac1e | 306,271,743,801,166,740,000,000,000,000,000,000,000 | 182 | fix integer overflow in Resample.c |
static inline int _color_blend (const int dst, const int src)
{
const int src_alpha = gdTrueColorGetAlpha(src);
if( src_alpha == gdAlphaOpaque ) {
return src;
} else {
const int dst_alpha = gdTrueColorGetAlpha(dst);
if( src_alpha == gdAlphaTransparent ) return dst;
if( dst_alpha == gdAlphaTransparent ) {
... | 0 | [
"CWE-399"
] | libgd | 4751b606fa38edc456d627140898a7ec679fcc24 | 217,035,165,440,837,980,000,000,000,000,000,000,000 | 31 | 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 void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
{
struct tss_struct *tss;
/*
* make sure the vm86() system call doesn't try to do anything silly
*/
info->regs.pt.ds = 0;
info->regs.pt.es = 0;
info->regs.pt.fs = 0;
#ifndef CONFIG_X86_32_LAZY_GS
info->regs.pt.gs = 0;
#endif
/*
*... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 163,821,726,410,045,150,000,000,000,000,000,000,000 | 74 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
void php_filter_number_int(PHP_INPUT_FILTER_PARAM_DECL)
{
/* strip everything [^0-9+-] */
const unsigned char allowed_list[] = "+-" DIGIT;
filter_map map;
filter_map_init(&map);
filter_map_update(&map, 1, allowed_list);
filter_map_apply(value, &map);
} | 0 | [
"CWE-190"
] | php-src | 57b997ebf99e0eb9a073e0dafd2ab100bd4a112d | 203,693,046,034,902,350,000,000,000,000,000,000,000 | 10 | Fix bug #71637: Multiple Heap Overflow due to integer overflows |
static int session_close (lua_State *L, int status, lua_KContext ctx) {
int rc;
struct ssh_userdata *state;
state = (struct ssh_userdata *) nseU_checkudata(L, 1, SSH2_UDATA, "ssh2");
if (state->session != NULL) {
while ((rc = libssh2_session_disconnect(
state->session, "Normal Shut... | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 224,033,448,634,733,700,000,000,000,000,000,000,000 | 27 | Avoid a crash (double-free) when SSH connection fails |
static BOOL security_A(BYTE* master_secret, const BYTE* client_random, BYTE* server_random,
BYTE* output)
{
return security_premaster_hash("A", 1, master_secret, client_random, server_random,
&output[0]) &&
security_premaster_hash("BB", 2, master_secret, c... | 0 | [
"CWE-125",
"CWE-787"
] | FreeRDP | d6cd14059b257318f176c0ba3ee0a348826a9ef8 | 32,257,348,785,059,277,000,000,000,000,000,000,000 | 10 | Fixed GHSL-2020-101 missing NULL check
(cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e) |
CtPtr ProtocolV2::_wait_for_peer_banner() {
unsigned banner_len = strlen(CEPH_BANNER_V2_PREFIX) + sizeof(__le16);
return READ(banner_len, _handle_peer_banner);
} | 0 | [
"CWE-323"
] | ceph | 47c7e623546a7a33bd6bbddfb899fa9c9a40f40a | 29,502,685,359,217,425,000,000,000,000,000,000,000 | 4 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
GF_Err sbgp_box_size(GF_Box *s)
{
GF_SampleGroupBox *p = (GF_SampleGroupBox*)s;
p->size += 8;
if (p->grouping_type_parameter) p->version=1;
if (p->version==1) p->size += 4;
p->size += 8*p->entry_count;
return GF_OK; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 230,823,199,015,257,670,000,000,000,000,000,000,000 | 11 | fixed #1587 |
static void r_kext_free(RKext *kext) {
if (!kext) {
return;
}
if (kext->mach0) {
MACH0_(mach0_free) (kext->mach0);
kext->mach0 = NULL;
}
if (kext->own_name && kext->name) {
R_FREE (kext->name);
kext->name = NULL;
}
R_FREE (kext);
} | 0 | [
"CWE-476"
] | radare2 | feaa4e7f7399c51ee6f52deb84dc3f795b4035d6 | 318,850,020,913,796,770,000,000,000,000,000,000,000 | 17 | Fix null deref in xnu.kernelcache ##crash
* Reported by @xshad3 via huntr.dev |
xfrm_get_type_offload(u8 proto, unsigned short family, bool try_load)
{
struct xfrm_state_afinfo *afinfo;
const struct xfrm_type_offload **typemap;
const struct xfrm_type_offload *type;
retry:
afinfo = xfrm_state_get_afinfo(family);
if (unlikely(afinfo == NULL))
return NULL;
typemap = afinfo->type_offload_map;... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 42,563,495,433,936,180,000,000,000,000,000,000,000 | 26 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
void usb_deregister_dev(struct usb_interface *intf,
struct usb_class_driver *class_driver)
{
if (intf->minor == -1)
return;
dev_dbg(&intf->dev, "removing %d minor\n", intf->minor);
device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
down_write(&minor_rwsem);
usb_minors[intf->minor] = NULL;
up_... | 0 | [
"CWE-362"
] | linux | 303911cfc5b95d33687d9046133ff184cf5043ff | 273,117,074,030,435,730,000,000,000,000,000,000,000 | 17 | USB: core: Fix races in character device registration and deregistraion
The syzbot fuzzer has found two (!) races in the USB character device
registration and deregistration routines. This patch fixes the races.
The first race results from the fact that usb_deregister_dev() sets
usb_minors[intf->minor] to NULL befor... |
static void module_save(const char *module, MODULE_THEME_REC *rec,
THEME_SAVE_REC *data)
{
CONFIG_NODE *fnode, *node;
FORMAT_REC *formats;
int n;
formats = g_hash_table_lookup(default_formats, rec->name);
if (formats == NULL) return;
fnode = config_node_traverse(data->config, "for... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 278,478,261,554,467,500,000,000,000,000,000,000,000 | 32 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
const xmlChar *name ATTRIBUTE_UNUSED) {
int ret;
xmlDocPtr doc;
xmlElementPtr elem = NULL;
if (cur == NULL)
return;
switch (cur->atype) {
case XML_ATTRIBUTE_CDATA:
case XML_ATTRIBUTE_ID:
case XML_ATTRIB... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 178,574,283,384,285,100,000,000,000,000,000,000,000 | 68 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
do_mount_all (char *types, char *options, char *test_opts) {
struct mntentchn *mc, *mc0, *mtmp;
int status = 0;
struct stat statbuf;
struct child {
pid_t pid;
char *group;
struct mntentchn *mec;
struct mntentchn *meclast;
struct child *nxt;
} childhead, *childtail, *cp;
char major[22];
char *g, *colon;... | 0 | [
"CWE-399"
] | util-linux | 4b39b6aefd5dd8ac68a92adc650dc13d5d54d704 | 286,268,012,267,611,360,000,000,000,000,000,000,000 | 117 | mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- force mount(8) to use /etc/mtab.tmp file every time. The original
code used the tmp file for remount/move operations only.
- call and check fflush() return code for... |
uint32_t BinaryProtocolWriter::serializedSizeZCBinary(
folly::IOBuf const& v) const {
size_t size = v.computeChainDataLength();
return (size > folly::IOBufQueue::kMaxPackCopy)
? serializedSizeI32() // too big to pack: size only
: size + serializedSizeI32(); // size + packed data
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 189,471,966,829,273,480,000,000,000,000,000,000,000 | 7 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
CmdRolesInfo() : Command("rolesInfo") {} | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 142,302,550,967,552,300,000,000,000,000,000,000,000 | 1 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
lyp_fill_attr(struct ly_ctx *ctx, struct lyd_node *parent, const char *module_ns, const char *module_name,
const char *attr_name, const char *attr_value, struct lyxml_elem *xml, int options, struct lyd_attr **ret)
{
const struct lys_module *mod = NULL;
const struct lys_submodule *submod = NULL;
... | 0 | [
"CWE-787"
] | libyang | f6d684ade99dd37b21babaa8a856f64faa1e2e0d | 199,963,839,279,258,400,000,000,000,000,000,000,000 | 80 | parser BUGFIX long identity name buffer overflow
STRING_OVERFLOW (CWE-120) |
void simplify(char *subdir)
{
char *a;
if (subdir == NULL || *subdir == 0) {
return;
}
while ((a = strstr(subdir, "//")) != NULL) {
overlapcpy(a, a + 1);
}
while ((a = strstr(subdir, "/./")) != NULL) {
overlapcpy(a, a + 2);
}
while (strncmp(subdir, "../", 3) == 0... | 0 | [
"CWE-434"
] | pure-ftpd | 37ad222868e52271905b94afea4fc780d83294b4 | 213,624,572,301,204,030,000,000,000,000,000,000,000 | 79 | Initialize the max upload file size when quotas are enabled
Due to an unwanted check, files causing the quota to be exceeded
were deleted after the upload, but not during the upload.
The bug was introduced in 2009 in version 1.0.23
Spotted by @DroidTest, thanks! |
GF_Err pasp_Write(GF_Box *s, GF_BitStream *bs)
{
GF_PixelAspectRatioBox *ptr = (GF_PixelAspectRatioBox *)s;
GF_Err e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->hSpacing);
gf_bs_write_u32(bs, ptr->vSpacing);
return GF_OK; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 228,245,840,640,642,430,000,000,000,000,000,000,000 | 9 | prevent dref memleak on invalid input (#1183) |
inline void TransposeConvV2(
const ConvParams& params, const RuntimeShape& input_shape,
const float* input_data, const RuntimeShape& hwoi_ordered_filter_shape,
const float* hwoi_ordered_filter_data, const RuntimeShape& output_shape,
float* output_data, const RuntimeShape& col2im_shape, float* col2im_dat... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 201,442,979,856,843,440,000,000,000,000,000,000,000 | 11 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
static int do_recv_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value)
{
NPSetWindowCallbackStruct **ws_info_p = (NPSetWindowCallbackStruct **)p_value;
NPSetWindowCallbackStruct *ws_info;
int32_t type;
uint32_t has_ws_info, visual_id, colormap, depth;
int error;
if (ws_info_p)
*ws_info_p = NU... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 165,766,943,203,926,960,000,000,000,000,000,000,000 | 39 | Support all the new variables added |
static inline Quantum ScaleCharToQuantum(const unsigned char value)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((Quantum) (16843009UL*value));
#else
return((Quantum) (16843009.0*value));
#endif
} | 0 | [
"CWE-190"
] | ImageMagick | f60d59cc3a7e3402d403361e0985ffa56f746a82 | 336,831,138,440,303,340,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/1727 |
check_can_index(typval_T *rettv, int evaluate, int verbose)
{
switch (rettv->v_type)
{
case VAR_FUNC:
case VAR_PARTIAL:
if (verbose)
emsg(_("E695: Cannot index a Funcref"));
return FAIL;
case VAR_FLOAT:
#ifdef FEAT_FLOAT
if (verbose)
emsg(_(e_float_as_string));
return FAIL;
#endif
ca... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 319,678,334,531,780,700,000,000,000,000,000,000,000 | 45 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
int ssl3_send_change_cipher_spec(SSL *s, int a, int b)
{
unsigned char *p;
if (s->state == a) {
p = (unsigned char *)s->init_buf->data;
*p = SSL3_MT_CCS;
s->init_num = 1;
s->init_off = 0;
s->state = b;
}
/* SSL3_ST_CW_CHANGE_B */
return (ssl3_do_write(s, SS... | 0 | [
"CWE-125"
] | openssl | bb1a4866034255749ac578adb06a76335fc117b1 | 134,806,312,298,230,230,000,000,000,000,000,000,000 | 16 | Make message buffer slightly larger than message.
Grow TLS/DTLS 16 bytes more than strictly necessary as a precaution against
OOB reads. In most cases this will have no effect because the message buffer
will be large enough already.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 006a788c84e54... |
future<std::unique_ptr<cql_server::response>> cql_server::connection::process_prepare(uint16_t stream, request_reader in, service::client_state& client_state,
tracing::trace_state_ptr trace_state) {
++_server._stats.prepare_requests;
auto query = sstring(in.read_long_string_view());
tracing::add_q... | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 91,853,876,267,165,500,000,000,000,000,000,000,000 | 29 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 |
static int rpza_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
RpzaContext *s = avctx->priv_data;
int ret;
s->buf = buf;
s->size = buf_size... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 3819db745da2ac7fb3faacb116788c32f4753f34 | 55,955,953,079,286,830,000,000,000,000,000,000,000 | 25 | avcodec/rpza: Perform pointer advance and checks before using the pointers
Fixes out of array accesses
Fixes Ticket2850
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
get_nolist_virtcol(void)
{
// check validity of cursor in current buffer
if (curwin->w_buffer == NULL
|| curwin->w_buffer->b_ml.ml_mfp == NULL
|| curwin->w_cursor.lnum > curwin->w_buffer->b_ml.ml_line_count)
return 0;
if (curwin->w_p_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL)
return getvcol_nolist(&... | 0 | [] | vim | 98a336dd497d3422e7efeef9f24cc9e25aeb8a49 | 321,369,245,514,654,570,000,000,000,000,000,000,000 | 12 | patch 8.2.0133: invalid memory access with search command
Problem: Invalid memory access with search command.
Solution: When :normal runs out of characters in bracketed paste mode break
out of the loop.(closes #5511) |
GF_Err ihdr_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_J2KImageHeaderBox *ptr = (GF_J2KImageHeaderBox *) s;
ISOM_DECREASE_SIZE(s, 14)
ptr->height = gf_bs_read_u32(bs);
ptr->width = gf_bs_read_u32(bs);
ptr->nb_comp = gf_bs_read_u16(bs);
ptr->bpc = gf_bs_read_u8(bs);
ptr->Comp = gf_bs_read_u8(bs);
ptr->UnkC = g... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 24,792,645,856,679,407,000,000,000,000,000,000,000 | 16 | fixed #1587 |
static void dump_file_info (WavpackContext *wpc, char *name, FILE *dst, int parameter)
{
char str [80];
int item_id;
str [0] = 0;
if (parameter == 0) {
for (item_id = 1; item_id <= 9; ++item_id) {
dump_file_item (wpc, str, item_id);
strcat (str, ";");
}
... | 0 | [
"CWE-476",
"CWE-703"
] | WavPack | 25b4a2725d8568212e7cf89ca05ca29d128af7ac | 141,822,569,062,243,680,000,000,000,000,000,000,000 | 27 | issue #121: NULL pointer dereference in wvunpack.c
* check for NULL pointer before dereferencing in wvunpack.c
* sanitize custom extensions to be alphanumeric only |
Status AuthorizationSession::checkAuthorizedToRevokePrivilege(const Privilege& privilege) {
const ResourcePattern& resource = privilege.getResourcePattern();
if (resource.isDatabasePattern() || resource.isExactNamespacePattern()) {
if (!isAuthorizedForActionsOnResource(
ResourcePattern::... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 327,582,194,863,930,960,000,000,000,000,000,000,000 | 19 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
create_encoding_table_core(arg, interp)
VALUE arg;
VALUE interp;
{
volatile VALUE table = rb_hash_new();
rb_ivar_set(interp, ID_encoding_table, table);
return table;
} | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 234,887,643,318,809,500,000,000,000,000,000,000,000 | 8 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
armpmu_enable_percpu_irq(void *data)
{
unsigned int irq = *(unsigned int *)data;
enable_percpu_irq(irq, IRQ_TYPE_NONE);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8fff105e13041e49b82f92eef034f363a6b1c071 | 272,050,974,702,544,430,000,000,000,000,000,000,000 | 5 | arm64: perf: reject groups spanning multiple HW PMUs
The perf core implicitly rejects events spanning multiple HW PMUs, as in
these cases the event->ctx will differ. However this validation is
performed after pmu::event_init() is called in perf_init_event(), and
thus pmu::event_init() may be called with a group leader... |
pixSmoothConnectedRegions(PIX *pixs,
PIX *pixm,
l_int32 factor)
{
l_int32 empty, i, n, x, y;
l_float32 aveval;
BOXA *boxa;
PIX *pixmc;
PIXA *pixa;
PROCNAME("pixSmoothConnectedRegions");
if (!pixs || pixGetDepth(pixs) != 8)
... | 0 | [
"CWE-125"
] | leptonica | 3c18c43b6a3f753f0dfff99610d46ad46b8bfac4 | 215,376,755,399,857,400,000,000,000,000,000,000,000 | 45 | Fixing oss-fuzz issue 22512: Heap-buffer-overflow in rasteropGeneralLow()
* Simplified the hole-filling function
` |
_asn1_convert_integer (const unsigned char *value, unsigned char *value_out,
int value_out_size, int *len)
{
char negative;
unsigned char val[SIZEOF_UNSIGNED_LONG_INT];
long valtmp;
int k, k2;
valtmp = _asn1_strtol (value, NULL, 10);
for (k = 0; k < SIZEOF_UNSIGNED_LONG_INT; k++)
{
val[... | 0 | [
"CWE-476"
] | libtasn1 | 53958290ab731c8486531a3bdef54a933533579d | 222,196,515,453,843,400,000,000,000,000,000,000,000 | 52 | Allow a NULL value in asn1_read_value() for all types. |
static void sig_print_errors(void)
{
init_finished = TRUE;
if (init_errors != NULL) {
signal_emit("gui dialog", 2, "error", init_errors);
g_free(init_errors);
}
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 141,493,666,722,418,760,000,000,000,000,000,000,000 | 9 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
bool is_sameXZC(const unsigned int size_x, const unsigned int size_z, const unsigned int size_c) const {
return is_sameXZ(size_x,size_z) && _spectrum==size_c;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 36,827,978,656,053,577,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
HermesValue JSObject::_getOwnIndexedImpl(JSObject *, Runtime *, uint32_t) {
return HermesValue::encodeEmptyValue();
} | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 123,044,153,488,557,220,000,000,000,000,000,000,000 | 3 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
static void InsertComplexDoubleRow(Image *image,double *p,int y,double MinVal,
double MaxVal,ExceptionInfo *exception)
{
double f;
int x;
register Quantum *q;
if (MinVal >= 0)
MinVal = -1;
if (MaxVal <= 0)
MaxVal = 1;
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quan... | 0 | [
"CWE-416"
] | ImageMagick | f7206618d27c2e69d977abf40e3035a33e5f6be0 | 241,175,366,373,437,900,000,000,000,000,000,000,000 | 62 | https://github.com/ImageMagick/ImageMagick/issues/1554 |
printh (void)
{
usage ();
printf ("\n Options: \n");
printf ("%-17s %s\n", " -d <value>", "print debug messages");
printf ("%-17s %s\n", " -D", "run as daemon");
printf ("%-17s %s\n", " -h --help", "print this help");
printf ("%-17s %s\n", " -v --version", "print version information");
... | 0 | [
"CWE-362"
] | ndjbdns | 177b5522e9b3d25778001c8cebfddd4d2973fcfd | 240,620,200,655,913,130,000,000,000,000,000,000,000 | 10 | Merge identical outgoing requests - patch 2.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. The merges operation takes place in the
dns_transmit layer, rather than between query and dns_transmit layers,
as don... |
static int h2_buf_available(void *target)
{
struct h2c *h2c = target;
if ((h2c->flags & H2_CF_DEM_DALLOC) && b_alloc_margin(&h2c->dbuf, 0)) {
h2c->flags &= ~H2_CF_DEM_DALLOC;
if (h2_recv_allowed(h2c))
conn_xprt_want_recv(h2c->conn);
return 1;
}
if ((h2c->flags & H2_CF_MUX_MALLOC) && b_alloc_margin(&h2c->... | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 104,095,008,639,533,960,000,000,000,000,000,000,000 | 25 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
static BinOpr subexpr (LexState *ls, expdesc *v, int limit) {
BinOpr op;
UnOpr uop;
enterlevel(ls);
uop = getunopr(ls->t.token);
if (uop != OPR_NOUNOPR) { /* prefix (unary) operator? */
int line = ls->linenumber;
luaX_next(ls); /* skip operator */
subexpr(ls, v, UNARY_PRIORITY);
luaK_prefix(... | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 237,504,091,525,632,150,000,000,000,000,000,000,000 | 28 | Bug: Lua can generate wrong code when _ENV is <const> |
submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
{
unsigned long tx_sequence;
socklen_t where_from_len;
union sockaddr_in46 where_from;
int bad_length, bad_sender, bad_sequence, bad_header;
int select_status;
int recvfrom_status;
int read_length;
int expected_length;
int comm... | 1 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 125,177,250,454,322,940,000,000,000,000,000,000,000 | 205 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
static BlockDriver *find_hdev_driver(const char *filename)
{
int score_max = 0, score;
BlockDriver *drv = NULL, *d;
QLIST_FOREACH(d, &bdrv_drivers, list) {
if (d->bdrv_probe_device) {
score = d->bdrv_probe_device(filename);
if (score > score_max) {
score_max ... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 136,332,042,179,071,550,000,000,000,000,000,000,000 | 17 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
void CModule::OnPostRehash() {} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 205,518,270,350,794,600,000,000,000,000,000,000,000 | 1 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
{
if ((in == NULL) || (in->cipher == NULL)) {
EVPerr(EVP_F_EVP_CIPHER_CTX_COPY, EVP_R_INPUT_NOT_INITIALIZED);
return 0;
}
#ifndef OPENSSL_NO_ENGINE
/* Make sure it's safe to copy a cipher context using an ENGINE */
if... | 0 | [
"CWE-189"
] | openssl | 3f3582139fbb259a1c3cbb0a25236500a409bf26 | 204,366,156,345,767,720,000,000,000,000,000,000,000 | 30 | Fix encrypt overflow
An overflow can occur in the EVP_EncryptUpdate function. If an attacker is
able to supply very large amounts of input data after a previous call to
EVP_EncryptUpdate with a partial block then a length check can overflow
resulting in a heap corruption.
Following an analysis of all OpenSSL internal... |
static void default_print_section_header(WriterContext *wctx)
{
DefaultContext *def = wctx->priv;
char buf[32];
const struct section *section = wctx->section[wctx->level];
const struct section *parent_section = wctx->level ?
wctx->section[wctx->level-1] : NULL;
av_bprint_clear(&wctx->sectio... | 0 | [
"CWE-476"
] | FFmpeg | 837cb4325b712ff1aab531bf41668933f61d75d2 | 273,449,770,173,825,020,000,000,000,000,000,000,000 | 24 | ffprobe: Fix null pointer dereference with color primaries
Found-by: AD-lab of venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
unsigned long *OPENSSL_ia32cap_loc(void) { return NULL; } | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 47,692,599,251,967,970,000,000,000,000,000,000,000 | 1 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
xmlXPathCacheWrapString(xmlXPathContextPtr ctxt, xmlChar *val)
{
if ((ctxt != NULL) && (ctxt->cache != NULL)) {
xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
if ((cache->stringObjs != NULL) &&
(cache->stringObjs->number != 0))
{
xmlXPathObjectPtr ret;
ret = (xmlXPathObj... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 178,335,474,354,833,050,000,000,000,000,000,000,000 | 39 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static av_cold int decode_init(AVCodecContext *avctx)
{
UtvideoContext * const c = avctx->priv_data;
c->avctx = avctx;
ff_bswapdsp_init(&c->bdsp);
if (avctx->extradata_size >= 16) {
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d.%d.%d\n",
avctx->extradata[3], avctx->extrada... | 0 | [
"CWE-125"
] | FFmpeg | 22aa37c0fedf14531783189a197542a055959b6c | 19,347,458,201,313,006,000,000,000,000,000,000,000 | 100 | avcodec/utvideodec: Fix bytes left check in decode_frame()
Fixes: out of array read
Fixes: poc-2017.avi
Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 118e1b0b3370dd1c0da442901b486689efd1654b)
Signed-off-by: Michael Niedermayer <mic... |
static GCObject **sweepgen (lua_State *L, global_State *g, GCObject **p,
GCObject *limit) {
static const lu_byte nextage[] = {
G_SURVIVAL, /* from G_NEW */
G_OLD1, /* from G_SURVIVAL */
G_OLD1, /* from G_OLD0 */
G_OLD, /* from G_OLD1 */
G_OLD, /* ... | 0 | [
"CWE-125"
] | lua | 127e7a6c8942b362aa3c6627f44d660a4fb75312 | 28,057,381,882,559,130,000,000,000,000,000,000,000 | 28 | Fixed bug of old finalized objects in the GC
When an object aged OLD1 is finalized, it is moved from the list
'finobj' to the *beginning* of the list 'allgc'. So, this part of the
list (and not only the survival list) must be visited by 'markold'. |
static struct atom_str *to_atom(const char *s, unsigned short len)
{
unsigned int hc = hc_str(s, len) % atom_table_sz;
struct atom_str *c;
for (c = atom_table[hc]; c; c = c->next_atom)
if (c->str_len == len && !strncmp(s, c->str_dat, len))
return c;
c = pool_alloc(sizeof(struct atom_str) + len + 1);
c->str_... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 172,257,713,125,637,200,000,000,000,000,000,000,000 | 18 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
getPeerNames(prop_t **peerName, prop_t **peerIP, struct sockaddr *pAddr, sbool bUXServer)
{
int error;
uchar szIP[NI_MAXHOST] = "";
uchar szHname[NI_MAXHOST] = "";
struct addrinfo hints, *res;
sbool bMaliciousHName = 0;
DEFiRet;
*peerName = NULL;
*peerIP = NULL;
if (bUXServer) {
strcpy((char *) szHname, ... | 0 | [
"CWE-190"
] | rsyslog | 0381a0de64a5a048c3d48b79055bd9848d0c7fc2 | 275,568,553,843,498,300,000,000,000,000,000,000,000 | 69 | imptcp: fix Segmentation Fault when octet count is to high |
ftrace_profile_alloc(struct ftrace_profile_stat *stat, unsigned long ip)
{
struct ftrace_profile *rec = NULL;
/* prevent recursion (from NMIs) */
if (atomic_inc_return(&stat->disabled) != 1)
goto out;
/*
* Try to find the function again since an NMI
* could have added it
*/
rec = ftrace_find_profiled_fun... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 221,355,497,033,222,000,000,000,000,000,000,000,000 | 31 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static int lg_ultrax_remote_mapping(struct hid_input *hi,
struct hid_usage *usage, unsigned long **bit, int *max)
{
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
return 0;
set_bit(EV_REP, hi->input->evbit);
switch (usage->hid & HID_USAGE) {
/* Reported on Logitech Ultra X Media Remote */
case 0x004:... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | 327,502,481,393,532,030,000,000,000,000,000,000,000 | 32 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... |
static void dump_vmcb(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct vmcb_control_area *control = &svm->vmcb->control;
struct vmcb_save_area *save = &svm->vmcb->save;
struct vmcb_save_area *save01 = &svm->vmcb01.ptr->save;
if (!dump_invalid_vmcb) {
pr_warn_ratelimited("set kvm_amd.dump_inv... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 285,527,215,383,592,280,000,000,000,000,000,000,000 | 122 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
static int snd_line6_control_playback_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 256;
return 0;
} | 0 | [
"CWE-476"
] | linux | 3450121997ce872eb7f1248417225827ea249710 | 78,555,704,636,343,155,000,000,000,000,000,000,000 | 9 | ALSA: line6: Fix write on zero-sized buffer
LINE6 drivers allocate the buffers based on the value returned from
usb_maxpacket() calls. The manipulated device may return zero for
this, and this results in the kmalloc() with zero size (and it may
succeed) while the other part of the driver code writes the packet
data w... |
static int handle_cr(struct kvm_vcpu *vcpu)
{
unsigned long exit_qualification, val;
int cr;
int reg;
int err;
int ret;
exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
cr = exit_qualification & 15;
reg = (exit_qualification >> 8) & 15;
switch ((exit_qualification >> 4) & 3) {
case 0: /* mov to cr */
v... | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 160,565,153,087,913,460,000,000,000,000,000,000,000 | 77 | kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jma... |
static int __cil_resolve_perms(symtab_t *class_symtab, symtab_t *common_symtab, struct cil_list *perm_strs, struct cil_list **perm_datums, enum cil_flavor class_flavor)
{
int rc = SEPOL_ERR;
struct cil_list_item *curr;
cil_list_init(perm_datums, perm_strs->flavor);
cil_list_for_each(curr, perm_strs) {
if (curr-... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 222,420,288,974,564,270,000,000,000,000,000,000,000 | 44 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
renumber_node_backref(Node* node, GroupNumRemap* map)
{
int i, pos, n, old_num;
int *backs;
BackRefNode* bn = BACKREF_(node);
if (! NODE_IS_BY_NAME(node))
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
old_num = bn->back_num;
if (IS_NULL(bn->back_dynamic))
backs = bn->back_static;
else
... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 228,459,334,900,000,850,000,000,000,000,000,000,000 | 26 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
int rdma_user_mmap_page(struct ib_ucontext *ucontext,
struct vm_area_struct *vma, struct page *page,
unsigned long size)
{
struct rdma_umap_priv *priv = rdma_user_mmap_pre(ucontext, vma, size);
if (IS_ERR(priv))
return PTR_ERR(priv);
if (remap_pfn_range(vma, vma->vm_start, page_to_pfn(page), size,
v... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 61,985,868,574,375,070,000,000,000,000,000,000,000 | 18 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht)
{
IS_CONSISTENT(ht);
HT_ASSERT(GC_REFCOUNT(ht) == 1);
if (ht->nNumUsed > ht->nNumOfElements + (ht->nNumOfElements >> 5)) { /* additional term is there to amortize the cost of compaction */
HANDLE_BLOCK_INTERRUPTIONS();
zend_hash_rehash(ht);
HANDLE_... | 0 | [
"CWE-190"
] | php-src | 4cc0286f2f3780abc6084bcdae5dce595daa3c12 | 286,342,925,336,099,000,000,000,000,000,000,000,000 | 28 | Fix #73832 - leave the table in a safe state if the size is too big. |
R_API char *r_bin_java_resolve(RBinJavaObj *BIN_OBJ, int idx, ut8 space_bn_name_type) {
// TODO XXX FIXME add a size parameter to the str when it is passed in
RBinJavaCPTypeObj *item = NULL, *item2 = NULL;
char *class_str = NULL,
*name_str = NULL,
*desc_str = NULL,
*string_str = NULL,
*empty = "",
*cp_name = NU... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 126,034,880,399,710,570,000,000,000,000,000,000,000 | 130 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
static bool sctp_writeable(struct sock *sk)
{
return sk->sk_sndbuf > sk->sk_wmem_queued;
} | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 9,707,974,687,925,792,000,000,000,000,000,000,000 | 4 | 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... |
void tipc_link_set_tolerance(struct tipc_link *l, u32 tol,
struct sk_buff_head *xmitq)
{
l->tolerance = tol;
if (l->bc_rcvlink)
l->bc_rcvlink->tolerance = tol;
if (link_is_up(l))
tipc_link_build_proto_msg(l, STATE_MSG, 0, 0, 0, tol, 0, xmitq);
} | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 330,692,278,084,134,600,000,000,000,000,000,000,000 | 9 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
int run_diff_index(struct rev_info *revs, int cached)
{
struct object *ent;
struct tree *tree;
const char *tree_name;
struct unpack_trees_options opts;
struct tree_desc t;
struct oneway_unpack_data unpack_cb;
mark_merge_entries();
ent = revs->pending.objects[0].item;
tree_name = revs->pending.objects[0].name... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 281,649,236,020,517,900,000,000,000,000,000,000,000 | 36 | 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> |
void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
int (*cb)(struct ssl_st *ssl,SSL_SESSION *sess))
{
ctx->new_session_cb=cb;
} | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 232,285,840,096,494,000,000,000,000,000,000,000,000 | 5 | Add SRP support. |
//! Load image from a PNG file \newinstance.
static CImg<T> get_load_png(const char *const filename, unsigned int *const bits_per_pixel=0) {
return CImg<T>().load_png(filename,bits_per_pixel); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 188,276,187,838,350,750,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static __be32 nfsd4_encode_fs_locations(struct xdr_stream *xdr,
struct svc_rqst *rqstp, struct svc_export *exp)
{
__be32 status;
int i;
__be32 *p;
struct nfsd4_fs_locations *fslocs = &exp->ex_fslocs;
status = nfsd4_encode_fsloc_fsroot(xdr, rqstp, &exp->ex_path);
if (status)
return status;
p = xdr_reserve_s... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 19,980,964,228,398,480,000,000,000,000,000,000,000 | 22 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
long SSL_CTX_sess_set_cache_size(SSL_CTX* /*ctx*/, long /*sz*/)
{
// unlimited size, can't set for now
return 0;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 312,576,270,840,238,000,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.