func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
cmsHPROFILE CMSEXPORT cmsCreateRGBProfile(const cmsCIExyY* WhitePoint,
const cmsCIExyYTRIPLE* Primaries,
cmsToneCurve* const TransferFunction[3])
{
return cmsCreateRGBProfileTHR(NULL, WhitePoint, Primaries, TransferFunction);
} | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 173,727,665,728,203,600,000,000,000,000,000,000,000 | 6 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static inline void set_ethernet_addr(rtl8150_t * dev)
{
u8 node_id[6];
get_registers(dev, IDR, sizeof(node_id), node_id);
memcpy(dev->netdev->dev_addr, node_id, sizeof(node_id));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7926aff5c57b577ab0f43364ff0c59d968f6a414 | 260,768,421,921,614,560,000,000,000,000,000,000,000 | 7 | rtl8150: Use heap buffers for all register access
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net... |
static void asmlinkage smm_do_relocation(void *arg)
{
const struct smm_module_params *p;
const struct smm_runtime *runtime;
int cpu;
uintptr_t curr_smbase;
uintptr_t perm_smbase;
p = arg;
runtime = p->runtime;
cpu = p->cpu;
curr_smbase = runtime->smbase;
if (cpu >= CONFIG_MAX_CPUS) {
printk(BIOS_CRIT,
... | 1 | [
"CWE-269"
] | coreboot | afb7a814783cda12f5b72167163b9109ee1d15a7 | 169,755,918,165,816,490,000,000,000,000,000,000,000 | 44 | cpu/x86/smm: Introduce SMM module loader version 2
Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores).
Current coreboot SMM is unable to handle more than ~32 CPU threads.
This patch introduces a version 2 of the SMM module loader which
addresses this problem. Having two versions of the SMM module lo... |
static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
gfp_t gfp_mask)
{
unsigned int max_sectors = queue_max_hw_sectors(rq->q);
struct bio *bio;
int ret;
int j;
if (!iov_iter_count(iter))
return -EINVAL;
bio = bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_VECS));
if (!bio)
return -... | 0 | [
"CWE-200"
] | linux | cc8f7fe1f5eab010191aa4570f27641876fa1267 | 112,878,778,378,100,100,000,000,000,000,000,000,000 | 76 | block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern
Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize
the buffer of a bio.
Signed-off-by: Haimin Zhang <tcs.kernel@gmail.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: ... |
static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ThrowCUTReaderException(severity,tag) \
{ \
if (palette != NULL) \
palette=DestroyImage(palette); \
if (clone_info != NULL) \
clone_info=DestroyImageInfo(clone_info); \
ThrowReaderException(severity,tag); \
}
Ima... | 1 | [
"CWE-20",
"CWE-125",
"CWE-908"
] | ImageMagick | cdb383749ef7b68a38891440af8cc23e0115306d | 319,383,524,387,642,680,000,000,000,000,000,000,000 | 340 | https://github.com/ImageMagick/ImageMagick/issues/1599 |
ALGdealloc(PyObject *ptr)
{
ALGobject *self = (ALGobject *)ptr;
/* Overwrite the contents of the object */
Py_XDECREF(self->counter);
self->counter = NULL;
memset(self->IV, 0, BLOCK_SIZE);
memset(self->oldCipher, 0, BLOCK_SIZE);
memset((char*)&(self->st), 0, sizeof(block_state));
self->mode = self->count = s... | 0 | [
"CWE-119",
"CWE-787"
] | pycrypto | 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 | 22,041,458,807,364,873,000,000,000,000,000,000,000 | 13 | Throw exception when IV is used with ECB or CTR
The IV parameter is currently ignored when initializing
a cipher in ECB or CTR mode.
For CTR mode, it is confusing: it takes some time to see
that a different parameter is needed (the counter).
For ECB mode, it is outright dangerous.
This patch forces an exception to ... |
static int virtnet_receive(struct receive_queue *rq, int budget)
{
struct virtnet_info *vi = rq->vq->vdev->priv;
unsigned int len, received = 0;
void *buf;
while (received < budget &&
(buf = virtqueue_get_buf(rq->vq, &len)) != NULL) {
receive_buf(vi, rq, buf, len);
received++;
}
if (rq->vq->num_free... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 | 258,348,315,973,001,170,000,000,000,000,000,000,000 | 19 | virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.
A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.
Drop NETIF_F_FRA... |
static errno_t sdap_initgr_rfc2307bis_next_base(struct tevent_req *req)
{
struct tevent_req *subreq;
struct sdap_initgr_rfc2307bis_state *state;
state = tevent_req_data(req, struct sdap_initgr_rfc2307bis_state);
talloc_zfree(state->filter);
state->filter = sdap_get_id_specific_filter(
... | 0 | [
"CWE-264"
] | sssd | 0b6b4b7669b46d3d0b0ebefbc0e1621965444717 | 280,166,590,514,760,600,000,000,000,000,000,000,000 | 36 | IPA: process non-posix nested groups
Do not expect objectClass to be posixGroup but rather more general
groupofnames.
Resolves:
https://fedorahosted.org/sssd/ticket/2343
Reviewed-by: Michal Židek <mzidek@redhat.com>
(cherry picked from commit bc8c93ffe881271043492c938c626a9be948000e) |
static void alt_fp_init(fp_int* a)
{
a->size = FP_SIZE_ECC;
fp_zero(a);
} | 0 | [
"CWE-200"
] | wolfssl | 9b9568d500f31f964af26ba8d01e542e1f27e5ca | 83,549,983,069,838,160,000,000,000,000,000,000,000 | 5 | Change ECDSA signing to use blinding. |
xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
int ret;
if (input == NULL) return(-1);
if (xmlParserDebugEntities) {
if ((ctxt->input != NULL) && (ctxt->input->filename))
xmlGenericError(xmlGenericErrorContext,
"%s(%d): ", ctxt->input->filename,
ctxt->input->line);
xmlGen... | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 296,007,713,796,665,900,000,000,000,000,000,000,000 | 16 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type)
{
struct rtattr *nest = NLMSG_TAIL(n);
addattr_l(n, maxlen, type, NULL, 0);
return nest;
} | 0 | [] | iproute2 | 8c50b728b226f6254251282697ce38a72639a6fc | 275,002,288,312,588,350,000,000,000,000,000,000,000 | 7 | libnetlink: fix use-after-free of message buf
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically
allocated 'buf' that is used to store netlink messages. If netlink message
is an error message, buf is deallocated before returning with error code.
However, on return err->error code is checked one ... |
u32 sqlite3ExprListFlags(const ExprList *pList){
int i;
u32 m = 0;
assert( pList!=0 );
for(i=0; i<pList->nExpr; i++){
Expr *pExpr = pList->a[i].pExpr;
assert( pExpr!=0 );
m |= pExpr->flags;
}
return m;
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 127,459,779,448,965,010,000,000,000,000,000,000,000 | 11 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
static void handle_new_recv_msgs(struct ipmi_smi *intf)
{
struct ipmi_smi_msg *smi_msg;
unsigned long flags = 0;
int rv;
int run_to_completion = intf->run_to_completion;
/* See if any waiting messages need to be processed. */
if (!run_to_completion)
spin_lock_irqsave(&... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 192,382,054,497,962,340,000,000,000,000,000,000,000 | 57 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
int xenvif_kthread_guest_rx(void *data)
{
struct xenvif *vif = data;
struct sk_buff *skb;
while (!kthread_should_stop()) {
wait_event_interruptible(vif->wq,
rx_work_todo(vif) ||
vif->disabled ||
kthread_should_stop());
/* This frontend is found to be rogue, disable it in
* kthread context.... | 0 | [
"CWE-399"
] | net-next | e9d8b2c2968499c1f96563e6522c56958d5a1d0d | 214,191,357,812,921,370,000,000,000,000,000,000,000 | 46 | xen-netback: disable rogue vif in kthread context
When netback discovers frontend is sending malformed packet it will
disables the interface which serves that frontend.
However disabling a network interface involving taking a mutex which
cannot be done in softirq context, so we need to defer this process to
kthread c... |
int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
long *timeo, struct sock *ssk)
{
struct netlink_sock *nlk;
nlk = nlk_sk(sk);
if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
test_bit(0, &nlk->state)) {
DECLARE_WAITQUEUE(wait, current);
if (!*timeo) {
if (!ssk || netlink_is_ker... | 0 | [] | linux-2.6 | 16e5726269611b71c930054ffe9b858c1cea88eb | 31,386,346,188,496,750,000,000,000,000,000,000,000 | 39 | af_unix: dont send SCM_CREDENTIALS by default
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.
This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventua... |
void net_ns_barrier(void)
{
down_write(&pernet_ops_rwsem);
up_write(&pernet_ops_rwsem);
} | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 247,014,387,540,401,000,000,000,000,000,000,000,000 | 5 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
static MagickBooleanType FloydSteinbergDither(Image *image,CubeInfo *cube_info)
{
#define DitherImageTag "Dither/Image"
CacheView
*image_view;
const char
*artifact;
double
amount;
DoublePixelPacket
**pixels;
ExceptionInfo
*exception;
MagickBooleanType
status;
ssize_t
y;... | 0 | [
"CWE-125"
] | ImageMagick6 | e2a21735e3a3f3930bd431585ec36334c4c2eb77 | 222,187,553,979,543,900,000,000,000,000,000,000,000 | 197 | https://github.com/ImageMagick/ImageMagick/issues/1540 |
static void smack_file_free_security(struct file *file)
{
file->f_security = NULL;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 38,792,868,933,091,823,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
dir_inspect(VALUE dir)
{
struct dir_data *dirp;
TypedData_Get_Struct(dir, struct dir_data, &dir_data_type, dirp);
if (!NIL_P(dirp->path)) {
VALUE str = rb_str_new_cstr("#<");
rb_str_append(str, rb_class_name(CLASS_OF(dir)));
rb_str_cat2(str, ":");
rb_str_append(str, dirp->path);
rb_str_cat2(str, ">");... | 0 | [
"CWE-22"
] | ruby | 143eb22f1877815dd802f7928959c5f93d4c7bb3 | 160,546,641,759,606,610,000,000,000,000,000,000,000 | 15 | merge revision(s) 62989:
dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c... |
TEST_F(QueryPlannerTest, MultikeyElemMatchAllCompound3) {
addIndex(BSON("arr.k" << 1 << "arr.v" << 1), true);
runQuery(fromjson(
"{arr: {$all: ["
"{$elemMatch: {k: 1, v: 1}}, {$elemMatch: {k: 2, v: 2}}, {$elemMatch: {k: 3, v: 3}}]}}"));
assertNumSolutions(4U);
assertSolutionExists("{csc... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 177,036,936,681,594,100,000,000,000,000,000,000,000 | 27 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
client_use_key_share(gnutls_session_t session, const gnutls_group_entry_st *group,
const uint8_t * data, size_t data_size)
{
const gnutls_ecc_curve_entry_st *curve;
int ret;
if (group->pk == GNUTLS_PK_EC) {
gnutls_pk_params_st pub;
curve = _gnutls_ecc_curve_get_params(group->curve);
gnutls_pk_params_... | 0 | [
"CWE-416"
] | gnutls | 15beb4b193b2714d88107e7dffca781798684e7e | 127,004,582,875,150,040,000,000,000,000,000,000,000 | 104 | key_share: avoid use-after-free around realloc
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
static int tcp_match_skb_to_sack(struct sock *sk, struct sk_buff *skb,
u32 start_seq, u32 end_seq)
{
int err;
bool in_sack;
unsigned int pkt_len;
unsigned int mss;
in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) &&
!before(end_seq, TCP_SKB_CB(skb)->end_seq);
if (tcp_skb_pcount(skb) > 1 && !in_sack &... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 323,497,569,851,616,200,000,000,000,000,000,000,000 | 45 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
static void holtekff_send(struct holtekff_device *holtekff,
struct hid_device *hid,
const u8 data[HOLTEKFF_MSG_LENGTH])
{
int i;
for (i = 0; i < HOLTEKFF_MSG_LENGTH; i++) {
holtekff->field->value[i] = data[i];
}
dbg_hid("sending %7ph\n", data);
hid_hw_request(hid, holtekff->field->report, HID_REQ_SE... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 206,267,545,337,159,570,000,000,000,000,000,000,000 | 14 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
QStringList ServerView::mimeTypes() const {
QStringList qsl;
qsl << QStringList(QLatin1String("text/uri-list"));
qsl << QStringList(QLatin1String("text/plain"));
return qsl;
} | 0 | [
"CWE-59",
"CWE-61"
] | mumble | e59ee87abe249f345908c7d568f6879d16bfd648 | 129,053,330,503,629,290,000,000,000,000,000,000,000 | 6 | FIX(client): Only allow "http"/"https" for URLs in ConnectDialog
Our public server list registration script doesn't have an URL scheme
whitelist for the website field.
Turns out a malicious server can register itself with a dangerous URL in
an attempt to attack a user's machine.
User interaction is required, as the ... |
connection_ap_handshake_rewrite(entry_connection_t *conn,
rewrite_result_t *out)
{
socks_request_t *socks = conn->socks_request;
const or_options_t *options = get_options();
tor_addr_t addr_tmp;
/* Initialize all the fields of 'out' to reasonable defaults */
out->automap = 0;
... | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 703,422,749,735,528,400,000,000,000,000,000,000 | 195 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
process_triblt(STREAM s, TRIBLT_ORDER * os, uint32 present, RD_BOOL delta)
{
RD_HBITMAP bitmap;
BRUSH brush;
if (present & 0x000001)
{
in_uint8(s, os->cache_id);
in_uint8(s, os->colour_table);
}
if (present & 0x000002)
rdp_in_coord(s, &os->x, delta);
if (present & 0x000004)
rdp_in_coord(s, &os->y, del... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 313,171,441,162,403,900,000,000,000,000,000,000,000 | 59 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
xmlSchemaFormatNodeForError(xmlChar ** msg,
xmlSchemaAbstractCtxtPtr actxt,
xmlNodePtr node)
{
xmlChar *str = NULL;
*msg = NULL;
if ((node != NULL) &&
(node->type != XML_ELEMENT_NODE) &&
(node->type != XML_ATTRIBUTE_NODE))
{
/*
* Don't try to format other nodes than element and
* att... | 1 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 232,451,949,434,367,400,000,000,000,000,000,000,000 | 94 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static int SN_Client_HandlePacket(MqttClient* client, SN_MsgType packet_type,
void* packet_obj, int timeout)
{
int rc = MQTT_CODE_SUCCESS;
word16 packet_id = 0;
(void)timeout;
switch ((int)packet_type)
{
case SN_MSG_TYPE_GWINFO:
{
SN_GwInfo info, *p_info = &info;
... | 0 | [
"CWE-787"
] | wolfMQTT | 84d4b53122e0fa0280c7872350b89d5777dabbb2 | 134,841,339,718,711,300,000,000,000,000,000,000,000 | 400 | Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free |
static void io_req_task_queue(struct io_kiocb *req)
{
int ret;
init_task_work(&req->task_work, io_req_task_submit);
percpu_ref_get(&req->ctx->refs);
ret = io_req_task_work_add(req, &req->task_work, true);
if (unlikely(ret)) {
struct task_struct *tsk;
init_task_work(&req->task_work, io_req_task_cancel);
ts... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 18,785,984,705,621,867,000,000,000,000,000,000,000 | 17 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static int kvm_s390_set_tod_ext(struct kvm *kvm, struct kvm_device_attr *attr)
{
struct kvm_s390_vm_tod_clock gtod;
if (copy_from_user(>od, (void __user *)attr->addr, sizeof(gtod)))
return -EFAULT;
if (!test_kvm_facility(kvm, 139) && gtod.epoch_idx)
return -EINVAL;
kvm_s390_set_tod_clock(kvm, >od);
VM_E... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 151,563,610,059,494,700,000,000,000,000,000,000,000 | 16 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int l2cap_sock_listen(struct socket *sock, int backlog)
{
struct sock *sk = sock->sk;
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
int err = 0;
BT_DBG("sk %p backlog %d", sk, backlog);
lock_sock(sk);
if (sk->sk_state != BT_BOUND) {
err = -EBADFD;
goto done;
}
if (sk->sk_type != SOCK_SEQPACKET &&... | 0 | [
"CWE-200"
] | linux | 792039c73cf176c8e39a6e8beef2c94ff46522ed | 147,804,009,172,410,110,000,000,000,000,000,000,000 | 43 | Bluetooth: L2CAP - Fix info leak via getsockname()
The L2CAP code fails to initialize the l2_bdaddr_type member of struct
sockaddr_l2 and the padding byte added for alignment. It that for leaks
two bytes kernel stack via the getsockname() syscall. Add an explicit
memset(0) before filling the structure to avoid the inf... |
zfont_get_to_unicode_map(gs_font_dir *dir)
{
const gs_unicode_decoder *pud = (gs_unicode_decoder *)dir->glyph_to_unicode_table;
return (pud == NULL ? NULL : &pud->data);
} | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 262,895,240,972,604,000,000,000,000,000,000,000,000 | 6 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
static int network_stats_read (void) /* {{{ */
{
derive_t copy_octets_rx;
derive_t copy_octets_tx;
derive_t copy_packets_rx;
derive_t copy_packets_tx;
derive_t copy_values_dispatched;
derive_t copy_values_not_dispatched;
derive_t copy_values_sent;
derive_t copy_values_not_sent;
derive_t copy_receive_list_lengt... | 0 | [
"CWE-119",
"CWE-787"
] | collectd | b589096f907052b3a4da2b9ccc9b0e2e888dfc18 | 230,859,391,336,085,000,000,000,000,000,000,000,000 | 75 | network plugin: Fix heap overflow in parse_packet().
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network... |
irc_server_set_buffer_title (struct t_irc_server *server)
{
char *title;
int length;
if (server && server->buffer)
{
if (server->is_connected)
{
length = 16 +
((server->current_address) ? strlen (server->current_address) : 16) +
16 + ((server-... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 82,939,458,564,927,440,000,000,000,000,000,000,000 | 29 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
FloydSteinbergInitG(gx_device_printer * pdev)
{
int i;
gx_device_bjc_printer *dev = (gx_device_bjc_printer *)pdev;
dev->FloydSteinbergErrorsG = (int *) gs_alloc_bytes(pdev->memory,
sizeof(int)*(pdev->width+3),
"bjc ... | 0 | [
"CWE-787"
] | ghostpdl | bf72f1a3dd5392ee8291e3b1518a0c2c5dc6ba39 | 204,168,419,588,655,100,000,000,000,000,000,000,000 | 22 | Fix valgrind problems with gdevbjca.c
2 problems here. Firstly, we could access off the end of a row
while looking for runs. Change the indexing to fix this.
Secondly, we could overrun our gamma tables due to unexpectedly
large values. Add some clamping. |
void LibRaw::parse_exif(int base)
{
unsigned entries, tag, type, len, save, c;
double expo, ape;
unsigned kodak = !strncmp(make, "EASTMAN", 7) && tiff_nifds < 3;
entries = get2();
if (!strncmp(make, "Hasselblad", 10) && (tiff_nifds > 3) && (entries > 512))
return;
INT64 fsize = ifp->size();
while (e... | 0 | [
"CWE-787"
] | LibRaw | 55f0a0c08974b8b79ebfa7762b555a1704b25fb2 | 124,973,419,188,282,150,000,000,000,000,000,000,000 | 250 | possible buffer underrun in exif parser |
static int snd_timer_user_next_device(struct snd_timer_id __user *_tid)
{
struct snd_timer_id id;
struct snd_timer *timer;
struct list_head *p;
if (copy_from_user(&id, _tid, sizeof(id)))
return -EFAULT;
mutex_lock(®ister_mutex);
if (id.dev_class < 0) { /* first item */
if (list_empty(&snd_timer_list))
... | 0 | [
"CWE-200",
"CWE-362"
] | linux | ee8413b01045c74340aa13ad5bdf905de32be736 | 248,649,744,109,780,530,000,000,000,000,000,000,000 | 95 | ALSA: timer: Fix double unlink of active_list
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and i... |
Unit *unit_following(Unit *u) {
assert(u);
if (UNIT_VTABLE(u)->following)
return UNIT_VTABLE(u)->following(u);
return NULL;
} | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 257,105,261,533,684,800,000,000,000,000,000,000,000 | 8 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
static int ssl_encrypt_buf( ssl_context *ssl )
{
size_t i;
cipher_mode_t mode;
int auth_done = 0;
SSL_DEBUG_MSG( 2, ( "=> encrypt buf" ) );
if( ssl->session_out == NULL || ssl->transform_out == NULL )
{
SSL_DEBUG_MSG( 1, ( "should never happen" ) );
return( POLARSSL_ERR_SSL_INT... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 166,055,663,214,966,270,000,000,000,000,000,000,000 | 333 | Added max length checking of hostname |
save_incsearch_state(void)
{
saved_search_match_endcol = search_match_endcol;
saved_search_match_lines = search_match_lines;
} | 0 | [
"CWE-416"
] | vim | 409510c588b1eec1ae33511ae97a21eb8e110895 | 158,410,495,455,693,800,000,000,000,000,000,000,000 | 5 | patch 8.2.5050: using freed memory when searching for pattern in path
Problem: Using freed memory when searching for pattern in path.
Solution: Make a copy of the line. |
STATIC void
S_put_range(pTHX_ SV *sv, UV start, const UV end, const bool allow_literals)
{
/* Appends to 'sv' a displayable version of the range of code points from
* 'start' to 'end'. Mnemonics (like '\r') are used for the few controls
* that have them, when they occur at the beginning or end of the ran... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 19,098,804,307,912,680,000,000,000,000,000,000,000 | 173 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
rb_str_partition(argc, argv, str)
int argc;
VALUE *argv;
VALUE str;
{
VALUE sep;
long pos;
if (argc == 0) return rb_call_super(argc, argv);
rb_scan_args(argc, argv, "1", &sep);
if (TYPE(sep) != T_REGEXP) {
VALUE tmp;
tmp = rb_check_string_type(sep);
if (NIL_P(tmp)) {
rb_raise(r... | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 198,034,689,651,176,760,000,000,000,000,000,000,000 | 32 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end)
{
GetByteContext gb;
int ret;
if (data >= data_end)
return -1;
bytestream2_init(&gb, data, data_end - data);
ret = amf_tag_skip(&gb);
if (ret < 0 || bytestream2_get_bytes_left(&gb) <= 0)
return -1;
av_assert... | 0 | [
"CWE-20"
] | FFmpeg | ffcc82219cef0928bed2d558b19ef6ea35634130 | 65,776,833,187,186,350,000,000,000,000,000,000,000 | 16 | avformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2
Fixes: out of array accesses
Found-by: JunDong Xie of Ant-financial Light-Year Security Lab
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
s32 inotify_add_watch(struct inotify_handle *ih, struct inotify_watch *watch,
struct inode *inode, u32 mask)
{
int ret = 0;
int newly_watched;
/* don't allow invalid bits: we don't want flags set */
mask &= IN_ALL_EVENTS | IN_ONESHOT;
if (unlikely(!mask))
return -EINVAL;
watch->mask = mask;
mutex_loc... | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 136,472,251,429,427,290,000,000,000,000,000,000,000 | 48 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
TEST_P(TcpTunnelingIntegrationTest, DeferTransmitDataUntilSuccessConnectResponseIsReceived) {
initialize();
// Start a connection, and verify the upgrade headers are received upstream.
tcp_client_ = makeTcpConnection(lookupPort("tcp_proxy"));
// Send some data straight away.
ASSERT_TRUE(tcp_client_->write("... | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 126,533,026,795,020,290,000,000,000,000,000,000,000 | 29 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
process_downstream_ack(int userid, int down_seq, int down_frag)
/* Process acks from downstream fragments.
After this, .offset and .fragment are updated (if ack correct),
or .len is set to zero when all is done.
*/
{
if (users[userid].outpacket.len <= 0)
/* No packet to apply acks to */
return;
if (users[u... | 0 | [] | iodine | b715be5cf3978fbe589b03b09c9398d0d791f850 | 87,928,796,154,101,600,000,000,000,000,000,000,000 | 36 | Fix authentication bypass bug
The client could bypass the password check by continuing after getting error
from the server and guessing the network parameters. The server would still
accept the rest of the setup and also network traffic.
Add checks for normal and raw mode that user has authenticated before allowing
a... |
static int smm_create_map(uintptr_t smbase, unsigned int num_cpus,
const struct smm_loader_params *params)
{
unsigned int i;
struct rmodule smm_stub;
unsigned int ss_size = params->per_cpu_save_state_size, stub_size;
unsigned int smm_entry_offset = params->smm_main_entry_offset;
unsigned int seg_count = 0, segm... | 0 | [
"CWE-269"
] | coreboot | afb7a814783cda12f5b72167163b9109ee1d15a7 | 213,732,572,083,948,200,000,000,000,000,000,000,000 | 75 | cpu/x86/smm: Introduce SMM module loader version 2
Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores).
Current coreboot SMM is unable to handle more than ~32 CPU threads.
This patch introduces a version 2 of the SMM module loader which
addresses this problem. Having two versions of the SMM module lo... |
static inline int security_msg_queue_associate(struct msg_queue *msq,
int msqflg)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 114,971,551,065,169,310,000,000,000,000,000,000,000 | 5 | 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... |
Spawner(const ConfigPtr &_config)
: config(_config),
creationTime(SystemTime::getUsec())
{ } | 0 | [
"CWE-200",
"CWE-61"
] | passenger | 4043718264095cde6623c2cbe8c644541036d7bf | 286,538,299,604,539,820,000,000,000,000,000,000,000 | 4 | Disable unused feature. |
static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
int rw, u64 file_offset, int skip_sum,
int async_submit)
{
struct btrfs_dio_private *dip = bio->bi_private;
int write = rw & REQ_WRITE;
struct btrfs_root *root = BTRFS_I(inode)->root;
int ret;
if (async_submit)
async_subm... | 0 | [
"CWE-200"
] | linux | 0305cd5f7fca85dae392b9ba85b116896eb7c1c7 | 3,837,057,902,672,529,000,000,000,000,000,000,000 | 51 | Btrfs: fix truncation of compressed and inlined extents
When truncating a file to a smaller size which consists of an inline
extent that is compressed, we did not discard (or made unusable) the
data between the new file size and the old file size, wasting metadata
space and allowing for the truncated data to be leaked... |
static int setcos_putdata(struct sc_card *card, struct sc_cardctl_setcos_data_obj* data_obj)
{
int r;
struct sc_apdu apdu;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
memset(&apdu, 0, sizeof(apdu));
apdu.cse = SC_APDU_CASE_3_SHORT;
apdu.cla = 0x00;
apdu.ins = 0xDA;
apdu.p1 = data_ob... | 0 | [
"CWE-125"
] | OpenSC | c3f23b836e5a1766c36617fe1da30d22f7b63de2 | 189,352,224,938,655,130,000,000,000,000,000,000,000 | 25 | fixed UNKNOWN READ
Reported by OSS-Fuzz
https://oss-fuzz.com/testcase-detail/5681169970757632 |
static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)
{
const struct cred *cred = current_cred();
if (!strncmp(name, XATTR_SECURITY_PREFIX,
sizeof XATTR_SECURITY_PREFIX - 1)) {
if (!strcmp(name, XATTR_NAME_CAPS)) {
if (!capable(CAP_SETFCAP))
return -EPERM;
} else if (!capa... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 329,281,241,670,150,080,000,000,000,000,000,000,000 | 20 | 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... |
Item_in_subselect::create_row_in_to_exists_cond(JOIN * join,
Item **where_item,
Item **having_item)
{
SELECT_LEX *select_lex= join->select_lex;
uint cols_num= left_expr->cols();
/*
The non-transformed HAVING clause... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 9,049,669,821,144,552,000,000,000,000,000,000,000 | 181 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static void get_old_counters(const struct xt_table_info *t,
struct xt_counters counters[])
{
struct arpt_entry *iter;
unsigned int cpu, i;
for_each_possible_cpu(cpu) {
i = 0;
xt_entry_foreach(iter, t->entries, t->size) {
struct xt_counters *tmp;
tmp = xt_get_per_cpu_counter(&iter->counters, cpu);... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 334,783,348,587,653,200,000,000,000,000,000,000,000 | 18 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
static size_t mg_mqtt_next_topic(struct mg_mqtt_message *msg,
struct mg_str *topic, uint8_t *qos,
size_t pos) {
unsigned char *buf = (unsigned char *) msg->dgram.ptr + pos;
size_t new_pos;
if (pos >= msg->dgram.len) return 0;
topic->len = (size_... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 212,674,505,380,449,060,000,000,000,000,000,000,000 | 14 | Protect against the directory traversal in mg_upload() |
static DH *load_dh_param(const char *dhfile)
{
DH *ret=NULL;
BIO *bio;
if ((bio=BIO_new_file(dhfile,"r")) == NULL)
goto err;
ret=PEM_read_bio_DHparams(bio,NULL,NULL,NULL);
err:
if (bio != NULL) BIO_free(bio);
return(ret);
} | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 3,432,769,260,868,062,300,000,000,000,000,000,000 | 12 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
bgp_update_print(netdissect_options *ndo,
const u_char *dat, int length)
{
struct bgp bgp;
const u_char *p;
int withdrawn_routes_len;
int len;
int i;
ND_TCHECK2(dat[0], BGP_SIZE);
if (length < BGP_SIZE)
goto trunc;
memcpy(&bgp, dat, BGP_SIZE);
p = dat + BGP_SIZE; /*XXX*/
length -= BGP_SIZE... | 0 | [
"CWE-125"
] | tcpdump | 86326e880d31b328a151d45348c35220baa9a1ff | 159,432,847,398,619,430,000,000,000,000,000,000,000 | 135 | (for 4.9.3) CVE-2018-14881/BGP: Fix BGP_CAPCODE_RESTART.
Add a bounds check and a comment to bgp_capabilities_print().
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s). |
static void cit_model4_BrightnessPacket(struct gspca_dev *gspca_dev, u16 val)
{
cit_write_reg(gspca_dev, 0x00aa, 0x012d);
cit_write_reg(gspca_dev, 0x0026, 0x012f);
cit_write_reg(gspca_dev, 0xd141, 0x0124);
cit_write_reg(gspca_dev, val, 0x0127);
cit_write_reg(gspca_dev, 0x00aa, 0x0130);
cit_write_reg(gspca_dev,... | 0 | [
"CWE-476"
] | linux | a246b4d547708f33ff4d4b9a7a5dbac741dc89d8 | 155,969,851,343,622,030,000,000,000,000,000,000,000 | 13 | media: xirlink_cit: add missing descriptor sanity checks
Make sure to check that we have two alternate settings and at least one
endpoint before accessing the second altsetting structure and
dereferencing the endpoint arrays.
This specifically avoids dereferencing NULL-pointers or corrupting
memory when a device does... |
static int __init max_swapfiles_check(void)
{
MAX_SWAPFILES_CHECK();
return 0;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 54,085,502,764,490,420,000,000,000,000,000,000,000 | 5 | 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(... |
const CImg<T>& save_rgba(const char *const filename) const {
return _save_rgba(0,filename);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 116,371,817,060,268,380,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. |
void updateGenre(TextIdentificationFrame *frame)
{
StringList fields = frame->fieldList();
StringList newfields;
for(StringList::ConstIterator it = fields.begin(); it != fields.end(); ++it) {
String s = *it;
int end = s.find(")");
if(s.startsWith("(") && end > 0) {
// "(12)Ge... | 0 | [
"CWE-434",
"CWE-352"
] | taglib | cb9f07d9dcd791b63e622da43f7b232adaec0a9a | 20,671,769,213,865,817,000,000,000,000,000,000,000 | 30 | Don't assume TDRC is an instance of TextIdentificationFrame (#831)
If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
which causes problems in rebuildAggregateFrames() when it is assumed
that TDRC is a TextIdentificationFrame |
listener_set_property (GSListener *listener,
DBusConnection *connection,
DBusMessage *message,
guint prop_id)
{
const char *path;
int type;
gboolean rc;
DBusMessageIter iter;
... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 102,811,412,292,871,840,000,000,000,000,000,000,000 | 49 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
long MemIo::write(BasicIo& src)
{
if (static_cast<BasicIo*>(this) == &src) return 0;
if (!src.isopen()) return 0;
byte buf[4096];
long readCount = 0;
long writeTotal = 0;
while ((readCount = src.read(buf, sizeof(buf)))) {
write(buf, readCount);
... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 129,936,204,898,793,170,000,000,000,000,000,000,000 | 15 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static int alloc_refcount_block(BlockDriverState *bs,
int64_t cluster_index, uint16_t **refcount_block)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
/* Find the refcount block for the given cluster */
refcount_t... | 1 | [
"CWE-190"
] | qemu | b106ad9185f35fc4ad669555ad0e79e276083bd7 | 96,331,514,894,509,600,000,000,000,000,000,000,000 | 267 | qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147)
free_cluster_index is only correct if update_refcount() was called from
an allocation function, and even there it's brittle because it's used to
protect unfinished allocations which still have a refcount of 0 - if it
moves in the wrong p... |
longlong Item_func_sleep::val_int()
{
THD *thd= current_thd;
Interruptible_wait timed_cond(thd);
mysql_cond_t cond;
double timeout;
int error;
DBUG_ASSERT(fixed == 1);
timeout= args[0]->val_real();
/*
On 64-bit OSX mysql_cond_timedwait() waits forever
if passed abstime time has already been ex... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 114,012,906,243,143,770,000,000,000,000,000,000,000 | 57 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static int selinux_secmark_relabel_packet(u32 sid)
{
const struct task_security_struct *__tsec;
u32 tsid;
__tsec = selinux_cred(current_cred());
tsid = __tsec->sid;
return avc_has_perm(&selinux_state,
tsid, sid, SECCLASS_PACKET, PACKET__RELABELTO,
NULL);
} | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 277,466,080,250,657,900,000,000,000,000,000,000,000 | 12 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
dissect_kafka_txn_offset_commit_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
offset = dissect_kafka_string(tree, hf_kafka_transactional_id, tvb, pinfo, offset, api_ver... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 162,925,838,333,484,630,000,000,000,000,000,000,000 | 42 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
processDSNSResponse(struct module_qstate* qstate, int id,
struct module_qstate* forq)
{
struct iter_qstate* foriq = (struct iter_qstate*)forq->minfo[id];
/* if the finished (iq->response) query has no NS set: continue
* up to look for the right dp; nothing to change, do DPNSstate */
if(qstate->return_rcode != LD... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 62,923,338,559,114,280,000,000,000,000,000,000,000 | 26 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
ga_concat_shorten_esc(garray_T *gap, char_u *str)
{
char_u *p;
char_u *s;
int c;
int clen;
char_u buf[NUMBUFLEN];
int same_len;
if (str == NULL)
{
ga_concat(gap, (char_u *)"NULL");
return;
}
for (p = str; *p != NUL; ++p)
{
same_len = 1;
s = p;
c = mb_cpt... | 0 | [
"CWE-121",
"CWE-787"
] | vim | 34f8117dec685ace52cd9e578e2729db278163fc | 255,743,422,040,651,240,000,000,000,000,000,000,000 | 40 | patch 8.2.4397: crash when using many composing characters in error message
Problem: Crash when using many composing characters in error message.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). |
int unit_load_related_unit(Unit *u, const char *type, Unit **_found) {
_cleanup_free_ char *t = NULL;
int r;
assert(u);
assert(type);
assert(_found);
r = unit_name_change_suffix(u->id, type, &t);
if (r < 0)
return r;
if (unit_has_name(u, ... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 312,496,528,522,476,900,000,000,000,000,000,000,000 | 18 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
{
sapi_header_struct sapi_header;
char *colon_offset;
char *header_line;
uint header_line_len;
int http_response_code;
if (SG(headers_sent) && !SG(request_info).no_headers) {
const char *output_start_filename = php_output_get_start_filena... | 0 | [
"CWE-601"
] | php-src | 98b9dfaec95e6f910f125ed172cdbd25abd006ec | 73,640,582,394,331,490,000,000,000,000,000,000,000 | 180 | Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment |
put_device(parent);
}
static int iscsi_is_conn_dev(const struct device *dev) | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 145,594,505,669,541,970,000,000,000,000,000,000,000 | 4 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
static inline size_t AllocationPolicy(size_t size)
{
register size_t
blocksize;
/*
The linear distribution.
*/
assert(size != 0);
assert(size % (4*sizeof(size_t)) == 0);
if (size <= BlockThreshold)
return(size/(4*sizeof(size_t)));
/*
Check for the largest block size.
*/
if (size > (si... | 0 | [
"CWE-190",
"CWE-189",
"CWE-703"
] | ImageMagick | 0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734 | 213,731,320,499,471,650,000,000,000,000,000,000,000 | 27 | |
static void read_client_command(uev_t *w, void *arg, int events)
{
char *command, *argument;
ctrl_t *ctrl = (ctrl_t *)arg;
ftp_cmd_t *cmd;
if (UEV_ERROR == events || UEV_HUP == events) {
uev_io_start(w);
return;
}
/* Reset inactivity timer. */
uev_timer_set(&ctrl->timeout_watcher, INACTIVITY_TIMER, 0);
i... | 0 | [
"CWE-120",
"CWE-787"
] | uftpd | 0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd | 128,683,353,084,899,500,000,000,000,000,000,000,000 | 37 | FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
TEST(HeaderMapImplTest, MoveIntoInline) {
HeaderMapImpl headers;
HeaderString key;
key.setCopy(Headers::get().CacheControl.get());
HeaderString value;
value.setCopy("hello", 5);
headers.addViaMove(std::move(key), std::move(value));
EXPECT_EQ("cache-control", headers.CacheControl()->key().getStringView());... | 1 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 329,821,614,915,755,500,000,000,000,000,000,000,000 | 18 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
zcliprestore(i_ctx_t *i_ctx_p)
{
return gs_cliprestore(igs);
} | 0 | [] | ghostpdl | 4f83478c88c2e05d6e8d79ca4557eb039354d2f3 | 320,164,629,091,156,500,000,000,000,000,000,000,000 | 4 | Bug 697799: have .eqproc check its parameters
The Ghostscript custom operator .eqproc was not check the number or type of
the parameters it was given. |
pixBlockconvGray(PIX *pixs,
PIX *pixacc,
l_int32 wc,
l_int32 hc)
{
l_int32 w, h, d, wpl, wpla;
l_uint32 *datad, *dataa;
PIX *pixd, *pixt;
PROCNAME("pixBlockconvGray");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined", procName... | 0 | [] | leptonica | 480f5e74c24fdc2003c42a4e15d1f24c9e6ea469 | 249,091,133,157,588,700,000,000,000,000,000,000,000 | 53 | Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray(). |
testcase_str2repo(Pool *pool, const char *str)
{
int repoid;
Repo *repo = 0;
if (str[0] == '#' && (str[1] >= '0' && str[1] <= '9'))
{
int j;
repoid = 0;
for (j = 1; str[j] >= '0' && str[j] <= '9'; j++)
repoid = repoid * 10 + (str[j] - '0');
if (!str[j] && repoid > 0 && repoid < pool->... | 0 | [
"CWE-120"
] | libsolv | 0077ef29eb46d2e1df2f230fc95a1d9748d49dec | 209,927,191,045,213,400,000,000,000,000,000,000,000 | 37 | testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.
(Jobs may point inside the whatproviedes array, so we must not invalid... |
void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen)
{
#ifdef QT_DEBUG_DRAW
qDebug() << "QPaintEngineEx::stroke()" << pen;
#endif
Q_D(QPaintEngineEx);
if (path.isEmpty())
return;
if (!d->strokeHandler) {
d->strokeHandler = new StrokeHandler(path.elementCount()+4);
... | 0 | [
"CWE-787"
] | qtbase | 6b400e3147dcfd8cc3a393ace1bd118c93762e0c | 208,992,809,461,842,860,000,000,000,000,000,000,000 | 235 | Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix.
Fixes: QTBUG-95239
Pick-to: 6.2 6.1 5.15
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
Reviewed-by: Robert Löhning <robert.loehning@qt.io> |
static void dev_seq_stop(struct seq_file *s, void *v)
{
kfree(s->private);
} | 0 | [
"CWE-190",
"CWE-189"
] | linux | fdc81f45e9f57858da6351836507fbcf1b7583ee | 120,263,391,180,876,470,000,000,000,000,000,000,000 | 4 | sg_start_req(): use import_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
GF_Err gf_media_avc_change_par(GF_AVCConfig *avcc, s32 ar_n, s32 ar_d)
{
GF_BitStream *orig, *mod;
AVCState avc;
u32 i, bit_offset, flag;
s32 idx;
GF_AVCConfigSlot *slc;
orig = NULL;
memset(&avc, 0, sizeof(AVCState));
avc.sps_active_idx = -1;
i=0;
while ((slc = (GF_AVCConfigSlot *)gf_list_enum(avcc->sequenc... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 278,826,953,995,335,100,000,000,000,000,000,000,000 | 98 | fix some exploitable overflows (#994, #997) |
int mnt_match_options(const char *optstr, const char *pattern)
{
char *name, *pat = (char *) pattern;
char *buf, *patval;
size_t namesz = 0, patvalsz = 0;
int match = 1;
if (!pattern && !optstr)
return 1;
if (!pattern)
return 0;
buf = malloc(strlen(pattern) + 1);
if (!buf)
return 0;
/* walk on pattern... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 57202f5713afa2af20ffbb6ab5331481d0396f8d | 33,899,877,013,615,016,000,000,000,000,000,000,000 | 55 | libmount: fix UID check for FUSE umount [CVE-2021-3995]
Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.
Signed-off-by: Karel Zak <kzak@redhat.com> |
NDIS_STATUS ParaNdis6_SendPauseRestart(
PARANDIS_ADAPTER *pContext,
BOOLEAN bPause,
ONPAUSECOMPLETEPROC Callback
)
{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
DEBUG_ENTRY(4);
if (bPause)
{
ParaNdis_DebugHistory(pContext, hopInternalSendPause, NULL, 1, 0, 0);
if (pContext->Sen... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 243,941,848,682,634,500,000,000,000,000,000,000,000 | 45 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
QStringList JlCompress::extractDir(QString fileCompressed, QString dir) {
// Apro lo zip
QuaZip zip(fileCompressed);
return extractDir(zip, dir);
} | 0 | [
"CWE-22"
] | quazip | 5d2fc16a1976e5bf78d2927b012f67a2ae047a98 | 128,032,481,982,514,340,000,000,000,000,000,000,000 | 5 | Fixed the Zip Slip vulnerability in JlCompress
When extracting a file with a dangerous path like "../evil.exe"
from a ZIP archive with JlCompress::extractDir(), the target
file would be created outside of the target directory, potentially
even overwriting an existing file there. |
void LibRaw::raw2image_start()
{
// restore color,sizes and internal data into raw_image fields
memmove(&imgdata.color,&imgdata.rawdata.color,sizeof(imgdata.color));
memmove(&imgdata.sizes,&imgdata.rawdata.sizes,sizeof(imgdata.sizes));
memmove(&imgdata.idata,&imgdata.rawdata.iparams,sizeof(imgdata.idata));
me... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 232,439,219,222,036,220,000,000,000,000,000,000,000 | 26 | fixed two more problems found by fuzzer |
inline unsigned int prand(const double z) {
cimg::mutex(4);
const unsigned int res = cimg::prand(z,&cimg::rng());
cimg::mutex(4,0);
return res;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 300,149,867,907,741,780,000,000,000,000,000,000,000 | 6 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
bool AbstractSqlMigrationReader::migrateTo(AbstractSqlMigrationWriter *writer)
{
if (!transaction()) {
qWarning() << "AbstractSqlMigrationReader::migrateTo(): unable to start reader's transaction!";
return false;
}
if (!writer->transaction()) {
qWarning() << "AbstractSqlMigrationRead... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 188,984,235,160,416,460,000,000,000,000,000,000,000 | 55 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
uint32_t CompactProtocolWriter::writeMapBegin(
const TType keyType,
TType valType,
uint32_t size) {
uint32_t wsize = 0;
if (size == 0) {
wsize += writeByte(0);
} else {
wsize += apache::thrift::util::writeVarint(out_, size);
wsize += writeByte(
detail::compact::TTypeToCType[keyTyp... | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 252,737,648,357,731,000,000,000,000,000,000,000,000 | 16 | 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... |
_copyDropRoleStmt(const DropRoleStmt *from)
{
DropRoleStmt *newnode = makeNode(DropRoleStmt);
COPY_NODE_FIELD(roles);
COPY_SCALAR_FIELD(missing_ok);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 305,596,317,715,488,160,000,000,000,000,000,000,000 | 9 | 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... |
StringVal decrypt(FunctionContext* ctx, const StringVal& src, const StringVal& key,
const StringVal& iv, EncryptionMode mode) {
if (src.len == 0 || src.is_null) {
return StringVal::null();
}
int cipher_len = src.len;
std::unique_ptr<char[]> p;
p.reset(new char[cipher_len]);... | 1 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 230,954,700,657,740,430,000,000,000,000,000,000,000 | 32 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static int xennet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
struct netlink_ext_ack *extack)
{
unsigned long max_mtu = XEN_PAGE_SIZE - XDP_PACKET_HEADROOM;
struct netfront_info *np = netdev_priv(dev);
struct bpf_prog *old_prog;
unsigned int i, err;
if (dev->mtu > max_mtu) {
netdev_warn(dev, "XD... | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 160,285,555,620,056,060,000,000,000,000,000,000,000 | 45 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
int git_tree_entry_dup(git_tree_entry **dest, const git_tree_entry *source)
{
size_t total_size;
git_tree_entry *copy;
assert(source);
total_size = sizeof(git_tree_entry) + source->filename_len + 1;
copy = git__malloc(total_size);
GITERR_CHECK_ALLOC(copy);
memcpy(copy, source, total_size);
*dest = copy;
r... | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 212,791,120,385,077,100,000,000,000,000,000,000,000 | 17 | tree: Check for `.git` with case insensitivy |
static inline spinlock_t *ext4_group_lock_ptr(struct super_block *sb,
ext4_group_t group)
{
return bgl_lock_ptr(EXT4_SB(sb)->s_blockgroup_lock, group); | 0 | [
"CWE-787"
] | linux | c37e9e013469521d9adb932d17a1795c139b36db | 140,269,723,221,269,960,000,000,000,000,000,000,000 | 5 | ext4: add more inode number paranoia checks
If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.
Also, if the superblock's first inode number field is too small,
refuse to mount the file system.
This addresses CVE-2018-10882.
https... |
mailimf_from_parse(const char * message, size_t length,
size_t * indx, struct mailimf_from ** result)
{
struct mailimf_mailbox_list * mb_list;
struct mailimf_from * from;
size_t cur_token;
int r;
int res;
cur_token = * indx;
r = mailimf_token_case_insensitive_parse(message, length,
&cur_to... | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 87,159,097,528,908,480,000,000,000,000,000,000,000 | 53 | Fixed crash #274 |
FunctionContext::FunctionContext() : _impl(new doris::FunctionContextImpl(this)) {} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 237,755,216,591,800,730,000,000,000,000,000,000,000 | 1 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
bool check_allow_all_hosts()
{
return (!hostname ||
(hostname[0] == wild_many && !hostname[1]));
} | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 57,916,573,559,514,850,000,000,000,000,000,000,000 | 5 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
_validate_summary_for_collection_id (GVariant *summary_v,
const char *collection_id,
GError **error)
{
VarSummaryRef summary;
summary = var_summary_from_gvariant (summary_v);
if (!flatpak_summary_find_ref_map (summary, collection_i... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 277,208,714,149,904,300,000,000,000,000,000,000,000 | 13 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
boot_defclass(mrb_state *mrb, struct RClass *super)
{
struct RClass *c;
c = MRB_OBJ_ALLOC(mrb, MRB_TT_CLASS, mrb->class_class);
if (super) {
c->super = super;
mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)super);
c->flags |= MRB_FL_CLASS_IS_INHERITED;
}
else {
c->super = mrb... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 310,957,737,911,344,000,000,000,000,000,000,000,000 | 16 | class.c: clear method cache after `remove_method`. |
void CiffDirectory::doAddComponent(UniquePtr component)
{
components_.push_back(component.release());
} | 0 | [
"CWE-125"
] | exiv2 | 9628f82084ed30d494ddd4f7360d233801e22967 | 96,679,817,377,721,400,000,000,000,000,000,000,000 | 4 | Avoid integer overflow.
(cherry picked from commit c0ecc2ae36f34462be98623deb85ba1747ae2175) |
rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
int bytesPerPixel) {
#ifdef WIN32
WSADATA unused;
#endif
rfbClient* client=(rfbClient*)calloc(sizeof(rfbClient),1);
if(!client) {
rfbClientErr("Couldn't allocate client structure!\n");
return NULL;
}
#ifdef WIN32
if((errno = WSAStartu... | 0 | [
"CWE-400",
"CWE-703"
] | libvncserver | bef41f6ec4097a8ee094f90a1b34a708fbd757ec | 105,036,695,854,350,470,000,000,000,000,000,000,000 | 116 | libvncclient: free vncRec memory in rfbClientCleanup()
Otherwise we leak memory. Spotted by Ramin Farajpour Cami
<ramin.blackhat@gmail.com>, thanks! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.