func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void user_enable_single_step(struct task_struct *task)
{
struct pt_regs *regs = task->thread.regs;
if (regs != NULL) {
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
task->thread.debug.dbcr0 &= ~DBCR0_BT;
task->thread.debug.dbcr0 |= DBCR0_IDM | DBCR0_IC;
regs->msr |= MSR_DE;
#else
regs->msr &= ~MSR_BE;
regs->msr |= MSR_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 285,069,609,715,245,480,000,000,000,000,000,000,000 | 16 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
static int io_recvmsg_prep_async(struct io_kiocb *req)
{
int ret;
ret = io_recvmsg_copy_hdr(req, req->async_data);
if (!ret)
req->flags |= REQ_F_NEED_CLEANUP;
return ret;
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 235,173,801,412,850,670,000,000,000,000,000,000,000 | 9 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static inline void VectorTruncate(DDSVector4 *value)
{
value->x = value->x > 0.0f ? floor(value->x) : ceil(value->x);
value->y = value->y > 0.0f ? floor(value->y) : ceil(value->y);
value->z = value->z > 0.0f ? floor(value->z) : ceil(value->z);
value->w = value->w > 0.0f ? floor(value->w) : ceil(value->w);
} | 0 | [
"CWE-20",
"CWE-617"
] | ImageMagick | 0c5b1e430a83ef793a7334bbbee408cf3c628699 | 185,327,414,784,618,970,000,000,000,000,000,000,000 | 7 | Added check to prevent image being 0x0 (reported in #489). |
void gf_hevc_parse_ps(GF_HEVCConfig* hevccfg, HEVCState* hevc, u32 nal_type)
{
u32 i, j;
if (!hevccfg) return;
for (i = 0; i < gf_list_count(hevccfg->param_array); i++) {
GF_NALUFFParamArray* ar = gf_list_get(hevccfg->param_array, i);
if (ar->type != nal_type) continue;
for (j = 0; j < gf_list_count(ar->nalus... | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 225,755,644,844,956,870,000,000,000,000,000,000,000 | 15 | fixed #2165 |
bool generic_pipe_buf_try_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
struct page *page = buf->page;
/*
* A reference of one is golden, that means that the owner of this
* page is the only one holding a reference to it. lock the page
* and return OK.
*/
if (page_count(page) == 1) {
lo... | 0 | [
"CWE-362"
] | linux | 189b0ddc245139af81198d1a3637cac74f96e13a | 327,454,203,107,564,550,000,000,000,000,000,000,000 | 16 | pipe: Fix missing lock in pipe_resize_ring()
pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to
prevent post_one_notification() from trying to insert into the ring
whilst the ring is being replaced.
The occupancy check must be done after the lock is taken, and the lock
must be taken after the new rin... |
static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp)
{
atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc);
sk_filter_release(fp);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 13,464,252,552,037,620,000,000,000,000,000,000,000 | 5 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int rowidWrite(Rtree *pRtree, sqlite3_int64 iRowid, sqlite3_int64 iNode){
sqlite3_bind_int64(pRtree->pWriteRowid, 1, iRowid);
sqlite3_bind_int64(pRtree->pWriteRowid, 2, iNode);
sqlite3_step(pRtree->pWriteRowid);
return sqlite3_reset(pRtree->pWriteRowid);
} | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 256,446,140,802,167,470,000,000,000,000,000,000,000 | 6 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,
int flags, pol_lookup_t lookup)
{
return (struct dst_entry *) lookup(net, net->ipv6.fib6_main_tbl, fl6, flags);
} | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 297,727,995,854,681,200,000,000,000,000,000,000,000 | 5 | ipv6: only static routes qualify for equal cost multipathing
Static routes in this case are non-expiring routes which did not get
configured by autoconf or by icmpv6 redirects.
To make sure we actually get an ecmp route while searching for the first
one in this fib6_node's leafs, also make sure it matches the ecmp ro... |
static int io_recvmsg_copy_hdr(struct io_kiocb *req,
struct io_async_msghdr *iomsg)
{
iomsg->msg.msg_name = &iomsg->addr;
iomsg->iov = iomsg->fast_iov;
#ifdef CONFIG_COMPAT
if (req->ctx->compat)
return __io_compat_recvmsg_copy_hdr(req, iomsg);
#endif
return __io_recvmsg_copy_hdr(req, iomsg);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 112,833,450,188,526,000,000,000,000,000,000,000,000 | 13 | 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... |
assegment_data_free (as_t *asdata)
{
XFREE (MTYPE_AS_SEG_DATA, asdata);
} | 0 | [
"CWE-20"
] | quagga | 7a42b78be9a4108d98833069a88e6fddb9285008 | 109,570,147,179,805,720,000,000,000,000,000,000,000 | 4 | bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up. The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message. This patch addresses... |
evdev_device_get_touch_count(struct evdev_device *device)
{
int ntouches;
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
return -1;
ntouches = libevdev_get_num_slots(device->evdev);
if (ntouches == -1) {
/* mtdev devices have multitouch but we don't know
* how many. Otherwise, any touch device with num_slo... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 80,883,295,354,158,200,000,000,000,000,000,000,000 | 20 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
onig_name_to_backref_number(regex_t* reg, const UChar* name,
const UChar* name_end, OnigRegion *region)
{
int i, n, *nums;
n = onig_name_to_group_numbers(reg, name, name_end, &nums);
if (n < 0)
return n;
else if (n == 0)
return ONIGERR_PARSER_BUG;
else if (n == 1)
return nums[0];
else {
... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 24,501,793,085,327,940,000,000,000,000,000,000,000 | 22 | onig-5.9.2 |
double json_real_value(const json_t *json)
{
if(!json_is_real(json))
return 0;
return json_to_real(json)->value;
} | 0 | [
"CWE-310"
] | jansson | 8f80c2d83808150724d31793e6ade92749b1faa4 | 118,444,927,988,671,660,000,000,000,000,000,000,000 | 7 | CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing. |
static int qeth_mpc_initialize(struct qeth_card *card)
{
int rc;
QETH_DBF_TEXT(SETUP, 2, "mpcinit");
rc = qeth_issue_next_read(card);
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
return rc;
}
rc = qeth_cm_enable(card);
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
goto out_qdio;
}
rc = qeth_... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 209,059,921,938,947,500,000,000,000,000,000,000,000 | 58 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
l2bit(UINT8 *out, const UINT8 *in, int xsize) {
int x;
for (x = 0; x < xsize; x++) {
*out++ = (*in++ >= 128) ? 255 : 0;
}
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 80,408,613,536,341,630,000,000,000,000,000,000,000 | 6 | Use snprintf instead of sprintf |
static longT _distance_sep_cdt(const longT i, const longT u, const longT *const g) {
const longT h = (i + u)/2;
if (g[i]<=g[u]) { return h<i + g[u]?i + g[u]:h; }
return h<u - g[i]?h:u - g[i]; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 125,207,312,591,930,570,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int ext4_superblock_csum_verify(struct super_block *sb,
struct ext4_super_block *es)
{
if (!ext4_has_metadata_csum(sb))
return 1;
return es->s_checksum == ext4_superblock_csum(sb, es);
} | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 118,215,596,511,538,070,000,000,000,000,000,000,000 | 8 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static int FIPS_cmac_aes192_test()
{
unsigned char key[] = { 0x8e,0x73,0xb0,0xf7, 0xda,0x0e,0x64,0x52,
0xc8,0x10,0xf3,0x2b, 0x80,0x90,0x79,0xe5,
0x62,0xf8,0xea,0xd2, 0x52,0x2c,0x6b,0x7b, };
unsigned char data[] = "Sample text";
unsigned char kaval[] =
{ 0xd6,0x99,0x19,0x25, 0xe5,0x1d,... | 0 | [] | openssl | 200f249b8c3b6439e0200d01caadc24806f1a983 | 43,003,385,831,275,430,000,000,000,000,000,000,000 | 47 | Remove Dual EC DRBG from FIPS module. |
static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,
u64 tree_id, u64 dirid, char *name)
{
struct btrfs_root *root;
struct btrfs_key key;
char *ptr;
int ret = -1;
int slot;
int len;
int total_len = 0;
struct btrfs_inode_ref *iref;
struct extent_buffer *l;
struct btrfs_path *path;
if... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 178,892,276,896,088,670,000,000,000,000,000,000,000 | 84 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
EXPORTED modseq_t mailbox_foldermodseq(const struct mailbox *mailbox)
{
return mailbox->mbentry->foldermodseq;
} | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 170,718,840,064,103,850,000,000,000,000,000,000,000 | 4 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static void cmd_format(const char *data)
{
GHashTable *optlist;
GSList *tmp, *modules;
char *module, *key, *value;
void *free_arg;
int reset;
if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS,
"format", &optlist, &module, &key, &value))
return;
modules = get_sorte... | 0 | [
"CWE-125"
] | irssi | e0c66e31224894674356ddaf6d46016c1abc994f | 111,188,302,014,018,080,000,000,000,000,000,000,000 | 44 | Previous theme patch fixes by c0ffee
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3058 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
parse_aaa(cupsd_location_t *loc, /* I - Location */
char *line, /* I - Line from file */
char *value, /* I - Start of value data */
int linenum) /* I - Current line number */
{
char *valptr; /* Pointer into value */
unsigned ip[4], /* IP address components */... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 69,415,412,673,778,840,000,000,000,000,000,000,000 | 369 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
is_anyone_waiting_for_metafile (NautilusDirectory *directory)
{
if (directory->details->call_when_ready_counters[REQUEST_METAFILE] > 0) {
return TRUE;
}
if (directory->details->monitor_counters[REQUEST_METAFILE] > 0) {
return TRUE;
}
return FALSE;
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 42,719,223,352,857,580,000,000,000,000,000,000,000 | 12 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
d_lite_julian_p(VALUE self)
{
get_d1(self);
return f_boolcast(m_julian_p(dat));
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 314,848,637,280,038,930,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
{
Buffer save;
char *p;
int spos, epos, rows, c_rows, pos, col = 0;
Line *l;
copyBuffer(&save, buf);
gotoLine(buf, a->start.line);
switch (form->type) {
case FORM_TEXTAREA:
case FORM_INPUT_TEXT:
case FORM_INPUT_FILE:
... | 1 | [
"CWE-476",
"CWE-787"
] | w3m | 7fdc83b0364005a0b5ed869230dd81752ba022e8 | 213,079,261,409,974,750,000,000,000,000,000,000,000 | 99 | Prevent invalid columnPos() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/89 |
flatpak_context_add_features (FlatpakContext *context,
FlatpakContextFeatures features)
{
context->features_valid |= features;
context->features |= features;
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b | 213,557,307,189,567,260,000,000,000,000,000,000,000 | 6 | context: Add --env-fd option
This allows environment variables to be added to the context without
making their values visible to processes running under a different uid,
which might be significant if the variable's value is a token or some
other secret value.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of... |
static void ff_layout_commit_count_stats(struct rpc_task *task, void *data)
{
struct nfs_commit_data *cdata = data;
ff_layout_commit_record_layoutstats_done(task, cdata);
rpc_count_iostats_metrics(task,
&NFS_CLIENT(cdata->inode)->cl_metrics[NFSPROC4_CLNT_COMMIT]);
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 337,071,941,331,298,980,000,000,000,000,000,000,000 | 8 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
ms_escher_read_SolverContainer (MSEscherState *state, MSEscherHeader *h)
{
return FALSE;
} | 0 | [
"CWE-119"
] | gnumeric | b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc | 107,237,245,927,266,890,000,000,000,000,000,000,000 | 4 | xls: fuzzed file crash. |
static void ohci_attach(USBPort *port1)
{
OHCIState *s = port1->opaque;
OHCIPort *port = &s->rhport[port1->index];
uint32_t old_state = port->ctrl;
/* set connect status */
port->ctrl |= OHCI_PORT_CCS | OHCI_PORT_CSC;
/* update speed */
if (port->port.dev->speed == USB_SPEED_LOW) {
... | 0 | [
"CWE-835"
] | qemu | 95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb | 205,153,336,961,240,000,000,000,000,000,000,000,000 | 27 | usb: ohci: limit the number of link eds
The guest may builds an infinite loop with link eds. This patch
limit the number of linked ed to avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
void dev_load(struct net *net, const char *name)
{
struct net_device *dev;
rcu_read_lock();
dev = dev_get_by_name_rcu(net, name);
rcu_read_unlock();
if (!dev && capable(CAP_NET_ADMIN))
request_module("%s", name);
} | 1 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 238,633,586,001,846,280,000,000,000,000,000,000,000 | 11 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
static void emulator_set_rflags(struct x86_emulate_ctxt *ctxt, ulong val)
{
kvm_set_rflags(emul_to_vcpu(ctxt), val);
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 51,763,816,766,991,930,000,000,000,000,000,000,000 | 4 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
init_proto(void)
{
l_fp dummy;
int i;
/*
* Fill in the sys_* stuff. Default is don't listen to
* broadcasting, require authentication.
*/
set_sys_leap(LEAP_NOTINSYNC);
sys_stratum = STRATUM_UNSPEC;
memcpy(&sys_refid, "INIT", 4);
sys_peer = NULL;
sys_rootdelay = 0;
sys_rootdisp = 0;
L_CLR(&sys_reftime)... | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 129,885,065,238,903,650,000,000,000,000,000,000,000 | 34 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
bool __fastcall TSCPFileSystem::GetStoredCredentialsTried()
{
return FSecureShell->GetStoredCredentialsTried();
}
| 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 285,485,105,043,333,660,000,000,000,000,000,000,000 | 4 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
static int smack_watch_key(struct key *key)
{
struct smk_audit_info ad;
struct smack_known *tkp = smk_of_current();
int rc;
if (key == NULL)
return -EINVAL;
/*
* If the key hasn't been initialized give it access so that
* it may do so.
*/
if (key->security == NULL)
return 0;
/*
* This should not occ... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 263,642,324,699,712,200,000,000,000,000,000,000,000 | 32 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
E_md4hash(const unsigned char *passwd, unsigned char *p16,
const struct nls_table *codepage)
{
int rc;
int len;
__le16 wpwd[129];
/* Password cannot be longer than 128 characters */
if (passwd) /* Password must be converted to NT unicode */
len = cifs_strtoUTF16(wpwd, passwd, 128, codepage);
else {
len = 0;... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 06deeec77a5a689cc94b21a8a91a76e42176685d | 323,161,756,851,351,500,000,000,000,000,000,000,000 | 20 | cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack
smbencrypt() points a scatterlist to the stack, which is breaks if
CONFIG_VMAP_STACK=y.
Fix it by switching to crypto_cipher_encrypt_one(). The new code
should be considerably faster as an added benefit.
This code is nearly identical to some code th... |
Function *ESTreeIRGen::genGeneratorFunction(
Identifier originalName,
Variable *lazyClosureAlias,
ESTree::FunctionLikeNode *functionNode) {
assert(functionNode && "Function AST cannot be null");
// Build the outer function which creates the generator.
// Does not have an associated source range.
au... | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 92,039,505,186,136,900,000,000,000,000,000,000,000 | 46 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
m_df_in_day(union DateData *x)
{
return isec_to_day(m_df(x));
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 27,626,448,771,623,480,000,000,000,000,000,000,000 | 4 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static void avrcp_handle_get_total_number_of_items(struct avrcp *session,
struct avrcp_browsing_header *pdu,
uint8_t transaction)
{
uint8_t scope;
uint8_t status = AVRCP_STATUS_SUCCESS;
if (ntohs(pdu->param_len) != 1) {
status = AVRCP_STATUS_INVALID_PARAM;
goto failed;
}
scope = pdu->params[0];
swi... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 42,335,339,343,375,030,000,000,000,000,000,000,000 | 32 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
Item * all_any_subquery_creator(THD *thd, Item *left_expr,
chooser_compare_func_creator cmp,
bool all,
SELECT_LEX *select_lex)
{
if ((cmp == &comp_eq_creator) && !all) // = ANY <=> IN
return new (thd->mem_root) Item_in_subselect(thd, left_expr, select_lex);
if ((cmp == &comp_ne_creator) && a... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 18,777,458,106,102,620,000,000,000,000,000,000,000 | 21 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op1, free_op_data1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, E... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 71,530,429,304,480,750,000,000,000,000,000,000,000 | 113 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void svhd_box_del(GF_Box *s)
{
GF_SphericalVideoInfoBox *ptr = (GF_SphericalVideoInfoBox *)s;
if (ptr->string) gf_free(ptr->string);
gf_free(s);
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 109,631,209,401,303,470,000,000,000,000,000,000,000 | 6 | fixed #2255 |
win_init(win_T *newp, win_T *oldp, int flags UNUSED)
{
int i;
newp->w_buffer = oldp->w_buffer;
#ifdef FEAT_SYN_HL
newp->w_s = &(oldp->w_buffer->b_s);
#endif
oldp->w_buffer->b_nwindows++;
newp->w_cursor = oldp->w_cursor;
newp->w_valid = 0;
newp->w_curswant = oldp->w_curswant;
newp->w_se... | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 198,393,675,004,917,800,000,000,000,000,000,000,000 | 62 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
static bool is_entry_flag(RzFlagItem *f) {
return f->space && !strcmp(f->space->name, RZ_FLAGS_FS_SYMBOLS) && rz_str_startswith(f->name, "entry.");
} | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 239,592,867,689,484,850,000,000,000,000,000,000,000 | 3 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
{
#define LSIZE2 (sizeof(long)*2)
int v1=0,v2=0,v3=0,v4=0,v5=0,v6=0,v7=0,v8=0,v9=0;
unsigned char buf[4],ibuf1[LSIZE2],ibuf2[LSIZE2];
unsigned char ibuf3[LSIZE2],ibuf4[LSIZE2],ibuf5[LSIZE2];
long l;
SSL_SESSION_ASN1 a;
M_ASN1_I2D_vars(in);
if ((in == NUL... | 0 | [] | openssl | 36ca4ba63d083da6f9d4598f18f17a8c32c8eca2 | 215,464,071,449,820,500,000,000,000,000,000,000,000 | 215 | Implement the Supported Point Formats Extension for ECC ciphersuites
Submitted by: Douglas Stebila |
static void __aggregate_redistribute_shares(struct task_group *tg)
{
int i, max_cpu = smp_processor_id();
unsigned long rq_weight = 0;
unsigned long shares, max_shares = 0, shares_rem = tg->shares;
for_each_possible_cpu(i)
rq_weight += tg->cfs_rq[i]->load.weight;
for_each_possible_cpu(i) {
/*
* divide sha... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 330,169,239,925,133,850,000,000,000,000,000,000,000 | 32 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
dtls1_fix_message_header(SSL *s, unsigned long frag_off,
unsigned long frag_len)
{
struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
msg_hdr->frag_off = frag_off;
msg_hdr->frag_len = frag_len;
} | 0 | [
"CWE-310"
] | openssl | 34628967f1e65dc8f34e000f0f5518e21afbfc7b | 299,451,719,093,274,870,000,000,000,000,000,000,000 | 8 | Fix DTLS retransmission from previous session.
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450. |
static void macvlan_port_destroy(struct net_device *dev)
{
struct macvlan_port *port = macvlan_port_get(dev);
dev->priv_flags &= ~IFF_MACVLAN_PORT;
netdev_rx_handler_unregister(dev);
kfree_rcu(port, rcu);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 225,091,179,545,029,460,000,000,000,000,000,000,000 | 8 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
ProtocolVersion SSL_METHOD::getVersion() const
{
return version_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 32,079,693,913,068,060,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static int __must_check __sta_info_destroy_part1(struct sta_info *sta)
{
struct ieee80211_local *local;
struct ieee80211_sub_if_data *sdata;
int ret;
might_sleep();
if (!sta)
return -ENOENT;
local = sta->local;
sdata = sta->sdata;
lockdep_assert_held(&local->sta_mtx);
/*
* Before removing the station ... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 185,674,309,501,202,950,000,000,000,000,000,000,000 | 39 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
Status BatchMatMulShape(shape_inference::InferenceContext* c) {
ShapeHandle a_shape;
ShapeHandle b_shape;
TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(0), 2, &a_shape));
TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(1), 2, &b_shape));
// Determine output rows and cols.
bool adj_x;
bool adj_y;
TF_RET... | 0 | [
"CWE-369"
] | tensorflow | 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4 | 302,852,951,316,296,700,000,000,000,000,000,000,000 | 33 | Prevent division by 0 in common shape functions.
PiperOrigin-RevId: 387712197
Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149 |
void do_get_replace_column(struct st_command *command)
{
char *from= command->first_argument;
char *buff, *start;
DBUG_ENTER("get_replace_columns");
free_replace_column();
if (!*from)
die("Missing argument in %s", command->query);
/* Allocate a buffer for results */
start= buff= (char*)my_malloc(str... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 318,435,416,979,958,900,000,000,000,000,000,000,000 | 31 | WL#9072: Backport WL#8785 to 5.5 |
static void predictor_decode_mono_3950(APEContext *ctx, int count)
{
APEPredictor *p = &ctx->predictor;
int32_t *decoded0 = ctx->decoded[0];
int32_t predictionA, currentA, A, sign;
ape_apply_filters(ctx, ctx->decoded[0], NULL, count);
currentA = p->lastA[0];
while (count--) {
A = *dec... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 68,441,982,129,821,570,000,000,000,000,000,000,000 | 47 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
RZ_IPI RzBinObject *rz_bin_object_new(RzBinFile *bf, RzBinPlugin *plugin, RzBinObjectLoadOptions *opts, ut64 offset, ut64 sz) {
rz_return_val_if_fail(bf && plugin, NULL);
ut64 bytes_sz = rz_buf_size(bf->buf);
RzBinObject *o = RZ_NEW0(RzBinObject);
if (!o) {
return NULL;
}
o->opts = *opts;
if (o->opts.loadaddr ... | 0 | [
"CWE-200",
"CWE-787"
] | rizin | 07b43bc8aa1ffebd9b68d60624c9610cf7e460c7 | 243,100,902,898,500,000,000,000,000,000,000,000,000 | 58 | fix oob read on luac |
gs_main_set_lib_paths(gs_main_instance * minst)
{
ref *paths = minst->lib_path.container.value.refs;
int first_is_here =
(r_size(&minst->lib_path.list) != 0 &&
paths[0].value.bytes == (const byte *)gp_current_directory_name ? 1 : 0);
int code = 0;
int count = minst->lib_path.count;
... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 327,288,359,246,831,320,000,000,000,000,000,000,000 | 56 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
*/
void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info)
{
memset(info, 0, sizeof(*info));
switch (vio->type) {
case VIO_TYPE_TCPIP:
info->protocol= MYSQL_VIO_TCP;
info->socket= vio_fd(vio);
return;
case VIO_TYPE_SOCKET:
info->protocol= MYSQL_VIO_SOCKET;
info->socket= vio_fd(vio);
retur... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 99,980,011,576,275,930,000,000,000,000,000,000,000 | 38 | 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 int srpt_ch_list_empty(struct srpt_device *sdev)
{
int res;
spin_lock_irq(&sdev->spinlock);
res = list_empty(&sdev->rch_list);
spin_unlock_irq(&sdev->spinlock);
return res;
} | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 107,466,051,240,800,880,000,000,000,000,000,000,000 | 10 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
static unsigned int selinux_ipv4_forward(unsigned int hooknum,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return selinux_ip_forward(skb, in->ifindex, PF_INET);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 109,336,222,714,439,710,000,000,000,000,000,000,000 | 8 | 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... |
QList<CoreIdentity> PostgreSqlStorage::identities(UserId user)
{
QList<CoreIdentity> identities;
QSqlDatabase db = logDb();
if (!beginReadOnlyTransaction(db)) {
qWarning() << "PostgreSqlStorage::identites(): cannot start read only transaction!";
qWarning() << " -" << qPrintable(db.lastError... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 1,760,295,669,770,002,400,000,000,000,000,000,000 | 58 | 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... |
static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op,
unsigned size, bool sign_extension)
{
int rc = X86EMUL_CONTINUE;
op->type = OP_IMM;
op->bytes = size;
op->addr.mem.ea = ctxt->_eip;
/* NB. Immediates are sign-extended as necessary. */
switch (op->bytes) {
case 1:
op->val = insn_... | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 222,789,140,196,304,300,000,000,000,000,000,000,000 | 39 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
xmlSchemaAttributeGroupPtr attrGr)
{
if ((attrGr->attrUses == NULL) ||
(attrGr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED))
return(0);
attrGr->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
if (xmlSchemaExpandAttributeGroupRefs(... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 185,888,682,985,745,080,000,000,000,000,000,000,000 | 13 | 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. |
parse_DEBUG_SLOW(char *arg OVS_UNUSED, const struct ofpact_parse_params *pp)
{
ofpact_put_DEBUG_SLOW(pp->ofpacts);
return NULL;
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 201,203,535,585,930,900,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table)
{
size_t length;
unsigned int tag, format, components;
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t by... | 1 | [
"CWE-125"
] | php-src | f80ad18afae2230c2c1802c7d829100af646874e | 32,907,118,309,176,137,000,000,000,000,000,000,000 | 318 | Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
I do not completely understand what is going on there, but I am pretty
sure dir_entry <= offset_base if not a normal situation, so we better not
to rely on such dir_entry. |
static int coolkey_get_token_info(sc_card_t *card, sc_pkcs15_tokeninfo_t * token_info)
{
coolkey_private_data_t * priv = COOLKEY_DATA(card);
char *label = NULL;
char *manufacturer_id = NULL;
char *serial_number = NULL;
LOG_FUNC_CALLED(card->ctx);
label = strdup((char *)priv->token_name);
manufacturer_id = coolk... | 0 | [
"CWE-415"
] | OpenSC | c246f6f69a749d4f68626b40795a4f69168008f4 | 24,059,621,653,558,307,000,000,000,000,000,000,000 | 23 | coolkey: Make sure the object ID is unique when filling list
Thanks to oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208 |
HttpHdrRange::canonize(HttpReply *rep)
{
assert(rep);
if (rep->contentRange())
clen = rep->contentRange()->elength;
else
clen = rep->content_length;
return canonize (clen);
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 77,393,583,976,410,000,000,000,000,000,000,000,000 | 11 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
{
struct vhost_vring_state s;
if (vq->private_data)
return -EBUSY;
if (copy_from_user(&s, argp, sizeof(s)))
return -EFAULT;
if (s.num != VHOST_VRING_LITTLE_ENDIAN &&
s.num != VHOST_VRING_BIG_ENDIAN)
return -EINVAL;
if (... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 99,237,763,838,282,090,000,000,000,000,000,000,000 | 21 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
static struct page *syscall_nopage(struct vm_area_struct *vma,
unsigned long adr, int *type)
{
struct page *p = virt_to_page(adr - vma->vm_start + syscall_page);
get_page(p);
return p;
} | 1 | [
"CWE-264"
] | linux-2.6 | 7d91d531900bfa1165d445390b3b13a8013f98f7 | 39,399,206,799,500,275,000,000,000,000,000,000,000 | 7 | [PATCH] i386 vDSO: use install_special_mapping
This patch uses install_special_mapping for the i386 vDSO setup, consolidating
duplicated code.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
C... |
QPDFObjectHandle::getUTF8Value()
{
if (isString())
{
return dynamic_cast<QPDF_String*>(m->obj.getPointer())->getUTF8Val();
}
else
{
typeWarning("string", "returning empty string");
QTC::TC("qpdf", "QPDFObjectHandle string returning empty utf8");
return "";
}
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 121,196,220,634,804,620,000,000,000,000,000,000,000 | 13 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
int is_dir(const char *fname) {
assert(fname);
if (*fname == '\0')
return 0;
// if fname doesn't end in '/', add one
int rv;
struct stat s;
if (fname[strlen(fname) - 1] == '/')
rv = stat(fname, &s);
else {
char *tmp;
if (asprintf(&tmp, "%s/", fname) == -1) {
fprintf(stderr, "Error: cannot allocate m... | 0 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 17,923,015,079,350,175,000,000,000,000,000,000,000 | 28 | security fix |
nm_utils_array_remove_at_indexes(GArray *array, const guint *indexes_to_delete, gsize len)
{
gsize elt_size;
guint index_to_delete;
guint i_src;
guint mm_src, mm_dst, mm_len;
gsize i_itd;
guint res_length;
g_return_if_fail(array);
if (!len)
return;
g_return_if_fail(indexes_t... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 25,947,899,198,979,206,000,000,000,000,000,000,000 | 73 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
get_max_rate_vht_80_ss1(int mcs)
{
switch (mcs) {
case 0:
return 29300000;
case 1:
return 58500000;
case 2:
return 87800000;
case 3:
return 117000000;
case 4:
return 175500000;
case 5:
return 234000000;
case 6:
return 263300000;
... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 192,622,062,092,440,970,000,000,000,000,000,000,000 | 26 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
static void Sys_AppendToExecBuffer( const char *text )
{
size_t size = sizeof( execBuffer ) - ( execBufferPointer - execBuffer );
int length = strlen( text ) + 1;
if( length > size || execArgc >= ARRAY_LEN( execArgv ) )
return;
Q_strncpyz( execBufferPointer, text, size );
execArgv[ execArgc++ ] = execBufferPoi... | 0 | [
"CWE-59"
] | ioq3 | b5acc31a4da72cc3a4a6d88facb15b6214d745c6 | 281,842,726,682,996,200,000,000,000,000,000,000,000 | 13 | CVE-2012-3345 |
static int replmd_add_fix_la(struct ldb_module *module, TALLOC_CTX *mem_ctx,
struct replmd_private *replmd_private,
struct ldb_message_element *el,
struct replmd_replicated_request *ac,
NTTIME now,
struct ldb_dn *forward_dn,
const struct dsdb_attribute *sa,
struct... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 231,103,812,917,187,960,000,000,000,000,000,000,000 | 93 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static struct addrinfo *lookuphost(const char *hostname, in_port_t port)
{
struct addrinfo *ai = 0;
struct addrinfo hints = { .ai_family = AF_UNSPEC,
.ai_protocol = IPPROTO_TCP,
.ai_socktype = SOCK_STREAM };
char service[NI_MAXSERV];
int error;... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 63,992,421,634,205,950,000,000,000,000,000,000,000 | 20 | Issue 102: Piping null to the server will crash it |
cJSON *cJSON_CreateObject( void )
{
cJSON *item = cJSON_New_Item();
if ( item )
item->type = cJSON_Object;
return item;
} | 1 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 258,261,044,401,663,100,000,000,000,000,000,000,000 | 7 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static int proc_do_uuid(struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table fake_table;
unsigned char buf[64], tmp_uuid[16], *uuid;
uuid = table->data;
if (!uuid) {
uuid = tmp_uuid;
generate_random_uuid(uuid);
} else {
static DEFINE_SPINLOCK(bootid_spinlock);
... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 114,154,372,497,860,750,000,000,000,000,000,000,000 | 26 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
static int mmtimer_disable_int(long nasid, int comparator)
{
switch (comparator) {
case 0:
nasid == -1 ? HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC1_INT_ENABLE),
0UL) : REMOTE_HUB_S(nasid, SH_RTC1_INT_ENABLE, 0UL);
break;
case 1:
nasid == -1 ? HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_ENABLE),
0UL) : REMOTE_HUB_S(... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 72,945,932,543,725,480,000,000,000,000,000,000,000 | 20 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
void mm_release(struct task_struct *tsk, struct mm_struct *mm)
{
struct completion *vfork_done = tsk->vfork_done;
/* Get rid of any cached register state */
deactivate_mm(tsk, mm);
/* notify parent sleeping on vfork() */
if (vfork_done) {
tsk->vfork_done = NULL;
complete(vfork_done);
}
/*
* If we're exi... | 1 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 151,640,168,250,028,060,000,000,000,000,000,000,000 | 33 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
This function decrypts the crypttext */
PHP_FUNCTION(mcrypt_module_get_supported_key_sizes)
{
int i, count = 0;
int *key_sizes;
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
array_init(return_value);
key_sizes = mcrypt_module_get_algo_supported_key_sizes(module, dir, &count);
for (i = 0; i < count; i++) {
add... | 1 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 220,229,357,068,519,220,000,000,000,000,000,000,000 | 15 | Fix bug #72455: Heap Overflow due to integer overflows |
win_free_lsize(win_T *wp)
{
/* TODO: why would wp be NULL here? */
if (wp != NULL)
VIM_CLEAR(wp->w_lines);
} | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 99,664,813,282,211,870,000,000,000,000,000,000,000 | 6 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
inline void srand() {
cimg::mutex(4);
cimg::srand(&cimg::rng());
cimg::mutex(4,0); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 248,803,243,773,784,060,000,000,000,000,000,000,000 | 5 | . |
g_file_enumerate_children_finish (GFile *file,
GAsyncResult *res,
GError **error)
{
GFileIface *iface;
g_return_val_if_fail (G_IS_FILE (file), NULL);
g_return_val_if_fail (G_IS_ASYNC_RESULT (res), NULL);
if (g_async_result_lega... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 270,827,910,971,505,800,000,000,000,000,000,000,000 | 15 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static struct sock *nr_make_new(struct sock *osk)
{
struct sock *sk;
struct nr_sock *nr, *onr;
if (osk->sk_type != SOCK_SEQPACKET)
return NULL;
sk = sk_alloc(sock_net(osk), PF_NETROM, GFP_ATOMIC, osk->sk_prot);
if (sk == NULL)
return NULL;
nr = nr_sk(sk);
sock_init_data(NULL, sk);
sk->sk_type = osk... | 0 | [
"CWE-200"
] | linux-2.6 | f6b97b29513950bfbf621a83d85b6f86b39ec8db | 67,555,618,069,822,510,000,000,000,000,000,000,000 | 44 | netrom: Fix nr_getname() leak
nr_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void PacketReader::xfrBlob(string& blob)
try
{
if(d_recordlen && !(d_pos == (d_startrecordpos + d_recordlen)))
blob.assign(&d_content.at(d_pos), &d_content.at(d_startrecordpos + d_recordlen - 1 ) + 1);
else
blob.clear();
d_pos = d_startrecordpos + d_recordlen;
} | 0 | [
"CWE-399"
] | pdns | adb10be102ddd4d2baf7a8adbb5673946fe5e555 | 88,436,880,550,100,580,000,000,000,000,000,000,000 | 10 | fix forward reference-check in getLabelFromContent() |
int emulator_set_dr(int dr, unsigned long value, struct kvm_vcpu *vcpu)
{
return __kvm_set_dr(vcpu, dr, value);
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 7,236,862,593,860,138,000,000,000,000,000,000,000 | 5 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
bool IsFixedSizeType(DataType dtype) {
return dtype != DT_STRING && dtype != DT_VARIANT && dtype != DT_RESOURCE &&
!kQuantizedTypes.Contains(dtype);
} | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 77,057,970,346,239,240,000,000,000,000,000,000,000 | 4 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
void cancel(Mutex* dataLock, void** data) override {
{
// cppcheck-suppress redundantPointerOp
MUTEX_LOCKER(mutexLocker, *dataLock);
// either we have not yet reached the execute above or we are already done
if (*data == nullptr) {
*data = (void*)1; // mark as canceled
}
... | 0 | [
"CWE-918"
] | arangodb | d9b7f019d2435f107b19a59190bf9cc27d5f34dd | 310,560,340,146,642,200,000,000,000,000,000,000,000 | 18 | [APM-78] Disable installation from remote URL (#15292) |
njs_promise_perform_race_handler(njs_vm_t *vm, njs_iterator_args_t *args,
njs_value_t *value, int64_t index)
{
njs_int_t ret;
njs_value_t arguments[2], next;
njs_promise_capability_t *capability;
njs_promise_iterator_args_t *pargs;
if (!njs_is_valid(valu... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 121,562,604,368,473,300,000,000,000,000,000,000,000 | 29 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
{
struct page *page;
struct kvm *kvm;
int r;
BUG_ON(vcpu->kvm == NULL);
kvm = vcpu->kvm;
vcpu->arch.emulate_ctxt.ops = &emulate_ops;
vcpu->arch.walk_mmu = &vcpu->arch.mmu;
vcpu->arch.mmu.root_hpa = INVALID_PAGE;
vcpu->arch.mmu.translate_gpa = translate_gpa;
vcpu... | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 282,416,516,549,939,030,000,000,000,000,000,000,000 | 64 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
krb5_ldap_iterate_password_policy(krb5_context context, char *match_expr,
void (*func)(krb5_pointer, osa_policy_ent_t),
krb5_pointer func_arg)
{
osa_policy_ent_rec *entry=NULL;
char *policy=NULL;
krb5_error_c... | 0 | [
"CWE-476"
] | krb5 | d1f707024f1d0af6e54a18885322d70fa15ec4d3 | 183,923,844,088,376,670,000,000,000,000,000,000,000 | 55 | Fix LDAP misused policy name crash [CVE-2014-5353]
In krb5_ldap_get_password_policy_from_dn, if LDAP_SEARCH returns
successfully with no results, return KRB5_KDB_NOENTRY instead of
returning success with a zeroed-out policy object. This fixes a null
dereference when an admin attempts to use an LDAP ticket policy name... |
virtual void beginStringOp(GfxState * /*state*/) {} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 113,999,831,938,444,010,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static int tg3_halt(struct tg3 *tp, int kind, int silent)
{
int err;
tg3_stop_fw(tp);
tg3_write_sig_pre_reset(tp, kind);
tg3_abort_hw(tp, silent);
err = tg3_chip_reset(tp);
__tg3_set_mac_addr(tp, 0);
tg3_write_sig_legacy(tp, kind);
tg3_write_sig_post_reset(tp, kind);
if (tp->hw_stats) {
/* Save the sta... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 146,940,790,215,848,790,000,000,000,000,000,000,000 | 30 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static inline bool f2fs_readonly(struct super_block *sb)
{
return sb_rdonly(sb);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 98,766,643,817,364,170,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
mmcl_set(MinMaxCharLen* l, OnigLen len)
{
l->min = len;
l->max = len;
l->min_is_sure = TRUE;
} | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 98,068,170,559,840,060,000,000,000,000,000,000,000 | 6 | #207: Out-of-bounds write |
static gboolean textview_leave_notify(GtkWidget *widget,
GdkEventCrossing *event,
TextView *textview)
{
if (textview->loading)
return FALSE;
textview_uri_update(textview, -1, -1);
return FALSE;
} | 0 | [
"CWE-601"
] | claws | ac286a71ed78429e16c612161251b9ea90ccd431 | 23,802,867,718,491,180,000,000,000,000,000,000,000 | 10 | harden link checker before accepting click |
zip_append_data(gs_memory_t *mem, gx_device_xps_zinfo_t *info, byte *data, uint len)
{
uint count;
/* if there is no data then this is the first call for this
archive file, open a temporary file to store the data. */
if (info->data.count == 0) {
char *filename =
(char *)gs_alloc_by... | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 42,939,685,363,634,630,000,000,000,000,000,000,000 | 38 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
{
TIFFPredictorState *sp = PredictorState(tif);
assert(sp != NULL);
assert(sp->decoderow != NULL);
assert(sp->decodepfunc != NULL);
if ((*sp->decoderow)(tif, op0, occ0, s)) {
return (*sp->decodepfunc)(tif, op0, occ0);
} else
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 3ca657a8793dd011bf869695d72ad31c779c3cc1 | 226,508,114,487,388,300,000,000,000,000,000,000,000 | 13 | * libtiff/tif_predict.h, libtiff/tif_predict.c:
Replace assertions by runtime checks to avoid assertions in debug mode,
or buffer overflows in release mode. Can happen when dealing with
unusual tile size like YCbCr with subsampling. Reported as MSVR 35105
by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &... |
add_commit_metadata_to_deploy_data (GVariantDict *metadata_dict,
GVariant *commit_metadata)
{
const char *alt_id = NULL;
const char *eol = NULL;
const char *eol_rebase = NULL;
g_variant_lookup (commit_metadata, "xa.alt-id", "&s", &alt_id);
g_variant_lookup (commit_meta... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 137,877,785,452,140,530,000,000,000,000,000,000,000 | 21 | 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... |
int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
{
regs->rax = kvm_register_read(vcpu, VCPU_REGS_RAX);
regs->rbx = kvm_register_read(vcpu, VCPU_REGS_RBX);
regs->rcx = kvm_register_read(vcpu, VCPU_REGS_RCX);
regs->rdx = kvm_register_read(vcpu, VCPU_REGS_RDX);
regs->rsi = kvm_register_r... | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 136,138,354,435,945,160,000,000,000,000,000,000,000 | 26 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
sctp_disposition_t sctp_sf_do_5_1E_ca(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_ulpevent *ev;
if (!sctp_vtag_verify(chunk,... | 0 | [
"CWE-20",
"CWE-476"
] | linux | ec0223ec48a90cb605244b45f7c62de856403729 | 310,840,531,667,731,420,000,000,000,000,000,000,000 | 76 | net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is AUTH capable
RFC4895 introduced AUTH chunks for SCTP; during the SCTP
handshake RANDOM; CHUNKS; HMAC-ALGO are negotiated (CHUNKS
being optional though):
---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->
<------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---... |
__ip_vs_get_service_entries(struct net *net,
const struct ip_vs_get_services *get,
struct ip_vs_get_services __user *uptr)
{
int idx, count=0;
struct ip_vs_service *svc;
struct ip_vs_service_entry entry;
int ret = 0;
for (idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) {
list_for_each_entry(svc, &ip_vs_... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 60,980,729,142,222,410,000,000,000,000,000,000,000 | 49 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.