func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt,
bool action_completed,
bool drop_partition,
bool frm_install,
bool close_table)
{
partition_info *part_info= lpt->part_info;
THD *thd= lpt... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 260,450,405,081,308,200,000,000,000,000,000,000,000 | 174 | 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. |
bool MainWindow::continueModified()
{
if (isWindowModified()) {
QMessageBox dialog(QMessageBox::Warning,
qApp->applicationName(),
tr("The project has been modified.\n"
"Do you want to save your ... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 86,624,385,207,808,410,000,000,000,000,000,000,000 | 28 | fix upgrade check is not using TLS correctly |
data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
int err = 0, id;
struct sock *sk = sock->sk;
struct mISDNdevice *dev;
struct mISDNversion ver;
switch (cmd) {
case IMGETVERSION:
ver.major = MISDN_MAJOR_VERSION;
ver.minor = MISDN_MINOR_VERSION;
ver.release = MISDN_RELEASE;
if... | 0 | [
"CWE-862"
] | linux | b91ee4aa2a2199ba4d4650706c272985a5a32d80 | 281,834,964,650,157,000,000,000,000,000,000,000,000 | 52 | mISDN: enforce CAP_NET_RAW for raw sockets
When creating a raw AF_ISDN socket, CAP_NET_RAW needs to be checked
first.
Signed-off-by: Ori Nimron <orinimron123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int sieve_fileinto(void *ac,
void *ic __attribute__((unused)),
void *sc,
void *mc,
const char **errmsg __attribute__((unused)))
{
sieve_fileinto_context_t *fc = (sieve_fileinto_context_t *) ac;
script_... | 0 | [
"CWE-269"
] | cyrus-imapd | 673ebd96e2efbb8895d08648983377262f35b3f7 | 3,319,364,972,912,316,000,000,000,000,000,000,000 | 87 | lmtp_sieve: don't create mailbox with admin for sieve autocreate |
void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
int *size)
{
struct xt_target *target = t->u.kernel.target;
struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t;
int pad, off = xt_compat_target_offset(target);
u_int16_t tsize = ct->u.user.target_size;
t = *ds... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 93,861,339,379,038,300,000,000,000,000,000,000,000 | 24 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
struct ewah_bitmap *root,
const unsigned char *sha1,
struct stored_bitmap *xor_with,
int flags)
{
struct stored_bitmap *stored;
khiter_t hash_pos;
int ret;
stored = xmalloc(sizeof(struct stored_bitmap));
stored->root... | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 169,726,189,348,232,200,000,000,000,000,000,000,000 | 29 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
xcf_load_channel_props (XcfInfo *info,
GimpImage *image,
GimpChannel **channel)
{
PropType prop_type;
guint32 prop_size;
while (TRUE)
{
if (! xcf_load_prop (info, &prop_type, &prop_size))
return FALSE;
switch (prop_type)
{
... | 0 | [
"CWE-416"
] | gimp | e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f | 125,555,218,125,229,200,000,000,000,000,000,000,000 | 153 | Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing...
...XCF channel and layer properties
The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION,
PROP_ACTIVE_CHANNEL saves the current object pointer the @info
structure. Others like PROP_SELECTION (for channel) and
PROP_GROUP_ITEM (for layer) will de... |
static void tcp_update_recv_tstamps(struct sk_buff *skb,
struct scm_timestamping_internal *tss)
{
if (skb->tstamp)
tss->ts[0] = ktime_to_timespec64(skb->tstamp);
else
tss->ts[0] = (struct timespec64) {0};
if (skb_hwtstamps(skb)->hwtstamp)
tss->ts[2] = ktime_to_timespec64(skb_hwtstamps(skb)->hwtstamp);... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 156,481,807,114,408,470,000,000,000,000,000,000,000 | 13 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
int file_permission(struct file *file, int mask)
{
return inode_permission(file->f_path.dentry->d_inode, mask);
} | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 26,276,468,000,655,290,000,000,000,000,000,000,000 | 4 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
static int check_clock(const clockid_t which_clock)
{
int error = 0;
struct task_struct *p;
const pid_t pid = CPUCLOCK_PID(which_clock);
if (CPUCLOCK_WHICH(which_clock) >= CPUCLOCK_MAX)
return -EINVAL;
if (pid == 0)
return 0;
read_lock(&tasklist_lock);
p = find_task_by_vpid(pid);
if (!p || !(CPUCLOCK_PER... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 293,028,349,660,222,570,000,000,000,000,000,000,000 | 22 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
DECLARESepPutFunc(putCMYKseparate8bittile)
{
(void) img; (void) y;
for( ; h > 0; --h) {
uint32 rv, gv, bv, kv;
for (x = w; x > 0; --x) {
kv = 255 - *a++;
rv = (kv*(255-*r++))/255;
gv = (kv*(255-*g++))/255;
bv = (kv*(255-*b++))/255;
*cp++ = PACK4(rv,gv,bv,255);
}
SKEW4(r, g, b, a, fromskew);
c... | 0 | [
"CWE-787"
] | libtiff | 4bb584a35f87af42d6cf09d15e9ce8909a839145 | 234,870,759,533,161,250,000,000,000,000,000,000,000 | 16 | RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz |
int tm_atnode(
tm_task_id tid, /* in */
tm_node_id *node) /* out */
{
task_info *tp;
if (!init_done)
return TM_BADINIT;
if ((tp = find_task(tid)) == NULL)
return TM_ENOTFOUND;
*node = tp->t_node;
return TM_SUCCESS;
} | 0 | [
"CWE-264"
] | torque | f2f4c950f3d461a249111c8826da3beaafccace9 | 28,710,239,413,970,670,000,000,000,000,000,000,000 | 18 | TRQ-2885 - limit tm_adopt() to only adopt a session id that
is owned by the calling user. |
socket_flush_if_writable(void)
{
int res;
/* Quick exit if nothing to do */
if (PqSendPointer == PqSendStart)
return 0;
/* No-op if reentrant call */
if (PqCommBusy)
return 0;
/* Temporarily put the socket into non-blocking mode */
socket_set_nonblocking(true);
PqCommBusy = true;
res = internal_flush... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 239,937,990,226,116,640,000,000,000,000,000,000,000 | 20 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
njs_string_bytes_from_string(njs_vm_t *vm, const njs_value_t *string,
const njs_value_t *encoding)
{
njs_str_t enc, str;
if (!njs_is_string(encoding)) {
njs_type_error(vm, "\"encoding\" must be a string");
return NJS_ERROR;
}
njs_string_get(encoding, &enc);
njs_string_get(stri... | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 231,131,666,052,396,100,000,000,000,000,000,000,000 | 27 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
virDomainGetSchedulerParametersFlags(virDomainPtr domain,
virTypedParameterPtr params, int *nparams,
unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%p, flags=%x",
params, npara... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 97,354,818,742,722,930,000,000,000,000,000,000,000 | 42 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static int rbd_dev_image_id(struct rbd_device *rbd_dev)
{
int ret;
size_t size;
CEPH_DEFINE_OID_ONSTACK(oid);
void *response;
char *image_id;
/*
* When probing a parent image, the image id is already
* known (and the image name likely is not). There's no
* need to fetch the image id again in this case. W... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 74,043,854,307,530,660,000,000,000,000,000,000,000 | 69 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
static int qeth_halt_channel(struct qeth_channel *channel)
{
unsigned long flags;
struct qeth_card *card;
int rc;
card = CARD_FROM_CDEV(channel->ccwdev);
QETH_CARD_TEXT(card, 3, "haltch");
spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
rc = ccw_device_halt(channel->ccwdev, QETH_HALT_CHANNEL_PARM);
... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 305,430,918,906,876,150,000,000,000,000,000,000,000 | 22 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
rpc_C_VerifyRecoverInit (CK_X_FUNCTION_LIST *self,
p11_rpc_message *msg)
{
CK_SESSION_HANDLE session;
CK_MECHANISM mechanism;
CK_OBJECT_HANDLE key;
BEGIN_CALL (VerifyRecoverInit);
IN_ULONG (session);
IN_MECHANISM (mechanism);
IN_ULONG (key);
PROCESS_CALL ((self, session, &mechanism,... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 175,453,037,536,059,850,000,000,000,000,000,000,000 | 14 | Check for arithmetic overflows before allocating |
for(inst = pModConf->root ; inst != NULL ; ) {
free(inst->pszBindPort);
free(inst->pszBindPath);
free(inst->pszBindAddr);
free(inst->pszBindRuleset);
free(inst->pszInputName);
free(inst->dfltTZ);
del = inst;
inst = inst->next;
free(del);
} | 0 | [
"CWE-190"
] | rsyslog | 0381a0de64a5a048c3d48b79055bd9848d0c7fc2 | 118,864,052,201,329,900,000,000,000,000,000,000,000 | 11 | imptcp: fix Segmentation Fault when octet count is to high |
static size_t poly_number_terms(double order)
{
/* Return the number of terms for a 2d polynomial */
if ( order < 1 || order > 5 ||
( order != floor(order) && (order-1.5) > MagickEpsilon) )
return 0; /* invalid polynomial order */
return((size_t) floor((order+1)*(order+2)/2));
} | 0 | [] | ImageMagick6 | 4eafab89a2742865d770857a9d7434993f65ae6b | 281,184,995,250,993,100,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/3331 |
ex_helptags(exarg_T *eap)
{
expand_T xpc;
char_u *dirname;
int add_help_tags = FALSE;
// Check for ":helptags ++t {dir}".
if (STRNCMP(eap->arg, "++t", 3) == 0 && VIM_ISWHITE(eap->arg[3]))
{
add_help_tags = TRUE;
eap->arg = skipwhite(eap->arg + 3);
}
if (STRCMP(eap->arg, "ALL") == 0)... | 0 | [
"CWE-122",
"CWE-787"
] | vim | bd228fd097b41a798f90944b5d1245eddd484142 | 117,354,328,720,173,540,000,000,000,000,000,000,000 | 31 | patch 8.2.3669: buffer overflow with long help argument
Problem: Buffer overflow with long help argument.
Solution: Use snprintf(). |
struct hostent *mingw_gethostbyname(const char *host)
{
ensure_socket_initialization();
return gethostbyname(host);
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 202,145,617,682,999,600,000,000,000,000,000,000,000 | 5 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
EXPORTED int mailbox_abort(struct mailbox *mailbox)
{
int r;
#ifdef WITH_DAV
r = mailbox_abort_dav(mailbox);
if (r) return r;
#endif
#ifdef USE_SIEVE
r = mailbox_abort_sieve(mailbox);
if (r) return r;
#endif
/* try to commit sub parts first */
r = mailbox_abort_cache(mailbox);
if (r) ... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 212,420,389,082,393,300,000,000,000,000,000,000,000 | 46 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
no_email_faults_handler(__attribute__((unused))vector_t *strvec)
{
global_data->no_email_faults = true;
} | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 165,316,836,465,698,270,000,000,000,000,000,000,000 | 4 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
add_offset (guint64 offset, guint64 advance)
{
/* Avoid 64-bit overflow by clamping */
if (offset > G_MAXUINT64 - advance)
return G_MAXUINT64;
return offset + advance;
} | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 31,140,212,409,850,390,000,000,000,000,000,000,000 | 7 | qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.
https://bugzilla.gnome.org/show_bug.cgi?id=775451 |
LINETYPE_null(int t)
{
(void) t; /* avoid -Wunused warning */
} | 0 | [
"CWE-787"
] | gnuplot | 963c7df3e0c5266efff260d0dff757dfe03d3632 | 253,080,927,428,727,900,000,000,000,000,000,000,000 | 4 | Better error handling for faulty font syntax
A missing close-quote in an enhanced text font specification could
cause a segfault.
Bug #2303 |
BSONObj makeUndefined() {
BSONObjBuilder b;
b.appendUndefined( "" );
return b.obj();
} | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 87,141,571,942,554,000,000,000,000,000,000,000,000 | 5 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
{
struct SingleRequest *k = &data->req;
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
use */
data->state.done = FALSE; /* *_done() is not called yet */
data->state.expect100header ... | 0 | [
"CWE-119"
] | curl | 9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400 | 146,893,329,590,247,260,000,000,000,000,000,000,000 | 43 | url: fix alignment of ssl_backend_data struct
- Align the array of ssl_backend_data on a max 32 byte boundary.
8 is likely to be ok but I went with 32 for posterity should one of
the ssl_backend_data structs change to contain a larger sized variable
in the future.
Prior to this change (since dev 70f1db3, release 7.5... |
int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc **d)
{
struct sock *sk, *parent;
bdaddr_t src, dst;
int result = 0;
BT_DBG("session %p channel %d", s, channel);
rfcomm_session_getaddr(s, &src, &dst);
/* Check if we have socket listening on channel */
parent = rfcomm_get_sock_by_... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 207,667,171,912,919,400,000,000,000,000,000,000,000 | 49 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
qemuProcessHandleMigrationStatus(qemuMonitorPtr mon G_GNUC_UNUSED,
virDomainObjPtr vm,
int status,
void *opaque)
{
qemuDomainObjPrivatePtr priv;
virQEMUDriverPtr driver = opaque;
virObjectEventPtr event = NULL... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 72,523,344,943,487,420,000,000,000,000,000,000,000 | 50 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
void vrend_set_single_vbo(struct vrend_context *ctx,
uint32_t index,
uint32_t stride,
uint32_t buffer_offset,
uint32_t res_handle)
{
struct vrend_resource *res;
if (ctx->sub->vbo[index].stride != stride ||
... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 318,236,665,925,074,560,000,000,000,000,000,000,000 | 30 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
dofwd(p, pos, value)
register struct parse *p;
register sopno pos;
sop value;
{
/* avoid making error situations worse */
if (p->error != 0)
return;
assert(value < 1<<OPSHIFT);
p->strip[pos] = OP(p->strip[pos]) | value;
} | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 320,227,007,782,617,180,000,000,000,000,000,000,000 | 12 | Fixed bug #68739 #68740 #68741 |
table_map used_tables() const { return (table_map)0L; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 174,905,257,235,089,200,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static void SerializeGltfCamera(const Camera &camera, json &o) {
SerializeStringProperty("type", camera.type, o);
if (!camera.name.empty()) {
SerializeStringProperty("name", camera.name, o);
}
if (camera.type.compare("orthographic") == 0) {
json orthographic;
SerializeGltfOrthographicCamera(camera.... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 24,671,784,192,952,080,000,000,000,000,000,000,000 | 23 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
ConnStateData::sendControlMsg(HttpControlMsg msg)
{
if (!isOpen()) {
debugs(33, 3, HERE << "ignoring 1xx due to earlier closure");
return;
}
// HTTP/1 1xx status messages are only valid when there is a transaction to trigger them
if (!pipeline.empty()) {
HttpReply::Pointer rep(m... | 0 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 31,348,000,387,270,415,000,000,000,000,000,000,000 | 27 | 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 int tipc_recvmsg(struct socket *sock, struct msghdr *m,
size_t buflen, int flags)
{
struct sock *sk = sock->sk;
bool connected = !tipc_sk_type_connectionless(sk);
struct tipc_sock *tsk = tipc_sk(sk);
int rc, err, hlen, dlen, copy;
struct tipc_skb_cb *skb_cb;
struct sk_buff_head xmitq;
struct tipc_msg *... | 0 | [
"CWE-200",
"CWE-909"
] | linux | d6d86830705f173fca6087a3e67ceaf68db80523 | 171,812,445,954,908,360,000,000,000,000,000,000,000 | 116 | net ticp:fix a kernel-infoleak in __tipc_sendmsg()
struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently
copying it to user space,causing kernel-infoleak.
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in instrument_c... |
GF_Err iloc_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i, j, item_count, extent_count;
GF_ItemLocationBox *ptr = (GF_ItemLocationBox *)s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_int(bs, ptr->offset_size, 4);
gf_bs_write_int(bs, ptr->length_size, 4... | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 324,443,446,986,140,440,000,000,000,000,000,000,000 | 45 | fixed #1786 (fuzz) |
i915_gem_execbuffer_retire_commands(struct drm_device *dev,
struct drm_file *file,
struct intel_ring_buffer *ring)
{
struct drm_i915_gem_request *request;
u32 invalidate;
/*
* Ensure that the commands in the batch buffer are
* finished before the interrupt fires.
*
* The sampler always gets ... | 0 | [
"CWE-189"
] | linux-2.6 | ed8cd3b2cd61004cab85380c52b1817aca1ca49b | 161,093,779,264,352,500,000,000,000,000,000,000,000 | 28 | drm/i915: fix integer overflow in i915_gem_execbuffer2()
On 32-bit systems, a large args->buffer_count from userspace via ioctl
may overflow the allocation size, leading to out-of-bounds access.
This vulnerability was introduced in commit 8408c282 ("drm/i915:
First try a normal large kmalloc for the temporary exec bu... |
int fmtutil_default_box_handler(deark *c, struct de_boxesctx *bctx)
{
struct de_boxdata *curbox = bctx->curbox;
if(curbox->is_uuid) {
if(!de_memcmp(curbox->uuid, "\xb1\x4b\xf8\xbd\x08\x3d\x4b\x43\xa5\xae\x8c\xd7\xd5\xa6\xce\x03", 16)) {
de_dbg(c, "GeoTIFF data at %"I64_FMT", len=%"I64_FMT, curbox->payload_pos, ... | 0 | [
"CWE-369"
] | deark | 62acb7753b0e3c0d3ab3c15057b0a65222313334 | 149,628,029,229,760,100,000,000,000,000,000,000,000 | 30 | pict,macrsrc: Fixed a bug that could cause division by 0
Found by F. Çelik. |
slap_remove_control(
Operation *op,
SlapReply *rs,
int ctrl,
BI_chk_controls fnc )
{
int i, j;
switch ( op->o_ctrlflag[ ctrl ] ) {
case SLAP_CONTROL_NONCRITICAL:
for ( i = 0, j = -1; op->o_ctrls[ i ] != NULL; i++ ) {
if ( strcmp( op->o_ctrls[ i ]->ldctl_oid,
slap_known_controls[ ctrl - 1 ] ) == 0 )
... | 0 | [
"CWE-125"
] | openldap | 21981053a1195ae1555e23df4d9ac68d34ede9dd | 125,515,282,769,648,770,000,000,000,000,000,000,000 | 67 | ITS#9408 fix vrfilter double-free |
binlog_trans_log_truncate(THD *thd, my_off_t pos)
{
DBUG_ENTER("binlog_trans_log_truncate");
DBUG_PRINT("enter", ("pos: %lu", (ulong) pos));
DBUG_ASSERT(thd_get_ha_data(thd, binlog_hton) != NULL);
/* Only true if binlog_trans_log_savepos() wasn't called before */
DBUG_ASSERT(pos != ~(my_off_t) 0);
binlog_... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 291,914,882,841,223,500,000,000,000,000,000,000,000 | 14 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
bool mark_unsupported_function(const char *where, void *store, uint result)
{
Item::vcol_func_processor_result *res=
(Item::vcol_func_processor_result*) store;
uint old_errors= res->errors;
mark_unsupported_func(where, "check_vcol_func_processor");
res->errors|= result; /* Store type of expression */
/* ... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 133,677,711,694,888,560,000,000,000,000,000,000,000 | 12 | 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. |
static void ca8210_test_interface_clear(struct ca8210_priv *priv)
{
struct ca8210_test *test = &priv->test;
debugfs_remove(test->ca8210_dfs_spi_int);
kfifo_free(&test->up_fifo);
dev_info(&priv->spi->dev, "Test interface removed\n");
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 6402939ec86eaf226c8b8ae00ed983936b164908 | 311,159,098,130,930,470,000,000,000,000,000,000,000 | 8 | ieee802154: ca8210: prevent memory leak
In ca8210_probe the allocated pdata needs to be assigned to
spi_device->dev.platform_data before calling ca8210_get_platform_data.
Othrwise when ca8210_get_platform_data fails pdata cannot be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lor... |
inline void ResizeNearestNeighbor(
const tflite::ResizeNearestNeighborParams& op_params,
const RuntimeShape& unextended_input_shape, const uint8* input_data,
const RuntimeShape& output_size_shape, const int32* output_size_data,
const RuntimeShape& unextended_output_shape, uint8* output_data) {
if (op_... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 16,110,333,185,573,912,000,000,000,000,000,000,000 | 72 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,
volatile struct mlx5_err_cqe *err_cqe)
{
if (err_cqe->syndrome != MLX5_CQE_SYNDROME_WR_FLUSH_ERR) {
const uint16_t wqe_m = ((1 << txq->wqe_n) - 1);
struct mlx5_txq_ctrl *txq_ctrl =
container_of(txq, struct mlx5_txq_ctrl, txq);
uint16_t ne... | 0 | [] | dpdk-stable | ef311075d21b4f68c8ccfc46a00cda7c2a0bf4cc | 80,742,745,747,905,960,000,000,000,000,000,000,000 | 52 | net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).
In MPRQ case, also the local cons... |
my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrlen)
{
int n;
n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000);
if (n < 1) {
#if !defined(PHP_WIN32) && !(defined(NETWARE) && defined(USE_WINSOCK))
if (n == 0) {
errno = ETIMEDOUT;
}
#endif
return -1;
}
re... | 0 | [
"CWE-189"
] | php-src | ac2832935435556dc593784cd0087b5e576bbe4d | 176,918,263,705,017,740,000,000,000,000,000,000,000 | 16 | Fix bug #69545 - avoid overflow when reading list |
static MagickBooleanType ReadDXT1(Image *image,DDSInfo *dds_info,
ExceptionInfo *exception)
{
DDSColors
colors;
register Quantum
*q;
register ssize_t
x;
size_t
bits;
ssize_t
y;
unsigned short
c0,
c1;
for (y = 0; y < (ssize_t) image->rows; y += 4)
{
for (x = 0; x <... | 0 | [
"CWE-20",
"CWE-617"
] | ImageMagick | 0c5b1e430a83ef793a7334bbbee408cf3c628699 | 151,355,799,579,042,680,000,000,000,000,000,000,000 | 58 | Added check to prevent image being 0x0 (reported in #489). |
peer_prefix_list_unset_vty (struct vty *vty, const char *ip_str, afi_t afi,
safi_t safi, const char *direct_str)
{
int ret;
struct peer *peer;
int direct = FILTER_IN;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
/* Check filter direction. */
if (strncmp (d... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 336,135,929,628,733,050,000,000,000,000,000,000,000 | 21 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
Status InferenceContext::Subshape(ShapeHandle s, int64_t start,
ShapeHandle* out) {
return Subshape(s, start, std::numeric_limits<int64_t>::max() /* end */, out);
} | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 278,406,085,756,763,530,000,000,000,000,000,000,000 | 4 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
feed_title(char *str)
{
if (!cur_title)
return;
while (*str) {
if (*str == '&')
Strcat_charp(cur_title, getescapecmd(&str));
else if (*str == '\n' || *str == '\r') {
Strcat_char(cur_title, ' ');
str++;
}
else
Strcat_char(cur_title, *(str++));
}
} | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 278,751,865,812,830,700,000,000,000,000,000,000,000 | 15 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
mbedtls_x509_crt *trust_ca,
mbedtls_x509_crl *ca_crl,
const mbedtls_x509_crt_profile *profile,
const char *cn, uint32_t *flags,
int (*f_vrfy)(void *, ... | 1 | [
"CWE-287",
"CWE-284"
] | mbedtls | 31458a18788b0cf0b722acda9bb2f2fe13a3fb32 | 255,779,092,214,055,430,000,000,000,000,000,000,000 | 135 | Only return VERIFY_FAILED from a single point
Everything else is a fatal error. Also improve documentation about that for
the vrfy callback. |
extract_number (dest, source)
int *dest;
unsigned char *source;
{
int temp = SIGN_EXTEND_CHAR (*(source + 1));
*dest = *source & 0377;
*dest += temp << 8;
} | 0 | [
"CWE-190",
"CWE-252"
] | glibc | 2864e767053317538feafa815046fff89e5a16be | 228,479,636,940,907,550,000,000,000,000,000,000,000 | 8 | Update.
1999-11-09 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
directory with the reference since this is as secure as using the
object with the dependency.
(_dl_dst_substitute): Likewise.
* elf/dl-load.c (_dl_dst_count): Change strings in first two
strncmp ... |
GF_Err stbl_GetSampleRAP(GF_SyncSampleBox *stss, u32 SampleNumber, GF_ISOSAPType *IsRAP, u32 *prevRAP, u32 *nextRAP)
{
u32 i;
if (prevRAP) *prevRAP = 0;
if (nextRAP) *nextRAP = 0;
(*IsRAP) = RAP_NO;
if (!stss || !SampleNumber) return GF_BAD_PARAM;
if (stss->r_LastSyncSample && (stss->r_LastSyncSample < SampleNu... | 0 | [
"CWE-416",
"CWE-401"
] | gpac | 2da2f68bffd51d89b1d272d22aa8cc023c1c066e | 159,880,549,304,118,400,000,000,000,000,000,000,000 | 30 | fixed #1705 |
int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
{
unsigned long pfn, text, pf;
struct page *page;
unsigned npages;
pgd_t *pgd = efi_mm.pgd;
if (efi_enabled(EFI_OLD_MEMMAP))
return 0;
/*
* It can happen that the physical address of new_memmap lands in memory
* which is not map... | 0 | [
"CWE-388"
] | tip | 4e78921ba4dd0aca1cc89168f45039add4183f8e | 191,984,378,859,280,400,000,000,000,000,000,000,000 | 71 | efi/x86/Add missing error handling to old_memmap 1:1 mapping code
The old_memmap flow in efi_call_phys_prolog() performs numerous memory
allocations, and either does not check for failure at all, or it does
but fails to propagate it back to the caller, which may end up calling
into the firmware with an incomplete 1:1 ... |
ShowInfo()
{
char buf[512], *p;
register struct win *wp = fore;
register int i;
if (wp == 0)
{
Msg(0, "(%d,%d)/(%d,%d) no window", D_x + 1, D_y + 1, D_width, D_height);
return;
}
p = buf;
if (buf < (p += GetAnsiStatus(wp, p)))
*p++ = ' ';
sprintf(p, "(%d,%d)/(%d,%d)",
wp->w_x ... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 42,967,307,862,203,910,000,000,000,000,000,000,000 | 107 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
cifs_readdata_alloc(unsigned int nr_pages, work_func_t complete)
{
struct cifs_readdata *rdata;
rdata = kzalloc(sizeof(*rdata) + (sizeof(struct page *) * nr_pages),
GFP_KERNEL);
if (rdata != NULL) {
kref_init(&rdata->refcount);
INIT_LIST_HEAD(&rdata->list);
init_completion(&rdata->done);
INIT_WORK(&rdata... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 163,172,434,922,194,760,000,000,000,000,000,000,000 | 15 | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... |
onig_get_passed_args_num_by_callout_args(OnigCalloutArgs* args)
{
int num;
CalloutListEntry* e;
num = args->num;
e = onig_reg_callout_list_at(args->regex, num);
if (IS_NULL(e)) return ONIGERR_INVALID_ARGUMENT;
if (e->of == ONIG_CALLOUT_OF_NAME) {
return e->u.arg.passed_num;
}
return ONIGERR_INVALI... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 259,531,641,171,020,570,000,000,000,000,000,000,000 | 14 | fix heap-buffer-overflow |
static int cap_sysctl(ctl_table *table, int op)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 144,136,890,132,493,120,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... |
With_sum_func_cache(const Item *a)
:m_with_sum_func(a->with_sum_func())
{ } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 32,836,204,603,600,707,000,000,000,000,000,000,000 | 3 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
construct_mac_tlv(struct sc_card *card, unsigned char *apdu_buf, size_t data_tlv_len, size_t le_tlv_len,
unsigned char *mac_tlv, size_t * mac_tlv_len, const unsigned char key_type)
{
size_t block_size = (KEY_TYPE_AES == key_type ? 16 : 8);
unsigned char mac[4096] = { 0 };
size_t mac_len;
unsigned char icv[16] = {... | 1 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 275,537,212,892,802,930,000,000,000,000,000,000,000 | 62 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void on_m2ts_dump_event(GF_M2TS_Demuxer *ts, u32 evt_type, void *par)
{
u32 i, count;
GF_M2TS_Program *prog;
GF_M2TS_PES_PCK *pck;
GF_M2TS_Dump *dumper = (GF_M2TS_Dump *)ts->user;
switch (evt_type) {
case GF_M2TS_EVT_PAT_FOUND:
if (dumper->timestamps_info_file) {
fprintf(dumper->timestamps_info_fil... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 289ffce3e0d224d314f5f92a744d5fe35999f20b | 157,097,284,635,596,720,000,000,000,000,000,000,000 | 196 | fixed #1767 (fuzz) |
static void cache_cleanup(void)
{
static int max_timeout;
struct cache_timeout data;
int count = 0;
data.current_time = time(NULL);
data.max_timeout = 0;
data.try_harder = 0;
/*
* In the first pass, we only remove entries that have timed out.
* We use a cache of the first time to expire to do this only
*... | 0 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 274,502,205,194,731,960,000,000,000,000,000,000,000 | 42 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
ExportSimpleFontPackages (
IN HII_DATABASE_PRIVATE_DATA *Private,
IN EFI_HII_HANDLE Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,
IN UINTN UsedSize,
IN UINTN BufferSize,
IN OUT VOID ... | 0 | [
"CWE-416"
] | edk2 | c32be82e99ef272e7fa742c2f06ff9a4c3756613 | 182,615,942,908,536,440,000,000,000,000,000,000,000 | 53 | MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995
Fix the corner case issue that the original configuration runtime
memory is freed, but it is still exposed to the OS runtime.
So this patch is to remove the configuration table to a... |
_dbus_get_autolaunch_address (const char *scope,
DBusString *address,
DBusError *error)
{
#ifdef DBUS_ENABLE_X11_AUTOLAUNCH
static const char arg_dbus_launch[] = "dbus-launch";
static const char arg_autolaunch[] = "--autolaunch";
static const char arg_b... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 127,148,240,547,352,200,000,000,000,000,000,000,000 | 99 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
static GF_Err do_meta_act()
{
u32 i;
for (i=0; i<nb_meta_act; i++) {
GF_Err e = GF_OK;
u32 tk = 0;
#ifndef GPAC_DISABLE_ISOM_WRITE
Bool self_ref;
#endif
MetaAction *meta = &metas[i];
if (meta->trackID) tk = gf_isom_get_track_by_id(file, meta->trackID);
switch (meta->act_type) {
#ifndef GPAC_DISABLE_ISOM... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 256,463,669,387,513,850,000,000,000,000,000,000,000 | 223 | fixed #1734 |
void CLASS setOlympusBodyFeatures(unsigned long long id)
{
imgdata.lens.makernotes.CamID = id;
if (id == 0x5330303638ULL) {
strcpy (model, "E-M10MarkIII");
}
if ((id == 0x4434303430ULL) || // E-1
(id == 0x4434303431ULL) || // E-300
((id & 0x00ffff0000ULL) == 0x0030300000ULL))
{
imgdata.len... | 0 | [
"CWE-119",
"CWE-125"
] | LibRaw | f1394822a0152ceed77815eafa5cac4e8baab10a | 150,426,756,879,993,020,000,000,000,000,000,000,000 | 32 | SECUNIA advisory 76000 #1 (wrong fuji width set via tiff tag |
sixel_dither_get_num_of_palette_colors(
sixel_dither_t /* in */ *dither)
{
return dither->ncolors;
} | 0 | [
"CWE-200"
] | libsixel | cb373ab6614c910407c5e5a93ab935144e62b037 | 118,384,766,138,597,340,000,000,000,000,000,000,000 | 5 | Avoid illegal memory access problem with 1 color paletted png(#73),
Thanks to HongxuChen. |
static int bnx2x_func_wait_started(struct bnx2x *bp)
{
int tout = 50;
int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0;
if (!bp->port.pmf)
return 0;
/*
* (assumption: No Attention from MCP at this stage)
* PMF probably in the middle of TX disable/enable transaction
* 1. Sync IRS for default SB
* 2. Sync... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 49,899,814,865,847,050,000,000,000,000,000,000,000 | 66 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static int vrend_draw_bind_ubo_shader(struct vrend_sub_context *sub_ctx,
int shader_type, int next_ubo_id)
{
uint32_t mask, dirty, update;
struct pipe_constant_buffer *cb;
struct vrend_resource *res;
if (!has_feature(feat_ubo))
return next_ubo_id;
mask = sub_... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 291,318,549,591,073,050,000,000,000,000,000,000,000 | 36 | 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> |
MagickExport MagickBooleanType SetImageExtent(Image *image,const size_t columns,
const size_t rows)
{
if ((columns == 0) || (rows == 0))
ThrowBinaryImageException(ImageError,"NegativeOrZeroImageSize",
image->filename);
image->columns=columns;
image->rows=rows;
if ((image->depth == 0) || (image->dept... | 0 | [
"CWE-665"
] | ImageMagick6 | 27b1c74979ac473a430e266ff6c4b645664bc805 | 216,146,751,308,879,380,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
e_ews_config_utils_is_online (void)
{
EShell *shell;
shell = e_shell_get_default ();
return shell && e_shell_get_online (shell);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 81,450,430,671,036,160,000,000,000,000,000,000,000 | 8 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static void update_tpr_threshold(struct kvm_vcpu *vcpu)
{
int max_irr, tpr;
if (!vm_need_tpr_shadow(vcpu->kvm))
return;
if (!kvm_lapic_enabled(vcpu) ||
((max_irr = kvm_lapic_find_highest_irr(vcpu)) == -1)) {
vmcs_write32(TPR_THRESHOLD, 0);
return;
}
tpr = (kvm_lapic_get_cr8(vcpu) & 0x0f) << 4;
vmcs_... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 300,178,069,395,682,300,000,000,000,000,000,000,000 | 16 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
HTTPSession::onWriteCompleted() {
if (!writesDraining_) {
return;
}
if (numActiveWrites_) {
return;
}
// Don't shutdown if there might be more writes
if (!pendingWrites_.empty()) {
return;
}
// All finished draining writes, so shut down the egress
shutdownTransport(false, true);
} | 0 | [
"CWE-20"
] | proxygen | 0600ebe59c3e82cd012def77ca9ca1918da74a71 | 311,398,614,531,098,500,000,000,000,000,000,000,000 | 17 | Check that a secondary auth manager is set before dereferencing.
Summary: CVE-2018-6343
Reviewed By: mingtaoy
Differential Revision: D12994423
fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7 |
explicit FusedBatchNormOpEx(OpKernelConstruction* context)
: FusedBatchNormOpBase<Device, T, U>(context,
kWithSideInputAndActivation) {} | 0 | [
"CWE-476",
"CWE-703"
] | tensorflow | 6972f9dfe325636b3db4e0bc517ee22a159365c0 | 30,465,325,038,014,926,000,000,000,000,000,000,000 | 3 | Add missing valuidation to FusedBatchNorm.
PiperOrigin-RevId: 372460336
Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126 |
static void macsec_count_tx(struct sk_buff *skb, struct macsec_tx_sc *tx_sc,
struct macsec_tx_sa *tx_sa)
{
struct pcpu_tx_sc_stats *txsc_stats = this_cpu_ptr(tx_sc->stats);
u64_stats_update_begin(&txsc_stats->syncp);
if (tx_sc->encrypt) {
txsc_stats->stats.OutOctetsEncrypted += skb->len;
txsc_stats->stat... | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 303,516,587,035,462,600,000,000,000,000,000,000,000 | 17 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
c_gregorian_to_yday(int y, int m, int d)
{
assert(m >= 1 && m <= 12);
return yeartab[c_gregorian_leap_p(y) ? 1 : 0][m] + d;
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 7,098,466,533,116,830,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static int waitproxyconnect_getsock(struct connectdata *conn,
curl_socket_t *sock)
{
sock[0] = conn->sock[FIRSTSOCKET];
if(conn->connect_state)
return Curl_connect_getsock(conn);
return GETSOCK_WRITESOCK(0);
} | 0 | [
"CWE-416",
"CWE-295"
] | curl | 7f4a9a9b2a49547eae24d2e19bc5c346e9026479 | 156,446,544,760,111,680,000,000,000,000,000,000,000 | 10 | openssl: associate/detach the transfer from connection
CVE-2021-22901
Bug: https://curl.se/docs/CVE-2021-22901.html |
add_bytes(regex_t* reg, UChar* bytes, int len)
{
BB_ADD(reg, bytes, len);
return 0;
} | 0 | [
"CWE-476"
] | oniguruma | 410f5916429e7d2920e1d4867388514f605413b8 | 66,649,788,877,056,860,000,000,000,000,000,000,000 | 5 | fix #87: Read unknown address in onig_error_code_to_str() |
static int satsub64be(const unsigned char *v1, const unsigned char *v2)
{
int ret, sat, brw, i;
if (sizeof(long) == 8)
do {
const union {
long one;
char little;
} is_endian = {
1
};
long l;
if (... | 0 | [
"CWE-189"
] | openssl | b77ab018b79a00f789b0fb85596b446b08be4c9d | 182,044,425,053,059,800,000,000,000,000,000,000,000 | 57 | Fix DTLS replay protection
The DTLS implementation provides some protection against replay attacks
in accordance with RFC6347 section 4.1.2.6.
A sliding "window" of valid record sequence numbers is maintained with
the "right" hand edge of the window set to the highest sequence number we
have received so far. Records ... |
void set_state(JSObject *self, State new_state) {
MOZ_ASSERT(is_instance(self));
MOZ_ASSERT((uint8_t)new_state > (uint8_t)state(self));
JS::SetReservedSlot(self, Slots::State, JS::Int32Value((int)new_state));
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 134,426,180,659,636,380,000,000,000,000,000,000,000 | 5 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
static double mp_find(_cimg_math_parser& mp) {
const int _step = (int)_mp_arg(6), step = _step?_step:-1;
const ulongT siz = (ulongT)mp.opcode[3];
longT ind = (longT)(mp.opcode[5]!=_cimg_mp_slot_nan?_mp_arg(5):step>0?0:siz - 1);
if (ind<0 || ind>=(longT)siz) return -1.;
cons... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 234,347,850,518,243,470,000,000,000,000,000,000,000 | 21 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int X509_TRUST_get_by_id(int id)
{
X509_TRUST tmp;
int idx;
if((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
return id - X509_TRUST_MIN;
tmp.trust = id;
if(!trtable) return -1;
idx = sk_X509_TRUST_find(trtable, &tmp);
if(idx == -1) return -1;
return idx + X509_TRUST_COUNT;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 312,904,902,191,390,800,000,000,000,000,000,000,000 | 12 | Backport OCSP fixes. |
set_local_option(struct Curl_easy *data, int option, int newstate)
{
struct TELNET *tn = data->req.p.telnet;
if(newstate == CURL_YES) {
switch(tn->us[option]) {
case CURL_NO:
tn->us[option] = CURL_WANTYES;
send_negotiation(data, CURL_WILL, option);
break;
case CURL_YES:
/* Alrea... | 0 | [
"CWE-200",
"CWE-909"
] | curl | 39ce47f219b09c380b81f89fe54ac586c8db6bde | 139,838,875,044,613,330,000,000,000,000,000,000,000 | 72 | telnet: check sscanf() for correct number of matches
CVE-2021-22898
Bug: https://curl.se/docs/CVE-2021-22898.html |
kill_all_local_variables ()
{
VAR_CONTEXT *vc;
for (vc = shell_variables; vc; vc = vc->down)
if (vc_isfuncenv (vc) && vc->scope == variable_context)
break;
if (vc == 0)
return; /* XXX */
if (vc->table && vc_haslocals (vc))
{
delete_all_variables (vc->table);
hash_dispose (vc->ta... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 193,915,502,910,376,400,000,000,000,000,000,000,000 | 17 | commit bash-20120224 snapshot |
static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
unsigned long speed;
if (!val || kstrtoul(val, 0, &speed) || speed > 63)
return -EINVAL;
scroll_speed = speed;
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c54def7bd64d7c0b6993336abcffb8444795bf38 | 212,129,854,131,544,980,000,000,000,000,000,000,000 | 7 | HID: magicmouse: sanity check report size in raw_event() callback
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that
magicmouse_emit_touch() gets only valid values of raw_id.
Cc: stable@vger.kernel.org
Reported-by: Steven Vittitoe <scvitti... |
static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
{
ctxt->regs_dirty = 0;
ctxt->regs_valid = 0;
} | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 12,501,309,675,025,747,000,000,000,000,000,000,000 | 5 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
uint32_t ident_opts) /**< lexer_obj_ident_opts_t option bits */
{
lexer_skip_spaces (context_p);
if (context_p->source_p >= context_p->source_end_p)
{
parser_raise_error (context_p, PARSER_ERR_PROPERT... | 1 | [
"CWE-288"
] | jerryscript | f3a420b672927037beb4508d7bdd68fb25d2caf6 | 18,090,551,596,235,490,000,000,000,000,000,000,000 | 221 | Fix class static block opening brace parsing (#4942)
The next character should not be consumed after finding the static block opening brace.
This patch fixes #4916.
JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu |
static inline void ablkcipher_buffer_write(struct ablkcipher_buffer *p)
{
scatterwalk_copychunks(p->data, &p->dst, p->len, 1);
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 194,164,357,870,407,900,000,000,000,000,000,000,000 | 4 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
int t2p_cmp_t2p_page(const void* e1, const void* e2){
int d;
d = (int32)(((T2P_PAGE*)e1)->page_number) - (int32)(((T2P_PAGE*)e2)->page_number);
if(d == 0){
d = (int32)(((T2P_PAGE*)e1)->page_directory) - (int32)(((T2P_PAGE*)e2)->page_directory);
}
return d;
} | 0 | [
"CWE-787"
] | libtiff | 7be2e452ddcf6d7abca88f41d3761e6edab72b22 | 171,450,877,516,956,030,000,000,000,000,000,000,000 | 9 | tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
fixes #220 |
void WriteStr(SAVESTREAM* f, const char *str)
{
cmsUInt32Number len;
if (str == NULL)
str = " ";
// Lenghth to write
len = (cmsUInt32Number) strlen(str);
f ->Used += len;
if (f ->stream) { // Should I write it to a file?
if (fwrite(str, 1, len, f->stream) != len) {
... | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 104,213,659,710,617,080,000,000,000,000,000,000,000 | 36 | Fix some warnings from static analysis |
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_nor... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 55,619,190,803,232,040,000,000,000,000,000,000,000 | 61 | - 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 |
GetFlushRecPtr(void)
{
/* use volatile pointer to prevent code rearrangement */
volatile XLogCtlData *xlogctl = XLogCtl;
XLogRecPtr recptr;
SpinLockAcquire(&xlogctl->info_lck);
recptr = xlogctl->LogwrtResult.Flush;
SpinLockRelease(&xlogctl->info_lck);
return recptr;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 200,270,434,577,283,300,000,000,000,000,000,000,000 | 12 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static inline int tcp_sequence(const struct tcp_sock *tp, u32 seq, u32 end_seq)
{
return !before(end_seq, tp->rcv_wup) &&
!after(seq, tp->rcv_nxt + tcp_receive_window(tp));
} | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 50,902,680,853,100,330,000,000,000,000,000,000,000 | 5 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
static void test_bind_result()
{
MYSQL_STMT *stmt;
int rc;
int nData;
ulong length1;
char szData[100];
MYSQL_BIND my_bind[2];
my_bool is_null[2];
myheader("test_bind_result");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_result");
myquery(rc);
rc= mysql_que... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 127,775,701,350,616,280,000,000,000,000,000,000,000 | 84 | 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... |
int ldb_kv_index_sub_transaction_start(struct ldb_kv_private *ldb_kv)
{
ldb_kv->nested_idx_ptr = talloc_zero(ldb_kv, struct ldb_kv_idxptr);
if (ldb_kv->nested_idx_ptr == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
/*
* We use a tiny hash size for the sub-database (11).
*
* The sub-transaction is only for on... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 146,167,765,585,353,200,000,000,000,000,000,000,000 | 23 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
_outBitmapIndexScan(StringInfo str, const BitmapIndexScan *node)
{
WRITE_NODE_TYPE("BITMAPINDEXSCAN");
_outScanInfo(str, (const Scan *) node);
WRITE_OID_FIELD(indexid);
WRITE_NODE_FIELD(indexqual);
WRITE_NODE_FIELD(indexqualorig);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 328,336,419,765,748,130,000,000,000,000,000,000,000 | 10 | 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 void key_gc_timer_func(unsigned long data)
{
kenter("");
key_gc_next_run = LONG_MAX;
schedule_work(&key_gc_work);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 304,457,119,077,257,100,000,000,000,000,000,000,000 | 6 | 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 skb_flow_dissector_prog_query(const union bpf_attr *attr,
union bpf_attr __user *uattr)
{
__u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids);
u32 prog_id, prog_cnt = 0, flags = 0;
struct bpf_prog *attached;
struct net *net;
if (attr->query.query_flags)
return -EINVAL;
net = get_net_ns_by... | 0 | [
"CWE-330"
] | linux | 55667441c84fa5e0911a0aac44fb059c15ba6da2 | 268,000,317,394,062,200,000,000,000,000,000,000,000 | 38 | net/flow_dissector: switch to siphash
UDP IPv6 packets auto flowlabels are using a 32bit secret
(static u32 hashrnd in net/core/flow_dissector.c) and
apply jhash() over fields known by the receivers.
Attackers can easily infer the 32bit secret and use this information
to identify a device and/or user, since this 32bi... |
static int sctp_setsockopt_initmsg(struct sock *sk, char __user *optval, int optlen)
{
struct sctp_initmsg sinit;
struct sctp_sock *sp = sctp_sk(sk);
if (optlen != sizeof(struct sctp_initmsg))
return -EINVAL;
if (copy_from_user(&sinit, optval, optlen))
return -EFAULT;
if (sinit.sinit_num_ostreams)
sp->init... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 74,116,363,345,005,160,000,000,000,000,000,000,000 | 21 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, const char *optstr)
{
jas_image_fmtinfo_t *fmtinfo;
jas_image_t *image;
image = 0;
/* If possible, try to determine the format of the input data. */
if (fmt < 0) {
if ((fmt = jas_image_getfmt(in)) < 0)
goto error;
}
/* Is it possible to decode an i... | 0 | [
"CWE-617"
] | jasper | 243749e5a6384acdb9f0a59515c0b85dfd62bd5b | 294,046,913,833,219,300,000,000,000,000,000,000,000 | 37 | Check data in jas_image
Regarding CVE-2018-19539.
Fix by Markus Koschany <apo@debian.org>.
From https://gist.github.com/apoleon/7c0f3a0c28437c18fee8a51b1aa16164. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.