func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
Value ExpressionNot::evaluate(const Document& root, Variables* variables) const {
Value pOp(_children[0]->evaluate(root, variables));
bool b = pOp.coerceToBool();
return Value(!b);
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 209,615,611,056,556,070,000,000,000,000,000,000,000 | 6 | SERVER-49404 Enforce additional checks in $arrayToObject |
static char *line_from_stdmac(void)
{
unsigned char c;
const unsigned char *p = stdmacpos;
char *line, *q;
size_t len = 0;
if (!stdmacpos)
return NULL;
/*
* 32-126 is ASCII, 127 is end of line, 128-31 are directives
* (allowed to wrap around) corresponding to PP_* tokens 0-15... | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 101,422,154,026,491,170,000,000,000,000,000,000,000 | 67 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
static void conn_release_items(conn *c) {
assert(c != NULL);
if (c->item) {
item_remove(c->item);
c->item = 0;
}
while (c->ileft > 0) {
item *it = *(c->icurr);
assert((it->it_flags & ITEM_SLABBED) == 0);
item_remove(it);
c->icurr++;
c->ileft--;
... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 106,937,336,842,703,480,000,000,000,000,000,000,000 | 25 | CVE reported by cisco talos |
gnutls_ocsp_req_add_cert(gnutls_ocsp_req_t req,
gnutls_digest_algorithm_t digest,
gnutls_x509_crt_t issuer, gnutls_x509_crt_t cert)
{
int ret;
gnutls_datum_t sn, tmp, inh, ikh;
uint8_t inh_buf[MAX_HASH_SIZE];
uint8_t ikh_buf[MAX_HASH_SIZE];
size_t inhlen = MAX_HASH_SIZE;
size_t ikhlen = MAX_HASH_SIZE;
i... | 0 | [
"CWE-264"
] | gnutls | 964632f37dfdfb914ebc5e49db4fa29af35b1de9 | 250,374,043,371,909,450,000,000,000,000,000,000,000 | 67 | ocsp: corrected the comparison of the serial size in OCSP response
Previously the OCSP certificate check wouldn't verify the serial length
and could succeed in cases it shouldn't.
Reported by Stefan Buehler. |
static void store_param_time(NET *net, MYSQL_BIND *param)
{
MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer;
char buff[MAX_TIME_REP_LENGTH], *pos;
uint length;
pos= buff+1;
pos[0]= tm->neg ? 1: 0;
int4store(pos+1, tm->day);
pos[5]= (uchar) tm->hour;
pos[6]= (uchar) tm->minute;
pos[7]= (uchar) tm->second... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 98,007,247,889,867,520,000,000,000,000,000,000,000 | 23 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
static void vhost_vsock_common_send_transport_reset(VHostVSockCommon *vvc)
{
VirtQueueElement *elem;
VirtQueue *vq = vvc->event_vq;
struct virtio_vsock_event event = {
.id = cpu_to_le32(VIRTIO_VSOCK_EVENT_TRANSPORT_RESET),
};
elem = virtqueue_pop(vq, sizeof(VirtQueueElement));
if (!elem... | 1 | [
"CWE-772"
] | qemu | 8d1b247f3748ac4078524130c6d7ae42b6140aaf | 143,220,470,271,784,780,000,000,000,000,000,000,000 | 32 | vhost-vsock: detach the virqueue element in case of error
In vhost_vsock_common_send_transport_reset(), if an element popped from
the virtqueue is invalid, we should call virtqueue_detach_element() to
detach it from the virtqueue before freeing its memory.
Fixes: fc0b9b0e1c ("vhost-vsock: add virtio sockets device")
... |
static void free_tio(struct dm_target_io *tio)
{
bio_put(&tio->clone);
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 76,645,427,096,502,930,000,000,000,000,000,000,000 | 4 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
first_num(
char * str)
{
char *start;
int ch;
double d;
ch = *str++;
while(ch && !isdigit(ch)) ch = *str++;
start = str-1;
while(isdigit(ch) || (ch == '.')) ch = *str++;
str[-1] = '\0';
d = atof(start);
str[-1] = (char)ch;
return d;
} | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 140,340,397,893,420,000,000,000,000,000,000,000,000 | 16 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
static void io_kill_linked_timeout(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *link;
bool cancelled = false;
unsigned long flags;
spin_lock_irqsave(&ctx->completion_lock, flags);
link = req->link;
/*
* Can happen if a linked timeout fired and link had been like
* req -> lin... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 223,623,654,250,337,140,000,000,000,000,000,000,000 | 35 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
#define MaxCount 128
#define PictCropRegionOp 0x01
#define PictEndOfPictureOp 0xff
#define PictJPEGOp 0x8200
#define PictInfoOp 0x0C00
#define PictInfoSize 512
#define PictPixmapOp 0x9A
#define PictPIC... | 0 | [
"CWE-20",
"CWE-252"
] | ImageMagick | 6b6bff054d569a77973f2140c0e86366e6168a6c | 227,871,200,076,829,870,000,000,000,000,000,000,000 | 448 | https://github.com/ImageMagick/ImageMagick/issues/1199 |
_mpegts_pat_program_free (GstMpegtsPatProgram * orig)
{
g_slice_free (GstMpegtsPatProgram, orig);
} | 0 | [
"CWE-125"
] | gst-plugins-bad | d58f668ece8795bddb3316832e1848c7b7cf38ac | 95,242,871,690,099,060,000,000,000,000,000,000,000 | 4 | mpegtssection: Add more section size checks
The smallest section ever needs to be at least 3 bytes (i.e. just the short
header).
Non-short headers need to be at least 11 bytes long (3 for the minimum header,
5 for the non-short header, and 4 for the CRC).
https://bugzilla.gnome.org/show_bug.cgi?id=775048 |
static inline u16 socket_type_to_security_class(int family, int type, int protocol)
{
switch (family) {
case PF_UNIX:
switch (type) {
case SOCK_STREAM:
case SOCK_SEQPACKET:
return SECCLASS_UNIX_STREAM_SOCKET;
case SOCK_DGRAM:
return SECCLASS_UNIX_DGRAM_SOCKET;
}
break;
case PF_INET:
case PF_INET6:... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 271,056,851,315,480,150,000,000,000,000,000,000,000 | 66 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
RZ_API RZ_OWN RzList /*<RzBinMap *>*/ *rz_bin_object_get_maps(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->maps;
} | 0 | [
"CWE-200",
"CWE-787"
] | rizin | 07b43bc8aa1ffebd9b68d60624c9610cf7e460c7 | 237,597,118,340,757,240,000,000,000,000,000,000,000 | 4 | fix oob read on luac |
static void sc_html_append_char(SC_HTMLParser *parser, gchar ch)
{
GString *str = parser->str;
if (!parser->pre && parser->space) {
g_string_append_c(str, ' ');
parser->space = FALSE;
}
g_string_append_c(str, ch);
parser->empty_line = FALSE;
if (ch == '\n') {
parser->newline = TRUE;
if (str->len > 1 &&... | 0 | [] | claws | 5f52f113ac9fd054f10752febbfac340c38cddbe | 262,468,929,936,200,420,000,000,000,000,000,000,000 | 19 | Fix bug #3201 "Fix memory corruption in sc_html_read_line()"
Previously fread() could fill the whole buffer
in which case buf[n] = '\0' messed up the stack.
Introduced in d0c64a09 + 4ab3585743. |
static bool askForDeletionConfirmation(bool& deleteLocalFiles, const int& size, const QString& name) {
DeletionConfirmationDlg dlg(NULL, size, name, deleteLocalFiles);
if (dlg.exec() == QDialog::Accepted) {
deleteLocalFiles = dlg.shouldDeleteLocalFiles();
return true;
}
return false;
} | 0 | [
"CWE-20",
"CWE-79"
] | qBittorrent | 6ca3e4f094da0a0017cb2d483ec1db6176bb0b16 | 340,206,990,148,810,500,000,000,000,000,000,000,000 | 8 | Add Utils::String::toHtmlEscaped |
rb_str_memsize(VALUE str)
{
if (!STR_EMBED_P(str) && !STR_SHARED_P(str)) {
return RSTRING(str)->as.heap.aux.capa;
}
else {
return 0;
}
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 21,890,198,253,930,034,000,000,000,000,000,000,000 | 9 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void copy_options(struct Sass_Options* to, struct Sass_Options* from) {
// do not overwrite ourself
if (to == from) return;
// free assigned memory
sass_clear_options(to);
// move memory
*to = *from;
// Reset pointers on source
sass_reset_options(from);
} | 0 | [
"CWE-125"
] | libsass | 8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae | 271,300,650,300,776,170,000,000,000,000,000,000,000 | 10 | Optimize line_begin/end search in `handle_error`
There is no need to advance by UTF-8 code points when searching for an
ASCII character, because UTF-8 is a prefix-free encoding. |
static MonoMethod *
inflate_method (MonoReflectionGenericClass *type, MonoObject *obj)
{
MonoMethod *method;
MonoClass *gklass;
gklass = mono_class_from_mono_type (mono_reflection_type_get_handle ((MonoReflectionType*)type->generic_type));
if (!strcmp (obj->vtable->klass->name, "MethodBuilder"))
if (((MonoRefle... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 328,413,564,922,779,440,000,000,000,000,000,000,000 | 23 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QInt16 b) {
return QInt32(a.value * static_cast<int32_t>(b.value));
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 19,825,458,716,476,658,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
_dbus_write (int fd,
const DBusString *buffer,
int start,
int len)
{
const char *data;
int bytes_written;
data = _dbus_string_get_const_data_len (buffer, start, len);
again:
bytes_written = write (fd, data, len);
if (bytes_w... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 185,402,606,447,991,000,000,000,000,000,000,000,000 | 24 | 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... |
ZEND_METHOD(Generator, rewind)
{
zend_generator *generator;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
generator = (zend_generator *) Z_OBJ_P(getThis());
zend_generator_rewind(generator);
} | 0 | [] | php-src | 83e2b9e2202da6cc25bdaac67a58022b90be88e7 | 120,194,836,361,524,880,000,000,000,000,000,000,000 | 12 | Fixed bug #76946 |
zzip_mem_disk_open(char* filename)
{
ZZIP_DISK* disk = zzip_disk_open(filename);
if (! disk) { perror(error[_zzip_mem_disk_open_fail]); return 0; }
___ ZZIP_MEM_DISK* dir = zzip_mem_disk_new();
zzip_mem_disk_load(dir, disk);
return dir; ____;
} | 0 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 267,013,906,377,261,000,000,000,000,000,000,000,000 | 8 | memdisk
(.) |
static void
xmlXPathCompMultiplicativeExpr(xmlXPathParserContextPtr ctxt) {
xmlXPathCompUnaryExpr(ctxt);
CHECK_ERROR;
SKIP_BLANKS;
while ((CUR == '*') ||
((CUR == 'd') && (NXT(1) == 'i') && (NXT(2) == 'v')) ||
((CUR == 'm') && (NXT(1) == 'o') && (NXT(2) == 'd'))) {
int op = -1;
... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 339,912,241,240,387,770,000,000,000,000,000,000,000 | 27 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct perf_event *event = file->private_data;
void (*func)(struct perf_event *);
u32 flags = arg;
switch (cmd) {
case PERF_EVENT_IOC_ENABLE:
func = perf_event_enable;
break;
case PERF_EVENT_IOC_DISABLE:
func = perf_event_disa... | 1 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 183,283,271,365,936,960,000,000,000,000,000,000,000 | 64 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
EXPORTED int mailbox_open_irlnb(const char *name, struct mailbox **mailboxptr)
{
return mailbox_open_advanced(name,
LOCK_SHARED|LOCK_NONBLOCK,
/* cannot do nonblocking lock on index...why? */
LOCK_SHARED,
... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 9,914,975,341,713,268,000,000,000,000,000,000,000 | 8 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
int h2_beam_holds_proxies(h2_bucket_beam *beam)
{
int has_proxies = 1;
h2_beam_lock bl;
if (beam && enter_yellow(beam, &bl) == APR_SUCCESS) {
has_proxies = !H2_BPROXY_LIST_EMPTY(&beam->proxies);
leave_yellow(beam, &bl);
}
return has_proxies;
} | 0 | [
"CWE-400"
] | mod_h2 | 83a2e3866918ce6567a683eb4c660688d047ee81 | 6,166,066,638,020,608,000,000,000,000,000,000,000 | 11 | * fixes a race condition where aborting streams triggers an unnecessary timeout. |
SYSCALL_DEFINE5(add_key, const char __user *, _type,
const char __user *, _description,
const void __user *, _payload,
size_t, plen,
key_serial_t, ringid)
{
key_ref_t keyring_ref, key_ref;
char type[32], *description;
void *payload;
long ret;
ret = -EINVAL;
if (plen > 1024 * 1024 - 1)
goto error;
/* ... | 1 | [
"CWE-476"
] | linux | 5649645d725c73df4302428ee4e02c869248b4c5 | 204,971,366,116,677,300,000,000,000,000,000,000,000 | 79 | KEYS: fix dereferencing NULL payload with nonzero length
sys_add_key() and the KEYCTL_UPDATE operation of sys_keyctl() allowed a
NULL payload with nonzero length to be passed to the key type's
->preparse(), ->instantiate(), and/or ->update() methods. Various key
types including asymmetric, cifs.idmap, cifs.spnego, an... |
size_t Magick::Image::channelDepth(const ChannelType channel_)
{
size_t
channel_depth;
GetPPException;
GetAndSetPPChannelMask(channel_);
channel_depth=GetImageDepth(constImage(),exceptionInfo);
RestorePPChannelMask;
ThrowImageException;
return(channel_depth);
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 277,265,389,377,466,160,000,000,000,000,000,000,000 | 12 | Added missing return to avoid use after free. |
static void magicmouse_input_configured(struct hid_device *hdev,
struct hid_input *hi)
{
struct magicmouse_sc *msc = hid_get_drvdata(hdev);
int ret = magicmouse_setup_input(msc->input, hdev);
if (ret) {
hid_err(hdev, "magicmouse setup input failed (%d)\n", ret);
/* clean msc->input to notify probe() of the f... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c54def7bd64d7c0b6993336abcffb8444795bf38 | 240,602,207,329,003,170,000,000,000,000,000,000,000 | 13 | 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... |
struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
{
u32 hash = inet_addr_hash(net, addr);
struct net_device *result = NULL;
struct in_ifaddr *ifa;
rcu_read_lock();
hlist_for_each_entry_rcu(ifa, &inet_addr_lst[hash], hash) {
if (ifa->ifa_local == addr) {
struct net_device *dev = ifa-... | 0 | [
"CWE-399"
] | net-next | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | 166,449,817,729,442,600,000,000,000,000,000,000,000 | 36 | ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all address... |
xfs_sbversion_add_attr2(xfs_mount_t *mp, xfs_trans_t *tp)
{
if ((mp->m_flags & XFS_MOUNT_ATTR2) &&
!(xfs_sb_version_hasattr2(&mp->m_sb))) {
spin_lock(&mp->m_sb_lock);
if (!xfs_sb_version_hasattr2(&mp->m_sb)) {
xfs_sb_version_addattr2(&mp->m_sb);
spin_unlock(&mp->m_sb_lock);
xfs_mod_sb(tp, XFS_SB_VERS... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 323,675,921,997,445,270,000,000,000,000,000,000,000 | 13 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
input_buffer& Alert::set(input_buffer& in)
{
return in >> *this;
} | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 110,532,064,696,592,140,000,000,000,000,000,000,000 | 4 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
_dbus_socketpair (DBusSocket *fd1,
DBusSocket *fd2,
dbus_bool_t blocking,
DBusError *error)
{
#ifdef HAVE_SOCKETPAIR
int fds[2];
int retval;
#ifdef SOCK_CLOEXEC
dbus_bool_t cloexec_done;
retval = socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds);
cl... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 283,521,998,732,048,020,000,000,000,000,000,000,000 | 65 | 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... |
reseq_anchor0(AnchorList *al, short *seqmap)
{
int i;
Anchor *a;
if (!al)
return;
for (i = 0; i < al->nanchor; i++) {
a = &al->anchors[i];
if (a->hseq >= 0) {
a->hseq = seqmap[a->hseq];
}
}
} | 0 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 228,902,228,983,635,700,000,000,000,000,000,000,000 | 15 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
LogFilePrep(const char *fname, const char *backup, const char *idstring)
{
char *logFileName = NULL;
if (asprintf(&logFileName, fname, idstring) == -1)
FatalError("Cannot allocate space for the log file name\n");
if (backup && *backup) {
struct stat buf;
if (!stat(logFileName, &bu... | 1 | [
"CWE-863"
] | xserver | da15c7413916f754708c62c2089265528cd661e2 | 56,456,244,053,678,585,000,000,000,000,000,000,000 | 36 | LogFilePrep: add a comment to the unsafe format string.
CVE-2018-14665 also made it possible to exploit this to access
memory. With -logfile forbidden when running with elevated privileges
this is no longer an issue.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry... |
int GetDevicelinkColorSpace(cmsHPROFILE hProfile)
{
cmsColorSpaceSignature ProfileSpace = cmsGetPCS(hProfile);
return _cmsLCMScolorSpace(ProfileSpace);
}
| 0 | [] | Little-CMS | 06d4557477e7ab3330a24d69af4c67adcac9acdf | 165,448,962,536,425,300,000,000,000,000,000,000,000 | 6 | utils/jpgicc/jpgicc.c: Fix fprintf parameter number |
void sqlite3UniqueConstraint(
Parse *pParse, /* Parsing context */
int onError, /* Constraint type */
Index *pIdx /* The index that triggers the constraint */
){
char *zErr;
int j;
StrAccum errMsg;
Table *pTab = pIdx->pTable;
sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0,
... | 0 | [
"CWE-674",
"CWE-787"
] | sqlite | 38096961c7cd109110ac21d3ed7dad7e0cb0ae06 | 43,500,200,370,061,980,000,000,000,000,000,000,000 | 31 | Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself.
FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5 |
int wc_SetSubjectBuffer(Cert* cert, const byte* der, int derSz)
{
int ret = 0;
if (cert == NULL) {
ret = BAD_FUNC_ARG;
}
else {
/* Check if decodedCert is cached */
if (cert->der != der) {
/* Allocate cache for the decoded cert */
ret = wc_SetCert_LoadDer... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 138,185,756,820,600,260,000,000,000,000,000,000,000 | 24 | OCSP: improve handling of OCSP no check extension |
static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
unsigned long new_addr, unsigned long new_len, bool *locked,
struct vm_userfaultfd_ctx *uf,
struct list_head *uf_unmap_early,
struct list_head *uf_unmap)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned long r... | 0 | [
"CWE-787"
] | linux | dcde237319e626d1ec3c9d8b7613032f0fd4663a | 320,377,872,083,870,200,000,000,000,000,000,000,000 | 76 | mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()
Currently the arm64 kernel ignores the top address byte passed to brk(),
mmap() and mremap(). When the user is not aware of the 56-bit address
limit or relies on the kernel to return an error, untagging such
pointers has the potential to create addres... |
static void sctp_chunk_destroy(struct sctp_chunk *chunk)
{
BUG_ON(!list_empty(&chunk->list));
list_del_init(&chunk->transmitted_list);
/* Free the chunk skb data and the SCTP_chunk stub itself. */
dev_kfree_skb(chunk->skb);
SCTP_DBG_OBJCNT_DEC(chunk);
kmem_cache_free(sctp_chunk_cachep, chunk);
} | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 267,252,682,891,462,870,000,000,000,000,000,000,000 | 11 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx)
{
TS_VERIFY_CTX *ret = ctx;
ASN1_OBJECT *policy;
TS_MSG_IMPRINT *imprint;
X509_ALGOR *md_alg;
ASN1_OCTET_STRING *msg;
ASN1_INTEGER *nonce;
assert(req != NULL);
if (ret)
TS_VERIFY_CTX_cleanup(ret);
else
if (!(ret = TS_VERIFY_CTX_new()... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 40,570,861,380,064,200,000,000,000,000,000,000,000 | 51 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
int Field_year::store(longlong nr, bool unsigned_val)
{
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
if (nr < 0 || (nr >= 100 && nr <= 1900) || nr > 2155)
{
*ptr= 0;
set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1);
return 1;
}
if (nr != 0 || field_length != 4) // 0000 -> 0; 00 -> 2000
{
if (nr < Y... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 199,432,977,944,611,980,000,000,000,000,000,000,000 | 19 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int do_o_path(struct nameidata *nd, unsigned flags, struct file *file)
{
struct path path;
int error = path_lookupat(nd, flags, &path);
if (!error) {
audit_inode(nd->name, path.dentry, 0);
error = vfs_open(&path, file, current_cred());
path_put(&path);
}
return error;
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 321,132,471,206,576,420,000,000,000,000,000,000,000 | 11 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
int git_index_add_all(
git_index *index,
const git_strarray *paths,
unsigned int flags,
git_index_matched_path_cb cb,
void *payload)
{
int error;
git_repository *repo;
git_iterator *wditer = NULL;
git_pathspec ps;
bool no_fnmatch = (flags & GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH) != 0;
assert(index);
repo =... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 146,407,891,853,958,050,000,000,000,000,000,000,000 | 40 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
hexchar(const char *s)
{
unsigned char result[2];
int i;
for (i = 0; i < 2; i++) {
if (s[i] >= '0' && s[i] <= '9')
result[i] = (unsigned char)(s[i] - '0');
else if (s[i] >= 'a' && s[i] <= 'f')
result[i] = (unsigned char)(s[i] - 'a') + 10;
else if (s[i] >= 'A' && s[i] <= 'F')
result[i] = (unsigned cha... | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 281,523,897,428,254,500,000,000,000,000,000,000,000 | 17 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
input_intermediate(struct input_ctx *ictx)
{
if (ictx->interm_len == (sizeof ictx->interm_buf) - 1)
ictx->flags |= INPUT_DISCARD;
else {
ictx->interm_buf[ictx->interm_len++] = ictx->ch;
ictx->interm_buf[ictx->interm_len] = '\0';
}
return (0);
} | 0 | [] | tmux | 2ffbd5b5f05dded1564ba32a6a00b0b417439b2f | 166,638,680,239,553,360,000,000,000,000,000,000,000 | 11 | When searching for tabs, start from screen width, fixes out-of-bounds
read found by Kuang-che Wu. |
has_server_privilege_name(PG_FUNCTION_ARGS)
{
text *servername = PG_GETARG_TEXT_P(0);
text *priv_type_text = PG_GETARG_TEXT_P(1);
Oid roleid;
Oid serverid;
AclMode mode;
AclResult aclresult;
roleid = GetUserId();
serverid = convert_server_name(servername);
mode = convert_server_priv_string(priv_typ... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 150,003,651,152,825,700,000,000,000,000,000,000,000 | 17 | 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... |
static void ext4_dirent_csum_set(struct inode *inode,
struct ext4_dir_entry *dirent)
{
struct ext4_dir_entry_tail *t;
if (!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb,
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
return;
t = get_dirent_tail(inode, dirent);
if (!t) {
EXT4_ERROR_INODE(inode, "metadata_csum set b... | 0 | [
"CWE-20"
] | linux | c9b92530a723ac5ef8e352885a1862b18f31b2f5 | 273,653,638,833,477,030,000,000,000,000,000,000,000 | 19 | ext4: make orphan functions be no-op in no-journal mode
Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.
Signe... |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 1);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_OK... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 315,168,687,741,013,520,000,000,000,000,000,000,000 | 33 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
ldns_rdf2buffer_str_alg(ldns_buffer *output, const ldns_rdf *rdf)
{
/* don't use algorithm mnemonics in the presentation format
this kind of got sneaked into the rfc's */
uint8_t data = ldns_rdf_data(rdf)[0];
ldns_buffer_printf(output, "%d", data);
return ldns_buffer_status(output);
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 168,984,785,586,330,840,000,000,000,000,000,000,000 | 8 | CAA and URI |
static int __init b43_init(void)
{
int err;
b43_debugfs_init();
err = b43_pcmcia_init();
if (err)
goto err_dfs_exit;
err = b43_sdio_init();
if (err)
goto err_pcmcia_exit;
#ifdef CONFIG_B43_BCMA
err = bcma_driver_register(&b43_bcma_driver);
if (err)
goto err_sdio_exit;
#endif
#ifdef CONFIG_B43_SSB
err = ... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 207,991,749,436,349,550,000,000,000,000,000,000,000 | 39 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... |
rb_str_squeeze(argc, argv, str)
int argc;
VALUE *argv;
VALUE str;
{
str = rb_str_dup(str);
rb_str_squeeze_bang(argc, argv, str);
return str;
} | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 226,817,812,392,118,700,000,000,000,000,000,000,000 | 9 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void get_lc_oid(struct req_state *s, string& oid)
{
string shard_id = s->bucket.name + ':' +s->bucket.bucket_id;
int max_objs = (s->cct->_conf->rgw_lc_max_objs > HASH_PRIME)?HASH_PRIME:s->cct->_conf->rgw_lc_max_objs;
int index = ceph_str_hash_linux(shard_id.c_str(), shard_id.size()) % HASH_PRIME % max_objs... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 155,916,751,279,762,360,000,000,000,000,000,000,000 | 11 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
{
MPTSASState *s = MPT_SAS(dev);
Error *err = NULL;
int ret;
dev->config[PCI_LATENCY_TIMER] = 0;
dev->config[PCI_INTERRUPT_PIN] = 0x01;
if (s->msi != ON_OFF_AUTO_OFF) {
ret = msi_init(dev, 0, 1, true, false, &err);
/... | 0 | [
"CWE-416"
] | qemu | 3791642c8d60029adf9b00bcb4e34d7d8a1aea4d | 324,951,723,776,756,270,000,000,000,000,000,000,000 | 55 | mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392)
While processing SCSI i/o requests in mptsas_process_scsi_io_request(),
the Megaraid emulator appends new MPTSASRequest object 'req' to
the 's->pending' queue. In case of an error, this same object gets
dequeued in mptsas_free_request() only if SCSIRequ... |
static bool nfs_verifier_is_delegated(struct dentry *dentry)
{
return nfs_test_verifier_delegated(dentry->d_time);
} | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 153,494,415,793,445,880,000,000,000,000,000,000,000 | 4 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
R_API RBinJavaAttrMetas *r_bin_java_get_attr_type_by_name(const char *name) {
// TODO: use sdb/hashtable here
int i;
for (i = 0; i < RBIN_JAVA_ATTRS_METAS_SZ; i++) {
if (!strcmp ((const char *) name, RBIN_JAVA_ATTRS_METAS[i].name)) {
return &RBIN_JAVA_ATTRS_METAS[i];
}
}
return &RBIN_JAVA_ATTRS_METAS[R_BIN_... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 100,144,365,270,973,000,000,000,000,000,000,000,000 | 10 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static void php_object_property_dump(zval *zv, zend_ulong index, zend_string *key, int level) /* {{{ */
{
const char *prop_name, *class_name;
if (key == NULL) { /* numeric key */
php_printf("%*c[" ZEND_LONG_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
int unmangle = zend_unmangle_property_name... | 0 | [
"CWE-416"
] | php-src | b2af4e8868726a040234de113436c6e4f6372d17 | 82,688,447,160,392,580,000,000,000,000,000,000,000 | 25 | Complete the fix of bug #70172 for PHP 7 |
static const struct vhost_memory_region *find_region(struct vhost_memory *mem,
__u64 addr, __u32 len)
{
struct vhost_memory_region *reg;
int i;
/* linear search is not brilliant, but we really have on the order of 6
* regions in practice */
for (i = 0; i < mem->nregions; ++i) {
reg = mem->regions + ... | 0 | [] | linux-2.6 | bd97120fc3d1a11f3124c7c9ba1d91f51829eb85 | 132,303,717,652,242,960,000,000,000,000,000,000,000 | 16 | vhost: fix length for cross region descriptor
If a single descriptor crosses a region, the
second chunk length should be decremented
by size translated so far, instead it includes
the full descriptor length.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: D... |
void DL_Dxf::writeLinetype(DL_WriterA& dw,
const DL_LinetypeData& data) {
std::string nameUpper = data.name;
std::transform(nameUpper.begin(), nameUpper.end(), nameUpper.begin(), ::toupper);
if (data.name.empty()) {
std::cerr << "DL_Dxf::writeLinetype: "
<< "Line... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 100,750,947,778,418,060,000,000,000,000,000,000,000 | 61 | check vertexIndex which might be -1 for broken DXF |
RZ_IPI char *rz_core_analysis_var_display(RzCore *core, RzAnalysisVar *var, bool add_name) {
RzAnalysis *analysis = core->analysis;
RzStrBuf *sb = rz_strbuf_new(NULL);
char *vartype = rz_type_as_string(core->analysis->typedb, var->type);
char *fmt = rz_type_format(analysis->typedb, vartype);
RzRegItem *i;
if (!fm... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 270,240,111,267,453,260,000,000,000,000,000,000,000 | 61 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static inline void ext4_xattr_hash_entry(struct ext4_xattr_header *header,
struct ext4_xattr_entry *entry)
{
__u32 hash = 0;
char *name = entry->e_name;
int n;
for (n = 0; n < entry->e_name_len; n++) {
hash = (hash << NAME_HASH_SHIFT) ^
(hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^
*name... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | 294,423,560,519,288,940,000,000,000,000,000,000,000 | 25 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@sus... |
get_dns_cert (const char *name, estream_t *r_key,
unsigned char **r_fpr, size_t *r_fprlen, char **r_url)
{
#ifdef USE_DNS_CERT
#ifdef USE_ADNS
gpg_error_t err;
adns_state state;
adns_answer *answer = NULL;
unsigned int ctype;
int count;
*r_key = NULL;
*r_fpr = NULL;
*r_fprlen = 0;
*r_ur... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 136,840,612,295,905,120,000,000,000,000,000,000,000 | 288 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
SWFInput_eof(SWFInput input)
{
return input->eof(input);
} | 0 | [
"CWE-190",
"CWE-703"
] | libming | a009a38dce1d9316cad1ab522b813b1d5ba4c62a | 24,715,398,979,844,490,000,000,000,000,000,000,000 | 4 | Fix left shift of a negative value in SWFInput_readSBits. Check for number before before left-shifting by (number-1). |
void RGWListBucketMultiparts::pre_exec()
{
rgw_bucket_object_pre_exec(s);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 234,159,014,212,632,400,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
{
struct sctp_chunk *retval;
struct sctp_sackhdr sack;
int len;
__u32 ctsn;
__u16 num_gabs, num_dup_tsns;
struct sctp_association *aptr = (struct sctp_association *)asoc;
struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
s... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 9,628,390,023,968,031,000,000,000,000,000,000,000 | 98 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static int do_send_NPIdentifier(rpc_message_t *message, void *p_value)
{
NPIdentifier ident = *(NPIdentifier *)p_value;
int id = 0;
if (ident) {
#ifdef BUILD_WRAPPER
id = id_lookup_value(ident);
if (id < 0)
id = id_create(ident);
#endif
#ifdef BUILD_VIEWER
id = (uintptr_t)ident;
#endif
assert(id != 0);
}... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 256,029,452,857,411,940,000,000,000,000,000,000,000 | 17 | Support all the new variables added |
nautilus_file_info_iface_init (NautilusFileInfoIface *iface)
{
iface->is_gone = nautilus_file_is_gone;
iface->get_name = nautilus_file_get_name;
iface->get_file_type = nautilus_file_get_file_type;
iface->get_location = nautilus_file_get_location;
iface->get_uri = nautilus_file_get_uri;
iface->get_parent_location ... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 281,305,827,401,591,070,000,000,000,000,000,000,000 | 22 | 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-... |
static vm_fault_t perf_mmap_fault(struct vm_fault *vmf)
{
struct perf_event *event = vmf->vma->vm_file->private_data;
struct perf_buffer *rb;
vm_fault_t ret = VM_FAULT_SIGBUS;
if (vmf->flags & FAULT_FLAG_MKWRITE) {
if (vmf->pgoff == 0)
ret = 0;
return ret;
}
rcu_read_lock();
rb = rcu_dereference(event->... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 217,188,446,855,278,100,000,000,000,000,000,000,000 | 34 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
getNextAttribute(TranslationTableHeader *table) {
/* Get the next attribute value, or 0 if there is no more space in the table. */
TranslationTableCharacterAttributes next = table->nextCharacterClassAttribute;
if (next) {
if (next == CTC_LitDigit)
table->nextCharacterClassAttribute = CTC_UserDefined9;
else
... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 187,438,488,381,921,600,000,000,000,000,000,000,000 | 12 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
static void macsec_set_shortlen(struct macsec_eth_header *h, size_t data_len)
{
if (data_len < MIN_NON_SHORT_LEN)
h->short_length = data_len;
} | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 196,015,596,689,328,900,000,000,000,000,000,000,000 | 5 | 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... |
int wvlan_set_station_nickname(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra)
{
struct wl_private *lp = wl_priv(dev);
unsigned long flags;
size_t len;
int ret = 0;
/*------------------------------------------------------------------------*... | 0 | [
"CWE-119",
"CWE-787"
] | linux | b5e2f339865fb443107e5b10603e53bbc92dc054 | 31,110,819,792,874,120,000,000,000,000,000,000,000 | 28 | staging: wlags49_h2: buffer overflow setting station name
We need to check the length parameter before doing the memcpy(). I've
actually changed it to strlcpy() as well so that it's NUL terminated.
You need CAP_NET_ADMIN to trigger these so it's not the end of the
world.
Reported-by: Nico Golde <nico@ngolde.de>
Rep... |
gerbv_gdk_draw_prim6(GdkPixmap *pixmap, GdkGC *gc, gerbv_simplified_amacro_t *s,
double scale, gint x, gint y)
{
const int outside_dia_idx = 2;
const int ci_thickness_idx = 3;
const int gap_idx = 4;
const int nuf_circles_idx = 5;
const int ch_thickness_idx = 6;
const int ch_length_idx = 7;
... | 0 | [
"CWE-703"
] | gerbv | b2c2f8da851f2ac8079a91ce9d498d87ff96abcf | 302,286,839,165,042,230,000,000,000,000,000,000,000 | 75 | Avoid direct access on array of unknown size
Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array. |
GF_Err gf_isom_get_bs(GF_ISOFile *movie, GF_BitStream **out_bs)
{
#ifndef GPAC_DISABLE_ISOM_WRITE
if (!movie || movie->openMode != GF_ISOM_OPEN_WRITE || !movie->editFileMap) //memory mode
return GF_NOT_SUPPORTED;
if (movie->segment_bs)
*out_bs = movie->segment_bs;
else
*out_bs = movie->editFileMap->bs;
if (... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 302,495,275,257,717,530,000,000,000,000,000,000,000 | 19 | fixed #1706 |
static int cdrom_ioctl_play_trkind(struct cdrom_device_info *cdi,
void __user *argp)
{
struct cdrom_ti ti;
int ret;
cd_dbg(CD_DO_IOCTL, "entering CDROMPLAYTRKIND\n");
if (!CDROM_CAN(CDC_PLAY_AUDIO))
return -ENOSYS;
if (copy_from_user(&ti, argp, sizeof(ti)))
return -EFAULT;
ret = check_for_audio_disc(cdi,... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 176,904,440,334,332,900,000,000,000,000,000,000,000 | 18 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
hfinfo_remove_from_gpa_name_map(const header_field_info *hfinfo)
{
g_free(last_field_name);
last_field_name = NULL;
if (!hfinfo->same_name_next && hfinfo->same_name_prev_id == -1) {
/* No hfinfo with the same name */
g_hash_table_steal(gpa_name_map, hfinfo->abbrev);
return;
}
if (hfinfo->same_name_next) {
... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 333,954,043,751,124,200,000,000,000,000,000,000,000 | 24 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static unsigned long intel_alloc_iova(struct device *dev,
struct dmar_domain *domain,
unsigned long nrpages, uint64_t dma_mask)
{
unsigned long iova_pfn = 0;
/* Restrict dma_mask to the width that the iommu can handle */
dma_mask = min_t(uint64_t, DOMAIN_MAX_ADDR(domain->gaw), dma_mask);
/* Ensur... | 0 | [] | linux | fb58fdcd295b914ece1d829b24df00a17a9624bc | 138,884,310,974,013,000,000,000,000,000,000,000,000 | 32 | iommu/vt-d: Do not enable ATS for untrusted devices
Currently Linux automatically enables ATS (Address Translation Service)
for any device that supports it (and IOMMU is turned on). ATS is used to
accelerate DMA access as the device can cache translations locally so
there is no need to do full translation on IOMMU sid... |
static int pix_abs16_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
{
int s, i;
uint8_t *pix3 = pix2 + line_size;
s = 0;
for(i=0;i<h;i++) {
s += abs(pix1[0] - avg4(pix2[0], pix2[1], pix3[0], pix3[1]));
s += abs(pix1[1] - avg4(pix2[1], pix2[2], pix3[1], pix3[2]));
... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 291,589,478,283,881,400,000,000,000,000,000,000,000 | 29 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
TPM2B_ENCRYPTED_SECRET_Marshal(TPM2B_ENCRYPTED_SECRET *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM2B_Marshal(&source->b, sizeof(source->t.secret), buffer, size); // libtpms changed
return written;
} | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 196,362,912,141,301,100,000,000,000,000,000,000,000 | 6 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
Spvar_definition *find_row_field_by_name(const LEX_CSTRING *name, uint *offset) const
{
// Cast-off the "const" qualifier
List_iterator<Spvar_definition> it(*((List<Spvar_definition>*)this));
Spvar_definition *def;
for (*offset= 0; (def= it++); (*offset)++)
{
if (eq_name(def, name))
... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 264,986,740,539,985,800,000,000,000,000,000,000,000 | 12 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
grub_auth_check_authentication (const char *userlist)
{
char login[1024];
struct grub_auth_user *cur = NULL;
static unsigned long punishment_delay = 1;
char entered[GRUB_AUTH_MAX_PASSLEN];
struct grub_auth_user *user;
grub_memset (login, 0, sizeof (login));
if (is_authenticated (userlist))
{
p... | 0 | [
"CWE-264"
] | grub | 451d80e52d851432e109771bb8febafca7a5f1f2 | 266,806,456,431,775,600,000,000,000,000,000,000,000 | 50 | Fix security issue when reading username and password
This patch fixes two integer underflows at:
* grub-core/lib/crypto.c
* grub-core/normal/auth.c
CVE-2015-8370
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
Also-By: Andrey Borzenkov <arvidjaar@... |
static llparse_match_t llparse__match_sequence_id(
llhttp__internal_t* s, const unsigned char* p,
const unsigned char* endp,
const unsigned char* seq, uint32_t seq_len) {
uint32_t index;
llparse_match_t res;
index = s->_index;
for (; p != endp; p++) {
unsigned char current;
current = *p;
... | 0 | [
"CWE-444"
] | node | 641f786bb1a1f6eb1ff8750782ed939780f2b31a | 82,260,375,099,400,730,000,000,000,000,000,000,000 | 31 | http: unset `F_CHUNKED` on new `Transfer-Encoding`
Duplicate `Transfer-Encoding` header should be a treated as a single,
but with original header values concatenated with a comma separator. In
the light of this, even if the past `Transfer-Encoding` ended with
`chunked`, we should be not let the `F_CHUNKED` to leak int... |
static ssize_t aac_show_kernel_version(struct device *device,
struct device_attribute *attr,
char *buf)
{
struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata;
int len, tmp;
tmp = le32_to_cpu(dev->adapter_info.kernelrev);
len = snprintf(buf, PAGE_SIZE, "%d.%d-%d[%d]\n",
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | f856567b930dfcdbc3323261bf77240ccdde01f5 | 280,422,719,843,546,000,000,000,000,000,000,000,000 | 13 | aacraid: missing capable() check in compat ioctl
In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the
check as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torv... |
int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
/*
* Options without arguments
*/
if (optname == SO_BINDTODEVICE)
return sock_setbindtodevice(sk, optval, o... | 1 | [
"CWE-119",
"CWE-787"
] | linux | b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 | 169,948,205,361,947,340,000,000,000,000,000,000,000 | 356 | net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since ... |
static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
{
XgmacState *s = qemu_get_nic_opaque(nc);
static const unsigned char sa_bcast[6] = {0xff, 0xff, 0xff,
0xff, 0xff, 0xff};
int unicast, broadcast, multicast;
struct desc bd;
ssize_... | 0 | [
"CWE-787"
] | qemu | 5519724a13664b43e225ca05351c60b4468e4555 | 79,882,512,284,640,190,000,000,000,000,000,000,000 | 50 | hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()
A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It
occurs while sending an Ethernet frame due to missing break statements
and improper checking of the buffer size.
Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Signed-off-by: Mauro Matteo Cas... |
static int kvm_dev_ioctl_create_vm(unsigned long type)
{
int r;
struct kvm *kvm;
struct file *file;
kvm = kvm_create_vm(type);
if (IS_ERR(kvm))
return PTR_ERR(kvm);
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
r = kvm_coalesced_mmio_init(kvm);
if (r < 0) {
kvm_put_kvm(kvm);
return r;
}
#endif
r = get_unused_fd... | 0 | [
"CWE-416",
"CWE-284"
] | linux | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | 317,522,121,101,850,970,000,000,000,000,000,000,000 | 37 | KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: ... |
symbol_translation (const symbol *sym)
{
if (sym->content->class == token_sym && !sym->is_alias)
{
/* A token whose translation has already been set? */
if (token_translations[sym->content->code]
!= undeftoken->content->number)
complain_code_redeclared
(sym->content->code,
... | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 90,255,163,573,189,250,000,000,000,000,000,000,000 | 15 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct device *dev = &intf->dev;
struct usb_device *usbdev = interface_to_usbdev(intf);
struct net_device *netdev;
struct catc *catc;
u8 broadcast[ETH_ALEN];
int pktsz, ret;
if (usb_set_interface(usbdev,
intf->altsetting->des... | 0 | [
"CWE-20",
"CWE-119"
] | linux | 2d6a0e9de03ee658a9adc3bfb2f0ca55dff1e478 | 292,022,730,299,658,250,000,000,000,000,000,000,000 | 167 | catc: Use heap buffer for memory size test
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
makeOperatorDependencies(HeapTuple tuple, bool isUpdate)
{
Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tuple);
ObjectAddress myself,
referenced;
myself.classId = OperatorRelationId;
myself.objectId = oper->oid;
myself.objectSubId = 0;
/*
* If we are updating the operator, delete any existing entr... | 1 | [
"CWE-94"
] | postgres | 5579726bd60a6e7afb04a3548bced348cd5ffd89 | 176,265,384,975,093,630,000,000,000,000,000,000,000 | 101 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
size_t, msg_len, unsigned int, msg_prio,
const struct timespec __user *, u_abs_timeout)
{
struct timespec ts, *p = NULL;
if (u_abs_timeout) {
int res = prepare_timeout(u_abs_timeout, &ts);
if (res)
return res;
p = &ts;
}
return... | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 332,250,162,001,851,100,000,000,000,000,000,000,000 | 13 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
static void php_wddx_add_var(wddx_packet *packet, zval *name_var)
{
zval **val;
HashTable *target_hash;
TSRMLS_FETCH();
if (Z_TYPE_P(name_var) == IS_STRING) {
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
}
if (zend_hash_find(EG(active_symbol_table), Z_STRVAL_P(name_var),
Z_S... | 1 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 166,615,571,244,109,660,000,000,000,000,000,000,000 | 40 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
void btrfs_reclaim_bgs(struct btrfs_fs_info *fs_info)
{
spin_lock(&fs_info->unused_bgs_lock);
if (!list_empty(&fs_info->reclaim_bgs))
queue_work(system_unbound_wq, &fs_info->reclaim_bgs_work);
spin_unlock(&fs_info->unused_bgs_lock);
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 153,058,109,282,434,300,000,000,000,000,000,000,000 | 7 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
readtup_heap(Tuplesortstate *state, SortTuple *stup,
int tapenum, unsigned int len)
{
unsigned int tupbodylen = len - sizeof(int);
unsigned int tuplen = tupbodylen + MINIMAL_TUPLE_DATA_OFFSET;
MinimalTuple tuple = (MinimalTuple) palloc(tuplen);
char *tupbody = (char *) tuple + MINIMAL_TUPLE_DATA_OFFSET;
Hea... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 364,442,582,050,970,200,000,000,000,000,000,000 | 26 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
static void dw_reader(struct dw_spi *dws)
{
u32 max = rx_max(dws);
u16 rxw;
while (max--) {
rxw = dw_read_io_reg(dws, DW_SPI_DR);
/* Care rx only if the transfer's original "rx" is not null */
if (dws->rx_end - dws->len) {
if (dws->n_bytes == 1)
*(u8 *)(dws->rx) = rxw;
else
*(u16 *)(dws->rx) = r... | 1 | [
"CWE-662"
] | linux | 19b61392c5a852b4e8a0bf35aecb969983c5932d | 330,113,182,566,141,800,000,000,000,000,000,000,000 | 17 | spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls
dw_spi_irq() and dw_spi_transfer_one concurrent calls.
I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null,
dw->len==4, and dw->tx_end==1.
When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one
may concurrent... |
static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
{
struct dccp_sock *dp = dccp_sk(sk);
struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
ktime_t now = ktime_get_real();
s64 delay;
/*
* This function is called only for Data and DataAck packets. Sending
* zero-sized Data(Ack)s is theoret... | 0 | [
"CWE-200"
] | linux | 7b07f8eb75aa3097cdfd4f6eac3da49db787381d | 315,397,997,625,684,830,000,000,000,000,000,000,000 | 76 | dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)
The CCID3 code fails to initialize the trailing padding bytes of struct
tfrc_tx_info added for alignment on 64 bit architectures. It that for
potentially leaks four bytes kernel stack via the getsockopt() syscall.
Add an explicit memset(0) before filling th... |
static struct htx_sl *h2_prepare_htx_reqline(uint32_t fields, struct ist *phdr, struct htx *htx, unsigned int *msgf)
{
struct ist uri, meth_sl;
unsigned int flags = HTX_SL_F_NONE;
struct htx_sl *sl;
size_t i;
if ((fields & H2_PHDR_FND_METH) && isteq(phdr[H2_PHDR_IDX_METH], ist("CONNECT"))) {
if (fields & H2_PHD... | 1 | [] | haproxy | a495e0d94876c9d39763db319f609351907a31e8 | 114,147,669,772,801,900,000,000,000,000,000,000,000 | 167 | BUG/MAJOR: h2: verify early that non-http/https schemes match the valid syntax
While we do explicitly check for strict character sets in the scheme,
this is only done when extracting URL components from an assembled one,
and we have special handling for "http" and "https" schemes directly in
the H2-to-HTX conversion. ... |
int sctp_inet_listen(struct socket *sock, int backlog)
{
struct sock *sk = sock->sk;
struct crypto_hash *tfm = NULL;
int err = -EINVAL;
if (unlikely(backlog < 0))
goto out;
sctp_lock_sock(sk);
if (sock->state != SS_UNCONNECTED)
goto out;
/* Allocate HMAC for generating cookie. */
if (!sctp_sk(sk)->hmac ... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 30,992,323,460,267,870,000,000,000,000,000,000,000 | 52 | 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... |
int rose_validate_nr(struct sock *sk, unsigned short nr)
{
struct rose_sock *rose = rose_sk(sk);
unsigned short vc = rose->va;
while (vc != rose->vs) {
if (nr == vc) return 1;
vc = (vc + 1) % ROSE_MODULUS;
}
return nr == rose->vs;
} | 0 | [
"CWE-20"
] | linux | e0bccd315db0c2f919e7fcf9cb60db21d9986f52 | 194,294,787,744,970,230,000,000,000,000,000,000,000 | 12 | rose: Add length checks to CALL_REQUEST parsing
Define some constant offsets for CALL_REQUEST based on the description
at <http://www.techfest.com/networking/wan/x25plp.htm> and the
definition of ROSE as using 10-digit (5-byte) addresses. Use them
consistently. Validate all implicit and explicit facilities lengths.
... |
define_macro (int argc, token_data **argv, symbol_lookup mode)
{
const builtin *bp;
if (bad_argc (argv[0], argc, 2, 3))
return;
if (TOKEN_DATA_TYPE (argv[1]) != TOKEN_TEXT)
{
M4ERROR ((warning_status, 0,
"Warning: %s: invalid macro name ignored", ARG (0)));
return;
}
if (argc == 2)
... | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 54,664,111,611,279,260,000,000,000,000,000,000,000 | 40 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
ldns_pkt_cert_algorithm2str(ldns_cert_algorithm cert_algorithm)
{
char *str;
ldns_buffer *buf;
buf = ldns_buffer_new(10);
if (!buf) {
return NULL;
}
str = NULL;
if (ldns_cert_algorithm2buffer_str(buf, cert_algorithm)
== LDNS_STATUS_OK) {
str = ldns_buffer_export2str(buf);
}
ldns_buffer_free(buf);
... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 129,549,112,057,998,260,000,000,000,000,000,000,000 | 19 | CAA and URI |
static void ide_atapi_cmd_read_pio(IDEState *s, int lba, int nb_sectors,
int sector_size)
{
s->lba = lba;
s->packet_transfer_size = nb_sectors * sector_size;
s->elementary_transfer_size = 0;
s->io_buffer_index = sector_size;
s->cd_sector_size = sector_size;
s-... | 0 | [] | qemu | ce560dcf20c14194db5ef3b9fc1ea592d4e68109 | 6,202,574,806,098,640,000,000,000,000,000,000,000 | 12 | ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0
The START STOP UNIT command will only eject/load media if
power condition is zero.
If power condition is !0 then LOEJ and START will be ignored.
From MMC (sbc contains similar wordings too)
The Power Conditions field requests the block device to be ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.