func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int avdtp_close(struct avdtp *session, struct avdtp_stream *stream,
gboolean immediate)
{
struct seid_req req;
int ret;
if (!g_slist_find(session->streams, stream))
return -EINVAL;
if (stream->lsep->state < AVDTP_STATE_OPEN)
return -EINVAL;
if (stream->close_int == TRUE) {
error("avdtp_close: rejecting ... | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 68,261,683,533,911,720,000,000,000,000,000,000,000 | 32 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
PHP_FUNCTION(curl_escape)
{
char *str = NULL, *res = NULL;
size_t str_len = 0;
zval *zid;
php_curl *ch;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &zid, &str, &str_len) == FAILURE) {
return;
}
if ((ch = (php_curl*)zend_fetch_resource(Z_RES_P(zid), le_curl_name, le_curl)) == NULL) {... | 1 | [
"CWE-119",
"CWE-787"
] | php-src | 72dbb7f416160f490c4e9987040989a10ad431c7 | 186,346,076,279,390,250,000,000,000,000,000,000,000 | 22 | Fix bug #72674 - check both curl_escape and curl_unescape |
void ActiveStreamEncoderFilter::do1xxHeaders() {
parent_.encode1xxHeaders(this, *parent_.filter_manager_callbacks_.informationalHeaders());
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 8,435,677,780,268,321,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int tcp_v6_rcv(struct sk_buff *skb)
{
const struct tcphdr *th;
const struct ipv6hdr *hdr;
struct sock *sk;
int ret;
struct net *net = dev_net(skb->dev);
if (skb->pkt_type != PACKET_HOST)
goto discard_it;
/*
* Count it even if it's bad.
*/
TCP_INC_STATS_BH(net, TCP_MIB_INSEGS);
if (!pskb_may_pul... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 103,115,469,897,391,750,000,000,000,000,000,000,000 | 140 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static void free_send_data(pj_ssl_sock_t *ssock, write_data_t *wdata)
{
send_buf_t *buf = &ssock->send_buf;
write_data_t *spl = &ssock->send_pending;
pj_assert(!pj_list_empty(&ssock->send_pending));
/* Free slot from the buffer */
if (spl->next == wdata && spl->prev == wdata) {
/* This is the... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 87,921,796,255,979,320,000,000,000,000,000,000,000 | 49 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
static void cliOutputCommandHelp(struct commandHelp *help, int group) {
printf("\r\n \x1b[1m%s\x1b[0m \x1b[90m%s\x1b[0m\r\n", help->name, help->params);
printf(" \x1b[33msummary:\x1b[0m %s\r\n", help->summary);
printf(" \x1b[33msince:\x1b[0m %s\r\n", help->since);
if (group) {
printf(" \x1b[... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 337,267,550,242,757,880,000,000,000,000,000,000,000 | 8 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
static int needs_empty_write(sector_t block, struct inode *inode)
{
int error;
struct buffer_head bh_map = { .b_state = 0, .b_blocknr = 0 };
bh_map.b_size = 1 << inode->i_blkbits;
error = gfs2_block_map(inode, block, &bh_map, 0);
if (unlikely(error))
return error;
return !buffer_mapped(&bh_map);
} | 1 | [
"CWE-119",
"CWE-787"
] | linux | 64dd153c83743af81f20924c6343652d731eeecb | 294,047,479,550,499,800,000,000,000,000,000,000,000 | 11 | GFS2: rewrite fallocate code to write blocks directly
GFS2's fallocate code currently goes through the page cache. Since it's only
writing to the end of the file or to holes in it, it doesn't need to, and it
was causing issues on low memory environments. This patch pulls in some of
Steve's block allocation work, and u... |
static void convert_trusts_entry(GKeyFile *key_file, void *value)
{
g_key_file_set_boolean(key_file, "General", "Trusted", TRUE);
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 154,712,439,458,924,270,000,000,000,000,000,000,000 | 4 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
__releases(&hb->lock)
{
spin_unlock(&hb->lock);
hb_waiters_dec(hb);
} | 0 | [
"CWE-264",
"CWE-269"
] | linux | e9c243a5a6de0be8e584c604d353412584b592f8 | 136,461,741,919,136,530,000,000,000,000,000,000,000 | 5 | futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1)
If uaddr == uaddr2, then we have broken the rule of only requeueing from
a non-pi futex to a pi futex with this call. If we attempt this, then
dangling pointers may be left for rt_waiter resulting in an expl... |
GF_Err stss_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_SyncSampleBox *ptr = (GF_SyncSampleBox *)s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->size / 4 < ptr->nb_entries || (u64)ptr->nb_entries > (u64)SIZE_MAX/sizeof(u32)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso fi... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 31,521,795,055,903,823,000,000,000,000,000,000,000 | 21 | fixed #2255 |
ip_vs_lookup_dest(struct ip_vs_service *svc, const union nf_inet_addr *daddr,
__be16 dport)
{
struct ip_vs_dest *dest;
/*
* Find the destination for the given service
*/
list_for_each_entry(dest, &svc->destinations, n_list) {
if ((dest->af == svc->af)
&& ip_vs_addr_equal(svc->af, &dest->addr, daddr)... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 04bcef2a83f40c6db24222b27a52892cba39dffb | 17,155,624,872,743,493,000,000,000,000,000,000,000 | 19 | ipvs: Add boundary check on ioctl arguments
The ipvs code has a nifty system for doing the size of ioctl command
copies; it defines an array with values into which it indexes the cmd
to find the right length.
Unfortunately, the ipvs code forgot to check if the cmd was in the
range that the array provides, allowing fo... |
static inline void control_tx_modulation_enable(struct cx23885_dev *dev,
bool enable)
{
cx23888_ir_and_or4(dev, CX23888_IR_CNTRL_REG, ~CNTRL_MOD,
enable ? CNTRL_MOD : 0);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 169,283,351,326,642,760,000,000,000,000,000,000,000 | 6 | media: rc: prevent memory leak in cx23888_ir_probe
In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
static void FVMenuImport(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int empty = fv->b.sf->onlybitmaps && fv->b.sf->bitmaps==NULL;
BDFFont *bdf;
FVImport(fv);
if ( empty && fv->b.sf->bitmaps!=NULL ) {
for ( bdf= fv->b.sf->bitmaps;... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 318,461,176,433,637,360,000,000,000,000,000,000,000 | 10 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
gdata_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
switch (property_id) {
case PROP_PROXY_URI:
gdata_service_set_proxy_uri (GDATA_SERVICE (object), g_value_get_boxed (value));
break;
case PROP_TIMEOUT:
gdata_service_set_timeout (GDATA_SERVICE (object)... | 0 | [
"CWE-20"
] | libgdata | 6799f2c525a584dc998821a6ce897e463dad7840 | 296,473,866,149,472,840,000,000,000,000,000,000,000 | 21 | core: Validate SSL certificates for all connections
This prevents MitM attacks which use spoofed SSL certificates.
Note that this bumps our libsoup requirement to 2.37.91.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535 |
static inline block_t datablock_addr(struct inode *inode,
struct page *node_page, unsigned int offset)
{
struct f2fs_node *raw_node;
__le32 *addr_array;
int base = 0;
bool is_inode = IS_INODE(node_page);
raw_node = F2FS_NODE(node_page);
/* from GC path only */
if (is_inode) {
if (!inode)
base = offset_... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 156,637,043,716,780,100,000,000,000,000,000,000,000 | 21 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
evdev_device_create(struct libinput_seat *seat,
struct udev_device *udev_device)
{
struct libinput *libinput = seat->libinput;
struct evdev_device *device = NULL;
int rc;
int fd;
int unhandled_device = 0;
const char *devnode = udev_device_get_devnode(udev_device);
const char *sysname = udev_device_get_sysn... | 1 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 313,229,520,796,584,900,000,000,000,000,000,000,000 | 109 | 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... |
int slirp_shutdown_wrap(int sockfd, int how)
{
int ret;
ret = shutdown(sockfd, how);
if (ret < 0) {
errno = socket_error();
}
return ret;
} | 0 | [
"CWE-120"
] | libslirp | 30648c03b27fb8d9611b723184216cd3174b6775 | 204,726,187,335,002,330,000,000,000,000,000,000,000 | 9 | util: add slirp_fmt() helpers
Various calls to snprintf() in libslirp assume that snprintf() returns
"only" the number of bytes written (excluding terminating NUL).
https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04
"Upon successful completion, the snprintf() function shall return... |
void ndp_set_log_fn(struct ndp *ndp,
void (*log_fn)(struct ndp *ndp, int priority,
const char *file, int line, const char *fn,
const char *format, va_list args))
{
ndp->log_fn = log_fn;
dbg(ndp, "Custom logging function %p registered.", log_fn);
} | 0 | [
"CWE-284"
] | libndp | a4892df306e0532487f1634ba6d4c6d4bb381c7f | 95,007,319,662,875,520,000,000,000,000,000,000,000 | 8 | libndp: validate the IPv6 hop limit
None of the NDP messages should ever come from a non-local network; as
stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA),
and 8.1. (redirect):
- The IP Hop Limit field has a value of 255, i.e., the packet
could not possibly have been forwarded by a router.
T... |
int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags)
{
return security_ops->task_setuid(id0, id1, id2, flags);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 190,287,860,917,822,880,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... |
int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val,
void *data)
{
struct die_args *args = data;
int ret = NOTIFY_DONE;
if (args->regs && user_mode(args->regs))
return ret;
if (val == DIE_GPF) {
/*
* To be potentially processing a kprobe fault and to
* trust the result fr... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 158,914,945,744,378,240,000,000,000,000,000,000,000 | 21 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
int ERR_GET_REASON(int l)
{
return l & 0xfff;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 321,464,150,892,186,800,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
_equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b)
{
COMPARE_STRING_FIELD(fdwname);
COMPARE_NODE_FIELD(func_options);
COMPARE_NODE_FIELD(options);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 174,985,263,716,366,570,000,000,000,000,000,000,000 | 8 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static int module_sig_check(struct load_info *info, int flags)
{
int err = -ENODATA;
const unsigned long markerlen = sizeof(MODULE_SIG_STRING) - 1;
const char *reason;
const void *mod = info->hdr;
/*
* Require flags == 0, as a module with version information
* removed is no longer the module that was signed
... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 182,335,586,243,271,150,000,000,000,000,000,000,000 | 55 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
XMLRPC_VALUE_TYPE xmlrpc_str_as_type(const char* str) /* {{{ */
{
const char** str_mapping = get_type_str_mapping();
int i;
if (str) {
for (i = 0; i < XMLRPC_TYPE_COUNT; i++) {
if (!strcmp(str_mapping[i], str)) {
return (XMLRPC_VALUE_TYPE) i;
}
}
}
return xmlrpc_none;
} | 0 | [] | php-src | f3c1863aa2721343245b63ac7bd68cfdc3dd41f3 | 223,018,619,813,543,060,000,000,000,000,000,000,000 | 14 | Fixed #70728
Conflicts:
ext/xmlrpc/xmlrpc-epi-php.c |
template<typename t>
CImg<_cimg_Ttfloat> get_solve(const CImg<t>& A) const {
return CImg<_cimg_Ttfloat>(*this,false).solve(A); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 269,847,172,561,041,900,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
int rpc_add_np_marshalers(rpc_connection_t *connection)
{
return rpc_connection_add_message_descriptors(connection, message_descs, sizeof(message_descs) / sizeof(message_descs[0]));
} | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 29,613,242,108,902,690,000,000,000,000,000,000,000 | 4 | Support all the new variables added |
write_to_buf(const char *string, size_t string_len, buf_t *buf)
{
if (!string_len)
return (int)buf->datalen;
check();
while (string_len) {
size_t copy;
if (!buf->tail || !CHUNK_REMAINING_CAPACITY(buf->tail))
buf_add_chunk_with_capacity(buf, string_len, 1);
copy = CHUNK_REMAINING_CAPACITY(b... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 39,216,150,187,277,945,000,000,000,000,000,000,000 | 25 | Log malformed hostnames in socks5 request respecting SafeLogging |
const Hybrid_type_traits_decimal *Hybrid_type_traits_decimal::instance()
{
return &decimal_traits_instance;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 217,880,032,939,229,100,000,000,000,000,000,000,000 | 4 | 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'... |
static int mxf_parse_structural_metadata(MXFContext *mxf)
{
MXFPackage *material_package = NULL;
int i, j, k, ret;
av_log(mxf->fc, AV_LOG_TRACE, "metadata sets count %d\n", mxf->metadata_sets_count);
/* TODO: handle multiple material packages (OP3x) */
for (i = 0; i < mxf->packages_count; i++) {
... | 1 | [
"CWE-125"
] | FFmpeg | bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75 | 281,505,139,662,170,930,000,000,000,000,000,000,000 | 396 | avformat/mxfdec: Fix av_log context
Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
mwifiex_cmd_append_wps_ie(struct mwifiex_private *priv, u8 **buffer)
{
int retLen = 0;
struct mwifiex_ie_types_header ie_header;
if (!buffer || !*buffer)
return 0;
/*
* If there is a wps ie buffer setup, append it to the return
* parameter buffer pointer.
*/
if (priv->wps_ie_len) {
mwifiex_dbg(priv->ad... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 5c455c5ab332773464d02ba17015acdca198f03d | 181,577,075,456,770,950,000,000,000,000,000,000,000 | 34 | mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
mwifiex_cmd_802_11_ad_hoc_start() calls memcpy() without checking
the destination size may trigger a buffer overflower,
which a local user could use to cause denial of service
or the execution of arbitrary code.
Fix it by putting the length chec... |
expand_case_fold_string(Node* node, regex_t* reg)
{
#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8
int r, n, len, alt_num;
int is_ambig, fold_len;
UChar *start, *end, *p;
UChar* foldp;
Node *top_root, *root, *snode, *prev_node;
OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM];
UChar buf[... | 0 | [
"CWE-125"
] | oniguruma | 4d461376bd85e7994835677b2ff453a43c49cd28 | 254,913,534,737,397,600,000,000,000,000,000,000,000 | 173 | don't expand string case folds to alternatives if code length == 1 and byte length is same |
static s32 avc_parse_slice(GF_BitStream *bs, AVCState *avc, Bool svc_idr_flag, AVCSliceInfo *si)
{
s32 pps_id, num_ref_idx_l0_active_minus1 = 0, num_ref_idx_l1_active_minus1 = 0;
/*s->current_picture.reference= h->nal_ref_idc != 0;*/
gf_bs_read_ue_log(bs, "first_mb_in_slice");
si->slice_type = gf_bs_read_ue_log(bs... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 37,130,545,727,332,640,000,000,000,000,000,000,000 | 107 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
bool NodeNameInValues(const std::vector<string>& control_dependencies,
const StringPiece& node_name) {
return std::find(control_dependencies.begin(), control_dependencies.end(),
node_name) != control_dependencies.end();
} | 0 | [
"CWE-125",
"CWE-369",
"CWE-908"
] | tensorflow | 0cc38aaa4064fd9e79101994ce9872c6d91f816b | 98,627,590,299,568,450,000,000,000,000,000,000,000 | 5 | Prevent unitialized memory access in `GraphConstructor::MakeEdge`
The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr... |
int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n)
{
int w,v;
w=n/8;
v=1<<(7-(n&0x07));
if ((a == NULL) || (a->length < (w+1)) || (a->data == NULL))
return(0);
return((a->data[w]&v) != 0);
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 42,999,223,075,020,305,000,000,000,000,000,000,000 | 10 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
flatpak_dir_run_triggers (FlatpakDir *self,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
g_autoptr(GFileEnumerator) dir_enum = NULL;
g_autoptr(GFileInfo) child_info = NULL;
g_autoptr(GFile) triggersdir = NULL;
GError *temp_error... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 307,558,819,983,680,930,000,000,000,000,000,000,000 | 111 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
psf_f2i_clip_array (const float *src, int *dest, int count, int normalize)
{ float normfact, scaled_value ;
normfact = normalize ? (8.0 * 0x10000000) : 1.0 ;
while (--count >= 0)
{ scaled_value = src [count] * normfact ;
if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFFFFFF))
{ dest [count] = 0x7F... | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 63,109,389,945,783,440,000,000,000,000,000,000,000 | 21 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len, int flags)
{
DECLARE_SOCKADDR(struct sockaddr_llc *, uaddr, msg->msg_name);
const int nonblock = flags & MSG_DONTWAIT;
struct sk_buff *skb = NULL;
struct sock *sk = sock->sk;
struct llc_sock *llc = llc_sk(sk);
... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 93,156,726,461,693,200,000,000,000,000,000,000,000 | 165 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int lo_map_grow(struct lo_map *map, size_t new_nelems)
{
struct lo_map_elem *new_elems;
size_t i;
if (new_nelems <= map->nelems) {
return 1;
}
new_elems = g_try_realloc_n(map->elems, new_nelems, sizeof(map->elems[0]));
if (!new_elems) {
return 0;
}
for (i = map-... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 39,913,008,124,608,773,000,000,000,000,000,000,000 | 25 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
static char *var_read_string(AVIOContext *pb, int size)
{
int n;
char *str;
if (size < 0 || size == INT_MAX)
return NULL;
str = av_malloc(size + 1);
if (!str)
return NULL;
n = avio_get_str(pb, size, str, size + 1);
if (n < size)
avio_skip(pb, size - n);
return s... | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 4f05e2e2dc1a89f38cd9f0960a6561083d714f1e | 163,988,246,800,275,780,000,000,000,000,000,000,000 | 16 | avformat/mvdec: Fix DoS due to lack of eof check
Fixes: loop.mv
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int decode_attr_mode(struct xdr_stream *xdr, uint32_t *bitmap, umode_t *mode)
{
uint32_t tmp;
__be32 *p;
int ret = 0;
*mode = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_MODE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_MODE)) {
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
return -E... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 219,907,876,245,733,700,000,000,000,000,000,000,000 | 21 | 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... |
note_request(const char *key, size_t bytes)
{
(void)key;
(void)bytes;
} | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 274,220,721,192,126,920,000,000,000,000,000,000,000 | 5 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static inline int sk_wmem_schedule(struct sock *sk, int size)
{
if (!sk_has_account(sk))
return 1;
return size <= sk->sk_forward_alloc ||
__sk_mem_schedule(sk, size, SK_MEM_SEND);
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 249,064,507,475,875,200,000,000,000,000,000,000,000 | 7 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
void FS_SortFileList(char **filelist, int numfiles) {
int i, j, k, numsortedfiles;
char **sortedlist;
sortedlist = Z_Malloc( ( numfiles + 1 ) * sizeof( *sortedlist ) );
sortedlist[0] = NULL;
numsortedfiles = 0;
for (i = 0; i < numfiles; i++) {
for (j = 0; j < numsortedfiles; j++) {
if (FS_PathCmp(filelist[i... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 73,472,570,723,080,220,000,000,000,000,000,000,000 | 22 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
mod_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 96,214,506,787,970,520,000,000,000,000,000,000,000 | 12 | - 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 |
tparm(const char *string, ...)
{
TPARM_DATA myData;
va_list ap;
char *result = NULL;
_nc_tparm_err = 0;
#ifdef TRACE
TPS(tname) = "tparm";
#endif /* TRACE */
if (tparm_setup(string, &myData) == OK) {
va_start(ap, string);
tparm_copy_valist(&myData, TRUE, ap);
va_end(ap);
result = tparam_... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 134,326,457,268,758,550,000,000,000,000,000,000,000 | 21 | 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... |
ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
{
int err = 0;
struct ip_tunnel_parm p;
struct ip_tunnel_prl prl;
struct ip_tunnel *t;
struct net *net = dev_net(dev);
struct sit_net *sitn = net_generic(net, sit_net_id);
#ifdef CONFIG_IPV6_SIT_6RD
struct ip_tunnel_6rd ip6rd;
#endif
switc... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 290,719,925,814,352,000,000,000,000,000,000,000,000 | 221 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void coroutine_fn v9fs_getlock(void *opaque)
{
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsGetlock glock;
int32_t fid, err = 0;
V9fsPDU *pdu = opaque;
v9fs_string_init(&glock.client_id);
err = pdu_unmarshal(pdu, offset, "dbqqds", &fid, &glock.type,
... | 0 | [
"CWE-362"
] | qemu | 89fbea8737e8f7b954745a1ffc4238d377055305 | 267,752,107,978,987,000,000,000,000,000,000,000,000 | 44 | 9pfs: Fully restart unreclaim loop (CVE-2021-20181)
Depending on the client activity, the server can be asked to open a huge
number of file descriptors and eventually hit RLIMIT_NOFILE. This is
currently mitigated using a reclaim logic : the server closes the file
descriptors of idle fids, based on the assumption that... |
boost::system::error_category& bdecode_category()
{
static bdecode_error_category bdecode_category;
return bdecode_category;
} | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 35,756,071,047,431,330,000,000,000,000,000,000,000 | 5 | fix out-of-bounds read in bdecode
Fixes #2099 |
static int oplea(RAsm *a, ut8 *data, const Opcode *op){
int l = 0;
int mod = 0;
st32 offset = 0;
int reg = 0;
int rm = 0;
if (op->operands[0].type & OT_REGALL &&
op->operands[1].type & (OT_MEMORY | OT_CONSTANT)) {
if (a->bits == 64) {
data[l++] = 0x48;
}
data[l++] = 0x8d;
if (op->operands[1].regs[... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | radare2 | 9b46d38dd3c4de6048a488b655c7319f845af185 | 213,750,680,135,281,300,000,000,000,000,000,000,000 | 51 | Fix #12372 and #12373 - Crash in x86 assembler (#12380)
0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL-
leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- |
mono_gc_finalize_notify (void)
{
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 8eb1189099e02372fd45ca1c67230eccf1edddc0 | 293,377,940,229,156,730,000,000,000,000,000,000,000 | 3 | Implement a reference queue API.
* gc.c: A reference queue allows one to queue
callbcks for when objects are collected.
It allows for safe cleanup of objects that can
only be done when it is effectively collected.
The major difference with regular finalization
is that the collector makes sure the object
was col... |
void Binary::write(std::ostream& os) {
Builder::write(*this, os);
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 141,032,176,119,483,090,000,000,000,000,000,000,000 | 3 | Resolve #764 |
gstd_error(int pri, int min_stat, const char *s)
{
char *t1;
if (gstd_errstring(&t1, min_stat) < 1)
LOG(pri, ("%s: couldn't form GSSAPI error string", s));
else {
LOG(pri, ("%s: %s", s, t1));
free(t1);
}
} | 0 | [
"CWE-400",
"CWE-703"
] | knc | f237f3e09ecbaf59c897f5046538a7b1a3fa40c1 | 124,768,340,422,459,240,000,000,000,000,000,000,000 | 11 | knc: fix a couple of memory leaks.
One of these can be remotely triggered during the authentication
phase which leads to a remote DoS possibility.
Pointed out by: Imre Rad <radimre83@gmail.com> |
_tiff_pop_handlers (void)
{
TIFFSetErrorHandler (orig_error_handler);
TIFFSetWarningHandler (orig_warning_handler);
} | 0 | [] | libgxps | 123dd99c6a1ae2ef6fcb5547e51fa58e8c954b51 | 212,148,420,243,685,870,000,000,000,000,000,000,000 | 5 | gxps-images: fix integer overflow in png decoder |
com_connect(String *buffer, char *line)
{
char *tmp, buff[256];
my_bool save_rehash= opt_rehash;
int error;
bzero(buff, sizeof(buff));
if (buffer)
{
/*
Two null bytes are needed in the end of buff to allow
get_arg to find end of string the second time it's called.
*/
tmp= strmake(bu... | 1 | [] | server | 383007c75d6ef5043fa5781956a6a02b24e2b79e | 148,919,061,023,578,560,000,000,000,000,000,000,000 | 51 | mysql cli: fix USE command quoting
* use proper sql quoting rules for USE, while preserving
as much of historical behavior as possible
* short commands (\u) behave as before |
TEST(ExpressionTypeTest, WithMinKeyValue) {
assertExpectedResults("$type", {{{Value(MINKEY)}, Value("minKey"_sd)}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 170,707,140,803,229,450,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static int vhost_net_buf_produce(struct vhost_net_virtqueue *nvq)
{
struct vhost_net_buf *rxq = &nvq->rxq;
rxq->head = 0;
rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue,
VHOST_RX_BATCH);
return rxq->tail;
} | 0 | [
"CWE-787"
] | linux | e2b3b35eb9896f26c98b9a2c047d9111638059a2 | 293,903,611,433,654,260,000,000,000,000,000,000,000 | 9 | vhost_net: batch used ring update in rx
This patch tries to batched used ring update during RX. This is pretty
fit for the case when guest is much faster (e.g dpdk based
backend). In this case, used ring is almost empty:
- we may get serious cache line misses/contending on both used ring
and used idx.
- at most 1 p... |
__reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
int type, struct posix_acl *acl)
{
char *name;
void *value = NULL;
size_t size = 0;
int error;
switch (type) {
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
if (acl) {
error = posix_acl_equiv_mode(acl, &inode->i... | 1 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 53,379,414,546,019,980,000,000,000,000,000,000,000 | 59 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval *val = &opline->op1.u.constant;
int retval;
if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(e... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 110,510,824,058,599,610,000,000,000,000,000,000,000 | 27 | - 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 |
static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
unsigned int len, i;
int ret = 0;
QCowHeader header;
QemuOpts *opts;
Error *local_err = NULL;
uint64_t ext_end;
uint64_t l1_vm_state_index;
cons... | 1 | [
"CWE-476"
] | qemu | 11b128f4062dd7f89b14abc8877ff20d41b28be9 | 212,699,104,262,143,160,000,000,000,000,000,000,000 | 408 | qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshot... |
HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
{
char *p, *q, *r;
int i, w, x, y, z, count, width;
struct readbuffer *obuf = h_env->obuf;
struct environment *envs = h_env->envs;
Str tmp;
int hseq;
int cmd;
#ifdef ID_EXT
char *id = NULL;
#endif /* ID_EXT */
... | 1 | [
"CWE-119"
] | w3m | ff8510ab954ac5db478964351f6a78891c34f1d8 | 177,652,467,272,237,320,000,000,000,000,000,000,000 | 1,009 | Prevent infinite recursion in HTMLlineproc0
Bug-Debian: https://github.com/tats/w3m/issues/36 |
Unregister given function as __autoload() implementation */
PHP_FUNCTION(spl_autoload_unregister)
{
char *func_name, *error = NULL;
int func_name_len;
char *lc_name = NULL;
zval *zcallable;
int success = FAILURE;
zend_function *spl_func_ptr;
zval *obj_ptr;
zend_fcall_info_cache fcc;
if (zend_parse_parameters... | 1 | [] | php-src | 620ccc9b1a0a593786a364af15d45fd797a6cf1f | 281,765,168,505,510,780,000,000,000,000,000,000,000 | 74 | Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading) |
*/
PHP_METHOD(DateTimeImmutable, modify)
{
zval *object, *new_object;
char *modify;
int modify_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, date_ce_immutable, &modify, &modify_len) == FAILURE) {
RETURN_FALSE;
}
new_object = date_clone_immutable(object TSRMLS_CC... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 70,740,375,195,754,290,000,000,000,000,000,000,000 | 17 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
static inline int UT16_MUL(ut16 *r, ut16 a, ut16 b) {
if (a && UT16_MAX / a < b) {
return 0;
}
if (r) {
*r = a * b;
}
return 1;
} | 0 | [
"CWE-476"
] | radare2 | 1ea23bd6040441a21fbcfba69dce9a01af03f989 | 77,264,308,708,074,830,000,000,000,000,000,000,000 | 9 | Fix #6816 - null deref in r_read_* |
retrieve_select_type (fd_set *set, SCM ports_ready, SCM list_or_vec)
{
SCM answer_list = ports_ready;
if (scm_is_simple_vector (list_or_vec))
{
int i = SCM_SIMPLE_VECTOR_LENGTH (list_or_vec);
while (--i >= 0)
{
answer_list = get_element (set,
SCM_SIMPLE_VECTOR_REF (list_or_vec, i),
... | 0 | [] | guile | 245608911698adb3472803856019bdd5670b6614 | 323,733,098,600,148,700,000,000,000,000,000,000,000 | 27 | Remove 'umask' calls from 'mkdir'.
Fixes <http://bugs.gnu.org/24659>.
* libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is
unbound; instead, use 0777 as the mode. Update docstring to clarify
this.
* doc/ref/posix.texi (File System): Adjust accordingly.
* NEWS: Mention it. |
static void vmxnet3_put_txq_descr(QEMUFile *f, void *pv, size_t size)
{
Vmxnet3TxqDescr *r = pv;
vmxnet3_put_ring_to_file(f, &r->tx_ring);
vmxnet3_put_ring_to_file(f, &r->comp_ring);
qemu_put_byte(f, r->intr_idx);
qemu_put_be64(f, r->tx_stats_pa);
vmxnet3_put_tx_stats_to_file(f, &r->txq_stats);... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 232,567,008,527,579,070,000,000,000,000,000,000,000 | 10 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt)
{
int error= 0;
List_iterator<partition_element> part_it(m_part_info->partitions);
uint num_parts= m_part_info->num_parts;
uint num_subparts= m_part_info->num_subparts;
uint i= 0;
DBUG_ENTER("ha_partition::truncate_partition");
... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 90,683,868,002,819,840,000,000,000,000,000,000,000 | 59 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
static int opensc_get_conf_entry(const char *config)
{
scconf_block *conf_block = NULL, **blocks;
char *buffer = NULL;
char *section = NULL;
char *name = NULL;
char *key = NULL;
int r = 0;
if (ctx->conf == NULL) {
r = ENOENT;
goto cleanup;
}
if ((buffer = strdup(config)) == NULL) {
r = ENOMEM;
goto c... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 110,123,760,042,200,620,000,000,000,000,000,000,000 | 52 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
AcceptConnReq(ptcplstn_t *const pLstn, int *const newSock, prop_t **peerName, prop_t **peerIP)
{
int sockflags;
struct sockaddr_storage addr;
socklen_t addrlen = sizeof(addr);
int iNewSock = -1;
DEFiRet;
*peerName = NULL; /* ensure we know if we don't have one! */
iNewSock = accept(pLstn->sock, (struct sockadd... | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 296,953,416,466,282,060,000,000,000,000,000,000,000 | 70 | net bugfix: potential buffer overrun |
CImg<T>& RGBtoHSL() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"RGBtoHSL(): Instance is not a RGB image.",
cimg_instance);
T *p1 = data(0,0,0,0), *p2 = data(0,0,0,1), *p3 = data(0,0,0,2);
const lon... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 194,585,893,812,604,300,000,000,000,000,000,000,000 | 26 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int huft_build(b, n, s, d, e, t, m)
unsigned *b; /* code lengths in bits (all assumed <= BMAX) */
unsigned n; /* number of codes (assumed <= N_MAX) */
unsigned s; /* number of simple-valued codes (0..s-1) */
ush *d; /* list of base values for non-simple codes */
ush *e... | 0 | [
"CWE-20"
] | gzip | 39a362ae9d9b007473381dba5032f4dfc1744cf2 | 40,435,760,655,553,370,000,000,000,000,000,000,000 | 206 | avoid creating an undersized buffer for the hufts table
A malformed input file can cause gzip to crash with a segmentation
violation or hang in an endless loop.
Reported in <http://bugs.debian.org/507263>.
* NEWS (Bug fixes): Mention it. |
std::string WebContents::GetMediaSourceID(
content::WebContents* request_web_contents) {
auto* frame_host = web_contents()->GetMainFrame();
if (!frame_host)
return std::string();
content::DesktopMediaID media_id(
content::DesktopMediaID::TYPE_WEB_CONTENTS,
content::DesktopMediaID::kNullId,
... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 141,898,196,331,807,500,000,000,000,000,000,000,000 | 26 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
set_optimize_exact(regex_t* reg, OptExact* e)
{
int r;
if (e->len == 0) return 0;
if (e->ignore_case) {
reg->exact = (UChar* )xmalloc(e->len);
CHECK_NULL_RETURN_MEMERR(reg->exact);
xmemcpy(reg->exact, e->s, e->len);
reg->exact_end = reg->exact + e->len;
reg->optimize = OPTIMIZE_STR_IC;
}
... | 0 | [
"CWE-125"
] | oniguruma | 4d461376bd85e7994835677b2ff453a43c49cd28 | 90,961,877,521,868,100,000,000,000,000,000,000,000 | 52 | don't expand string case folds to alternatives if code length == 1 and byte length is same |
SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
const char *path_p,
SMB_ACL_TYPE_T type)
{
VFS_FIND(sys_acl_get_file);
return handle->fns->sys_acl_get_file(handle, path_p, type);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 28,209,885,377,303,480,000,000,000,000,000,000,000 | 7 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
ofputil_encode_group_desc_request(enum ofp_version ofp_version,
uint32_t group_id)
{
struct ofpbuf *request;
switch (ofp_version) {
case OFP10_VERSION:
ovs_fatal(0, "dump-groups needs OpenFlow 1.1 or later "
"(\'-O OpenFlow11\')");
case OFP... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 8,373,059,681,855,433,000,000,000,000,000,000,000 | 31 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static void do_key_event(VncState *vs, int down, int keycode, int sym)
{
/* QEMU console switch */
switch(keycode) {
case 0x2a: /* Left Shift */
case 0x36: /* Right Shift */
case 0x1d: /* Left CTRL */
case 0x9d: ... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 40,269,081,286,302,500,000,000,000,000,000,000,000 | 185 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
static void *softnet_seq_start(struct seq_file *seq, loff_t *pos)
{
return softnet_get_online(pos);
} | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 41,300,986,229,232,612,000,000,000,000,000,000,000 | 4 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
loop(void)
{
enum {
ST_COMMAND,
ST_TRANSPARENT
} state;
fd_set rdset, wrset;
int r, n;
unsigned char c;
tty_q.len = 0;
state = ST_TRANSPARENT;
while ( ! sig_exit ) {
FD_ZERO(&rdset);
FD_ZERO(&wrset);
FD_SET(STI, &rdset);
FD_SET(tty_fd, &rdset);
if ( tty_q.len ) FD_SET(tty_fd, &wrset);
r = sel... | 0 | [
"CWE-77",
"CWE-125"
] | picocom | 1ebc60b20fbe9a02436d5cbbf8951714e749ddb1 | 313,348,835,030,693,200,000,000,000,000,000,000,000 | 120 | Do not use "/bin/sh" to run external commands.
Picocom no longer uses /bin/sh to run external commands for
file-transfer operations. Parsing the command line and spliting it into
arguments is now performed internally by picocom, using quoting rules
very similar to those of the Unix shell. Hopefully, this makes it
impo... |
static void append_to_textview(GtkTextView *tv, const char *str)
{
GtkTextBuffer *tb = gtk_text_view_get_buffer(tv);
/* Ensure we insert text at the end */
GtkTextIter text_iter;
gtk_text_buffer_get_end_iter(tb, &text_iter);
gtk_text_buffer_place_cursor(tb, &text_iter);
/* Deal with possible b... | 0 | [
"CWE-200"
] | libreport | 257578a23d1537a2d235aaa2b1488ee4f818e360 | 171,636,662,619,930,000,000,000,000,000,000,000,000 | 50 | wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was passed to the bugzilla bug
report.
report-gtk saves the first text view buffer and then reloads data from the
reported problem directory... |
unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1, char* phash, unsigned int& nHashesDone)
{
unsigned int& nNonce = *(unsigned int*)(pdata + 12);
for (;;)
{
// Crypto++ SHA-256
// Hash pdata using pmidstate as the starting state into
// preformatted buf... | 0 | [
"CWE-16",
"CWE-787"
] | bitcoin | a206b0ea12eb4606b93323268fc81a4f1f952531 | 215,479,317,802,933,430,000,000,000,000,000,000,000 | 25 | Do not allow overwriting unspent transactions (BIP 30)
Introduce the following network rule:
* a block is not valid if it contains a transaction whose hash
already exists in the block chain, unless all that transaction's
outputs were already spent before said block.
Warning: this is effectively a network rule ... |
finish_bgprint(fz_context *ctx)
{
int status;
if (!bgprint.active)
return;
/* If we are using it, then wait for it to finish. */
status = wait_for_bgprint_to_finish();
if (status == RENDER_OK)
{
/* The background bgprint completed successfully. */
return;
}
if (status == RENDER_FATAL)
{
/* We failed... | 0 | [
"CWE-369",
"CWE-22"
] | mupdf | 22c47acbd52949421f8c7cb46ea1556827d0fcbf | 95,044,786,720,467,290,000,000,000,000,000,000,000 | 30 | Bug 704834: Fix division by zero for zero width pages in muraster. |
static void init_busid_table(void)
{
/*
* This also sets the bus_table[i].status to
* STUB_BUSID_OTHER, which is 0.
*/
memset(busid_table, 0, sizeof(busid_table));
spin_lock_init(&busid_table_lock);
} | 1 | [
"CWE-362"
] | linux | 22076557b07c12086eeb16b8ce2b0b735f7a27e7 | 318,893,677,485,477,700,000,000,000,000,000,000,000 | 10 | usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
usbip_host updates device status without holding lock from stub probe,
disconnect and rebind code paths. When multiple requests to import a
device are received, these unprotected code paths step all over each
other and drive fails with NULL-ptr deref and ... |
static struct trusted_key_payload *trusted_payload_alloc(struct key *key)
{
struct trusted_key_payload *p = NULL;
int ret;
ret = key_payload_reserve(key, sizeof *p);
if (ret < 0)
return p;
p = kzalloc(sizeof *p, GFP_KERNEL);
if (p)
p->migratable = 1; /* migratable by default */
return p;
} | 0 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | linux | 096fe9eaea40a17e125569f9e657e34cdb6d73bd | 233,500,660,533,256,280,000,000,000,000,000,000,000 | 13 | KEYS: Fix handling of stored error in a negatively instantiated user key
If a user key gets negatively instantiated, an error code is cached in the
payload area. A negatively instantiated key may be then be positively
instantiated by updating it with valid data. However, the ->update key
type method must be aware th... |
parser_parse_array_initializer (parser_context_t *context_p, /**< context */
parser_pattern_flags_t flags) /**< flags */
{
parser_pattern_end_marker_t end_pos = parser_pattern_get_target (context_p, flags);
lexer_next_token (context_p);
parser_emit_cbc_ext (context_p, CBC_EXT_ITER... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 2,904,145,541,818,212,000,000,000,000,000,000,000 | 46 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
XML_GetInputContext(XML_Parser parser, int *offset, int *size)
{
#ifdef XML_CONTEXT_BYTES
if (parser == NULL)
return NULL;
if (parser->m_eventPtr && parser->m_buffer) {
if (offset != NULL)
*offset = (int)(parser->m_eventPtr - parser->m_buffer);
if (size != NULL)
*size = (int)(parser->m_buf... | 0 | [
"CWE-611"
] | libexpat | 11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 | 199,600,390,013,256,320,000,000,000,000,000,000,000 | 19 | xmlparse.c: Fix extraction of namespace prefix from XML name (#186) |
ExecASTruncateTriggers(EState *estate, ResultRelInfo *relinfo)
{
TriggerDesc *trigdesc = relinfo->ri_TrigDesc;
if (trigdesc && trigdesc->trig_truncate_after_statement)
AfterTriggerSaveEvent(estate, relinfo, TRIGGER_EVENT_TRUNCATE,
false, NULL, NULL, NIL, NULL);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 227,772,792,018,719,600,000,000,000,000,000,000,000 | 8 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
vte_sequence_handler_set_scrolling_region_to_end (VteTerminal *terminal, GValueArray *params)
{
GValue value = {0};
g_value_init (&value, G_TYPE_LONG);
g_value_set_long (&value, 0); /* Out of range means start/end */
g_value_array_insert (params, 1, &value);
vte_sequence_handler_offset(terminal, params, -1, vte... | 0 | [] | vte | 8b971a7b2c59902914ecbbc3915c45dd21530a91 | 158,932,926,800,441,100,000,000,000,000,000,000,000 | 11 | Fix terminal title reporting
Fixed CVE-2003-0070 again.
See also http://marc.info/?l=bugtraq&m=104612710031920&w=2 .
(cherry picked from commit 6042c75b5a6daa0e499e61c8e07242d890d38ff1) |
update_description_for_link (NautilusFile *file, char *string)
{
char *res;
if (nautilus_file_is_symbolic_link (file)) {
g_assert (!nautilus_file_is_broken_symbolic_link (file));
if (string == NULL) {
return g_strdup (_("link"));
}
/* Note to localizers: convert file type string for file
* (e.g. "fol... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 263,612,059,209,592,830,000,000,000,000,000,000,000 | 20 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
char* GetSignatureName(const char* path, const char* country_code, BOOL bSilent)
{
static char szSubjectName[128];
char szCountry[3] = "__";
char *p = NULL, *mpath = NULL;
int i;
BOOL r;
HCERTSTORE hStore = NULL;
HCRYPTMSG hMsg = NULL;
PCCERT_CONTEXT pCertContext = NULL;
DWORD dwSize, dwEncoding, dwContentType... | 0 | [
"CWE-94"
] | rufus | 19472668370aacec0dba9dda306601cfc4a4ed7e | 97,096,338,378,603,160,000,000,000,000,000,000,000 | 123 | [pki] don't link with wintrust.lib
* WinTrust.lib is responsible for the MSASN1.dll sideloading issue described in #1877,
so, since we only use it for WinVerifyTrustEx(), hook into that function manually.
* Closes #1877 for the MinGW side.
* Note that we will probably try to use the method suggested by @assarbad and... |
has_function_privilege_name_id(PG_FUNCTION_ARGS)
{
Name username = PG_GETARG_NAME(0);
Oid functionoid = PG_GETARG_OID(1);
text *priv_type_text = PG_GETARG_TEXT_P(2);
Oid roleid;
AclMode mode;
AclResult aclresult;
roleid = get_role_oid_or_public(NameStr(*username));
mode = convert_function_priv_string(... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 104,730,423,563,737,640,000,000,000,000,000,000,000 | 19 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val)
{
if (!f6i)
return;
if (f6i->fib6_metrics == &dst_default_metrics) {
struct dst_metrics *p = kzalloc(sizeof(*p), GFP_ATOMIC);
if (!p)
return;
refcount_set(&p->refcnt, 1);
f6i->fib6_metrics = p;
}
f6i->fib6_metrics->metrics[metric - 1]... | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 273,383,221,568,074,520,000,000,000,000,000,000,000 | 17 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
int uECC_compute_public_key(const uint8_t *private_key, uint8_t *public_key, uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
uECC_word_t *_private = (uECC_word_t *)private_key;
uECC_word_t *_public = (uECC_word_t *)public_key;
#else
uECC_word_t _private[uECC_MAX_WORDS];
uECC_word_t _public[uECC_MA... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 116,283,310,051,913,860,000,000,000,000,000,000,000 | 34 | Fix for #168 |
vte_sequence_handler_decset_internal(VteTerminal *terminal,
int setting,
gboolean restore,
gboolean save,
gboolean set)
{
gboolean recognized = FALSE;
gpointer p;
guint i;
struct {
int setting;
gboolean *bvalue;
gint *ivalue;
gpointer *pvalue;
gpointer fvalue;
gpointe... | 0 | [] | vte | 8b971a7b2c59902914ecbbc3915c45dd21530a91 | 43,481,448,472,593,490,000,000,000,000,000,000,000 | 331 | Fix terminal title reporting
Fixed CVE-2003-0070 again.
See also http://marc.info/?l=bugtraq&m=104612710031920&w=2 .
(cherry picked from commit 6042c75b5a6daa0e499e61c8e07242d890d38ff1) |
TPM2B_SENSITIVE_CREATE_Unmarshal(TPM2B_SENSITIVE_CREATE *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
INT32 startSize;
if (rc == TPM_RC_SUCCESS) {
rc = UINT16_Unmarshal(&target->size, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
if (target->size == 0) {
rc = TPM_RC_S... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 29,353,198,529,086,836,000,000,000,000,000,000,000 | 27 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
TEST_F(Http1ClientConnectionImplTest, LargeResponseHeadersAccepted) {
initialize();
NiceMock<MockResponseDecoder> response_decoder;
Http::RequestEncoder& request_encoder = codec_->newStream(response_decoder);
TestRequestHeaderMapImpl headers{{":method", "GET"}, {":path", "/"}, {":authority", "host"}};
reques... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 303,587,629,673,306,600,000,000,000,000,000,000,000 | 15 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
void vrend_report_context_error_internal(const char *fname, struct vrend_context *ctx,
enum virgl_ctx_errors error, uint32_t value)
{
ctx->in_error = true;
ctx->last_error = error;
vrend_printf("%s: context error reported %d \"%s\" %s %d\n", fname,
ctx->... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 324,651,651,625,467,100,000,000,000,000,000,000,000 | 9 | 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> |
static int set_evtchn_to_irq(evtchn_port_t evtchn, unsigned int irq)
{
unsigned row;
unsigned col;
if (evtchn >= xen_evtchn_max_channels())
return -EINVAL;
row = EVTCHN_ROW(evtchn);
col = EVTCHN_COL(evtchn);
if (evtchn_to_irq[row] == NULL) {
/* Unallocated irq entries return -1 anyway */
if (irq == -1)
... | 1 | [
"CWE-362",
"CWE-476"
] | linux | 073d0552ead5bfc7a3a9c01de590e924f11b5dd2 | 174,928,840,109,534,150,000,000,000,000,000,000,000 | 26 | xen/events: avoid removing an event channel while handling it
Today it can happen that an event channel is being removed from the
system while the event handling loop is active. This can lead to a
race resulting in crashes or WARN() splats when trying to access the
irq_info structure related to the event channel.
Fix... |
usage_long()
{
fprintf(stderr, usage_longstr, UDP_RATE / (1024*1024), DURATION, DEFAULT_TCP_BLKSIZE / 1024, DEFAULT_UDP_BLKSIZE / 1024);
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 320,203,003,438,888,250,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
xfs_readlink_by_handle(
struct file *parfilp,
xfs_fsop_handlereq_t *hreq)
{
struct dentry *dentry;
__u32 olen;
void *link;
int error;
if (!capable(CAP_SYS_ADMIN))
return -XFS_ERROR(EPERM);
dentry = xfs_handlereq_to_dentry(parfilp, hreq);
if (IS_ERR(dentry))
return PTR_ERR(dentry);
/* Restrict t... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 279,132,227,845,390,100,000,000,000,000,000,000,000 | 46 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
SPL_METHOD(MultipleIterator, current)
{
spl_SplObjectStorage *intern;
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT, return_value TSR... | 1 | [
"CWE-416"
] | php-src | c2e197e4efc663ca55f393bf0e799848842286f3 | 80,825,916,481,975,290,000,000,000,000,000,000,000 | 11 | Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage |
bool Tool::isMongos() {
// TODO: when mongos supports QueryOption_Exaust add a version check (SERVER-2628)
BSONObj isdbgrid;
conn("true").simpleCommand("admin", &isdbgrid, "isdbgrid");
return isdbgrid["isdbgrid"].trueValue();
} | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 86,770,805,900,230,690,000,000,000,000,000,000,000 | 6 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.