func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void __update_nat_bits(struct f2fs_sb_info *sbi, nid_t start_nid,
struct page *page)
{
struct f2fs_nm_info *nm_i = NM_I(sbi);
unsigned int nat_index = start_nid / NAT_ENTRY_PER_BLOCK;
struct f2fs_nat_block *nat_blk = page_address(page);
int valid = 0;
int i;
if (!enabled_nat_bits(sbi, NULL))
retur... | 0 | [
"CWE-200",
"CWE-362"
] | linux | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | 265,716,558,694,400,900,000,000,000,000,000,000,000 | 30 | f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocated again.
Thread A Thread B
- f2fs_create
- f2fs_new_inode
- alloc_nid
- __insert_nid_to_list(ALLOC_NID_LIST)
- f2fs_balance_fs_bg
- build_free... |
static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs,
int exception_state)
{
unsigned long flags;
int sstep_tries = 100;
int error;
int cpu;
int trace_on = 0;
int online_cpus = num_online_cpus();
u64 time_left;
kgdb_info[ks->cpu].enter_kgdb++;
kgdb_info[ks->cpu].exception_state |= exception... | 0 | [
"CWE-787"
] | linux | eadb2f47a3ced5c64b23b90fd2a3463f63726066 | 36,293,928,683,695,877,000,000,000,000,000,000,000 | 255 | lockdown: also lock down previous kgdb use
KGDB and KDB allow read and write access to kernel memory, and thus
should be restricted during lockdown. An attacker with access to a
serial port (for example, via a hypervisor console, which some cloud
vendors provide over the network) could trigger the debugger so it is
i... |
bool run(OperationContext* txn,
const string& dbname,
BSONObj& cmdObj,
int options,
string& errmsg,
BSONObjBuilder& result) {
std::string userNameString;
std::vector<RoleName> roles;
Status status = auth::parseRolePossessionMan... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 330,822,908,785,243,050,000,000,000,000,000,000,000 | 50 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
void DcmSCP::findPresentationContext(const T_ASC_PresentationContextID presID,
OFString &abstractSyntax,
OFString &transferSyntax)
{
transferSyntax.clear();
abstractSyntax.clear();
if (m_assoc == NULL)
return;
DUL_PRESENTATIONCONTEXT... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 287,593,708,355,351,680,000,000,000,000,000,000,000 | 33 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
static void ima_adpcm_reset2 (_AFmoduleinst *i)
{
ima_adpcm_data *d = (ima_adpcm_data *) i->modspec;
int framesPerBlock = d->framesPerBlock;
d->track->fpos_next_frame = d->track->fpos_first_frame +
d->blockAlign * (d->track->nextfframe / framesPerBlock);
d->track->frames2ignore += d->framesToIgnore;
assert(d-... | 0 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 293,666,515,080,360,400,000,000,000,000,000,000,000 | 12 | Fix decoding of multi-channel ADPCM audio files. |
char *dentry_path_raw(struct dentry *dentry, char *buf, int buflen)
{
return __dentry_path(dentry, buf, buflen);
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 18,726,714,712,195,370,000,000,000,000,000,000,000 | 4 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
zzip_disk_findnext(ZZIP_DISK* disk, struct zzip_disk_entry* entry)
{
if ((char*)entry < disk->buffer ||
(char*)entry > disk->endbuf-sizeof(entry) ||
! zzip_disk_entry_check_magic (entry) ||
zzip_disk_entry_sizeto_end (entry) > 64*1024)
return 0;
entry = zzip_disk_entry_to_next_entry (entry);
if ((char*... | 0 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 200,932,716,220,755,850,000,000,000,000,000,000,000 | 16 | memdisk
(.) |
static int jas_iccattrtab_get(jas_iccattrtab_t *attrtab, int i,
jas_iccattrname_t *name, jas_iccattrval_t **val)
{
jas_iccattr_t *attr;
if (i < 0 || i >= attrtab->numattrs)
goto error;
attr = &attrtab->attrs[i];
*name = attr->name;
if (!(*val = jas_iccattrval_clone(attr->val)))
goto error;
return 0;
error:
... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 53,259,016,858,505,130,000,000,000,000,000,000,000 | 14 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
GF_Err lsrc_Read(GF_Box *s, GF_BitStream *bs)
{
GF_LASERConfigurationBox *ptr = (GF_LASERConfigurationBox *)s;
ptr->hdr_size = (u32) ptr->size;
ptr->hdr = gf_malloc(sizeof(char)*ptr->hdr_size);
if (!ptr->hdr)
return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->hdr, ptr->hdr_size);
return GF_OK; | 0 | [
"CWE-416"
] | gpac | 6063b1a011c3f80cee25daade18154e15e4c058c | 199,434,988,294,440,600,000,000,000,000,000,000,000 | 10 | fix UAF in audio_sample_entry_Read (#1440) |
static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
{
struct net *net = sock_net(in_skb->sk);
struct nlattr *tb[RTA_MAX+1];
struct rt6_info *rt;
struct sk_buff *skb;
struct rtmsg *rtm;
struct flowi6 fl6;
int err, iif = 0, oif = 0;
err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ip... | 0 | [
"CWE-17"
] | linux-stable | 9d289715eb5c252ae15bd547cb252ca547a3c4f2 | 190,278,309,381,999,500,000,000,000,000,000,000,000 | 90 | ipv6: stop sending PTB packets for MTU < 1280
Reduce the attack vector and stop generating IPv6 Fragment Header for
paths with an MTU smaller than the minimum required IPv6 MTU
size (1280 byte) - called atomic fragments.
See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1]
for more information and h... |
connection_edge_finished_connecting(edge_connection_t *edge_conn)
{
connection_t *conn;
tor_assert(edge_conn);
tor_assert(edge_conn->base_.type == CONN_TYPE_EXIT);
conn = TO_CONN(edge_conn);
tor_assert(conn->state == EXIT_CONN_STATE_CONNECTING);
log_info(LD_EXIT,"Exit connection to %s:%u (%s) established.... | 0 | [
"CWE-20",
"CWE-617"
] | tor | 79b59a2dfcb68897ee89d98587d09e55f07e68d7 | 207,563,938,856,665,730,000,000,000,000,000,000,000 | 42 | TROVE-2017-004: Fix assertion failure in relay_send_end_cell_from_edge_
This fixes an assertion failure in relay_send_end_cell_from_edge_() when an
origin circuit and a cpath_layer = NULL were passed.
A service rendezvous circuit could do such a thing when a malformed BEGIN cell
is received but shouldn't in the first... |
JVM_GetAllThreads(JNIEnv *env, jclass aClass)
{
Trc_SC_GetAllThreads(env);
exit(223);
} | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 320,151,896,410,130,130,000,000,000,000,000,000,000 | 5 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
do_in_path_and_pp(
char_u *path,
char_u *name,
int flags,
void (*callback)(char_u *fname, void *ck),
void *cookie)
{
int done = FAIL;
char_u *s;
int len;
char *start_dir = "pack/*/start/*/%s";
char *opt_dir = "pack/*/opt/*/%s";
if ((flags & DIP_NORTP) == 0)
done = do_in_... | 0 | [
"CWE-122"
] | vim | 2bdad6126778f907c0b98002bfebf0e611a3f5db | 101,058,534,215,243,020,000,000,000,000,000,000,000 | 40 | patch 8.2.4647: "source" can read past end of copied line
Problem: "source" can read past end of copied line.
Solution: Add a terminating NUL. |
Http::Stream::initiateClose(const char *reason)
{
debugs(33, 4, clientConnection << " because " << reason);
getConn()->stopSending(reason); // closes ASAP
} | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 270,198,544,646,632,640,000,000,000,000,000,000,000 | 5 | Handle more partial responses (#791) |
static void StreamTcpClearKeepAliveFlag(TcpSession *ssn, Packet *p)
{
TcpStream *stream = NULL;
if (p->flags & PKT_PSEUDO_STREAM_END)
return;
if (PKT_IS_TOSERVER(p)) {
stream = &ssn->client;
} else {
stream = &ssn->server;
}
if (stream->flags & STREAMTCP_STREAM_FLAG_KE... | 0 | [] | suricata | 50e2b973eeec7172991bf8f544ab06fb782b97df | 314,310,628,672,433,670,000,000,000,000,000,000,000 | 18 | stream/tcp: handle RST with MD5 or AO header
Special handling for RST packets if they have an TCP MD5 or AO header option.
The options hash can't be validated. The end host might be able to validate
it, as it can have a key/password that was communicated out of band.
The sender could use this to move the TCP state to... |
int enc_untrusted_sys_futex_wake(int32_t *futex, int32_t num) {
if (!TrustedPrimitives::IsOutsideEnclave(futex, sizeof(int32_t))) {
TrustedPrimitives::BestEffortAbort(
"enc_untrusted_sys_futex_wake: futex word should be in untrusted "
"local memory.");
}
MessageWriter input;
MessageReader o... | 0 | [
"CWE-787"
] | asylo | a37fb6a0e7daf30134dbbf357c9a518a1026aa02 | 284,043,461,598,042,880,000,000,000,000,000,000,000 | 21 | Check untrusted queue is in outside enclave
PiperOrigin-RevId: 333370935
Change-Id: Ic3f15d5db1302d95c7cb199b44172474fecb81ca |
void mntput_no_expire(struct vfsmount *mnt)
{
repeat:
if (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
if (likely(!mnt->mnt_pinned)) {
spin_unlock(&vfsmount_lock);
__mntput(mnt);
return;
}
atomic_add(mnt->mnt_pinned + 1, &mnt->mnt_count);
mnt->mnt_pinned = 0;
spin_unlock(&vfsmount_lock);
... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 271,266,010,144,417,700,000,000,000,000,000,000,000 | 17 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
int width() const {
return (int)_width;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 35,376,240,578,354,653,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. |
static int cbq_delete(struct Qdisc *sch, unsigned long arg)
{
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *cl = (struct cbq_class*)arg;
if (cl->filters || cl->children || cl == &q->link)
return -EBUSY;
sch_tree_lock(sch);
if (cl->next_alive)
cbq_deactivate_class(cl);
if (q->tx_borrowed ==... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 269,776,179,672,135,200,000,000,000,000,000,000,000 | 37 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static bool ext4_should_use_dax(struct inode *inode)
{
if (!test_opt(inode->i_sb, DAX))
return false;
if (!S_ISREG(inode->i_mode))
return false;
if (ext4_should_journal_data(inode))
return false;
if (ext4_has_inline_data(inode))
return false;
if (ext4_encrypted_inode(inode))
return false;
return true;
} | 0 | [] | linux | 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44 | 299,861,194,974,941,700,000,000,000,000,000,000,000 | 14 | ext4: fail ext4_iget for root directory if unallocated
If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, b... |
OVS_REQUIRES(ipf->ipf_lock)
{
struct ipf_list *ipf_list;
HMAP_FOR_EACH_WITH_HASH (ipf_list, node, hash, &ipf->frag_lists) {
if (ipf_list_key_eq(&ipf_list->key, key)) {
return ipf_list;
}
}
return NULL;
} | 0 | [
"CWE-401"
] | ovs | 803ed12e31b0377c37d7aa8c94b3b92f2081e349 | 261,719,843,960,426,200,000,000,000,000,000,000,000 | 10 | ipf: release unhandled packets from the batch
Since 640d4db788ed ("ipf: Fix a use-after-free error, ...") the ipf
framework unconditionally allocates a new dp_packet to track
individual fragments. This prevents a use-after-free. However, an
additional issue was present - even when the packet buffer is cloned,
if the... |
static inline int armv8pmu_counter_valid(int idx)
{
return idx >= ARMV8_IDX_CYCLE_COUNTER && idx <= ARMV8_IDX_COUNTER_LAST;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8fff105e13041e49b82f92eef034f363a6b1c071 | 71,914,280,168,564,850,000,000,000,000,000,000,000 | 4 | arm64: perf: reject groups spanning multiple HW PMUs
The perf core implicitly rejects events spanning multiple HW PMUs, as in
these cases the event->ctx will differ. However this validation is
performed after pmu::event_init() is called in perf_init_event(), and
thus pmu::event_init() may be called with a group leader... |
static gboolean continue_rebound(gpointer user_data)
{
GDHCPClient *dhcp_client = user_data;
uint64_t rand;
switch_listening_mode(dhcp_client, L2);
send_request(dhcp_client);
if (dhcp_client->t2_timeout> 0) {
g_source_remove(dhcp_client->t2_timeout);
dhcp_client->t2_timeout = 0;
}
/*recalculate remaining ... | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 55,211,688,107,106,680,000,000,000,000,000,000,000 | 27 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
static inline int dq_insert_tree(struct qtree_mem_dqinfo *info,
struct dquot *dquot)
{
int tmp = QT_TREEOFF;
#ifdef __QUOTA_QT_PARANOIA
if (info->dqi_blocks <= QT_TREEOFF) {
quota_error(dquot->dq_sb, "Quota tree root isn't allocated!");
return -EIO;
}
#endif
return do_insert_tree(info, dquot, &tmp, 0);
} | 0 | [
"CWE-416"
] | linux | 9bf3d20331295b1ecb81f4ed9ef358c51699a050 | 17,755,289,282,034,340,000,000,000,000,000,000,000 | 13 | quota: check block number when reading the block in quota file
The block number in the quota tree on disk should be smaller than the
v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be
allocating an 'allocated' block and that would lead to a loop in a tree,
which will probably trigger oops later. Thi... |
static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
basename[MagickPathExtent],
buffer[MagickPathExtent];
MagickBooleanType
status;
register const Quantum
*p;
register ssize_t
x;
size_t
bit,
byte;
ssize_t
co... | 0 | [
"CWE-200",
"CWE-703"
] | ImageMagick | 216d117f05bff87b9dc4db55a1b1fadb38bcb786 | 220,778,293,837,353,130,000,000,000,000,000,000,000 | 125 | XBM coder leaves the hex image data uninitialized if hex value of the pixel is negative |
void preempt_count_add(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON((preempt_count() < 0)))
return;
#endif
__preempt_count_add(val);
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Spinlock count overflowing soon?
*/
DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >=
PREEMP... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 167,840,952,378,486,170,000,000,000,000,000,000,000 | 25 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
pcm_reader_t *wav_open(pcm_io_context_t *io, int ignore_length)
{
wav_reader_t *reader = 0;
int64_t data_length;
unsigned bpf;
if ((reader = calloc(1, sizeof(wav_reader_t))) == 0)
return 0;
memcpy(&reader->io, io, sizeof(pcm_io_context_t));
reader->ignore_length = ignore_length;
if ... | 0 | [
"CWE-703"
] | fdkaac | 4ec1422bd951a137225ffa4052da120e2ab0a0f4 | 328,579,138,235,528,900,000,000,000,000,000,000,000 | 31 | wav/caf parser: ensure fmt/desc chunk
fixes https://github.com/nu774/fdkaac/issues/52 |
load_reduce(UnpicklerObject *self)
{
PyObject *callable = NULL;
PyObject *argtup = NULL;
PyObject *obj = NULL;
PDATA_POP(self->stack, argtup);
if (argtup == NULL)
return -1;
PDATA_POP(self->stack, callable);
if (callable) {
obj = PyObject_CallObject(callable, argtup);
... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 184,957,792,354,964,330,000,000,000,000,000,000,000 | 22 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static inline void __cpu_invalidate_fpregs_state(void)
{
__this_cpu_write(fpu_fpregs_owner_ctx, NULL);
} | 0 | [
"CWE-119",
"CWE-732",
"CWE-787"
] | linux | 59c4bd853abcea95eccc167a7d7fd5f1a5f47b98 | 80,020,532,206,239,830,000,000,000,000,000,000,000 | 4 | x86/fpu: Don't cache access to fpu_fpregs_owner_ctx
The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing
to the context that is currently loaded. It never changed during the
lifetime of a task - it remained stable/constant.
After deferred FPU registers loading until return to userland was
implement... |
static void op64_tx_resume(struct b43_dmaring *ring)
{
b43_dma_write(ring, B43_DMA64_TXCTL, b43_dma_read(ring, B43_DMA64_TXCTL)
& ~B43_DMA64_TXSUSPEND);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 142,126,700,767,865,300,000,000,000,000,000,000,000 | 5 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
tty_putcode(struct tty *tty, enum tty_code_code code)
{
tty_puts(tty, tty_term_string(tty->term, code));
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 266,861,429,964,480,580,000,000,000,000,000,000,000 | 4 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
GLint64 vrend_renderer_get_timestamp(void)
{
GLint64 v;
glGetInteger64v(GL_TIMESTAMP, &v);
return v;
} | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 176,578,245,534,202,030,000,000,000,000,000,000,000 | 6 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static int bcast_or_ucast(struct dhcp_packet *packet, uint32_t ciaddr, uint32_t server)
{
if (server)
return udhcp_send_kernel_packet(packet,
ciaddr, CLIENT_PORT,
server, SERVER_PORT);
return raw_bcast_from_client_config_ifindex(packet, ciaddr);
} | 0 | [
"CWE-125"
] | busybox | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c | 318,005,032,491,590,300,000,000,000,000,000,000,000 | 8 | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... |
static bool nft_setelem_is_catchall(const struct nft_set *set,
const struct nft_set_elem *elem)
{
struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
if (nft_set_ext_exists(ext, NFT_SET_EXT_FLAGS) &&
*nft_set_ext_flags(ext) & NFT_SET_ELEM_CATCHALL)
return true;
return false;
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 237,918,420,181,038,060,000,000,000,000,000,000,000 | 11 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
EXPORTED int mboxlist_lookup(const char *name, mbentry_t **entryptr,
struct txn **tid)
{
mbentry_t *entry = NULL;
int r;
r = mboxlist_mylookup(name, &entry, tid, 0);
if (r) return r;
/* Ignore "reserved" entries, like they aren't there */
if (entry->mbtype & MBTYP... | 0 | [
"CWE-20"
] | cyrus-imapd | 6bd33275368edfa71ae117de895488584678ac79 | 77,675,923,718,184,670,000,000,000,000,000,000,000 | 27 | mboxlist: fix uninitialised memory use where pattern is "Other Users" |
void addBufferFragment(Buffer::BufferFragment& fragment) override {
add(fragment.data(), fragment.size());
fragment.done();
} | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 261,104,154,308,474,560,000,000,000,000,000,000,000 | 4 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
qboolean FS_FilenameCompare( const char *s1, const char *s2 ) {
int c1, c2;
do {
c1 = *s1++;
c2 = *s2++;
if (c1 >= 'a' && c1 <= 'z') {
c1 -= ('a' - 'A');
}
if (c2 >= 'a' && c2 <= 'z') {
c2 -= ('a' - 'A');
}
if ( c1 == '\\' || c1 == ':' ) {
c1 = '/';
}
if ( c2 == '\\' || c2 == ':' ) {
... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 214,711,399,791,680,520,000,000,000,000,000,000,000 | 28 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
StringCrosser(const std::vector<
std::unique_ptr<ColumnInterface<InternalType>>>& columns,
const int64 num_buckets_unused, const uint64 hash_key_unused,
const tstring k_feature_separator)
: columns_(columns), k_feature_separator_(k_feature_separator) {} | 0 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 301,872,835,152,858,030,000,000,000,000,000,000,000 | 5 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
static void reclaim_dma_bufs(void)
{
unsigned long flags;
struct port_buffer *buf, *tmp;
LIST_HEAD(tmp_list);
if (list_empty(&pending_free_dma_bufs))
return;
/* Create a copy of the pending_free_dma_bufs while holding the lock */
spin_lock_irqsave(&dma_bufs_lock, flags);
list_cut_position(&tmp_list, &pending... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c4baad50297d84bde1a7ad45e50c73adae4a2192 | 74,369,999,990,105,020,000,000,000,000,000,000,000 | 21 | virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat... |
ephy_string_find_and_replace (const char *haystack,
const char *to_find,
const char *to_repl)
{
GString *str;
g_assert (haystack);
g_assert (to_find);
g_assert (to_repl);
str = g_string_new (haystack);
g_string_replace (str, to_find, to_repl, 0);... | 0 | [
"CWE-787"
] | epiphany | 486da133569ebfc436c959a7419565ab102e8525 | 279,227,529,940,356,300,000,000,000,000,000,000,000 | 14 | Fix memory corruption in ephy_string_shorten()
This fixes a regression that I introduced in 232c613472b38ff0d0d97338f366024ddb9cd228.
I got my browser stuck in a crash loop today while visiting a website
with a page title greater than ephy-embed.c's MAX_TITLE_LENGTH, the only
condition in which ephy_string_shorten() ... |
static int check_poison_all_blocks(void) {
int ok = 1;
unsigned short int blockNo = 0;
if (umm_heap == NULL) {
umm_init();
}
/* Now iterate through the blocks list */
blockNo = UMM_NBLOCK(blockNo) & UMM_BLOCKNO_MASK;
while( UMM_NBLOCK(blockNo) & UMM_BLOCKNO_MASK ) {
if ( !(UMM_NBLOCK(blockNo) &... | 0 | [
"CWE-190"
] | mongoose-os | b338266c0492cccdb8d8a93ee0b9217bc5a04036 | 223,131,790,775,014,420,000,000,000,000,000,000,000 | 25 | Fix umm_malloc() |
void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1,
jas_matind_t r0, jas_matind_t c0, jas_matind_t r1, jas_matind_t c1)
{
jas_matind_t i;
if (mat0->data_) {
if (!(mat0->flags_ & JAS_MATRIX_REF)) {
jas_free(mat0->data_);
}
mat0->data_ = 0;
mat0->datasize_ = 0;
}
if (mat0->rows_) {
jas_fre... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 65,483,412,931,051,620,000,000,000,000,000,000,000 | 40 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
bool DML_prelocking_strategy::
handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
Sroutine_hash_entry *rt, sp_head *sp, bool *need_prelocking)
{
/*
We assume that for any "CALL proc(...)" statement sroutines_list will
have 'proc' as first element (it may have several, consider e.g.
... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 136,139,756,486,950,480,000,000,000,000,000,000,000 | 24 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
check_coding_spec(const char* line, Py_ssize_t size, struct tok_state *tok,
int set_readline(struct tok_state *, const char *))
{
char *cs;
int r = 1;
if (tok->cont_line) {
/* It's a continuation line, so it can't be a coding spec. */
tok->read_coding_spec = 1;
ret... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 14,438,936,767,349,880,000,000,000,000,000,000,000 | 53 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr)
{
struct in6_addr maddr;
if (idev->dev->flags&(IFF_LOOPBACK|IFF_NOARP))
return;
addrconf_addr_solict_mult(addr, &maddr);
__ipv6_dev_mc_dec(idev, &maddr);
} | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 77,116,889,487,683,060,000,000,000,000,000,000,000 | 10 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
static int crldp_check_crlissuer(DIST_POINT *dp, X509_CRL *crl, int crl_score)
{
int i;
X509_NAME *nm = X509_CRL_get_issuer(crl);
/* If no CRLissuer return is successful iff don't need a match */
if (!dp->CRLissuer)
return ! !(crl_score & CRL_SCORE_ISSUER_NAME);
for (i = 0; i < sk_GENERAL_NA... | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 293,460,148,875,262,180,000,000,000,000,000,000,000 | 16 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
{
RAMBlock *block = ram_block;
if (block == NULL) {
block = qemu_get_ram_block(addr);
addr -= block->offset;
}
if (xen_enabled() && block->host == NULL) {
/* We need to check if the requested address is in the RAM
... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 212,766,205,766,434,900,000,000,000,000,000,000,000 | 22 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
evdev_init_accel(struct evdev_device *device,
enum libinput_config_accel_profile which)
{
struct motion_filter *filter;
if (which == LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT)
filter = create_pointer_accelerator_filter_flat(device->dpi);
else if (device->tags & EVDEV_TAG_TRACKPOINT)
filter = create_pointer_accelera... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 66,248,545,582,097,040,000,000,000,000,000,000,000 | 24 | 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... |
virtual ~AuthorizationManagerWithExplicitUserPrivilegesTest() {
if (authzManager)
authzManager->invalidateUserCache();
} | 0 | [
"CWE-863"
] | mongo | a93cfd354467981c9cf944a4ada748d0226fdfb0 | 220,447,558,109,662,530,000,000,000,000,000,000,000 | 4 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
(cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b)
(cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
(cherry picked from commit fb87cc88ecb5d300f14cda7bc238d7d5132118f5) |
xmlBufLength(const xmlBufPtr buf)
{
if ((!buf) || (buf->error))
return 0;
CHECK_COMPAT(buf)
return(buf->use);
} | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 317,323,944,030,811,330,000,000,000,000,000,000,000 | 8 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
static void mg_ws_cb(struct mg_connection *c, int ev, void *ev_data,
void *fn_data) {
struct ws_msg msg;
size_t ofs = (size_t) c->pfn_data;
// assert(ofs < c->recv.len);
if (ev == MG_EV_READ) {
if (!c->is_websocket && c->is_client) {
int n = mg_http_get_request_len(c->recv.buf, c... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 31,246,655,212,325,913,000,000,000,000,000,000,000 | 87 | Protect against the directory traversal in mg_upload() |
static int __init fwnet_init(void)
{
int err;
err = fw_core_add_descriptor(&rfc2374_unit_directory);
if (err)
return err;
#if IS_ENABLED(CONFIG_IPV6)
err = fw_core_add_descriptor(&rfc3146_unit_directory);
if (err)
goto out;
#endif
fwnet_packet_task_cache = kmem_cache_create("packet_task",
sizeof(struct ... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 251,420,340,483,203,780,000,000,000,000,000,000,000 | 35 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... |
struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
size_t align, unsigned int heap_id_mask,
unsigned int flags)
{
struct ion_handle *handle;
struct ion_device *dev = client->dev;
struct ion_buffer *buffer = NULL;
struct ion_heap *heap;
int ret;
pr_debug("%s: len %zu align %zu hea... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 8,913,963,349,001,571,000,000,000,000,000,000,000 | 61 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
static void prb_retire_rx_blk_timer_expired(struct timer_list *t)
{
struct packet_sock *po =
from_timer(po, t, rx_ring.prb_bdqc.retire_blk_timer);
struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(&po->rx_ring);
unsigned int frozen;
struct tpacket_block_desc *pbd;
spin_lock(&po->sk.sk_receive_queue.lock);
fro... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 199,821,763,374,531,660,000,000,000,000,000,000,000 | 72 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
zip_close_archive_file(gx_device_xps *xps_dev, const char *filename)
{
gx_device_xps_zinfo_t *info = zip_look_up_file_info(xps_dev, filename);
gx_device_xps_zdata_t data;
byte buf[4];
unsigned long crc = 0;
int count = 0;
int len;
/* we can't use the vector stream accessor because it calls b... | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 27,255,554,550,223,720,000,000,000,000,000,000,000 | 80 | 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... |
static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
{
struct pci_dev *pdev = adapter->pdev;
int size;
u8 offset = 0;
/* real ring DMA buffer */
adapter->ring_size = size =
adapter->txd_ring_size * 1 + 7 + /* dword align */
adapter->txs_ring_size * 4 + 7 + /* dword align */
adapter->rxd_ring_s... | 0 | [
"CWE-200"
] | linux | f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 | 19,538,374,958,222,140,000,000,000,000,000,000,000 | 50 | atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs. This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.
Now that SG and checksum offload are i... |
tpaddr_print_ip(netdissect_options *ndo,
const struct arp_pkthdr *ap, u_short pro)
{
if (pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL)
ND_PRINT((ndo, "<wrong proto type>"));
else if (PROTO_LEN(ap) != 4)
ND_PRINT((ndo, "<wrong len>"));
else
ND_PRINT((ndo, "%s", ipaddr_string(ndo, TPA(ap))));
} | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 13ab8d18617d616c7d343530f8a842e7143fb5cc | 46,431,383,585,971,310,000,000,000,000,000,000,000 | 10 | CVE-2017-13013/ARP: Fix printing of ARP protocol addresses.
If the protocol type isn't ETHERTYPE_IP or ETHERTYPE_TRAIL, or if the
protocol address length isn't 4, don't print the address as an IPv4 address.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture fil... |
uint64_t additional_length() const { return additional_length_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 309,672,915,916,709,840,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
virDomainRedirdevDefFormat(virBufferPtr buf,
virDomainRedirdevDefPtr def,
unsigned int flags)
{
const char *bus;
bus = virDomainRedirdevBusTypeToString(def->bus);
virBufferAsprintf(buf, "<redirdev bus='%s'", bus);
if (virDomainChrAttrsDefFormat(buf... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 148,867,321,936,246,280,000,000,000,000,000,000,000 | 25 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
FLAC_API FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, uint32_t value)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
FLAC__ASSERT(0 != encoder->protected_);
if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED)
return false;
encoder->pr... | 0 | [
"CWE-787"
] | flac | e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be | 79,146,754,131,375,370,000,000,000,000,000,000,000 | 10 | libFlac: Exit at EOS in verify mode
When verify mode is enabled, once decoder flags end of stream,
encode processing is considered complete.
CVE-2021-0561
Signed-off-by: Ralph Giles <giles@thaumas.net> |
static int r_core_bin_file_print(RCore *core, RBinFile *binfile, int mode) {
RListIter *iter;
RBinObject *obj;
const char *name = binfile ? binfile->file : NULL;
(void)r_bin_get_info (core->bin); // XXX is this necssary for proper iniitialization
ut32 id = binfile ? binfile->id : 0;
ut32 fd = binfile ? binfile->f... | 0 | [
"CWE-125"
] | radare2 | 1f37c04f2a762500222dda2459e6a04646feeedf | 299,600,055,612,477,260,000,000,000,000,000,000,000 | 56 | Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923) |
static int alloc_blocks(ext2_filsys fs,
struct ext2_dx_countlimit **limit,
struct ext2_dx_entry **prev_ent,
struct ext2_dx_entry **next_ent,
int *prev_offset, int *next_offset,
struct out_dir *outdir, int i,
int *prev_count, int *next_count)
{
errcode_t retval;
char *block_start;
if (*limit)
(*... | 0 | [
"CWE-787"
] | e2fsprogs | 8dd73c149f418238f19791f9d666089ef9734dff | 245,732,297,869,981,830,000,000,000,000,000,000,000 | 36 | e2fsck: abort if there is a corrupted directory block when rehashing
In e2fsck pass 3a, when we are rehashing directories, at least in
theory, all of the directories should have had corruptions with
respect to directory entry structure fixed. However, it's possible
(for example, if the user declined a fix) that we ca... |
inline virtual QString userName() { return QString(); } | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 283,190,657,782,566,800,000,000,000,000,000,000,000 | 1 | 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 void sched_feat_enable(int i) { }; | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 66,643,516,408,149,940,000,000,000,000,000,000,000 | 1 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
static int parse_dos_extended(blkid_probe pr, blkid_parttable tab,
uint32_t ex_start, uint32_t ex_size, int ssf)
{
blkid_partlist ls = blkid_probe_get_partlist(pr);
uint32_t cur_start = ex_start, cur_size = ex_size;
unsigned char *data;
int ct_nodata = 0; /* count ext.partitions without data partitions */
int i;... | 1 | [] | util-linux | 7164a1c34d18831ac61c6744ad14ce916d389b3f | 187,687,402,815,712,560,000,000,000,000,000,000,000 | 90 | libblkid: ignore extended partition at zero offset
If the extended partition starts at zero LBA then MBR is interpreted
as EBR and all is recursively parsed... result is out-of-memory.
MBR --extended-partition--> EBR --> MBR --> ENB --> MBR ...
Note that such PT is not possible to create by standard partitioning
to... |
static void reds_set_one_channel_security(RedsState *reds, int id, uint32_t security)
{
ChannelSecurityOptions *security_options;
if ((security_options = reds_find_channel_security(reds, id))) {
security_options->options = security;
return;
}
security_options = g_new(ChannelSecurityOpti... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 247,614,304,047,749,530,000,000,000,000,000,000,000 | 14 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
onig_copyright(void)
{
static char s[58];
sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2008 K.Kosako",
ONIGURUMA_VERSION_MAJOR,
ONIGURUMA_VERSION_MINOR,
ONIGURUMA_VERSION_TEENY);
return s;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 228,558,802,413,306,560,000,000,000,000,000,000,000 | 10 | onig-5.9.2 |
MagickPrivate MagickBooleanType XMagickProgressMonitor(const char *tag,
const MagickOffsetType quantum,const MagickSizeType span,
void *magick_unused(client_data))
{
XWindows
*windows;
windows=XSetWindows((XWindows *) ~0);
if (windows == (XWindows *) NULL)
return(MagickTrue);
if (windows->info.mapp... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 53,983,561,607,860,810,000,000,000,000,000,000,000 | 15 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static void sun7i_a20_get_out_factors(struct factors_request *req)
{
u8 div, calcm, calcp;
/* These clocks can only divide, so we will never be able to achieve
* frequencies higher than the parent frequency */
if (req->rate > req->parent_rate)
req->rate = req->parent_rate;
div = DIV_ROUND_UP(req->parent_rate,... | 0 | [
"CWE-476"
] | linux | fcdf445ff42f036d22178b49cf64e92d527c1330 | 31,842,753,565,256,296,000,000,000,000,000,000,000 | 26 | clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup()
In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup().
It returns NULL when fails. 'derived_name' should be checked.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> |
CImg<T> get_erode(const unsigned int s) const {
return (+*this).erode(s);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 65,378,912,829,706,270,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 usbnet_purge_paused_rxq(struct usbnet *dev)
{
skb_queue_purge(&dev->rxq_pause);
} | 0 | [
"CWE-703"
] | linux | 1666984c8625b3db19a9abc298931d35ab7bc64b | 331,200,256,817,135,100,000,000,000,000,000,000,000 | 4 | usbnet: cleanup after bind() in probe()
In case bind() works, but a later error forces bailing
in probe() in error cases work and a timer may be scheduled.
They must be killed. This fixes an error case related to
the double free reported in
http://www.spinics.net/lists/netdev/msg367669.html
and needs to go on top of L... |
BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM,
int LeftOfs, int TopOfs, int Delay,
int Disposal, gdImagePtr previm)
{
gdIOCtx *out = gdNewFileCtx(outFile);
if (out == NULL) return;
gdImageGifAnimAddCtx(im, out, Lo... | 0 | [
"CWE-415"
] | libgd | 553702980ae89c83f2d6e254d62cf82e204956d0 | 17,155,093,626,727,443,000,000,000,000,000,000,000 | 9 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which ar... |
void free_transhuge_page(struct page *page)
{
struct deferred_split *ds_queue = get_deferred_split_queue(page);
unsigned long flags;
spin_lock_irqsave(&ds_queue->split_queue_lock, flags);
if (!list_empty(page_deferred_list(page))) {
ds_queue->split_queue_len--;
list_del(page_deferred_list(page));
}
spin_unlo... | 0 | [
"CWE-362"
] | linux | c444eb564fb16645c172d550359cb3d75fe8a040 | 73,056,725,720,262,730,000,000,000,000,000,000,000 | 13 | mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()
Write protect anon page faults require an accurate mapcount to decide
if to break the COW or not. This is implemented in the THP path with
reuse_swap_page() ->
page_trans_huge_map_swapcount()/page_trans_huge_mapcount().
If the COW triggers while ... |
R_API int r_config_readonly(RConfig *cfg, const char *key) {
RConfigNode *n = r_config_node_get (cfg, key);
if (!n) {
return false;
}
n->flags |= CN_RO;
return true;
} | 0 | [
"CWE-416"
] | radare2 | f85bc674b2a2256a364fe796351bc1971e106005 | 217,530,444,758,458,580,000,000,000,000,000,000,000 | 8 | Fix #7698 - UAF in r_config_set when loading a dex |
findForPassRule(const TranslationTableHeader *table, int pos, int currentPass,
const InString *input, int *transOpcode, const TranslationTableRule **transRule,
int *transCharslen, int *passCharDots, widechar const **passInstructions,
int *passIC, PassRuleMatch *match, TranslationTableRule **groupingRule,
widech... | 0 | [
"CWE-125"
] | liblouis | 5e4089659bb49b3095fa541fa6387b4c40d7396e | 293,488,250,170,652,500,000,000,000,000,000,000,000 | 24 | Fix a buffer overflow
Fixes #635
Thanks to HongxuChen for reporting it |
is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset)
{
struct mntentchn *mnt = NULL;
char *node;
int res = 0;
node = canonicalize(node0);
/* Search for mountpoint node in mtab,
* procceed if any of these has the loop option set or
* the device is a loop device
*/
mn... | 0 | [
"CWE-200"
] | util-linux | 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 | 49,201,531,308,668,800,000,000,000,000,000,000,000 | 39 | mount: (deprecated) drop --guess-fstype
The option is undocumented and unnecessary.
Signed-off-by: Karel Zak <kzak@redhat.com> |
JsVar *jspeiGetTopScope() {
if (execInfo.scopesVar) {
JsVar *scope = jsvGetLastArrayItem(execInfo.scopesVar);
if (scope) return scope;
}
return jsvLockAgain(execInfo.root);
} | 0 | [
"CWE-787"
] | Espruino | e069be2ecc5060ef47391716e4de94999595b260 | 323,490,507,710,761,360,000,000,000,000,000,000,000 | 7 | Fix potential corruption issue caused by `delete [].__proto__` (fix #2142) |
evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t fd,
ev_ssize_t howmuch)
{
struct evbuffer_chain *chain = buffer->first;
struct evbuffer_chain_fd *info =
EVBUFFER_CHAIN_EXTRA(struct evbuffer_chain_fd, chain);
#if defined(SENDFILE_IS_MACOSX) || defined(SENDFILE_IS_FREEBSD)
int res;
off_t len... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 143,997,912,290,550,560,000,000,000,000,000,000,000 | 51 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
static int test_gf2m_mul(void)
{
BIGNUM *a, *b[2] = {NULL, NULL}, *c = NULL, *d = NULL;
BIGNUM *e = NULL, *f = NULL, *g = NULL, *h = NULL;
int i, j, st = 0;
if (!TEST_ptr(a = BN_new())
|| !TEST_ptr(b[0] = BN_new())
|| !TEST_ptr(b[1] = BN_new())
|| !TEST_ptr(c = BN_ne... | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 209,612,665,789,611,650,000,000,000,000,000,000,000 | 52 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
on_timeout_set_flag (gpointer data)
{
gboolean *flag = data;
g_assert (*flag == FALSE);
*flag = TRUE;
return FALSE;
} | 0 | [] | cockpit | c51f6177576d7e12614c64d316cf0b67addd17c9 | 91,921,956,849,681,340,000,000,000,000,000,000,000 | 7 | ws: Fix bug parsing invalid base64 headers
The len parameter to g_base64_decode_inplace() is a inout
parameter, and needs to be initialized. Lets just use
the simpler g_base64_decode() function. This fixes a segfault.
Closes #10819 |
static bool find_ctx0_fence_locked(struct list_head *fence_list,
void *fence_cookie,
bool *seen_first,
struct vrend_fence **fence)
{
struct vrend_fence *iter;
LIST_FOR_EACH_ENTRY(iter, fence_list, fences) {
... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 89,506,430,131,375,440,000,000,000,000,000,000,000 | 26 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
if (out == NULL) {
return WS_MEMORY_E;
} | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 192,666,889,155,513,950,000,000,000,000,000,000,000 | 3 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
const BIGNUM *in_kinv, const BIGNUM *in_r,
EC_KEY *eckey)
{
int ok = 0, i;
BIGNUM *kinv = NULL, *s, *m = NULL, *tmp = NULL, *blind = NULL;
BIGNUM *blindm = NULL;
const BI... | 0 | [
"CWE-203"
] | openssl | 0c27d793745c7837b13646302b6890a556b7017a | 100,110,287,515,814,310,000,000,000,000,000,000,000 | 174 | Add blinding to an ECDSA signature
Keegan Ryan (NCC Group) has demonstrated a side channel attack on an
ECDSA signature operation. During signing the signer calculates:
s:= k^-1 * (m + r * priv_key) mod order
The addition operation above provides a sufficient signal for a
flush+reload attack to derive the private ke... |
static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
{
struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
struct sock *sk = sock->sk;
bdaddr_t *src = &sa->sco_bdaddr;
int err = 0;
BT_DBG("sk %p %s", sk, batostr(&sa->sco_bdaddr));
if (!addr || addr->sa_family != AF_BLUETOOTH)
... | 0 | [
"CWE-200"
] | linux | c4c896e1471aec3b004a693c689f60be3b17ac86 | 118,315,695,197,606,810,000,000,000,000,000,000,000 | 35 | Bluetooth: sco: fix information leak to userspace
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. ... |
void security_inode_getsecid(const struct inode *inode, u32 *secid)
{
security_ops->inode_getsecid(inode, secid);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 232,113,641,393,919,640,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... |
crypto_args(
struct peer *peer, /* peer structure pointer */
u_int opcode, /* operation code */
associd_t associd, /* association ID */
char *str /* argument string */
)
{
tstamp_t tstamp; /* NTP timestamp */
struct exten *ep; /* extension field pointer */
u_int len; /* extension field length */
size_t slen... | 0 | [
"CWE-20"
] | ntp | c4cd4aaf418f57f7225708a93bf48afb2bc9c1da | 6,496,297,377,028,221,000,000,000,000,000,000,000 | 37 | CVE-2014-9297 |
static int gup_huge_pmd(pmd_t orig, pmd_t *pmdp, unsigned long addr,
unsigned long end, unsigned int flags,
struct page **pages, int *nr)
{
struct page *head, *page;
int refs;
if (!pmd_access_permitted(orig, flags & FOLL_WRITE))
return 0;
if (pmd_devmap(orig)) {
if (unlikely(flags & FOLL_LONGTERM))
r... | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 37,741,423,366,853,633,000,000,000,000,000,000,000 | 33 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
void initialize() override {
config_helper_.addConfigModifier(
[&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager&
hcm) -> void {
ConfigHelper::setConnectConfig(hcm, false, false,
downstream_protoco... | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 171,534,778,598,518,070,000,000,000,000,000,000,000 | 10 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static BOOL nla_client_init_cred_handle(rdpNla* nla)
{
SECURITY_STATUS secStatus;
SEC_WINPR_KERBEROS_SETTINGS* kerbSettings;
WINPR_ASSERT(nla);
kerbSettings = nla->kerberosSettings;
WINPR_ASSERT(kerbSettings);
WINPR_ASSERT(nla->table->SetCredentialsAttributes);
if (kerbSettings->kdcUrl)
{
#ifdef UNICODE
Sec... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 62,214,772,991,148,010,000,000,000,000,000,000,000 | 38 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
Hybrid_type_traits_integer::fix_length_and_dec(Item *item, Item *arg) const
{
item->decimals= 0;
item->max_length= MY_INT64_NUM_DECIMAL_DIGITS;
item->unsigned_flag= 0;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 272,992,351,987,833,220,000,000,000,000,000,000,000 | 6 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
edit_deep_directories(struct archive_write_disk *a)
{
int ret;
char *tail = a->name;
/* If path is short, avoid the open() below. */
if (strlen(tail) < PATH_MAX)
return;
/* Try to record our starting dir. */
a->restore_pwd = la_opendirat(AT_FDCWD, ".");
__archive_ensure_cloexec_flag(a->restore_pwd);
if (a->... | 0 | [
"CWE-59",
"CWE-269"
] | libarchive | b41daecb5ccb4c8e3b2c53fd6147109fc12c3043 | 257,353,086,956,692,270,000,000,000,000,000,000,000 | 38 | Do not follow symlinks when processing the fixup list
Use lchmod() instead of chmod() and tell the remaining functions that the
real file to be modified is a symbolic link.
Fixes #1566 |
static ut64 num_callback(RNum *user, const char *name, int *ok) {
RFlag *f = (RFlag*)user;
RFlagItem *item;
if (ok) {
*ok = 0;
}
item = ht_find (f->ht_name, name, NULL);
if (item) {
// NOTE: to avoid warning infinite loop here we avoid recursivity
if (item->alias) {
return 0LL;
}
if (ok) {
*ok = 1... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 52b1526443c1f433087928291d1c3d37a5600515 | 66,177,623,050,824,010,000,000,000,000,000,000,000 | 19 | Fix crash in wasm disassembler |
int unshare_fd(unsigned long unshare_flags, unsigned int max_fds,
struct files_struct **new_fdp)
{
struct files_struct *fd = current->files;
int error = 0;
if ((unshare_flags & CLONE_FILES) &&
(fd && atomic_read(&fd->count) > 1)) {
*new_fdp = dup_fd(fd, max_fds, &error);
if (!*new_fdp)
return er... | 0 | [
"CWE-665",
"CWE-362"
] | linux | b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948 | 325,863,295,330,174,900,000,000,000,000,000,000,000 | 15 | fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
current->group_leader->exit_signal may change during copy_process() if
current->real_parent exits.
Move the assignment inside tasklist_lock to avoid the race.
Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com>
Acked-by: Oleg Nesterov <oleg@redhat.... |
prev_nonnull_line(Line *line)
{
Line *l;
for (l = line; l != NULL && l->len == 0; l = l->prev) ;
if (l == NULL || l->len == 0)
return -1;
Currentbuf->currentLine = l;
if (l != line)
Currentbuf->pos = Currentbuf->currentLine->len;
return 0;
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 324,934,609,932,340,770,000,000,000,000,000,000,000 | 13 | Make temporary directory safely when ~/.w3m is unwritable |
void Gfx::opSetExtGState(Object args[], int numArgs) {
Object obj1, obj2, obj3, obj4, obj5;
GfxBlendMode mode;
GBool haveFillOP;
Function *funcs[4];
GfxColor backdropColor;
GBool haveBackdropColor;
GfxColorSpace *blendingColorSpace;
GBool alpha, isolated, knockout;
int i;
if (!res->lookupGState(arg... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 93,650,810,074,895,270,000,000,000,000,000,000,000 | 267 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
check_proc_sys_userns_file (const char *path)
{
FILE *fp;
fp = fopen (path, "r");
if (fp)
{
char buf[32];
size_t n_read = fread (buf, 1, sizeof(buf) - 1, fp);
if (n_read > 0)
{
buf[n_read] = '\0';
if (strtol (buf, NULL, 10) == 0)
fprintf (stderr, "user... | 0 | [] | libpod | d400f0b5b2d68c4148a7c173e7fbbfd9b377a660 | 20,697,560,260,353,962,000,000,000,000,000,000,000 | 17 | rootless: fix segfault when open fd >= FD_SETSIZE
if there are more than FD_SETSIZE open fds passed down to the Podman
process, the initialization code could crash as it attempts to store
them into a fd_set. Use an array of fd_set structs, each of them
holding only FD_SETSIZE file descriptors.
Signed-off-by: Giusepp... |
CNF_GetClientLogLimit(void)
{
return client_log_limit;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 327,703,340,165,817,850,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static int ieee80211_set_cqm_rssi_range_config(struct wiphy *wiphy,
struct net_device *dev,
s32 rssi_low, s32 rssi_high)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_vif *vif = &sdata->vif;
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
if (s... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 4,338,540,894,331,901,400,000,000,000,000,000,000 | 24 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
{
struct inode *inode = filp->f_path.dentry->d_inode;
struct address_space *mapping = inode->i_mapping;
unsigned long index, offset;
enum sgp_type sgp = SGP_READ;
/*
* Might this read be for a stacking f... | 0 | [
"CWE-400"
] | linux-2.6 | 14fcc23fdc78e9d32372553ccf21758a9bd56fa1 | 290,038,638,838,577,800,000,000,000,000,000,000,000 | 101 | tmpfs: fix kernel BUG in shmem_delete_inode
SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814
on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage
method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages
to a tmpfs directory, incrementing i_blocks ... |
MagickPrivate void ReleaseOpenCLCommandQueue(MagickCLDevice device,
cl_command_queue queue)
{
if (queue == (cl_command_queue) NULL)
return;
assert(device != (MagickCLDevice) NULL);
LockSemaphoreInfo(device->lock);
if ((device->profile_kernels != MagickFalse) ||
(device->command_queues_index >= MAGI... | 0 | [
"CWE-476"
] | ImageMagick | cca91aa1861818342e3d072bb0fad7dc4ffac24a | 302,294,681,329,992,850,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/790 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.