func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int compressed_size)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret;
uint64_t *l2_table;
int64_t cluster_offset;
int... | 0 | [
"CWE-190"
] | qemu | cab60de930684c33f67d4e32c7509b567f8c445b | 118,783,296,403,652,240,000,000,000,000,000,000,000 | 49 | qcow2: Fix new L1 table size check (CVE-2014-0143)
The size in bytes is assigned to an int later, so check that instead of
the number of entries.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
string SummarizeArray(int64_t limit, int64_t num_elts,
const TensorShape& tensor_shape, const char* data,
const bool print_v2) {
string ret;
const T* array = reinterpret_cast<const T*>(data);
const gtl::InlinedVector<int64_t, 4> shape = tensor_shape.dim_sizes();
if (... | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 139,916,727,545,663,880,000,000,000,000,000,000,000 | 28 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
void write_node_page(unsigned int nid, struct f2fs_io_info *fio)
{
struct f2fs_summary sum;
set_summary(&sum, nid, 0, 0);
do_write_page(&sum, fio);
f2fs_update_iostat(fio->sbi, fio->io_type, F2FS_BLKSIZE);
} | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 288,454,238,585,653,660,000,000,000,000,000,000,000 | 9 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
static void ip_cmsg_recv_pktinfo(struct msghdr *msg, struct sk_buff *skb)
{
struct in_pktinfo info;
struct rtable *rt = skb_rtable(skb);
info.ipi_addr.s_addr = ip_hdr(skb)->daddr;
if (rt) {
info.ipi_ifindex = rt->rt_iif;
info.ipi_spec_dst.s_addr = rt->rt_spec_dst;
} else {
info.ipi_ifindex = 0;
info.ipi_s... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 152,327,935,579,251,060,000,000,000,000,000,000,000 | 16 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
repodata_set_constant(Repodata *data, Id solvid, Id keyname, unsigned int constant)
{
Repokey key;
key.name = keyname;
key.type = REPOKEY_TYPE_CONSTANT;
key.size = constant;
key.storage = KEY_STORAGE_INCORE;
repodata_set(data, solvid, &key, 0);
} | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 96,782,421,605,285,100,000,000,000,000,000,000,000 | 9 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
static int sco_connect(struct hci_dev *hdev, struct sock *sk)
{
struct sco_conn *conn;
struct hci_conn *hcon;
int err, type;
BT_DBG("%pMR -> %pMR", &sco_pi(sk)->src, &sco_pi(sk)->dst);
if (lmp_esco_capable(hdev) && !disable_esco)
type = ESCO_LINK;
else
type = SCO_LINK;
if (sco_pi(sk)->setting == BT_VOICE_... | 0 | [
"CWE-416"
] | linux | 0771cbb3b97d3c1d68eecd7f00055f599954c34e | 248,438,835,225,634,130,000,000,000,000,000,000,000 | 45 | Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg
This makes use of bt_skb_sendmsg instead of allocating a different
buffer to be used with memcpy_from_msg which cause one extra copy.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
static void io_kill_timeout(struct io_kiocb *req)
{
struct io_timeout_data *io = req->async_data;
int ret;
ret = hrtimer_try_to_cancel(&io->timer);
if (ret != -1) {
atomic_set(&req->ctx->cq_timeouts,
atomic_read(&req->ctx->cq_timeouts) + 1);
list_del_init(&req->timeout.list);
io_cqring_fill_event(req, 0);... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 318,382,675,588,664,000,000,000,000,000,000,000,000 | 14 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static int __netdev_has_upper_dev(struct net_device *upper_dev, void *data)
{
struct net_device *dev = data;
return upper_dev == dev; | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 64,232,459,660,904,190,000,000,000,000,000,000,000 | 6 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
dissect_NOTIFY_OPTION(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
proto_item *item;
proto_tree *subtree;
guint16 type;
guint32 count;
subtree = proto_tree_add_subtree(tree, tvb, offset, 0, e... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 339,416,282,221,341,480,000,000,000,000,000,000,000 | 42 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
TEST_F(QueryPlannerTest, TypeArrayUsingStringAliasMustFetchAndFilter) {
addIndex(BSON("a" << 1));
runQuery(fromjson("{a: {$type: 'array'}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: {a: {$type: 'array'}}, node: {ixscan: {pa... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 301,663,310,704,631,600,000,000,000,000,000,000,000 | 10 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
test_gui_drop_files(dict_T *args UNUSED)
{
# if defined(HAVE_DROP_FILE)
int row;
int col;
int_u mods;
char_u **fnames;
int count = 0;
typval_T t;
list_T *l;
listitem_T *li;
if (dict_find(args, (char_u *)"files", -1) == NULL
|| dict_find(args, (char_u *)"row", -1) == NULL
... | 0 | [
"CWE-121",
"CWE-787"
] | vim | 34f8117dec685ace52cd9e578e2729db278163fc | 186,484,470,285,361,100,000,000,000,000,000,000,000 | 57 | patch 8.2.4397: crash when using many composing characters in error message
Problem: Crash when using many composing characters in error message.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). |
static void isor_reset_seq_list(GF_List *list)
{
while (gf_list_count(list)) {
GF_NALUFFParam *sl = gf_list_pop_back(list);
gf_free(sl->data);
gf_free(sl);
}
} | 0 | [
"CWE-703",
"CWE-835"
] | gpac | 71460d72ec07df766dab0a4d52687529f3efcf0a | 272,367,550,890,180,300,000,000,000,000,000,000,000 | 8 | fixed #1876 |
csi_length(const char *value)
{
int result = 0;
if (value[0] == '\033' && value[1] == '[') {
result = 2;
} else if (UChar(value[0]) == 0x9a) {
result = 1;
}
return result;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 130,444,094,949,310,490,000,000,000,000,000,000,000 | 11 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
void SSL_SESSION::CopyX509(X509* x)
{
if (x == 0) return;
X509_NAME* issuer = x->GetIssuer();
X509_NAME* subject = x->GetSubject();
ASN1_STRING* before = x->GetBefore();
ASN1_STRING* after = x->GetAfter();
peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(),
subject->Get... | 1 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 329,638,085,903,592,330,000,000,000,000,000,000,000 | 13 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
void *data)
{
struct nfs4_statfs_res *res = data;
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (!status)
status = decode_sequence(xdr, &res->seq_res, req);
if (!status)
status = decode_p... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 293,234,689,712,423,760,000,000,000,000,000,000,000 | 16 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static inline Nan::Persistent<Function> & constructor() {
static Nan::Persistent<Function> my_constructor;
return my_constructor;
} | 0 | [
"CWE-78"
] | ssh2 | f763271f41320e71d5cbee02ea5bc6a2ded3ca21 | 139,228,679,930,832,850,000,000,000,000,000,000,000 | 4 | examples,lib,test: switch to code rewrite
For more information see: https://github.com/mscdex/ssh2/issues/935 |
bool Binary::unexport(const std::string& name) {
for (const std::unique_ptr<Symbol>& s : symbols_) {
if (s->name() == name && s->has_export_info()) {
return unexport(*s);
}
}
return false;
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 300,155,014,189,925,870,000,000,000,000,000,000,000 | 8 | Resolve #764 |
irc_server_free_data (struct t_irc_server *server)
{
int i;
if (!server)
return;
/* free data */
for (i = 0; i < IRC_SERVER_NUM_OPTIONS; i++)
{
if (server->options[i])
weechat_config_option_free (server->options[i]);
}
if (server->name)
free (ser... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 191,105,571,581,120,750,000,000,000,000,000,000,000 | 63 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
static char **mysql_sys_var_str(THD* thd, int offset)
{
return (char **) intern_sys_var_ptr(thd, offset, true);
} | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 34,211,139,064,102,380,000,000,000,000,000,000,000 | 4 | MDEV-26323 use-after-poison issue of MariaDB server |
int msPostGISLayerIsOpen(layerObj *layer)
{
#ifdef USE_POSTGIS
if (layer->debug) {
msDebug("msPostGISLayerIsOpen called.\n");
}
if (layer->layerinfo)
return MS_TRUE;
else
return MS_FALSE;
#else
msSetError( MS_MISCERR,
"PostGIS support is not available.",
"msPostGISLay... | 0 | [
"CWE-89"
] | mapserver | 3a10f6b829297dae63492a8c63385044bc6953ed | 189,193,493,328,059,720,000,000,000,000,000,000,000 | 19 | Fix potential SQL Injection with postgis TIME filters (#4834) |
static ssize_t userfaultfd_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct userfaultfd_ctx *ctx = file->private_data;
ssize_t _ret, ret = 0;
struct uffd_msg msg;
int no_wait = file->f_flags & O_NONBLOCK;
if (ctx->state == UFFD_STATE_WAIT_API)
return -EINVAL;
for (;;) {
if ... | 0 | [
"CWE-416"
] | linux | 384632e67e0829deb8015ee6ad916b180049d252 | 99,007,566,110,973,270,000,000,000,000,000,000,000 | 29 | userfaultfd: non-cooperative: fix fork use after free
When reading the event from the uffd, we put it on a temporary
fork_event list to detect if we can still access it after releasing and
retaking the event_wqh.lock.
If fork aborts and removes the event from the fork_event all is fine as
long as we're still in the u... |
static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
{
struct address_space *mapping = iocb->ki_filp->f_mapping;
struct inode *inode = mapping->host;
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct f2fs_inode_info *fi = F2FS_I(inode);
size_t count = iov_iter_count(iter);
loff_t offset = io... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 124,325,484,458,800,000,000,000,000,000,000,000,000 | 74 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
get_os_handle(const char *name)
{
ulong hfile; /* This must be as long as the longest handle. */
/* This is correct for Win32, maybe wrong for Win64. */
int i, ch;
for (i = 0; (ch = name[i]) != 0; ++i)
if (!isxdigit(ch))
return (long)INVALID_HANDLE_VALUE;
if ... | 0 | [
"CWE-20"
] | ghostpdl | a9bd3dec9fde03327a4a2c69dad1036bf9632e20 | 140,673,788,986,297,540,000,000,000,000,000,000,000 | 13 | Bug 704342: Include device specifier strings in access validation
for the "%pipe%", %handle%" and %printer% io devices.
We previously validated only the part after the "%pipe%" Postscript device
specifier, but this proved insufficient.
This rebuilds the original file name string, and validates it complete. The
sligh... |
static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,
struct ib_qp_attr *qp_attr,
int *qp_attr_mask)
{
unsigned long flags;
int ret;
spin_lock_irqsave(&cm_id_priv->lock, flags);
switch (cm_id_priv->id.state) {
case IB_CM_REQ_SENT:
case IB_CM_MRA_REQ_RCVD:
case IB_CM_REQ_RCVD:
case IB_CM_MRA... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 60,948,871,064,587,810,000,000,000,000,000,000,000 | 35 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
static int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
{
struct super_block *sb = inode->i_sb;
ext4_lblk_t punch_start, punch_stop;
handle_t *handle;
unsigned int credits;
loff_t new_size, ioffset;
int ret;
/*
* We need to test this early because xfstests assumes that a
* collapse ra... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 161,488,458,579,664,300,000,000,000,000,000,000,000 | 135 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
umount2(const char *path, int flags) {
fprintf(stderr, _("umount: compiled without support for -f\n"));
errno = ENOSYS;
return -1;
} | 0 | [
"CWE-399"
] | util-linux | 11b51a46bfd3c340df251b2d20fe9d04d077a88e | 150,339,849,176,919,250,000,000,000,000,000,000,000 | 5 | umount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Based on CVE-2011-1089.
Signed-off-by: Karel Zak <kzak@redhat.com> |
bool Track::SetCodecPrivate(const uint8_t* codec_private, uint64_t length) {
if (!codec_private || length < 1)
return false;
delete[] codec_private_;
codec_private_ =
new (std::nothrow) uint8_t[static_cast<size_t>(length)]; // NOLINT
if (!codec_private_)
return false;
memcpy(codec_private_, ... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 16,991,154,383,571,464,000,000,000,000,000,000,000 | 16 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
{
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
struct btrfs_device *tgt_device = NULL;
struct btrfs_device *src_device = NULL;
struct btrfs_trans_handle *trans;
struct btrfs_root *root = fs_info->tree_root;
int result;
int ret;
if (s... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 94,817,159,668,531,280,000,000,000,000,000,000,000 | 85 | 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... |
ves_icall_MonoType_get_Namespace (MonoReflectionType *type)
{
MonoDomain *domain = mono_domain_get ();
MonoClass *class = mono_class_from_mono_type (type->type);
MONO_ARCH_SAVE_REGS;
while (class->nested_in)
class = class->nested_in;
if (class->name_space [0] == '\0')
return NULL;
else
return mono_strin... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 42,168,116,986,314,470,000,000,000,000,000,000,000 | 15 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
cleanup_dead_jobs ()
{
register int i;
#if defined (HAVE_WAITPID)
reap_zombie_children ();
#endif
for (i = 0; i < pid_list_size; i++)
{
if ((pid_list[i].flags & PROC_RUNNING) == 0 &&
(pid_list[i].flags & PROC_NOTIFIED))
pid_list[i].pid = NO_PID;
}
#if defined (COPROCESS_SUPPORT)
coproc_reap... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 228,942,931,724,393,700,000,000,000,000,000,000,000 | 21 | bash-4.4-rc2 release |
int fit_image_load(bootm_headers_t *images, ulong addr,
const char **fit_unamep, const char **fit_uname_configp,
int arch, int image_type, int bootstage_id,
enum fit_load_op load_op, ulong *datap, ulong *lenp)
{
int cfg_noffset, noffset;
const char *fit_uname;
const char *fit_uname_config;
const char... | 1 | [] | u-boot | 3f04db891a353f4b127ed57279279f851c6b4917 | 119,886,429,833,007,260,000,000,000,000,000,000,000 | 251 | image: Check for unit addresses in FITs
Using unit addresses in a FIT is a security risk. Add a check for this
and disallow it.
CVE-2021-27138
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Bruce Monroe <bruce.monroe@intel.com>
Reported-by: Arie Haenel <arie.haenel@intel.com>
Reported-by: Julien Lenoir <... |
static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
{
struct ctl_table *table;
table = net->nf_frag.sysctl.frags_hdr->ctl_table_arg;
unregister_net_sysctl_table(net->nf_frag.sysctl.frags_hdr);
if (!net_eq(net, &init_net))
kfree(table);
} | 0 | [] | linux | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 | 133,332,773,447,950,550,000,000,000,000,000,000,000 | 9 | net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list,
required taking the hash writer lock. However, the LRU list isn't
tied to the hash at all, so we can use a separate lock for it.
Original-idea-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Je... |
compare_node_path_segment(const void *void_lhs,
const void *void_rhs)
{
const sorted_pattern_t *element = void_lhs;
const char *segment = void_rhs;
return strcmp(element->node->segment.data, segment);
} | 0 | [
"CWE-703"
] | subversion | e1b615840932fb46aefe1cd90d2115720af4600e | 90,186,229,361,572,140,000,000,000,000,000,000,000 | 8 | Fix issue #4880 "Use-after-free of object-pools when used as httpd module"
Ensure that we initialize authz again if the pool which our authz
caches depend on is cleared. Apache HTTPD may run pre/post config
hooks multiple times and clear its global configuration pool which
our authz caching pools depend on.
Reported-... |
EXPORTED int mailbox_annotation_write(struct mailbox *mailbox, uint32_t uid,
const char *entry, const char *userid,
const struct buf *value)
{
annotate_state_t *state = NULL;
int r = 0;
struct buf oldvalue = BUF_INITIALIZER;
an... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 267,699,215,132,744,360,000,000,000,000,000,000,000 | 31 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
point_below(PG_FUNCTION_ARGS)
{
Point *pt1 = PG_GETARG_POINT_P(0);
Point *pt2 = PG_GETARG_POINT_P(1);
PG_RETURN_BOOL(FPlt(pt1->y, pt2->y));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 289,291,979,256,845,180,000,000,000,000,000,000,000 | 7 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
emacs_edit_and_execute_command (count, c)
int count, c;
{
return (edit_and_execute_command (count, c, EMACS_EDITING_MODE, EMACS_EDIT_COMMAND));
} | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 146,081,872,143,378,440,000,000,000,000,000,000,000 | 5 | Bash-4.4 patch 7 |
QPDF::CopiedStreamDataProvider::provideStreamData(
int objid, int generation, Pipeline* pipeline)
{
QPDFObjectHandle foreign_stream =
this->foreign_streams[QPDFObjGen(objid, generation)];
foreign_stream.pipeStreamData(pipeline, 0, qpdf_dl_none);
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 1,675,102,940,952,192,700,000,000,000,000,000,000 | 7 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
fill_seq_fork_with_data(Relation rel, HeapTuple tuple, ForkNumber forkNum)
{
Buffer buf;
Page page;
sequence_magic *sm;
OffsetNumber offnum;
/* Initialize first page of relation with special magic number */
buf = ReadBufferExtended(rel, forkNum, P_NEW, RBM_NORMAL, NULL);
Assert(BufferGetBlockNumber(buf) == 0... | 0 | [
"CWE-94"
] | postgres | cc7e0feba51b4aeb0adf9bdac659f83e9986b90d | 120,786,368,793,707,440,000,000,000,000,000,000,000 | 72 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static int __ext4_ext_check(const char *function, unsigned int line,
struct inode *inode, struct ext4_extent_header *eh,
int depth, ext4_fsblk_t pblk)
{
const char *error_msg;
int max = 0, err = -EFSCORRUPTED;
if (unlikely(eh->eh_magic != EXT4_EXT_MAGIC)) {
error_msg = "invalid magic";
goto corrup... | 0 | [
"CWE-125"
] | linux | bc890a60247171294acc0bd67d211fa4b88d40ba | 288,634,181,149,883,300,000,000,000,000,000,000,000 | 55 | ext4: verify the depth of extent tree in ext4_find_extent()
If there is a corupted file system where the claimed depth of the
extent tree is -1, this can cause a massive buffer overrun leading to
sadness.
This addresses CVE-2018-10877.
https://bugzilla.kernel.org/show_bug.cgi?id=199417
Signed-off-by: Theodore Ts'o ... |
connection_handle_read_body_unknown (request_st * const r, chunkqueue * const cq, chunkqueue * const dst_cq)
{
/* r->conf.max_request_size is in kBytes */
const off_t max_request_size = (off_t)r->conf.max_request_size << 10;
chunkqueue_append_chunkqueue(dst_cq, cq);
if (0 != max_request_size && dst_cq->... | 0 | [
"CWE-703"
] | lighttpd1.4 | b03b86f47b0d5a553137f081fadc482b4af1372d | 159,194,608,983,342,400,000,000,000,000,000,000,000 | 13 | [core] fix merging large headers across mult reads (fixes #3059)
(thx mitd)
x-ref:
"Connections stuck in Close_Wait causing 100% cpu usage"
https://redmine.lighttpd.net/issues/3059 |
struct in6_addr *fl6_update_dst(struct flowi6 *fl6,
const struct ipv6_txoptions *opt,
struct in6_addr *orig)
{
if (!opt || !opt->srcrt)
return NULL;
*orig = fl6->daddr;
fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr;
return orig;
} | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 136,248,288,667,077,330,000,000,000,000,000,000,000 | 11 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
/* Returns true if we found and killed one or more timeouts */
static __cold bool io_kill_timeouts(struct io_ring_ctx *ctx,
struct task_struct *tsk, bool cancel_all)
{
struct io_kiocb *req, *tmp;
int canceled = 0;
spin_lock(&ctx->completion_lock);
spin_lock_irq(&ctx->timeout_lock);
list_for_each_entry_saf... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 227,530,769,003,479,060,000,000,000,000,000,000,000 | 22 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
bool operator!=(const SmallIntVal& other) const { return !(*this == other); } | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 150,607,131,895,937,150,000,000,000,000,000,000,000 | 1 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static int rtreeUpdate(
sqlite3_vtab *pVtab,
int nData,
sqlite3_value **aData,
sqlite_int64 *pRowid
){
Rtree *pRtree = (Rtree *)pVtab;
int rc = SQLITE_OK;
RtreeCell cell; /* New cell to insert if nData>1 */
int bHaveRowid = 0; /* Set to 1 after new rowid is determined */
... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 299,864,624,820,108,550,000,000,000,000,000,000,000 | 144 | 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 |
static const avifProperty * avifPropertyArrayFind(const avifPropertyArray * properties, const char * type)
{
for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
avifProperty * prop = &properties->prop[propertyIndex];
if (!memcmp(prop->type, type, 4)) {
... | 0 | [
"CWE-703",
"CWE-787"
] | libavif | 0a8e7244d494ae98e9756355dfbfb6697ded2ff9 | 86,513,805,192,977,750,000,000,000,000,000,000,000 | 10 | Set max image size to 16384 * 16384
Fix https://crbug.com/oss-fuzz/24728 and
https://crbug.com/oss-fuzz/24734. |
parse_mailonchange(char *line)
{
char *address;
check_number_of_args(line, 2);
address = line;
line = CPS_SplitWord(line);
Free(mail_user_on_change);
if (sscanf(line, "%lf", &mail_change_threshold) == 1) {
mail_user_on_change = Strdup(address);
} else {
mail_user_on_change = NULL;
command_pars... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 198,727,482,808,038,160,000,000,000,000,000,000,000 | 14 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index,
const struct canfd_frame *rxdata)
{
struct canfd_frame *cf = op->frames + op->cfsiz * index;
struct canfd_frame *lcf = op->last_frames + op->cfsiz * index;
int i;
/*
* no one uses the MSBs of flags for comparison,
* so we use it here to... | 0 | [
"CWE-362"
] | linux | d5f9023fa61ee8b94f37a93f08e94b136cf1e463 | 182,672,133,543,972,130,000,000,000,000,000,000,000 | 35 | can: bcm: delay release of struct bcm_op after synchronize_rcu()
can_rx_register() callbacks may be called concurrently to the call to
can_rx_unregister(). The callbacks and callback data, though, are
protected by RCU and the struct sock reference count.
So the callback data is really attached to the life of sk, mean... |
CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
{
struct SingleRequest *k = &data->req;
if(conn) {
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
use */
/* if the protocol used doesn't support wildcards, switch it off */
... | 0 | [
"CWE-416"
] | curl | 81d135d67155c5295b1033679c606165d4e28f3f | 94,022,458,550,203,370,000,000,000,000,000,000,000 | 45 | Curl_close: clear data->multi_easy on free to avoid use-after-free
Regression from b46cfbc068 (7.59.0)
CVE-2018-16840
Reported-by: Brian Carpenter (Geeknik Labs)
Bug: https://curl.haxx.se/docs/CVE-2018-16840.html |
jas_matrix_t *jas_matrix_create(int numrows, int numcols)
{
jas_matrix_t *matrix;
int i;
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
return 0;
}
matrix->flags_ = 0;
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
matrix->rows_ = 0;
matrix->maxrows_ = numrows;
matrix->data_ = 0;
matrix->dat... | 1 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 60,119,243,757,426,160,000,000,000,000,000,000,000 | 47 | 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... |
bool LReference::canStoreWithoutSideEffects() const {
return kind_ == Kind::VarOrGlobal && llvh::isa<Variable>(base_);
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 153,117,115,345,893,730,000,000,000,000,000,000,000 | 3 | 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... |
CIRCNetwork::CIRCNetwork(CUser* pUser, const CString& sName)
: m_sName(sName),
m_pUser(nullptr),
m_sNick(""),
m_sAltNick(""),
m_sIdent(""),
m_sRealName(""),
m_sBindHost(""),
m_sEncoding(""),
m_sQuitMsg(""),
m_ssTrustedFingerprints(),
m_pModules(new CModule... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 55,978,190,144,721,250,000,000,000,000,000,000,000 | 52 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
onigenc_unicode_ctype_code_range(int ctype, const OnigCodePoint* ranges[])
{
if (ctype >= CODE_RANGES_NUM) {
return ONIGERR_TYPE_BUG;
}
if (CodeRangeTableInited == 0) init_code_range_array();
*ranges = CodeRanges[ctype];
return 0;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 107,338,883,418,329,410,000,000,000,000,000,000,000 | 12 | onig-5.9.2 |
dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, struct fp_info *p_fp_info,
gboolean is_common, rlc_info *rlcinf,
void *data)
{
gboolean is_control_frame;
guint8 number_of_subframes;
... | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 137,259,555,230,898,740,000,000,000,000,000,000,000 | 349 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
Item_equal *item_equal)
{
List<Item> eq_list;
Item_func_eq *eq_item= 0;
if (((Item *) item_equal)->const_item() && !item_equal->val_int())
return new (thd->mem_root) Item_bool(thd, false);
Item *item_const=... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 164,540,277,094,096,260,000,000,000,000,000,000,000 | 183 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
static void ssl_log_flush(pn_transport_t* transport)
{
char buf[128]; // see "man ERR_error_string_n()"
unsigned long err = ERR_get_error();
while (err) {
ERR_error_string_n(err, buf, sizeof(buf));
ssl_log(transport, "%s", buf);
err = ERR_get_error();
}
} | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 152,529,981,809,494,200,000,000,000,000,000,000,000 | 10 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
dnsc_parse_certs(struct dnsc_env *env, struct config_file *cfg)
{
struct config_strlist *head, *head2;
size_t signed_cert_id;
size_t rotated_cert_id;
char *nm;
env->signed_certs_count = 0U;
env->rotated_certs_count = 0U;
for (head = cfg->dnscrypt_provider_cert; head; head = head->next) {
env->signed_certs_cou... | 0 | [
"CWE-190"
] | unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 197,025,315,670,459,400,000,000,000,000,000,000,000 | 42 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. |
static inline void disable_gif(struct vcpu_svm *svm)
{
if (vgif_enabled(svm))
svm->vmcb->control.int_ctl &= ~V_GIF_MASK;
else
svm->vcpu.arch.hflags &= ~HF_GIF_MASK;
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 142,292,350,154,931,650,000,000,000,000,000,000,000 | 7 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
xsltCommentComp(xsltStylesheetPtr style, xmlNodePtr inst) {
#ifdef XSLT_REFACTORED
xsltStyleItemCommentPtr comp;
#else
xsltStylePreCompPtr comp;
#endif
if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
return;
#ifdef XSLT_REFACTORED
comp = (xsltStyleItemCommentPtr) xsltNewSty... | 0 | [] | libxslt | 7ca19df892ca22d9314e95d59ce2abdeff46b617 | 212,508,198,284,891,400,000,000,000,000,000,000,000 | 21 | Fix for type confusion in preprocessing attributes
CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
We need to check that the parent node is an element before dereferencing
its namespace |
const Header& Binary::header() const {
return header_;
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 284,863,360,840,393,200,000,000,000,000,000,000,000 | 3 | Resolve #764 |
void get_adif_header(adif_header *adif, bitfile *ld)
{
uint8_t i;
/* adif_id[0] = */ faad_getbits(ld, 8
DEBUGVAR(1,106,"get_adif_header(): adif_id[0]"));
/* adif_id[1] = */ faad_getbits(ld, 8
DEBUGVAR(1,107,"get_adif_header(): adif_id[1]"));
/* adif_id[2] = */ faad_getbits(ld, 8
... | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 74,139,052,565,367,330,000,000,000,000,000,000,000 | 47 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
{
switch (codec_id) {
case AV_CODEC_ID_8SVX_EXP:
case AV_CODEC_ID_8SVX_FIB:
case AV_CODEC_ID_ADPCM_CT:
case AV_CODEC_ID_ADPCM_IMA_APC:
case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
case AV_CODEC_ID_ADPCM_IMA_OKI:
case AV_CODEC_ID_ADPCM_IMA_... | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 202,459,582,097,383,170,000,000,000,000,000,000,000 | 49 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static int gdColorMatch(gdImagePtr im, int col1, int col2, float threshold)
{
const int dr = gdImageRed(im, col1) - gdImageRed(im, col2);
const int dg = gdImageGreen(im, col1) - gdImageGreen(im, col2);
const int db = gdImageBlue(im, col1) - gdImageBlue(im, col2);
const int da = gdImageAlpha(im, col1) - gdImageAlpha... | 0 | [
"CWE-189"
] | php-src | 8f4a5373bb71590352fd934028d6dde5bc18530b | 159,349,102,130,965,020,000,000,000,000,000,000,000 | 11 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
Initial fix was PHP stuff
This one is libgd fix.
- filter invalid crop size
- dont try to copy on invalid position
- fix crop size when out of src image
- fix possible NULL deref
- fix possible integer overfloow |
auth_line_is_valid (guint8 *line, guint8 *line_end)
{
guint8 *p;
for (p = line; p < line_end; p++)
{
if (!_DBUS_ISASCII(*p))
return FALSE;
/* Technically, the dbus spec allows all ASCII characters, but for robustness we also
fail if we see any control characters. Such low values w... | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 243,779,597,657,568,500,000,000,000,000,000,000,000 | 25 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
char *argument)
{
switch(optid) {
case OPT_CHARSETS_DIR:
strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
charsets_dir = mysql_charsets_dir;
break;
case OPT_DELIMITER:
if (argument == disabl... | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 186,136,066,221,343,960,000,000,000,000,000,000,000 | 164 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec) |
static int wait_til_done(void (*handler)(void), bool interruptible)
{
int ret;
schedule_bh(handler);
if (interruptible)
wait_event_interruptible(command_done, command_status >= 2);
else
wait_event(command_done, command_status >= 2);
if (command_status < 2) {
cancel_activity();
cont = &intr_cont;
reset... | 0 | [
"CWE-416"
] | linux | 233087ca063686964a53c829d547c7571e3f67bf | 278,493,295,849,534,340,000,000,000,000,000,000,000 | 27 | floppy: disable FDRAWCMD by default
Minh Yuan reported a concurrency use-after-free issue in the floppy code
between raw_cmd_ioctl and seek_interrupt.
[ It turns out this has been around, and that others have reported the
KASAN splats over the years, but Minh Yuan had a reproducer for it and
so gets primary credi... |
unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
u32 ordinal)
{
int duration_idx = TPM_UNDEFINED;
int duration = 0;
if (ordinal < TPM_MAX_ORDINAL)
duration_idx = tpm_ordinal_duration[ordinal];
else if ((ordinal & TPM_PROTECTED_ORDINAL_MASK) <
TPM_MAX_PROTECTED_ORDINAL)
duration_idx =
... | 0 | [
"CWE-200"
] | linux | 1309d7afbed112f0e8e90be9af975550caa0076b | 111,654,789,205,503,230,000,000,000,000,000,000,000 | 21 | char/tpm: Fix unitialized usage of data buffer
This patch fixes information leakage to the userspace by initializing
the data buffer to zero.
Reported-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com>
[ Also re... |
static int calc_max_log2_tile_cols(int Sb64Cols) {
int maxLog2 = 1;
while ((Sb64Cols >> maxLog2) >= VP9_MIN_TILE_WIDTH_B64)
maxLog2++;
return maxLog2 - 1;
} | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 53,281,998,238,697,780,000,000,000,000,000,000,000 | 7 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
int sftp_seek(sftp_file file, uint32_t new_offset) {
if (file == NULL) {
return -1;
}
file->offset = new_offset;
file->eof = 0;
return 0;
} | 0 | [] | libssh | 4d8420f3282ed07fc99fc5e930c17df27ef1e9b2 | 309,396,348,100,915,760,000,000,000,000,000,000,000 | 10 | sftp: Fix bug in sftp_mkdir not returning on error.
resolves: #84
(cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44) |
HttpStateData::start()
{
if (!sendRequest()) {
debugs(11, 3, "httpStart: aborted");
mustStop("HttpStateData::start failed");
return;
}
++ statCounter.server.all.requests;
++ statCounter.server.http.requests;
/*
* We used to set the read timeout here, but not any more.
... | 0 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 131,525,201,934,382,910,000,000,000,000,000,000,000 | 17 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... |
static GF_Node *lsr_read_selector(GF_LASeRCodec *lsr)
{
u32 flag;
GF_Node *elt = gf_node_new(lsr->sg, TAG_LSR_selector);
lsr_read_id(lsr, elt);
lsr_read_rare_full(lsr, elt);
lsr_read_fill(lsr, elt);
lsr_read_stroke(lsr, elt);
lsr_read_eRR(lsr, elt);
GF_LSR_READ_INT(lsr, flag, 1, "hasChoice");
if (flag) {
GF_... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 234,855,840,289,945,460,000,000,000,000,000,000,000 | 25 | fixed #2213 |
static const char *state_text(enum conn_states state) {
const char* const statenames[] = { "conn_listening",
"conn_new_cmd",
"conn_waiting",
"conn_read",
"conn_... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 88,710,085,308,067,420,000,000,000,000,000,000,000 | 15 | CVE reported by cisco talos |
R_API bool r_str_glob(const char* str, const char *glob) {
const char* cp = NULL, *mp = NULL;
if (!glob || !strcmp (glob, "*")) {
return true;
}
if (!strchr (glob, '*')) {
if (*glob == '^') {
glob++;
while (*... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 133,697,011,603,981,100,000,000,000,000,000,000,000 | 51 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
static void mp_set_termios(struct tty_struct *tty, struct MP_TERMIOS *old_termios)
{
struct sb_uart_state *state = tty->driver_data;
unsigned long flags;
unsigned int cflag = tty->termios.c_cflag;
#define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
if ((cflag ^ old_termios->c_cflag) == 0... | 0 | [
"CWE-200"
] | linux | a8b33654b1e3b0c74d4a1fed041c9aae50b3c427 | 186,248,622,193,925,100,000,000,000,000,000,000,000 | 41 | Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Li... |
DLLIMPORT double cfg_getfloat(cfg_t *cfg, const char *name)
{
return cfg_getnfloat(cfg, name, 0);
} | 0 | [] | libconfuse | d73777c2c3566fb2647727bb56d9a2295b81669b | 118,733,963,418,450,470,000,000,000,000,000,000,000 | 4 | Fix #163: unterminated username used with getpwnam()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com> |
parser_free(PyST_Object *st)
{
PyNode_Free(st->st_node);
PyObject_Del(st);
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 154,814,068,069,658,280,000,000,000,000,000,000,000 | 5 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
void calculateMasterVolume()
{
if (lastPeakValue)
{
float v = 32768.0f*(1<<mixerShift) / (float)lastPeakValue;
masterVolume = (mp_sint32)((float)masterVolume*v);
if (masterVolume > 256)
masterVolume = 256;
}
} | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 54,150,290,944,229,060,000,000,000,000,000,000,000 | 10 | Fix use-after-free in PlayerGeneric destructor |
OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec)
{
if ((l_tilec->data == 00) || ((l_tilec->data_size_needed > l_tilec->data_size) && (l_tilec->ownsData == OPJ_FALSE))) {
l_tilec->data = (OPJ_INT32 *) opj_malloc(l_tilec->data_size_needed);
if (! l_tilec->data ) {
return OPJ_FALSE;
}
/*fpri... | 0 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 93,850,564,128,763,930,000,000,000,000,000,000,000 | 30 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
void close_files()
{
DBUG_ENTER("close_files");
for (; cur_file >= file_stack; cur_file--)
{
if (cur_file->file && cur_file->file != stdin)
{
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
fclose(cur_file->file);
}
my_free(cur_file->file_name);
cur_file->file_name= ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 338,103,854,783,060,770,000,000,000,000,000,000,000 | 15 | 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... |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
OpData* op_data = reinterpret_cast<OpData*>(node->user_data);
int num_inputs = node->inputs->size;
// The number of outputs should be the same as number of inputs.
TF_LITE_ENSURE_EQ(context, node->outputs->size, num_inputs);
// Check subgraph i... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 296,630,358,833,971,330,000,000,000,000,000,000,000 | 84 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
S_with_queued_errors(pTHX_ SV *ex)
{
PERL_ARGS_ASSERT_WITH_QUEUED_ERRORS;
if (PL_errors && SvCUR(PL_errors) && !SvROK(ex)) {
sv_catsv(PL_errors, ex);
ex = sv_mortalcopy(PL_errors);
SvCUR_set(PL_errors, 0);
}
return ex;
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 58,062,524,364,261,240,000,000,000,000,000,000,000 | 10 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
static int cpu_cfs_quota_write_s64(struct cgroup_subsys_state *css,
struct cftype *cftype, s64 cfs_quota_us)
{
return tg_set_cfs_quota(css_tg(css), cfs_quota_us);
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 25,823,716,248,879,495,000,000,000,000,000,000,000 | 5 | 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... |
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op2;
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
fun... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 8,102,772,900,912,067,000,000,000,000,000,000,000 | 55 | - 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 |
GF_Err paen_Read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read(s, bs, fiin_AddBox);
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 258,370,164,157,748,900,000,000,000,000,000,000,000 | 4 | fixed 2 possible heap overflows (inc. #1088) |
bgp_clear ()
{
if (bgpids.storage == 0 || bgpids.nalloc == 0)
return;
free (bgpids.storage);
bgpids.storage = 0;
bgpids.nalloc = 0;
bgpids.head = 0;
bgpids.npid = 0;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 128,040,720,391,427,170,000,000,000,000,000,000,000 | 13 | bash-4.4-rc2 release |
static void v9fs_readlink(void *opaque)
{
V9fsPDU *pdu = opaque;
size_t offset = 7;
V9fsString target;
int32_t fid;
int err = 0;
V9fsFidState *fidp;
err = pdu_unmarshal(pdu, offset, "d", &fid);
if (err < 0) {
goto out_nofid;
}
trace_v9fs_readlink(pdu->tag, pdu->id, fid);... | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 339,462,120,163,207,200,000,000,000,000,000,000,000 | 38 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
PHP_MINIT_FUNCTION(imagetypes)
{
REGISTER_LONG_CONSTANT("IMAGETYPE_GIF", IMAGE_FILETYPE_GIF, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMAGETYPE_JPEG", IMAGE_FILETYPE_JPEG, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMAGETYPE_PNG", IMAGE_FILETYPE_PNG, CONST_CS | CONST_PER... | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 7,529,168,399,047,443,000,000,000,000,000,000,000 | 26 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
static int pragmaVtabOpen(sqlite3_vtab *pVtab, sqlite3_vtab_cursor **ppCursor){
PragmaVtabCursor *pCsr;
pCsr = (PragmaVtabCursor*)sqlite3_malloc(sizeof(*pCsr));
if( pCsr==0 ) return SQLITE_NOMEM;
memset(pCsr, 0, sizeof(PragmaVtabCursor));
pCsr->base.pVtab = pVtab;
*ppCursor = &pCsr->base;
return SQLITE_OK... | 0 | [
"CWE-754"
] | sqlite | ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd | 324,175,682,611,144,000,000,000,000,000,000,000,000 | 9 | Fix the NOT NULL verification logic in PRAGMA integrity_check so that it
works for generated columns whose value is the result of a comparison operator.
Ticket [bd8c280671ba44a7]
FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400 |
int main(int argc, char *argv[])
{
int fd, n, pid, request, ret;
char *me, *newname;
struct user_nic_args args;
int container_veth_ifidx = -1, host_veth_ifidx = -1, netns_fd = -1;
char *cnic = NULL, *nicname = NULL;
struct alloted_s *alloted = NULL;
if (argc < 7 || argc > 8) {
usage(argv[0], true);
exit(EXI... | 0 | [
"CWE-417"
] | lxc | 5eb45428b312e978fb9e294dde16efb14dd9fa4d | 158,880,088,317,529,690,000,000,000,000,000,000,000 | 210 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
void TABLE_LIST::set_check_materialized()
{
DBUG_ENTER("TABLE_LIST::set_check_materialized");
SELECT_LEX_UNIT *derived= this->derived;
if (view)
derived= &view->unit;
DBUG_ASSERT(derived);
DBUG_ASSERT(!derived->is_excluded());
if (!derived->first_select()->exclude_from_table_unique_test)
derived->se... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 19,121,780,732,100,985,000,000,000,000,000,000,000 | 21 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
unsigned int nr_pages;
unsigned int nr_freed;
size_t offset;
struct page *pages[PIPE_DEF_BUFFERS];
struct partial_page partial[PIPE_DEF_BUFFERS];
struct iovec *vec, __vec[PIPE_... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 119,373,601,284,062,830,000,000,000,000,000,000,000 | 95 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
static void call_trans2ioctl(connection_struct *conn,
struct smb_request *req,
char **pparams, int total_params,
char **ppdata, int total_data,
unsigned int max_data_bytes)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
char *pdata = *ppdata;
files... | 0 | [
"CWE-787"
] | samba | 22b4091924977f6437b59627f33a8e6f02b41011 | 57,561,895,726,364,940,000,000,000,000,000,000,000 | 57 | CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs
This is an internal xattr that should not be user visible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static int set_bit_to_user(int nr, void __user *addr)
{
unsigned long log = (unsigned long)addr;
struct page *page;
void *base;
int bit = nr + (log % PAGE_SIZE) * 8;
int r;
r = get_user_pages_fast(log, 1, FOLL_WRITE, &page);
if (r < 0)
return r;
BUG_ON(r != 1);
base = kmap_atomic(page);
set_bit(bit, base);... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 55,229,292,690,750,060,000,000,000,000,000,000,000 | 19 | 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... |
virtual ~Rewritable_query_parameter() { } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 239,811,412,987,216,540,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static void set_qpdf_options(QPDF& pdf, Options& o)
{
if (o.ignore_xref_streams)
{
pdf.setIgnoreXRefStreams(true);
}
if (o.suppress_recovery)
{
pdf.setAttemptRecovery(false);
}
if (o.password_is_hex_key)
{
pdf.setPasswordIsHexKey(true);
}
if (o.suppress_wa... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 309,138,835,475,986,000,000,000,000,000,000,000,000 | 19 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
prepare_session_removed_closed_stream(nghttp2_session *session,
nghttp2_hd_deflater *deflater) {
int rv;
nghttp2_settings_entry iv;
nghttp2_bufs bufs;
nghttp2_mem *mem;
ssize_t nread;
int i;
nghttp2_stream *stream;
nghttp2_frame_hd hd;
mem = nghttp2_mem_default()... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 316,567,038,543,189,340,000,000,000,000,000,000,000 | 99 | Add nghttp2_option_set_max_outbound_ack |
static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in,
void *out, unsigned long len) {
gcry_cipher_decrypt(cipher->key[0], out, len, in, len);
} | 0 | [
"CWE-310"
] | libssh | e99246246b4061f7e71463f8806b9dcad65affa0 | 240,768,267,938,315,500,000,000,000,000,000,000,000 | 4 | security: fix for vulnerability CVE-2014-0017
When accepting a new connection, a forking server based on libssh forks
and the child process handles the request. The RAND_bytes() function of
openssl doesn't reset its state after the fork, but simply adds the
current process id (getpid) to the PRNG state, which is not g... |
INT AirPDcapInitContext(
PAIRPDCAP_CONTEXT ctx)
{
AIRPDCAP_DEBUG_TRACE_START("AirPDcapInitContext");
if (ctx==NULL) {
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapInitContext", "NULL context", AIRPDCAP_DEBUG_LEVEL_5);
AIRPDCAP_DEBUG_TRACE_END("AirPDcapInitContext");
return AIRPDCAP_RET_UNSUCC... | 0 | [
"CWE-20"
] | wireshark | 9b0b20b8d5f8c9f7839d58ff6c5900f7e19283b4 | 104,766,789,874,974,260,000,000,000,000,000,000,000 | 24 | Make sure EAPOL body is big enough for a EAPOL_RSN_KEY.
A pointer to a EAPOL_RSN_KEY is set on the packet presuming the
whole EAPOL_RSN_KEY is there. That's not always the case for
fuzzed/malicious captures.
Bug: 11585
Change-Id: Ib94b8aceef444c7820e43b969596efdb8dbecccd
Reviewed-on: https://code.wireshark.org/revie... |
bool IsSupported(const NodeDef* node) const override {
return IsTranspose(*node) || IsConjugateTranspose(*node);
} | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 85,608,540,438,390,540,000,000,000,000,000,000,000 | 3 | 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... |
TEST_F(AuthorizationManagerLogOpTest, testDropDatabaseAddsRecoveryUnits) {
authzManager->logOp(&opCtx,
"c",
{"admin", "$cmd"},
BSON("dropDatabase"
<< "1"),
nullptr);
ASSERT_EQ(size_t(1), ... | 0 | [
"CWE-863"
] | mongo | a93cfd354467981c9cf944a4ada748d0226fdfb0 | 329,769,881,513,072,640,000,000,000,000,000,000,000 | 9 | 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) |
BOOL rfx_write_message(RFX_CONTEXT* context, wStream* s, RFX_MESSAGE* message)
{
if (context->state == RFX_STATE_SEND_HEADERS)
{
if (!rfx_compose_message_header(context, s))
return FALSE;
context->state = RFX_STATE_SEND_FRAME_DATA;
}
if (!rfx_write_message_frame_begin(context, s, message) ||
!rfx_writ... | 0 | [
"CWE-125"
] | FreeRDP | 3a06ce058f690b7fc1edad2f352c453376c2ebfe | 120,315,903,563,322,520,000,000,000,000,000,000,000 | 20 | Fixed oob read in rfx_process_message_tileset
Check input data length
Thanks to hac425 CVE-2020-11043 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.