func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void CWebServer::RType_FloorPlans(WebEmSession & session, const request& req, Json::Value &root)
{
root["status"] = "OK";
root["title"] = "Floorplans";
std::vector<std::vector<std::string> > result, result2, result3;
result = m_sql.safe_query("SELECT Key, nValue, sValue FROM Preferences WHERE Key LIKE... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 73,696,062,448,498,350,000,000,000,000,000,000,000 | 84 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
ippSetValueTag(
ipp_t *ipp, /* I - IPP message */
ipp_attribute_t **attr, /* IO - IPP attribute */
ipp_tag_t value_tag) /* I - Value tag */
{
int i; /* Looping var */
_ipp_value_t *value; /* Current value */
int integer; /* Current integer value */
cups_lang_t *language; ... | 1 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 8,300,613,243,036,090,000,000,000,000,000,000,000 | 143 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
void ContentSettingsObserver::SetContentSettingRules(
const RendererContentSettingRules* content_setting_rules) {
content_setting_rules_ = content_setting_rules;
} | 0 | [
"CWE-20",
"CWE-200"
] | muon | c18663aa171c6cdf03da3e8c70df8663645b97c4 | 261,562,372,016,430,340,000,000,000,000,000,000,000 | 4 | Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer |
void ipc_init_ids(struct ipc_ids *ids)
{
ids->in_use = 0;
ids->seq = 0;
ids->next_id = -1;
init_rwsem(&ids->rwsem);
idr_init(&ids->ipcs_idr);
} | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 136,976,378,272,133,030,000,000,000,000,000,000,000 | 8 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
fr_window_history_add (FrWindow *window,
const char *path)
{
if ((window->priv->history_current == NULL) || (g_strcmp0 (path, window->priv->history_current->data) != 0)) {
GList *scan;
GList *new_current = NULL;
/* search the path in the history */
for (scan = window->pr... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 264,660,696,579,127,300,000,000,000,000,000,000,000 | 36 | libarchive: sanitize filenames before extracting |
QPDFWriter::writeObjectStream(QPDFObjectHandle object)
{
// Note: object might be null if this is a place-holder for an
// object stream that we are generating from scratch.
QPDFObjGen old_og = object.getObjGen();
assert(old_og.getGen() == 0);
int old_id = old_og.getObj();
int new_id = obj_renu... | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 136,988,725,184,787,160,000,000,000,000,000,000,000 | 148 | Fix infinite loop in QPDFWriter (fixes #143) |
static int em_syscall(struct x86_emulate_ctxt *ctxt)
{
struct x86_emulate_ops *ops = ctxt->ops;
struct desc_struct cs, ss;
u64 msr_data;
u16 cs_sel, ss_sel;
u64 efer = 0;
/* syscall is not available in real mode */
if (ctxt->mode == X86EMUL_MODE_REAL ||
ctxt->mode == X86EMUL_MODE_VM86)
return emulate_ud(... | 1 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 308,948,657,571,020,140,000,000,000,000,000,000,000 | 51 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
bool is_exit = false;
return _display(disp,title,0,display_info,axis,align,XYZ,exit_on_anykey,0,true,is_exit);
}
const CImgList<T>& _display(CImgDisplay &disp, const char *const title, const CImgList<charT> *const titles,
const bool display_info, const char axis, con... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 38,743,909,608,874,710,000,000,000,000,000,000,000 | 85 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void delete_x11_file(pid_t pid) {
char *fname;
if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_X11_DIR, pid) == -1)
errExit("asprintf");
int rv = unlink(fname);
(void) rv;
free(fname);
} | 0 | [
"CWE-703"
] | firejail | 6b8dba29d73257311564ee7f27b9b14758cc693e | 260,644,619,118,244,940,000,000,000,000,000,000,000 | 8 | security fix |
TEST_P(Http2CodecImplTest, Invalid204WithContentLength) {
initialize();
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(_, true));
request_encoder_->encodeHeaders(request_headers, true);
TestHeaderMapImpl response_headers... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 69,665,451,481,652,460,000,000,000,000,000,000,000 | 20 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
assert_next_is_dir (FlatpakBwrap *bwrap,
gsize i,
const char *dir)
{
g_assert_cmpuint (i, <, bwrap->argv->len);
g_assert_cmpstr (bwrap->argv->pdata[i++], ==, "--dir");
g_assert_cmpuint (i, <, bwrap->argv->len);
g_assert_cmpstr (bwrap->argv->pdata[i++], ==, dir);
return ... | 0 | [
"CWE-74"
] | flatpak | 4108e022452303093d8b90c838695a0476cb09c7 | 26,569,232,496,875,300,000,000,000,000,000,000,000 | 10 | context: Add --unset-env option and a corresponding override
This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality
that I noticed while resolving that vulnerability, but is not required
for fixing the vulnerability.
Signed-off-by: Simon McVittie <smcv@collabora.com> |
WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
bool fetching_ckpt, XLogRecPtr tliRecPtr)
{
static pg_time_t last_fail_time = 0;
pg_time_t now;
/*-------
* Standby mode is implemented by a state machine:
*
* 1. Read from either archive or pg_xlog (XLOG_FROM_ARCHIVE), or just
* pg_x... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 31,556,539,179,091,868,000,000,000,000,000,000,000 | 340 | 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... |
zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, zend_bool raw)
{
unsigned char md[EVP_MAX_MD_SIZE];
const EVP_MD *mdtype;
unsigned int n;
zend_string *ret;
if (!(mdtype = EVP_get_digestbyname(method))) {
php_error_docref(NULL, E_WARNING, "Unknown signature algorithm");
return NULL;
... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 131,802,616,830,278,560,000,000,000,000,000,000,000 | 26 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
pg_has_role_id_name(PG_FUNCTION_ARGS)
{
Oid roleid = PG_GETARG_OID(0);
Name rolename = PG_GETARG_NAME(1);
text *priv_type_text = PG_GETARG_TEXT_P(2);
Oid roleoid;
AclMode mode;
AclResult aclresult;
roleoid = get_role_oid(NameStr(*rolename), false);
mode = convert_role_priv_string(priv_type_text);
ac... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 339,609,741,927,736,100,000,000,000,000,000,000,000 | 16 | 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... |
explicit ParallelConcatUpdate(OpKernelConstruction* ctx) : OpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("loc", &loc_));
} | 0 | [
"CWE-369"
] | tensorflow | e86605c0a336c088b638da02135ea6f9f6753618 | 158,208,919,001,264,580,000,000,000,000,000,000,000 | 3 | Fix FPE in inpace update ops.
PiperOrigin-RevId: 388303197
Change-Id: Ib48309b6213ffe53eba81004b00e889d653e4b83 |
cifs_get_tcp_session(struct smb_vol *volume_info)
{
struct TCP_Server_Info *tcp_ses = NULL;
int rc;
cifs_dbg(FYI, "UNC: %s\n", volume_info->UNC);
/* see if we already have a matching tcp_ses */
tcp_ses = cifs_find_tcp_session(volume_info);
if (tcp_ses)
return tcp_ses;
tcp_ses = kzalloc(sizeof(struct TCP_Ser... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 1fc29bacedeabb278080e31bb9c1ecb49f143c3b | 312,156,559,887,365,060,000,000,000,000,000,000,000 | 113 | cifs: fix off-by-one bug in build_unc_path_to_root
commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed
the code such that the vol->prepath no longer contained a leading
delimiter and then fixed up the places that accessed that field to
account for that change.
One spot in build_unc_path_to_root wa... |
static Image *ReadPICTImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
geometry[MagickPathExtent],
header_ole[4];
Image
*image;
int
c,
code;
MagickBooleanType
jpeg,
status;
PICTRectangle
frame;
PICTPixmap
pixmap;
Quantum
index;
register... | 0 | [
"CWE-772",
"CWE-401"
] | ImageMagick | c1b09bbec148f6ae11d0b686fdb89ac6dc0ab14e | 64,066,649,643,859,590,000,000,000,000,000,000,000 | 706 | https://github.com/ImageMagick/ImageMagick/issues/577 |
SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
unsigned int, flags, struct sockaddr __user *, addr,
int __user *, addr_len)
{
struct socket *sock;
struct iovec iov;
struct msghdr msg;
struct sockaddr_storage address;
int err, err2;
int fput_needed;
if (size > INT_MAX)
size = INT_MAX... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 161,760,079,883,621,950,000,000,000,000,000,000,000 | 42 | 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... |
void init(READ_RECORD *info)
{
Table_read_cursor::init(info);
bound_tracker.init();
end_of_partition= false;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 326,129,802,239,557,300,000,000,000,000,000,000,000 | 6 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
struct iphdr *tiph = &tunnel->parms.iph;
u8 tos = tunnel->parms.iph.tos;
__be16... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 63,820,317,129,650,070,000,000,000,000,000,000,000 | 142 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
{
uint32* cp1 = cp+w+toskew;
int32 incr = 2*toskew+w;
(void) y;
fromskew = (fromskew * 10) / 4;
if ((w & 3) == 0 && (h & 1) == 0) {
for (; h >= 2; h -= 2) {
x = w>>2;
do {
int32 Cb = pp[8];
... | 0 | [
"CWE-119"
] | libtiff | 40a5955cbf0df62b1f9e9bd7d9657b0070725d19 | 225,252,235,602,730,060,000,000,000,000,000,000,000 | 74 | * libtiff/tif_next.c: add new tests to check that we don't read outside of
the compressed input stream buffer.
* libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height |
static int local_renameat(FsContext *ctx, V9fsPath *olddir,
const char *old_name, V9fsPath *newdir,
const char *new_name)
{
int ret;
int odirfd, ndirfd;
if (ctx->export_flags & V9FS_SM_MAPPED_FILE &&
(local_is_mapped_file_metadata(ctx, old_name) |... | 0 | [
"CWE-732"
] | qemu | 7a95434e0ca8a037fd8aa1a2e2461f92585eb77b | 287,522,595,757,558,700,000,000,000,000,000,000,000 | 70 | 9pfs: local: forbid client access to metadata (CVE-2017-7493)
When using the mapped-file security mode, we shouldn't let the client mess
with the metadata. The current code already tries to hide the metadata dir
from the client by skipping it in local_readdir(). But the client can still
access or modify it through sev... |
spell_dump_compl(
char_u *pat, // leading part of the word
int ic, // ignore case
int *dir, // direction for adding matches
int dumpflags_arg) // DUMPFLAG_*
{
langp_T *lp;
slang_T *slang;
idx_T arridx[MAXWLEN];
int curi[MAXWLEN];
char_u word[MAXWLEN];
int c;
... | 1 | [
"CWE-121",
"CWE-787"
] | vim | 54e5fed6d27b747ff152cdb6edfb72ff60e70939 | 334,073,240,092,751,100,000,000,000,000,000,000,000 | 189 | patch 9.0.0035: spell dump may go beyond end of an array
Problem: Spell dump may go beyond end of an array.
Solution: Limit the word length. |
mrb_io_modestr_to_flags(mrb_state *mrb, const char *mode)
{
int flags = 0;
const char *m = mode;
switch (*m++) {
case 'r':
flags |= FMODE_READABLE;
break;
case 'w':
flags |= FMODE_WRITABLE | FMODE_CREATE | FMODE_TRUNC;
break;
case 'a':
flags |= FMODE_WRITABLE | FMODE_APP... | 0 | [
"CWE-416",
"CWE-787"
] | mruby | b51b21fc63c9805862322551387d9036f2b63433 | 144,567,999,958,483,340,000,000,000,000,000,000,000 | 36 | Fix `use after free in File#initilialize_copy`; fix #4001
The bug and the fix were reported by https://hackerone.com/pnoltof |
bgp_notification_print(netdissect_options *ndo,
const u_char *dat, int length)
{
struct bgp_notification bgpn;
const u_char *tptr;
ND_TCHECK2(dat[0], BGP_NOTIFICATION_SIZE);
memcpy(&bgpn, dat, BGP_NOTIFICATION_SIZE);
/* some little sanity checking */
if (length<BGP_NOTIFICAT... | 0 | [
"CWE-674",
"CWE-787"
] | tcpdump | af2cf04a9394c1a56227c2289ae8da262828294a | 54,823,312,843,432,840,000,000,000,000,000,000,000 | 79 | (for 4.9.3) CVE-2018-16300/BGP: prevent stack exhaustion
Enforce a limit on how many times bgp_attr_print() can recurse.
This fixes a stack exhaustion discovered by Include Security working
under the Mozilla SOS program in 2018 by means of code audit. |
static int __init x25_init(void)
{
int rc;
rc = proto_register(&x25_proto, 0);
if (rc)
goto out;
rc = sock_register(&x25_family_ops);
if (rc)
goto out_proto;
dev_add_pack(&x25_packet_type);
rc = register_netdevice_notifier(&x25_dev_notifier);
if (rc)
goto out_sock;
rc = x25_register_sysctl();
if (r... | 0 | [] | net | 7781607938c8371d4c2b243527430241c62e39c2 | 50,067,960,087,081,440,000,000,000,000,000,000,000 | 41 | net/x25: Fix null-ptr-deref caused by x25_disconnect
When the link layer is terminating, x25->neighbour will be set to NULL
in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in
x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is
shown below.
(Thread 1) | (Thread 2... |
int4_to_char(PG_FUNCTION_ARGS)
{
int32 value = PG_GETARG_INT32(0);
text *fmt = PG_GETARG_TEXT_P(1);
NUMDesc Num;
FormatNode *format;
text *result;
bool shouldFree;
int out_pre_spaces = 0,
sign = 0;
char *numstr,
*orgnum;
NUM_TOCHAR_prepare;
/*
* On DateType depend part (int32)
*/... | 0 | [
"CWE-120"
] | postgres | 0150ab567bcf5e5913e2b62a1678f84cc272441f | 276,358,581,693,281,240,000,000,000,000,000,000,000 | 89 | to_char(): prevent accesses beyond the allocated buffer
Previously very long field masks for floats could access memory
beyond the existing buffer allocated to hold the result.
Reported by Andres Freund and Peter Geoghegan. Backpatch to all
supported versions.
Security: CVE-2015-0241 |
char *get_56_lenc_string(char **buffer,
size_t *max_bytes_available,
size_t *string_length)
{
static char empty_string[1]= { '\0' };
char *begin= *buffer;
if (*max_bytes_available == 0)
return NULL;
/*
If the length encoded string has the length 0
... | 1 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 213,051,532,348,137,760,000,000,000,000,000,000,000 | 37 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
static struct pppox_sock *lookup_chan(u16 call_id, __be32 s_addr)
{
struct pppox_sock *sock;
struct pptp_opt *opt;
rcu_read_lock();
sock = rcu_dereference(callid_sock[call_id]);
if (sock) {
opt = &sock->proto.pptp;
if (opt->dst_addr.sin_addr.s_addr != s_addr)
sock = NULL;
else
sock_hold(sk_pppox(sock)... | 0 | [
"CWE-200"
] | net | 09ccfd238e5a0e670d8178cf50180ea81ae09ae1 | 282,287,648,214,657,000,000,000,000,000,000,000,000 | 18 | pptp: verify sockaddr_len in pptp_bind() and pptp_connect()
Reported-by: Dmitry Vyukov <dvyukov@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
get_filter(
Operation *op,
BerElement *ber,
Filter **filt,
const char **text )
{
return get_filter0( op, ber, filt, text, 0 );
} | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 125,833,120,997,508,000,000,000,000,000,000,000,000 | 8 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
static int php_date_period_initialize_from_hash(php_period_obj *period_obj, HashTable *myht TSRMLS_DC)
{
zval **ht_entry;
/* this function does no rollback on error */
if (zend_hash_find(myht, "start", sizeof("start"), (void**) &ht_entry) == SUCCESS) {
if (Z_TYPE_PP(ht_entry) == IS_OBJECT && Z_OBJCE_PP(ht_entry... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 90,635,900,376,323,770,000,000,000,000,000,000,000 | 73 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
GF_Err dmax_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_DMAXBox *ptr = (GF_DMAXBox *)s;
if (ptr == NULL) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->maxDur);
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 317,768,929,542,769,540,000,000,000,000,000,000,000 | 10 | prevent dref memleak on invalid input (#1183) |
_copyRelabelType(const RelabelType *from)
{
RelabelType *newnode = makeNode(RelabelType);
COPY_NODE_FIELD(arg);
COPY_SCALAR_FIELD(resulttype);
COPY_SCALAR_FIELD(resulttypmod);
COPY_SCALAR_FIELD(resultcollid);
COPY_SCALAR_FIELD(relabelformat);
COPY_LOCATION_FIELD(location);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 41,733,359,537,279,563,000,000,000,000,000,000,000 | 13 | 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... |
cmsBool Type_MPE_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number i, BaseOffset, DirectoryPos, CurrentPos;
int inputChan, outputChan;
cmsUInt32Number ElemCount;
cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL, Before;
cms... | 0 | [
"CWE-125"
] | Little-CMS | 5ca71a7bc18b6897ab21d815d15e218e204581e2 | 86,939,934,530,385,070,000,000,000,000,000,000,000 | 90 | Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug |
int read_header_tga(gdIOCtx *ctx, oTga *tga)
{
unsigned char header[18];
if (gdGetBuf(header, sizeof(header), ctx) < 18) {
gd_error("fail to read header");
return -1;
}
tga->identsize = header[0];
tga->colormaptype = header[1];
tga->imagetype = header[2];
tga->colormapstart = header[3] + (header[4] << 8);... | 1 | [
"CWE-125"
] | libgd | 10ef1dca63d62433fda13309b4a228782db823f7 | 276,200,054,405,641,370,000,000,000,000,000,000,000 | 57 | Unsupported TGA bpp/alphabit combinations should error gracefully
Currently, only 24bpp without alphabits and 32bpp with 8 alphabits are
really supported. All other combinations will be rejected with a warning. |
int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait)
{
int r;
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
if (unlikely(r != 0))
return r;
r = ttm_bo_wait(&bo->tbo, true, no_wait);
ttm_bo_unreserve(&bo->tbo);
return r;
} | 0 | [
"CWE-399",
"CWE-772"
] | linux | 385aee965b4e4c36551c362a334378d2985b722a | 281,916,513,007,170,070,000,000,000,000,000,000,000 | 11 | drm/virtio: don't leak bo on drm_gem_object_init failure
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@redhat.com |
static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir)
{
struct inode *dir = file->f_mapping->host;
struct gfs2_inode *dip = GFS2_I(dir);
struct gfs2_holder d_gh;
u64 offset = file->f_pos;
int error;
gfs2_holder_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh);
error = gfs2_glock_nq(&d_gh);
if (err... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 64dd153c83743af81f20924c6343652d731eeecb | 274,683,753,714,378,340,000,000,000,000,000,000,000 | 23 | GFS2: rewrite fallocate code to write blocks directly
GFS2's fallocate code currently goes through the page cache. Since it's only
writing to the end of the file or to holes in it, it doesn't need to, and it
was causing issues on low memory environments. This patch pulls in some of
Steve's block allocation work, and u... |
d_lite_wnum0(VALUE self)
{
get_d1(self);
return INT2FIX(m_wnum0(dat));
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 280,445,121,242,555,140,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 convert_ctx_accesses(struct verifier_env *env)
{
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
struct bpf_insn insn_buf[16];
struct bpf_prog *new_prog;
u32 cnt;
int i;
enum bpf_access_type type;
if (!env->prog->aux->ops->convert_ctx_access)
return 0;
for (i = 0; i < i... | 0 | [
"CWE-200"
] | linux | a1b14d27ed0965838350f1377ff97c93ee383492 | 6,667,738,681,883,869,000,000,000,000,000,000,000 | 67 | bpf: fix branch offset adjustment on backjumps after patching ctx expansion
When ctx access is used, the kernel often needs to expand/rewrite
instructions, so after that patching, branch offsets have to be
adjusted for both forward and backward jumps in the new eBPF program,
but for backward jumps it fails to account ... |
static inline unsigned long context_get_sm_pds(struct pasid_table *table)
{
int pds, max_pde;
max_pde = table->max_pasid >> PASID_PDE_SHIFT;
pds = find_first_bit((unsigned long *)&max_pde, MAX_NR_PASID_BITS);
if (pds < 7)
return 0;
return pds - 7;
} | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 47,904,724,168,784,940,000,000,000,000,000,000,000 | 11 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
put_tag_and_len(unsigned int tag, size_t len, u8 **ptr)
{
int i;
u8 *p;
if (len < 128) {
i = 2;
} else if (len < 256) {
i = 3;
} else {
i = 4;
}
if (ptr) {
p = *ptr;
*p++ = (u8)tag;
switch (i) {
case 2:
*p++ = len;
break;
case 3:
*p++ = 0x81;
*p++ = len;
break;
case 4:
... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 268,703,170,421,572,850,000,000,000,000,000,000,000 | 36 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void pwq_adjust_max_active(struct pool_workqueue *pwq)
{
struct workqueue_struct *wq = pwq->wq;
bool freezable = wq->flags & WQ_FREEZABLE;
unsigned long flags;
/* for @wq->saved_max_active */
lockdep_assert_held(&wq->mutex);
/* fast exit for non-freezable wqs */
if (!freezable && pwq->max_active == wq->... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 11,747,718,944,015,694,000,000,000,000,000,000,000 | 39 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
int get_ret() const { return op_ret; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 263,804,896,641,496,700,000,000,000,000,000,000,000 | 1 | 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 <... |
setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps, uint field_count)
{
uint bitmap_size= bitmap_buffer_size(field_count);
DBUG_ASSERT(table->s->virtual_fields == 0 && table->def_vcol_set == 0);
my_bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count,
FALSE);
bitmaps+... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 24,662,430,873,349,610,000,000,000,000,000,000,000 | 26 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static double x2scr_scaled(ASS_Renderer *render_priv, double x)
{
if (render_priv->state.explicit)
return x2scr_pos_scaled(render_priv, x);
return x * render_priv->orig_width_nocrop /
render_priv->track->PlayResX +
FFMAX(render_priv->settings.left_margin, 0);
} | 0 | [
"CWE-125"
] | libass | f4f48950788b91c6a30029cc28a240b834713ea7 | 48,579,172,827,859,480,000,000,000,000,000,000,000 | 8 | Fix line wrapping mode 0/3 bugs
This fixes two separate bugs:
a) Don't move a linebreak into the first symbol. This results in a empty
line at the front, which does not help to equalize line lengths at all.
Instead, merge line with the second one.
b) When moving a linebreak into a symbol that already is a break... |
static bool need_emulate_wbinvd(struct kvm_vcpu *vcpu)
{
return vcpu->kvm->arch.iommu_domain &&
!(vcpu->kvm->arch.iommu_flags & KVM_IOMMU_CACHE_COHERENCY);
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 217,555,864,012,684,800,000,000,000,000,000,000,000 | 5 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
void sendServerHello(SSL& ssl, BufferOutput buffer)
{
if (ssl.getSecurity().get_resuming())
ssl.verifyState(clientKeyExchangeComplete);
else
ssl.verifyState(clientHelloComplete);
if (ssl.GetError()) return;
ServerHello sh(ssl.getSecurity().get_connection().version_,
... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 63,314,982,822,740,330,000,000,000,000,000,000,000 | 25 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int ieee80211_do_open(struct net_device *dev, bool coming_up)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
u32 changed = 0;
int res;
u32 hw_reconf_flags = 0;
switch (sdata->vif.type) {
case NL80211_IFTYPE_WDS:
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 259,065,629,348,562,700,000,000,000,000,000,000,000 | 182 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
MagickExport void ResetImagePropertyIterator(const Image *image)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (image->properties == (void *) NULL)
return;
... | 0 | [
"CWE-125"
] | ImageMagick | dd84447b63a71fa8c3f47071b09454efc667767b | 96,616,932,159,807,410,000,000,000,000,000,000,000 | 10 | Prevent buffer overflow (bug report from Ibrahim el-sayed) |
bytes_rsplit(PyBytesObject *self, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"sep", "maxsplit", 0};
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
Py_ssize_t maxsplit = -1;
const char *s = PyBytes_AS_STRING(self), *sub;
Py_buffer vsub;
PyObject *list, *subobj = Py_None;
if (!Py... | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 241,124,676,833,222,400,000,000,000,000,000,000,000 | 25 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
bool value_depends_on_sql_mode_const_item()
{
/*
Currently we use value_depends_on_sql_mode() only for virtual
column expressions. They should not contain any expensive items.
If we ever get a crash on the assert below, it means
check_vcol_func_processor() is badly implemented for this i... | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 125,275,853,881,989,960,000,000,000,000,000,000,000 | 17 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static struct audit_tree *alloc_tree(const char *s)
{
struct audit_tree *tree;
tree = kmalloc(sizeof(struct audit_tree) + strlen(s) + 1, GFP_KERNEL);
if (tree) {
atomic_set(&tree->count, 1);
tree->goner = 0;
INIT_LIST_HEAD(&tree->chunks);
INIT_LIST_HEAD(&tree->rules);
INIT_LIST_HEAD(&tree->list);
INIT_L... | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 9,892,705,080,137,806,000,000,000,000,000,000,000 | 17 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
static double mp_date(_cimg_math_parser& mp) {
const unsigned int
siz_out = (unsigned int)mp.opcode[2],
siz_arg1 = (unsigned int)mp.opcode[4],
siz_arg2 = (unsigned int)mp.opcode[6];
double *ptr_out = &_mp_arg(1) + (siz_out?1:0);
const double
*ptr_arg... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 140,350,692,257,549,940,000,000,000,000,000,000,000 | 27 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
unsigned count_channel_mask_bits(FLAC__uint32 mask)
{
unsigned count = 0;
while(mask) {
if(mask & 1)
count++;
mask >>= 1;
}
return count;
} | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 160,504,945,422,616,830,000,000,000,000,000,000,000 | 10 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
rsvg_clip_path_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts)
{
const char *id = NULL, *klazz = NULL, *value = NULL;
RsvgClipPath *clip_path;
clip_path = (RsvgClipPath *) self;
if (rsvg_property_bag_size (atts)) {
if ((value = rsvg_property_bag_lookup (atts, "clipPathUnit... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 97,291,031,565,644,350,000,000,000,000,000,000,000 | 24 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void enable_sep_cpu(void)
{
int cpu = get_cpu();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
if (!boot_cpu_has(X86_FEATURE_SEP)) {
put_cpu();
return;
}
tss->ss1 = __KERNEL_CS;
tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss;
wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
wrmsr(MSR_IA32_SYS... | 0 | [
"CWE-264"
] | linux-2.6 | 7d91d531900bfa1165d445390b3b13a8013f98f7 | 248,446,071,166,796,770,000,000,000,000,000,000,000 | 17 | [PATCH] i386 vDSO: use install_special_mapping
This patch uses install_special_mapping for the i386 vDSO setup, consolidating
duplicated code.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
C... |
int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct used_address used_address;
if (vlen > UIO_MAXIOV)
... | 0 | [
"CWE-264"
] | net | 4de930efc23b92ddf88ce91c405ee645fe6e27ea | 149,070,781,317,029,740,000,000,000,000,000,000,000 | 55 | net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static struct srpt_send_ioctx *srpt_get_send_ioctx(struct srpt_rdma_ch *ch)
{
struct srpt_send_ioctx *ioctx;
unsigned long flags;
BUG_ON(!ch);
ioctx = NULL;
spin_lock_irqsave(&ch->spinlock, flags);
if (!list_empty(&ch->free_list)) {
ioctx = list_first_entry(&ch->free_list,
struct srpt_send_ioctx, free_l... | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 184,519,265,214,727,440,000,000,000,000,000,000,000 | 39 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
PDO_API void php_pdo_stmt_delref(pdo_stmt_t *stmt TSRMLS_DC)
{
if (--stmt->refcount == 0) {
free_statement(stmt TSRMLS_CC);
} | 0 | [
"CWE-476"
] | php-src | 6045de69c7dedcba3eadf7c4bba424b19c81d00d | 302,295,744,770,096,450,000,000,000,000,000,000,000 | 6 | Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
Proper soltion would be to call serialize/unserialize and deal with the result,
but this requires more work that should be done by wddx maintainer (not me). |
static int StreamTcpTest32(void)
{
Packet p;
Flow f;
ThreadVars tv;
StreamTcpThread stt;
uint8_t payload[4];
TCPHdr tcph;
TcpReassemblyThreadCtx *ra_ctx = StreamTcpReassembleInitThreadCtx(NULL);
int ret = 0;
PacketQueue pq;
memset(&pq,0,sizeof(PacketQueue));
memset (&p, 0, S... | 0 | [] | suricata | 843d0b7a10bb45627f94764a6c5d468a24143345 | 142,048,469,318,066,380,000,000,000,000,000,000,000 | 83 | stream: support RST getting lost/ignored
In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'.
However, the target of the RST may not have received it, or may not
have accepted it. Also, the RST may have been injected, so the supposed
sender may not actually be aware of the RST that was sent in it's ... |
static void test_bind_nagative()
{
MYSQL_STMT *stmt_insert;
char *query;
int rc;
MYSQL_BIND my_bind[1];
int32 my_val= 0;
ulong my_length= 0L;
my_bool my_null= FALSE;
myheader("test_insert_select");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
myquery(rc);
r... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 48,995,061,820,870,720,000,000,000,000,000,000,000 | 43 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
TiledInputFile::Data::getTileBuffer (int number)
{
return tileBuffers[number % tileBuffers.size()];
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 205,744,716,912,952,800,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static void convert_1u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst,
OPJ_SIZE_T length)
{
OPJ_SIZE_T i;
for (i = 0; i < (length & ~(OPJ_SIZE_T)7U); i += 8U) {
OPJ_UINT32 val = *pSrc++;
pDst[i + 0] = (OPJ_INT32)(val >> 7);
pDst[i + 1] = (OPJ_INT32)((val >> 6)... | 0 | [
"CWE-787"
] | openjpeg | e5285319229a5d77bf316bb0d3a6cbd3cb8666d9 | 25,425,504,748,179,177,000,000,000,000,000,000,000 | 40 | pgxtoimage(): fix write stack buffer overflow (#997) |
GF_Box *tfdt_New()
{
ISOM_DECL_BOX_ALLOC(GF_TFBaseMediaDecodeTimeBox, GF_ISOM_BOX_TYPE_TFDT);
return (GF_Box *)tmp;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 72,638,567,777,753,400,000,000,000,000,000,000,000 | 5 | fixed 2 possible heap overflows (inc. #1088) |
pbm_getc (FILE * infile)
/* Read next char, skipping over any comments */
/* A comment/newline sequence is returned as a newline */
{
register int ch;
ch = getc(infile);
if (ch == '#') {
do {
ch = getc(infile);
} while (ch != '\n' && ch != EOF);
}
return ch;
} | 0 | [] | libjpeg-turbo | 6709e4a0cfa44d4f54ee8ad05753d4aa9260cb91 | 149,726,337,094,905,030,000,000,000,000,000,000,000 | 14 | Check range of integer values in PPM text file
Add checks to ensure values are within the specified range.
Fixes mozilla/mozjpeg#141, closes #8 |
static int lowest_referenced_row(MpegEncContext *s, int dir)
{
int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->quarter_sample;
int my, off, i, mvs;
if (s->picture_structure != PICT_FRAME || s->mcsel)
goto unhandled;
switch (s->mv_type) {
case MV_TYPE_16X16:
mvs = 1... | 0 | [
"CWE-476"
] | FFmpeg | b3332a182f8ba33a34542e4a0370f38b914ccf7d | 184,960,479,199,649,800,000,000,000,000,000,000,000 | 34 | avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile
These 2 fields are not always the same, it is simpler to always use the same field
for detecting studio profile
Fixes: null pointer dereference
Fixes: ffmpeg_crash_3.avi
Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böh... |
static int xc2028_signal(struct dvb_frontend *fe, u16 *strength)
{
struct xc2028_data *priv = fe->tuner_priv;
u16 frq_lock, signal = 0;
int rc, i;
tuner_dbg("%s called\n", __func__);
rc = check_device_status(priv);
if (rc < 0)
return rc;
/* If the device is sleeping, no chann... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 8dfbcc4351a0b6d2f2d77f367552f48ffefafe18 | 75,100,534,935,396,000,000,000,000,000,000,000,000 | 53 | [media] xc2028: avoid use after free
If struct xc2028_config is passed without a firmware name,
the following trouble may happen:
[11009.907205] xc2028 5-0061: type set to XCeive xc2028/xc3028 tuner
[11009.907491] ==================================================================
[11009.907750] BUG: KASAN: use-after-... |
int check_for_newer(__G__ filename) /* return 1 if existing file is newer */
__GDEF /* or equal; 0 if older; -1 if doesn't */
char *filename; /* exist yet */
{
time_t existing, archive;
#ifdef USE_EF_UT_TIME
iztimes z_utime;
#endif
#ifdef AOS_VS
long ... | 0 | [
"CWE-400"
] | unzip | 41beb477c5744bc396fa1162ee0c14218ec12213 | 314,350,721,048,236,500,000,000,000,000,000,000,000 | 108 | Fix bug in undefer_input() that misplaced the input state. |
static int ath6kl_wmi_error_event_rx(struct wmi *wmi, u8 *datap, int len)
{
const char *type = "unknown error";
struct wmi_cmd_error_event *ev;
ev = (struct wmi_cmd_error_event *) datap;
switch (ev->err_code) {
case INVALID_PARAM:
type = "invalid parameter";
break;
case ILLEGAL_STATE:
type = "invalid state... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 251,708,855,125,678,560,000,000,000,000,000,000,000 | 23 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
static MagickBooleanType DecodeImage(Image *image,const ssize_t opacity)
{
ExceptionInfo
*exception;
IndexPacket
index;
int
c;
LZWInfo
*lzw_info;
ssize_t
offset,
y;
unsigned char
data_size;
size_t
pass;
/*
Allocate decoder tables.
*/
assert(image != (Image ... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 19651f3db63fa1511ed83a348c4c82fa553f8d01 | 71,823,062,236,482,350,000,000,000,000,000,000,000 | 123 | https://github.com/ImageMagick/ImageMagick/issues/1595 |
static MagickBooleanType ReadProfile(Image *image,const char *name,
const unsigned char *datum,ssize_t length,ExceptionInfo *exception)
{
MagickBooleanType
status;
StringInfo
*profile;
if (length < 4)
return(MagickFalse);
profile=BlobToStringInfo(datum,(size_t) length);
if (profile == (StringI... | 0 | [
"CWE-125"
] | ImageMagick | 803bc34ebe023f209f745baf8a112610ff77cc8c | 1,203,441,291,855,056,300,000,000,000,000,000,000 | 22 | Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team) |
static void vnc_dpy_copy(DisplayState *ds, int src_x, int src_y, int dst_x, int dst_y, int w, int h)
{
VncDisplay *vd = ds->opaque;
VncState *vs, *vn;
uint8_t *src_row;
uint8_t *dst_row;
int i,x,y,pitch,depth,inc,w_lim,s;
int cmp_bytes;
vnc_refresh_server_surface(vd);
QTAILQ_FOREACH_SAF... | 1 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 67,577,172,461,967,970,000,000,000,000,000,000,000 | 71 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
void ocfs2_unlock_and_free_pages(struct page **pages, int num_pages)
{
int i;
for(i = 0; i < num_pages; i++) {
if (pages[i]) {
unlock_page(pages[i]);
mark_page_accessed(pages[i]);
page_cache_release(pages[i]);
}
}
} | 0 | [
"CWE-20"
] | linux-2.6 | 272b62c1f0f6f742046e45b50b6fec98860208a0 | 18,851,165,522,536,738,000,000,000,000,000,000,000 | 12 | Treat writes as new when holes span across page boundaries
When a hole spans across page boundaries, the next write forces
a read of the block. This could end up reading existing garbage
data from the disk in ocfs2_map_page_blocks. This leads to
non-zero holes. In order to avoid this, mark the writes as new
when the h... |
void qpdf_set_r6_encryption_parameters(
qpdf_data qpdf, char const* user_password, char const* owner_password,
QPDF_BOOL allow_accessibility, QPDF_BOOL allow_extract,
qpdf_r3_print_e print, qpdf_r3_modify_e modify,
QPDF_BOOL encrypt_metadata)
{
qpdf->qpdf_writer->setR6EncryptionParameters(
user_pas... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 32,444,211,636,093,393,000,000,000,000,000,000,000 | 11 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
low_nibble_of_octet_to_hex(guint8 oct)
{
/* At least one version of Apple's C compiler/linker is buggy, causing
a complaint from the linker about the "literal C string section"
not ending with '\0' if we initialize a 16-element "char" array with
a 16-character string, the fact that initializing such an arr... | 0 | [
"CWE-125"
] | wireshark | d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1 | 34,430,748,306,048,115,000,000,000,000,000,000,000 | 14 | epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958. |
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
is_identical_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
&opline->op2.u.constant TSRMLS_CC);
zval_d... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 261,559,087,807,393,160,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
TEST_F(OptimizePipeline, ProjectWithRenameThenMixedMatchPushedDown) {
auto pipeline = Pipeline::parse(
makeVector(fromjson("{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: "
"'myMeta', bucketMaxSpanSeconds: 3600}}"),
fromjson("{$project: {... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 273,276,773,720,311,770,000,000,000,000,000,000,000 | 25 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
const char* SSL_get_version(SSL* ssl)
{
static const char* version3 = "SSLv3";
static const char* version31 = "TLSv1";
return ssl->isTLS() ? version31 : version3;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 48,486,193,569,545,430,000,000,000,000,000,000,000 | 7 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
void *ipt_alloc_initial_table(const struct xt_table *info)
{
return xt_alloc_initial_table(ipt, IPT);
} | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 262,107,998,379,336,060,000,000,000,000,000,000,000 | 4 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
TEST(BuiltinRemoveVariableTest, RemoveSerializesCorrectlyWithTrailingPath) {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
VariablesParseState vps = expCtx->variablesParseState;
auto expression = ExpressionFieldPath::parse(expCtx, "$$REMOVE.a.b", vps);
ASSERT_BSONOBJ_EQ... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 338,711,924,186,853,660,000,000,000,000,000,000,000 | 8 | SERVER-38070 fix infinite loop in agg expression |
L_I16B(UINT8 *out, const UINT8 *in, int xsize) {
int x;
for (x = 0; x < xsize; x++, in++) {
*out++ = 0;
*out++ = *in;
}
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 202,326,682,850,646,280,000,000,000,000,000,000,000 | 7 | Use snprintf instead of sprintf |
nautilus_link_local_create (const char *directory_uri,
const char *base_name,
const char *display_name,
const char *image,
const char *target_uri,
const GdkPoint *point,
int screen,
gboolean unique_filename)
{
char *real_directory_... | 0 | [] | nautilus | 6d1d33567cea0590ed1ad00506718f6d591ba95f | 70,844,332,881,355,640,000,000,000,000,000,000,000 | 103 | Bug 573991 – Nautilus does not recognize some .desktop files as
2009-03-04 Alexander Larsson <alexl@redhat.com>
Bug 573991 – Nautilus does not recognize some .desktop files as launchers
* libnautilus-private/nautilus-link.c:
(nautilus_link_get_link_info_given_file_contents):
Don't try to sniff th... |
isdn_net_getcfg(isdn_net_ioctl_cfg * cfg)
{
isdn_net_dev *p = isdn_net_findif(cfg->name);
if (p) {
isdn_net_local *lp = p->local;
strcpy(cfg->eaz, lp->msn);
cfg->exclusive = lp->exclusive;
if (lp->pre_device >= 0) {
sprintf(cfg->drvid, "%s,%d", dev->drvid[lp->pre_device],
lp->pre_channel);
} else
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 37,613,098,782,769,705,000,000,000,000,000,000,000 | 56 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
backslash_trans(int c)
{
switch (c)
{
case 'r': return CAR;
case 't': return TAB;
case 'e': return ESC;
case 'b': return BS;
}
return c;
} | 0 | [
"CWE-416"
] | vim | 4c13e5e6763c6eb36a343a2b8235ea227202e952 | 315,277,789,272,608,060,000,000,000,000,000,000,000 | 11 | patch 8.2.3949: using freed memory with /\%V
Problem: Using freed memory with /\%V.
Solution: Get the line again after getvvcol(). |
static int cbs_av1_tile_log2(int blksize, int target)
{
int k;
for (k = 0; (blksize << k) < target; k++);
return k;
} | 0 | [
"CWE-20",
"CWE-129"
] | FFmpeg | b97a4b658814b2de8b9f2a3bce491c002d34de31 | 96,921,930,999,855,020,000,000,000,000,000,000,000 | 6 | cbs_av1: Fix reading of overlong uvlc codes
The specification allows 2^32-1 to be encoded as any number of zeroes
greater than 31, followed by a one. This previously failed because the
trace code would overflow the array containing the string representation
of the bits if there were more than 63 zeroes. Fix that by ... |
clock_select(void)
{
struct peer *peer;
int i, j, k, n;
int nlist, nl2;
int allow;
int speer;
double d, e, f, g;
double high, low;
double speermet;
double orphmet = 2.0 * U_INT32_MAX; /* 2x is greater than */
struct endpoint endp;
struct peer *osys_peer;
struct peer *sys_prefer = NULL; /* prefer peer */
st... | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 166,492,958,557,818,550,000,000,000,000,000,000,000 | 528 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
void license_write_preamble(wStream* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize)
{
/* preamble (4 bytes) */
Stream_Write_UINT8(s, bMsgType); /* bMsgType (1 byte) */
Stream_Write_UINT8(s, flags); /* flags (1 byte) */
Stream_Write_UINT16(s, wMsgSize); /* wMsgSize (2 bytes) */
} | 0 | [] | FreeRDP | f1d6afca6ae620f9855a33280bdc6f3ad9153be0 | 250,731,543,352,221,160,000,000,000,000,000,000,000 | 7 | Fix CVE-2014-0791
This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc(). |
static void fd_timer_workfn(struct work_struct *work)
{
fd_timer_fn();
} | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 214,001,640,297,760,270,000,000,000,000,000,000,000 | 4 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *ptep,
struct page *pagecache_page, spinlock_t *ptl)
{
pte_t pte;
struct hstate *h = hstate_vma(vma);
struct page *old_page, *new_page;
int ret = 0, outside_reserve = 0;
unsigned long mmun_start;... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 123,408,437,527,567,740,000,000,000,000,000,000,000 | 125 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
~StringView() {
if (isHandle_)
strPrim().~Handle<StringPrimitive>();
} | 0 | [
"CWE-416",
"CWE-703"
] | hermes | d86e185e485b6330216dee8e854455c694e3a36e | 85,153,105,205,093,410,000,000,000,000,000,000,000 | 4 | Fix a bug in transient object property assignment and getUTF16Ref
Summary:
The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by
appending more contents to the same allocator.
This case was encountered in `transientObjectPutErrorMessage`, resulting in
using free'd memory.
Reviewed By: tmikov
D... |
GF_Err hdlr_dump(GF_Box *a, FILE * trace)
{
GF_HandlerBox *p = (GF_HandlerBox *)a;
gf_isom_box_dump_start(a, "HandlerBox", trace);
if (p->nameUTF8 && (u32) p->nameUTF8[0] == strlen(p->nameUTF8+1)) {
fprintf(trace, "hdlrType=\"%s\" Name=\"%s\" ", gf_4cc_to_str(p->handlerType), p->nameUTF8+1);
} else {
fprintf(tr... | 1 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 235,521,610,768,473,860,000,000,000,000,000,000,000 | 17 | fixed 2 possible heap overflows (inc. #1088) |
size_t Binary::segment_index(const SegmentCommand& segment) const {
return segment.index();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 59,414,000,545,938,750,000,000,000,000,000,000,000 | 3 | Resolve #764 |
Storage::State AbstractSqlStorage::init(const QVariantMap &settings)
{
setConnectionProperties(settings);
_debug = Quassel::isOptionSet("debug");
QSqlDatabase db = logDb();
if (!db.isValid() || !db.isOpen())
return NotAvailable;
if (installedSchemaVersion() == -1) {
qCritical() <<... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 27,048,514,892,662,617,000,000,000,000,000,000,000 | 31 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
static void DrawPathEllipticArc(DrawingWand *wand, const PathMode mode,
const double rx,const double ry,const double x_axis_rotation,
const MagickBooleanType large_arc_flag,const MagickBooleanType sweep_flag,
const double x,const double y)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == Magi... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 154,624,319,752,457,090,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/716 |
static int check_ptr_alignment(struct bpf_verifier_env *env,
const struct bpf_reg_state *reg, int off,
int size, bool strict_alignment_once)
{
bool strict = env->strict_alignment || strict_alignment_once;
const char *pointer_desc = "";
switch (reg->type) {
case PTR_TO_PACKET:
case PTR_TO_PACKE... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 100,339,444,522,591,130,000,000,000,000,000,000,000 | 49 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
errno_t krb5_setup(TALLOC_CTX *mem_ctx, struct pam_data *pd,
struct krb5_ctx *krb5_ctx, struct krb5child_req **krb5_req)
{
struct krb5child_req *kr = NULL;
kr = talloc_zero(mem_ctx, struct krb5child_req);
if (kr == NULL) {
DEBUG(1, ("talloc failed.\n"));
return ENOMEM;
... | 0 | [
"CWE-287"
] | sssd | fffdae81651b460f3d2c119c56d5caa09b4de42a | 178,166,518,201,045,800,000,000,000,000,000,000,000 | 22 | Fix bad password caching when using automatic TGT renewal
Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856 |
ldns_str2rdf_mnemonic4int8(ldns_lookup_table *lt,
ldns_rdf **rd, const char *str)
{
if ((lt = ldns_lookup_by_name(lt, str))) {
/* it was given as a integer */
*rd = ldns_native2rdf_int8(LDNS_RDF_TYPE_INT8, (uint8_t) lt->id);
if (!*rd)
return LDNS_STATUS_ERR;
else
return LDNS_STATUS_OK;
}
return ldns_... | 0 | [] | ldns | 3bdeed02505c9bbacb3b64a97ddcb1de967153b7 | 207,585,045,947,283,860,000,000,000,000,000,000,000 | 13 | bugfix #1257: Free after reallocing to 0 size
Thanks Stephan Zeisberg |
static inline int pfkey_xfrm_policy2sec_ctx_size(const struct xfrm_policy *xp)
{
struct xfrm_sec_ctx *xfrm_ctx = xp->security;
if (xfrm_ctx) {
int len = sizeof(struct sadb_x_sec_ctx);
len += xfrm_ctx->ctx_len;
return PFKEY_ALIGN8(len);
}
return 0;
} | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 81,150,975,989,094,930,000,000,000,000,000,000,000 | 11 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
int update_state_info(MI_CHECK *param, MI_INFO *info,uint update)
{
MYISAM_SHARE *share=info->s;
if (update & UPDATE_OPEN_COUNT)
{
share->state.open_count=0;
share->global_changed=0;
}
if (update & UPDATE_STAT)
{
uint i, key_parts= mi_uint2korr(share->state.header.key_parts);
share->state.r... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 153,749,426,761,201,510,000,000,000,000,000,000,000 | 58 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
void CWebAuth::AcceptedLogin(CUser& User) {
if (m_pWebSock) {
std::shared_ptr<CWebSession> spSession = m_pWebSock->GetSession();
spSession->SetUser(&User);
m_pWebSock->SetLoggedIn(true);
m_pWebSock->UnPauseRead();
if (m_bBasic) {
m_pWebSock->ReadLine("");
... | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 85,086,532,495,196,300,000,000,000,000,000,000,000 | 18 | Don't let web skin name ../../../../ access files outside of usual skins directories.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.