func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
Fraction Fraction::operator-(int v) const
{
return Fraction { numerator - v * denominator, denominator };
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 333,083,886,345,207,600,000,000,000,000,000,000,000 | 4 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
unsigned long long Chapters::Atom::GetUID() const { return m_uid; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 113,361,743,172,882,470,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
evutil_issetugid(void)
{
#ifdef EVENT__HAVE_ISSETUGID
return issetugid();
#else
#ifdef EVENT__HAVE_GETEUID
if (getuid() != geteuid())
return 1;
#endif
#ifdef EVENT__HAVE_GETEGID
if (getgid() != getegid())
return 1;
#endif
return 0;
#endif
} | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 55,990,311,044,627,390,000,000,000,000,000,000,000 | 17 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
void normalize_path(char *path) {
#ifdef _WIN32
if (path != NULL) {
for (size_t i = 0; i <= strlen(path); i++) {
if (path[i] == '/') {
path[i] = separator;
}
}
}
#else
UNUSED(path);
#endif
} | 0 | [
"CWE-476"
] | libmobi | c0699c8693c47f14a2e57dec7292e862ac7adf9c | 18,983,926,996,916,916,000,000,000,000,000,000,000 | 13 | Fix undefined behavior when passing null to strdup |
static int demangle(RCore *core, const char *s) {
char *p, *q;
const char *ss = strchr (s, ' ');
if (!*s) {
return 0;
}
if (!ss) {
const char *lang = r_config_get (core->config, "bin.lang");
demangle_internal (core, lang, s);
return 1;
}
p = strdup (s);
q = p + (ss - s);
*q = 0;
demangle_internal (cor... | 0 | [
"CWE-119",
"CWE-787"
] | radare2 | 00e8f205475332d7842d0f0d1481eeab4e83017c | 169,966,070,609,863,160,000,000,000,000,000,000,000 | 18 | Fix #7727 - undefined pointers and out of band string access fixes |
PHP_FUNCTION(cosh)
{
double num;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &num) == FAILURE) {
return;
}
RETURN_DOUBLE(cosh(num));
} | 0 | [] | php-src | 0d822f6df946764f3f0348b82efae2e1eaa83aa0 | 226,391,266,047,541,060,000,000,000,000,000,000,000 | 9 | Bug #71201 round() segfault on 64-bit builds |
lookup_gname(struct cpio *cpio, gid_t gid)
{
return (lookup_name(cpio, &cpio->gname_cache,
&lookup_gname_helper, (id_t)gid));
} | 0 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 194,873,185,227,738,220,000,000,000,000,000,000,000 | 5 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
u_int8_t is_udp_guessable_protocol(u_int16_t l7_guessed_proto) {
switch (l7_guessed_proto) {
case NDPI_PROTOCOL_QUIC:
case NDPI_PROTOCOL_SNMP:
case NDPI_PROTOCOL_NETFLOW:
/* TODO: add more protocols (if any missing) */
return(1);
}
return(0);
} | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 140,566,453,790,321,640,000,000,000,000,000,000,000 | 11 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
zfs_external_acl(znode_t *zp)
{
zfs_acl_phys_t acl_phys;
int error;
if (zp->z_is_sa)
return (0);
/*
* Need to deal with a potential
* race where zfs_sa_upgrade could cause
* z_isa_sa to change.
*
* If the lookup fails then the state of z_is_sa should have
* changed.
*/
if ((error = sa_lookup(zp-... | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 240,941,244,160,138,540,000,000,000,000,000,000,000 | 29 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
{
const BCIns *ins;
GCproto *pt;
BCPos pos;
lua_assert(fn->c.gct == ~LJ_TFUNC || fn->c.gct == ~LJ_TTHREAD);
if (!isluafunc(fn)) { /* Cannot derive a PC for non-Lua functions. */
return NO_BCPOS;
} else if (nextframe == NULL) { /*... | 1 | [
"CWE-125"
] | LuaJIT | e296f56b825c688c3530a981dc6b495d972f3d01 | 256,275,479,602,107,980,000,000,000,000,000,000,000 | 57 | Call error function on rethrow after trace exit. |
inline double WireFormatLite::DecodeDouble(uint64_t value) {
return bit_cast<double>(value);
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 109,442,691,296,393,880,000,000,000,000,000,000,000 | 3 | Apply patch |
map_id_range_down_base(unsigned extents, struct uid_gid_map *map, u32 id, u32 count)
{
unsigned idx;
u32 first, last, id2;
id2 = id + count - 1;
/* Find the matching extent */
for (idx = 0; idx < extents; idx++) {
first = map->extent[idx].first;
last = first + map->extent[idx].count - 1;
if (id >= first &&... | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 204,132,333,352,934,370,000,000,000,000,000,000,000 | 17 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
ModuleExport size_t RegisterVIFFImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("VIFF","VIFF","Khoros Visualization image");
entry->decoder=(DecodeImageHandler *) ReadVIFFImage;
entry->encoder=(EncodeImageHandler *) WriteVIFFImage;
entry->magick=(IsImageFormatHandler *) IsVIFF;
(void) Register... | 0 | [
"CWE-125"
] | ImageMagick | ecf3f09e41160339919858beae8a7d14ab27e7c9 | 213,091,155,235,614,830,000,000,000,000,000,000,000 | 16 | Fixed check. |
OPJ_BOOL opj_jp2_set_decoded_components(opj_jp2_t *p_jp2,
OPJ_UINT32 numcomps,
const OPJ_UINT32* comps_indices,
opj_event_mgr_t * p_manager)
{
return opj_j2k_set_decoded_components(p_jp2->j2k,
... | 0 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 16,644,538,901,413,166,000,000,000,000,000,000,000 | 9 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
hfs_write_decmpfs(struct archive_write_disk *a)
{
int r;
uint32_t compression_type;
r = fsetxattr(a->fd, DECMPFS_XATTR_NAME, a->decmpfs_header_p,
a->decmpfs_attr_size, 0, 0);
if (r < 0) {
archive_set_error(&a->archive, errno,
"Cannot restore xattr:%s", DECMPFS_XATTR_NAME);
compression_type = archive... | 0 | [
"CWE-59",
"CWE-269"
] | libarchive | b41daecb5ccb4c8e3b2c53fd6147109fc12c3043 | 83,612,803,944,531,780,000,000,000,000,000,000,000 | 19 | Do not follow symlinks when processing the fixup list
Use lchmod() instead of chmod() and tell the remaining functions that the
real file to be modified is a symbolic link.
Fixes #1566 |
static int set_offload(struct tun_struct *tun, unsigned long arg)
{
u32 features = 0;
if (arg & TUN_F_CSUM) {
features |= NETIF_F_HW_CSUM;
arg &= ~TUN_F_CSUM;
if (arg & (TUN_F_TSO4|TUN_F_TSO6)) {
if (arg & TUN_F_TSO_ECN) {
features |= NETIF_F_TSO_ECN;
arg &= ~TUN_F_TSO_ECN;
}
if (arg & TUN_F_... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 274,649,603,570,110,420,000,000,000,000,000,000,000 | 36 | 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... |
static int setcos_getdata(struct sc_card *card, struct sc_cardctl_setcos_data_obj* data_obj)
{
int r;
struct sc_apdu apdu;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
memset(&apdu, 0, sizeof(apdu));
apdu.cse = SC_APDU_CASE_2_SHORT;
apdu.cla = 0x00;
apdu.ins = 0xCA; /* GET DATA */
apdu.... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 280,387,731,478,590,500,000,000,000,000,000,000,000 | 34 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
bool operator()(Vertex_const_handle) const { return true; } | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 120,878,935,814,948,310,000,000,000,000,000,000,000 | 1 | Fix Nef_2 and Nef_S2 IO |
static void dev_disable_change(struct inet6_dev *idev)
{
struct netdev_notifier_info info;
if (!idev || !idev->dev)
return;
netdev_notifier_info_init(&info, idev->dev);
if (idev->cnf.disable_ipv6)
addrconf_notify(NULL, NETDEV_DOWN, &info);
else
addrconf_notify(NULL, NETDEV_UP, &info);
} | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 61,631,000,273,709,500,000,000,000,000,000,000,000 | 13 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
static void __nft_release_table(struct net *net, struct nft_table *table)
{
struct nft_flowtable *flowtable, *nf;
struct nft_chain *chain, *nc;
struct nft_object *obj, *ne;
struct nft_rule *rule, *nr;
struct nft_set *set, *ns;
struct nft_ctx ctx = {
.net = net,
.family = NFPROTO_NETDEV,
};
ctx.family = tab... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 91,936,439,742,917,860,000,000,000,000,000,000,000 | 46 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
static JSValue js_bs_put_u64_le(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
return js_bs_put_val(ctx, this_val, argc, argv, 10);
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 172,198,537,130,479,570,000,000,000,000,000,000,000 | 4 | fixed #2138 |
int vt_do_kdskbmode(int console, unsigned int arg)
{
struct kbd_struct *kb = kbd_table + console;
int ret = 0;
unsigned long flags;
spin_lock_irqsave(&kbd_event_lock, flags);
switch(arg) {
case K_RAW:
kb->kbdmode = VC_RAW;
break;
case K_MEDIUMRAW:
kb->kbdmode = VC_MEDIUMRAW;
break;
case K_XLATE:
kb->... | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 260,603,990,293,925,900,000,000,000,000,000,000,000 | 31 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
char base64_encode_value(char value_in)
{
if (value_in > 63)
return '=';
return ENCODING[(int)value_in];
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 173,780,017,654,518,560,000,000,000,000,000,000,000 | 6 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
int RGWPutLC_ObjStore::get_params()
{
const auto max_size = s->cct->_conf->rgw_max_put_param_size;
op_ret = rgw_rest_read_all_input(s, &data, &len, max_size, false);
return op_ret;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 327,192,846,703,933,800,000,000,000,000,000,000,000 | 6 | 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 <... |
LineBitmapRequester::~LineBitmapRequester(void)
{
UBYTE i;
if (m_ppDownsampler) {
for(i = 0;i < m_ucCount;i++) {
delete m_ppDownsampler[i];
}
m_pEnviron->FreeMem(m_ppDownsampler,m_ucCount * sizeof(class DownsamplerBase *));
}
if (m_ppUpsampler) {
for(i = 0;i < m_ucCount;i++) {
dele... | 0 | [
"CWE-476"
] | libjpeg | 51c3241b6da39df30f016b63f43f31c4011222c7 | 120,929,913,909,521,380,000,000,000,000,000,000,000 | 31 | Fixed a NULL-pointer access in the line-based reconstruction process
in case no valid scan was found and no data is present. |
real_connect (NMVpnServicePlugin *plugin,
NMConnection *connection,
GError **error)
{
return _connect_common (plugin, FALSE, connection, NULL, error);
} | 0 | [] | NetworkManager-vpnc | 07ac18a32b4e361a27ef48ac757d36cbb46e8e12 | 277,144,868,169,482,500,000,000,000,000,000,000,000 | 6 | service: disallow newlinies in configuration values (CVE-2018-10900)
The vpnc configuration format doesn't allow those. vpnc(8):
The values start exactly one space after the keywords, and run to the end
of line. This lets you put any kind of weird character (except CR, LF and
NUL) in your strings
We have no ch... |
static int tls12_find_nid(int id, const tls12_lookup *table, size_t tlen)
{
size_t i;
for (i = 0; i < tlen; i++) {
if ((table[i].id) == id)
return table[i].nid;
}
return NID_undef;
} | 0 | [
"CWE-20"
] | openssl | 4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2 | 264,219,598,658,137,620,000,000,000,000,000,000,000 | 9 | Don't change the state of the ETM flags until CCS processing
Changing the ciphersuite during a renegotiation can result in a crash
leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS
so this is TLS only.
The problem is caused by changing the flag indicating whether to use ETM
or not immediately on... |
static void cmd_reject_invalid_cid(struct l2cap_conn *conn, u8 ident,
u16 scid, u16 dcid)
{
struct l2cap_cmd_rej_cid rej;
rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID);
rej.scid = __cpu_to_le16(scid);
rej.dcid = __cpu_to_le16(dcid);
l2cap_send_cmd(conn, ident, L2CAP_COMMAND_REJ, sizeof(rej), &rej);
} | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 204,496,887,806,580,300,000,000,000,000,000,000,000 | 11 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
virDomainSEVDefFree(virDomainSEVDefPtr def)
{
if (!def)
return;
VIR_FREE(def->dh_cert);
VIR_FREE(def->session);
VIR_FREE(def);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 43,544,177,228,378,210,000,000,000,000,000,000,000 | 10 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
void TY_(InitMap)(void)
{
MapStr("\r\n\f", newline|white);
MapStr(" \t", white);
MapStr("-.:_", namechar);
MapStr("0123456789", digit|digithex|namechar);
MapStr("abcdefghijklmnopqrstuvwxyz", lowercase|letter|namechar);
MapStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", uppercase|letter|namechar);
MapStr("... | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 145,289,066,514,595,250,000,000,000,000,000,000,000 | 10 | Issue #217 - avoid len going negative, ever... |
static int ciedefdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEF, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEF", &tempr... | 0 | [] | ghostpdl | b326a71659b7837d3acde954b18bda1a6f5e9498 | 162,797,793,971,300,150,000,000,000,000,000,000,000 | 21 | Bug 699655: Properly check the return value....
...when getting a value from a dictionary |
static u32 srpt_sess_get_index(struct se_session *se_sess)
{
return 0;
} | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 164,437,412,733,640,400,000,000,000,000,000,000,000 | 4 | 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... |
int tls1_enc(SSL *s, int send)
{
SSL3_RECORD *rec;
EVP_CIPHER_CTX *ds;
unsigned long l;
int bs,i,j,k,pad=0,ret,mac_size=0;
const EVP_CIPHER *enc;
if (send)
{
if (EVP_MD_CTX_md(s->write_hash))
{
int n=EVP_MD_CTX_size(s->write_hash);
OPENSSL_assert(n >= 0);
}
ds=s->enc_write_ctx;
rec= &(s->s3-... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 192,237,439,860,635,680,000,000,000,000,000,000,000 | 183 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
run_calcsize(
char *config,
char *program,
char *disk,
char *dirname,
GSList *levels,
char *file_exclude,
char *file_include)
{
char *cmd, *cmdline;
char *command;
GPtrArray *argv_ptr = g_ptr_array_new();
char tmppath[PATH_MAX];
char n... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 273,381,825,403,587,300,000,000,000,000,000,000,000 | 174 | * 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 mt_process_mt_event(struct hid_device *hid,
struct mt_application *app,
struct hid_field *field,
struct hid_usage *usage,
__s32 value,
bool first_packet)
{
__s32 quirks = app->quirks;
struct input_dev *input = field->hidinput->input;
if (!usage->type || !(hid->claimed & HID_CLAIMED_I... | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 300,907,701,725,349,400,000,000,000,000,000,000,000 | 38 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
static php_zlib_context *php_zlib_output_handler_context_init(TSRMLS_D)
{
php_zlib_context *ctx = (php_zlib_context *) ecalloc(1, sizeof(php_zlib_context));
ctx->Z.zalloc = php_zlib_alloc;
ctx->Z.zfree = php_zlib_free;
return ctx;
} | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 22,544,463,612,654,603,000,000,000,000,000,000,000 | 7 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
static int vmx_vm_init(struct kvm *kvm)
{
if (!ple_gap)
kvm->arch.pause_in_guest = true;
if (boot_cpu_has(X86_BUG_L1TF) && enable_ept) {
switch (l1tf_mitigation) {
case L1TF_MITIGATION_OFF:
case L1TF_MITIGATION_FLUSH_NOWARN:
/* 'I explicitly don't care' is set */
break;
case L1TF_MITIGATION_FLUSH:
... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 163,742,652,244,529,850,000,000,000,000,000,000,000 | 30 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
s32 gf_mv12_next_start_code(unsigned char *pbuffer, u32 buflen, u32 *optr, u32 *scode)
{
u32 value;
u32 offset;
if (buflen < 4) return -1;
for (offset = 0; offset < buflen - 3; offset++, pbuffer++) {
#ifdef GPAC_BIG_ENDIAN
value = *(u32 *)pbuffer >> 8;
#else
value = (pbuffer[0] << 16) | (pbuffer[1] << 8) | (pb... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 258,631,322,250,644,400,000,000,000,000,000,000,000 | 21 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLength) {
if(!isWritable() || srcLength == 0 || srcChars == NULL) {
return *this;
}
// Perform all remaining operations relative to srcChars + srcStart.
// From this point forward, do not use srcStart.
srcChars += srcStart;
if... | 1 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 78,872,655,036,842,330,000,000,000,000,000,000,000 | 51 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
static inline void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags)
{
activate_task(rq, p, en_flags);
p->on_rq = TASK_ON_RQ_QUEUED;
/* if a worker is waking up, notify workqueue */
if (p->flags & PF_WQ_WORKER)
wq_worker_waking_up(p, cpu_of(rq));
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 20,863,832,940,649,880,000,000,000,000,000,000,000 | 9 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
static int MSLIsStandalone(void *context)
{
MSLInfo
*msl_info;
/*
Is this document tagged standalone?
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule()," SAX.MSLIsStandalone()");
msl_info=(MSLInfo *) context;
return(msl_info->document->standalone == 1);
} | 0 | [
"CWE-772",
"CWE-787"
] | ImageMagick | e793eb203e5e0f91f5037aed6585e81b1e27395b | 101,910,786,851,239,240,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/636 |
ieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, u32 info_flags)
{
struct ieee80211_hdr *hdr;
struct ieee80211_tx_data tx = {
.local = sdata->local,
.sdata = sdata,
};
struct sta_info *sta;
rcu_read_lock();
if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) {
kf... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 35,125,381,255,546,613,000,000,000,000,000,000,000 | 36 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
pdf14_create_clist_device(gs_memory_t *mem, gs_gstate * pgs,
gx_device ** ppdev, gx_device * target,
const gs_pdf14trans_t * pdf14pct)
{
pdf14_clist_device * dev_proto;
pdf14_clist_device * pdev, temp_dev_proto;
int code;
bool has_tags = ta... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 22,351,295,006,251,370,000,000,000,000,000,000,000 | 74 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
int netdev_rx_handler_register(struct net_device *dev,
rx_handler_func_t *rx_handler,
void *rx_handler_data)
{
ASSERT_RTNL();
if (dev->rx_handler)
return -EBUSY;
rcu_assign_pointer(dev->rx_handler_data, rx_handler_data);
rcu_assign_pointer(dev->rx_handler, rx_handler);
return 0;
} | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 15,094,721,191,174,390,000,000,000,000,000,000,000 | 14 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
MagickExport MagickBooleanType NegateImage(Image *image,
const MagickBooleanType grayscale,ExceptionInfo *exception)
{
#define NegateImageTag "Negate/Image"
CacheView
*image_view;
MagickBooleanType
status;
MagickOffsetType
progress;
register ssize_t
i;
ssize_t
y;
assert(image !=... | 0 | [
"CWE-399",
"CWE-119",
"CWE-787"
] | ImageMagick | d4fc44b58a14f76b1ac997517d742ee12c9dc5d3 | 170,052,872,208,675,240,000,000,000,000,000,000,000 | 166 | https://github.com/ImageMagick/ImageMagick/issues/1611 |
g_sleep(int msecs)
{
#if defined(_WIN32)
Sleep(msecs);
#else
usleep(msecs * 1000);
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 152,294,758,668,508,230,000,000,000,000,000,000,000 | 8 | move temp files from /tmp to /tmp/.xrdp |
crypto_recv(
struct peer *peer, /* peer structure pointer */
struct recvbuf *rbufp /* packet buffer pointer */
)
{
const EVP_MD *dp; /* message digest algorithm */
u_int32 *pkt; /* receive packet pointer */
struct autokey *ap, *bp; /* autokey pointer */
struct exten *ep, *fp; /* extension pointers */
struct ce... | 1 | [
"CWE-20"
] | ntp | c4cd4aaf418f57f7225708a93bf48afb2bc9c1da | 288,307,314,436,767,700,000,000,000,000,000,000,000 | 626 | CVE-2014-9297 |
static void FVMenuCopyFrom(GWindow UNUSED(gw), struct gmenuitem *mi, GEvent *UNUSED(e)) {
/*FontView *fv = (FontView *) GDrawGetUserData(gw);*/
if ( mi->mid==MID_CharName )
copymetadata = !copymetadata;
else if ( mi->mid==MID_TTFInstr )
copyttfinstr = !copyttfinstr;
else
onlycopydisplayed = (mi->mid... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 142,398,830,045,893,600,000,000,000,000,000,000,000 | 11 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static void jas_icctxt_dump(jas_iccattrval_t *attrval, FILE *out)
{
jas_icctxt_t *txt = &attrval->data.txt;
fprintf(out, "string = \"%s\"\n", txt->string);
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 202,209,719,165,089,050,000,000,000,000,000,000,000 | 5 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
xmlTextReaderGetRemainder(xmlTextReaderPtr reader) {
xmlParserInputBufferPtr ret = NULL;
if (reader == NULL)
return(NULL);
if (reader->node == NULL)
return(NULL);
reader->node = NULL;
reader->curnode = NULL;
reader->mode = XML_TEXTREADER_MODE_EOF;
if (reader->ctxt != NULL) {
xmlStopPars... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 282,504,404,196,799,860,000,000,000,000,000,000,000 | 35 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
int i;
if ((cur == NULL) || (ns == NULL) || (node == NULL) ||
(ns->type != XML_NAMESPACE_DECL) ||
(node->type != XML_ELEMENT_NODE))
return;
/* @@ with_ns to check whether namespace nodes should be looked at @@ */
/*
... | 1 | [
"CWE-189"
] | libxml2 | d7958b21e7f8c447a26bb2436f08402b2c308be4 | 329,643,035,250,835,900,000,000,000,000,000,000,000 | 48 | Fix some potential problems on reallocation failures
The count was incremented before the allocation
and not fixed in case of failure
* xpath.c: corrects a few instances where the available count of some
structure is updated before we know the allocation actually
succeeds |
TEST(LineBasedFrameDecoder, CarriageNewLineOnly) {
auto pipeline = Pipeline<IOBufQueue&, std::unique_ptr<IOBuf>>::create();
int called = 0;
(*pipeline)
.addBack(LineBasedFrameDecoder(
10, true, LineBasedFrameDecoder::TerminatorType::CARRIAGENEWLINE))
.addBack(test::FrameTester([&](std::uniq... | 0 | [
"CWE-119",
"CWE-787"
] | wangle | 5b3bceca875e4ea4ed9d14c20b20ce46c92c13c6 | 163,507,996,043,934,310,000,000,000,000,000,000,000 | 26 | Peek for \n in LineBasedFrameDecoder.
Summary:
Previously this could underflow if there was not a following \n.
CVE-2019-3563
Reviewed By: siyengar
Differential Revision: D14935715
fbshipit-source-id: 25c3eecf373f89efa1232456aeeb092f13b7fa06 |
static void floppy_release_regions(int fdc)
{
floppy_release_allocated_regions(fdc, ARRAY_END(io_regions));
} | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 55,511,916,457,366,590,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 void test_bug9735()
{
MYSQL_RES *res;
int rc;
myheader("test_bug9735");
rc= mysql_query(mysql, "drop table if exists t1");
myquery(rc);
rc= mysql_query(mysql, "create table t1 (a mediumtext, b longtext) "
"character set latin1");
myquery(rc);
rc= mysql_query(mysql, "sel... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 45,433,083,145,051,940,000,000,000,000,000,000,000 | 23 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
unsigned int offset, unsigned int count)
{
struct nfs_page *req;
req = nfs_setup_write_request(ctx, page, offset, count);
if (IS_ERR(req))
return PTR_ERR(req);
/* Update file length */
nfs_grow_file(page, offset, count);
nfs_mark... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 296,549,885,870,108,670,000,000,000,000,000,000,000 | 15 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
bytes_hash(PyBytesObject *a)
{
if (a->ob_shash == -1) {
/* Can't fail */
a->ob_shash = _Py_HashBytes(a->ob_sval, Py_SIZE(a));
}
return a->ob_shash;
} | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 277,138,239,032,232,330,000,000,000,000,000,000,000 | 8 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
void OPENSSL_LH_free(OPENSSL_LHASH *lh)
{
if (lh == NULL)
return;
OPENSSL_LH_flush(lh);
OPENSSL_free(lh->b);
OPENSSL_free(lh);
} | 0 | [
"CWE-404"
] | openssl | 64c85430f95200b6b51fe9475bd5203f7c19daf1 | 18,977,599,335,395,498,000,000,000,000,000,000,000 | 9 | Fix bug in OPENSSL_LH_flush
Fixes #18139.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18141)
(cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e) |
void avahi_server_decrease_host_rr_pending(AvahiServer *s) {
assert(s);
assert(s->n_host_rr_pending > 0);
if (--s->n_host_rr_pending == 0)
server_set_state(s, AVAHI_SERVER_RUNNING);
} | 0 | [
"CWE-399"
] | avahi | 3093047f1aa36bed8a37fa79004bf0ee287929f4 | 7,645,926,274,948,216,000,000,000,000,000,000,000 | 8 | Don't get confused by UDP packets with a source port that is zero
This is a fix for rhbz 475394.
Problem identified by Hugo Dias. |
int BSONObj::woSortOrder(const BSONObj& other, const BSONObj& sortKey , bool useDotted ) const {
if ( isEmpty() )
return other.isEmpty() ? 0 : -1;
if ( other.isEmpty() )
return 1;
uassert( 10060 , "woSortOrder needs a non-empty sortKey" , ! sortKey.isEmpty() );
... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 208,129,859,275,875,020,000,000,000,000,000,000,000 | 29 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
void set(Http::RequestHeaderMap&, bool) override {} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 25,005,160,477,422,835,000,000,000,000,000,000,000 | 1 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
const char *db_name,
const char *db_cl_name)
{
MYSQL_ROW row;
char *query_str;
int db_cl_altered= FALSE;
DBUG_ENTER("dump_trigger");
while ((row= mysql_fetch_row(show_create_trigger_rs)... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 258,536,618,870,260,370,000,000,000,000,000,000,000 | 55 | WL#9072: Backport WL#8785 to 5.5 |
void ADDCALL sass_delete_file_context (struct Sass_File_Context* ctx)
{
// clear the context and free it
sass_clear_context(ctx); free(ctx);
} | 0 | [
"CWE-125"
] | libsass | 8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae | 294,191,385,833,635,400,000,000,000,000,000,000,000 | 5 | 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. |
vips_foreign_find_save( const char *name )
{
char filename[VIPS_PATH_MAX];
char option_string[VIPS_PATH_MAX];
VipsForeignSaveClass *save_class;
vips__filename_split8( name, filename, option_string );
if( !(save_class = (VipsForeignSaveClass *) vips_foreign_map(
"VipsForeignSave",
(VipsSListMap2Fn) vips_fore... | 0 | [
"CWE-362",
"CWE-476"
] | libvips | 20d840e6da15c1574b3ed998bc92f91d1e36c2a5 | 308,207,548,885,589,360,000,000,000,000,000,000,000 | 20 | fix a crash with delayed load
If a delayed load failed, it could leave the pipeline only half-set up.
Sebsequent threads could then segv.
Set a load-has-failed flag and test before generate.
See https://github.com/jcupitt/libvips/issues/893 |
static std::unique_ptr<ResponseHeaderMapImpl> create() {
return std::unique_ptr<ResponseHeaderMapImpl>(new (inlineHeadersSize())
ResponseHeaderMapImpl());
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 245,809,928,656,594,960,000,000,000,000,000,000,000 | 4 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static void dccp_skb_entail(struct sock *sk, struct sk_buff *skb)
{
skb_set_owner_w(skb, sk);
WARN_ON(sk->sk_send_head);
sk->sk_send_head = skb;
} | 0 | [
"CWE-119"
] | linux-stable | f53dc67c5e7babafe239b93a11678b0e05bead51 | 12,303,910,187,150,158,000,000,000,000,000,000,000 | 6 | [DCCP]: Use AF-independent rebuild_header routine
This fixes a nasty bug: dccp_send_reset() is called by both DCCPv4 and DCCPv6, but uses
inet_sk_rebuild_header() in each case. This leads to unpredictable and weird behaviour:
under some conditions, DCCPv6 Resets were sent, in other not.
The fix is to use the AF-indep... |
http_SetH(const struct http *to, unsigned n, const char *fm)
{
assert(n < to->shd);
AN(fm);
to->hd[n].b = TRUST_ME(fm);
to->hd[n].e = strchr(to->hd[n].b, '\0');
to->hdf[n] = 0;
} | 0 | [] | Varnish-Cache | 29870c8fe95e4e8a672f6f28c5fbe692bea09e9c | 265,196,292,674,062,920,000,000,000,000,000,000,000 | 9 | Check for duplicate Content-Length headers in requests
If a duplicate CL header is in the request, we fail the request with a
400 (Bad Request)
Fix a test case that was sending duplicate CL by misstake and would
not fail because of that. |
GF_Err gf_crypt_fragment(GF_ISOFile *mp4, const char *drm_file, const char *dst_file, const char *fragment_name, u32 fs_dump_flags)
{
return gf_crypt_file_ex(mp4, drm_file, dst_file, 0, fragment_name, fs_dump_flags);
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 47,100,026,195,758,630,000,000,000,000,000,000,000 | 4 | fixed #2138 |
static int mxf_add_timecode_metadata(AVDictionary **pm, const char *key, AVTimecode *tc)
{
char buf[AV_TIMECODE_STR_SIZE];
av_dict_set(pm, key, av_timecode_make_string(tc, buf, 0), 0);
return 0;
} | 0 | [
"CWE-703",
"CWE-834"
] | FFmpeg | 900f39692ca0337a98a7cf047e4e2611071810c2 | 102,370,636,042,708,310,000,000,000,000,000,000,000 | 7 | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
QPDF::objGenToIndirect(QPDFObjGen const& og)
{
return getObjectByID(og.getObj(), og.getGen());
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 248,382,383,711,167,800,000,000,000,000,000,000,000 | 4 | 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 ... |
WavFileBase::WavFileBase()
{
convBuff = NULL;
convBuffSize = 0;
}
| 0 | [
"CWE-119"
] | soundtouch | 9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e | 258,746,363,318,006,850,000,000,000,000,000,000,000 | 5 | Added minimum size check for WAV header block lengh values |
ClrToEOS(NCURSES_SP_DCLx NCURSES_CH_T blank)
{
int row, col;
row = SP_PARM->_cursrow;
col = SP_PARM->_curscol;
if (row < 0)
row = 0;
if (col < 0)
col = 0;
UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_eos");
NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
clr_eos,
screen_lines... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 39,366,060,393,226,255,000,000,000,000,000,000,000 | 27 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
int blkid_probe_enable_partitions(blkid_probe pr, int enable)
{
pr->chains[BLKID_CHAIN_PARTS].enabled = enable;
return 0;
} | 0 | [] | util-linux | 50d1594c2e6142a3b51d2143c74027480df082e0 | 78,038,359,422,319,170,000,000,000,000,000,000,000 | 5 | libblkid: avoid non-empty recursion in EBR
This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f.
We also need to detect non-empty recursion in the EBR chain. It's
possible to create standard valid logical partitions and in the last one
points back to the EBR chain. In this case all offsets will be ... |
void stri_box_del(GF_Box *s)
{
GF_SubTrackInformationBox *ptr = (GF_SubTrackInformationBox *)s;
if (ptr == NULL) return;
if (ptr->attribute_list) gf_free(ptr->attribute_list);
gf_free(ptr); | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 8,121,918,261,026,499,000,000,000,000,000,000,000 | 7 | fixed #1587 |
static void kvm_mmu_update_cpu_dirty_logging(struct kvm *kvm, bool enable)
{
struct kvm_arch *ka = &kvm->arch;
if (!kvm_x86_ops.cpu_dirty_log_size)
return;
if ((enable && ++ka->cpu_dirty_logging_count == 1) ||
(!enable && --ka->cpu_dirty_logging_count == 0))
kvm_make_all_cpus_request(kvm, KVM_REQ_UPDATE_C... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 291,438,205,359,921,900,000,000,000,000,000,000,000 | 13 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static int __init sysfs_deprecated_setup(char *arg)
{
return kstrtol(arg, 10, &sysfs_deprecated);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 146,710,327,957,500,610,000,000,000,000,000,000,000 | 4 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static int cpuacct_percpu_seq_read(struct cgroup *cgroup, struct cftype *cft,
struct seq_file *m)
{
struct cpuacct *ca = cgroup_ca(cgroup);
u64 percpu;
int i;
for_each_present_cpu(i) {
percpu = cpuacct_cpuusage_read(ca, i);
seq_printf(m, "%llu ", (unsigned long long) percpu);
}
seq_printf(m, "\n");
r... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 318,417,298,947,486,150,000,000,000,000,000,000,000 | 14 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static int parse_pred(const char *str, void *data,
int pos, struct filter_parse_error *pe,
struct filter_pred **pred_ptr)
{
struct trace_event_call *call = data;
struct ftrace_event_field *field;
struct filter_pred *pred = NULL;
char num_buf[24]; /* Big enough to hold an address */
char *field_name... | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 165,228,053,674,863,520,000,000,000,000,000,000,000 | 236 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
asmlinkage long sys_oabi_fstatat64(int dfd,
const char __user *filename,
struct oldabi_stat64 __user *statbuf,
int flag)
{
struct kstat stat;
int error;
error = vfs_fstatat(dfd, filename, &stat, flag);
if (error)
return error;
return cp_oldabi_stat64(&stat, statbuf);
} | 0 | [
"CWE-264"
] | linux | 7de249964f5578e67b99699c5f0b405738d820a2 | 29,417,920,108,594,420,000,000,000,000,000,000,000 | 13 | arm: oabi compat: add missing access checks
Add access checks to sys_oabi_epoll_wait() and sys_oabi_semtimedop().
This fixes CVE-2016-3857, a local privilege escalation under
CONFIG_OABI_COMPAT.
Cc: stable@vger.kernel.org
Reported-by: Chiachih Wu <wuchiachih@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
R... |
bool Item_in_subselect::create_in_to_exists_cond(JOIN *join_arg)
{
bool res;
DBUG_ASSERT(engine->engine_type() == subselect_engine::SINGLE_SELECT_ENGINE ||
engine->engine_type() == subselect_engine::UNION_ENGINE);
/*
TODO: the call to init_cond_guards allocates and initializes an
array of b... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 225,509,350,036,520,760,000,000,000,000,000,000,000 | 43 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static void DB_error(MYSQL *mysql_arg, const char *when)
{
DBUG_ENTER("DB_error");
maybe_die(EX_MYSQLERR, "Got error: %d: \"%s\" %s",
mysql_errno(mysql_arg), mysql_error(mysql_arg), when);
DBUG_VOID_RETURN;
} | 0 | [] | server | 5a43a31ee81bc181eeb5ef2bf0704befa6e0594d | 307,222,781,959,951,800,000,000,000,000,000,000,000 | 7 | mysqldump: comments and identifiers with new lines
don't let identifiers with new lines to break a comment |
static int io_ring_add_registered_fd(struct io_uring_task *tctx, int fd,
int start, int end)
{
struct file *file;
int offset;
for (offset = start; offset < end; offset++) {
offset = array_index_nospec(offset, IO_RINGFD_REG_MAX);
if (tctx->registered_rings[offset])
continue;
file = fget(fd);
if... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 313,714,899,848,413,570,000,000,000,000,000,000,000 | 24 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static bool is_filter_match(GSList *discovery_filter, struct eir_data *eir_data,
int8_t rssi)
{
GSList *l, *m;
bool got_match = false;
for (l = discovery_filter; l != NULL && got_match != true;
l = g_slist_next(l)) {
struct discovery_client *client = l->data;
struct discovery_filter *item = clien... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 121,321,463,337,303,040,000,000,000,000,000,000,000 | 53 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
int ssl3_get_server_hello(SSL *s)
{
STACK_OF(SSL_CIPHER) *sk;
const SSL_CIPHER *c;
CERT *ct = s->cert;
unsigned char *p,*d;
int i,al=SSL_AD_INTERNAL_ERROR,ok;
unsigned int j;
long n;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp;
#endif
/* Hello verify request and/or server hello version may not
* match so set fir... | 0 | [
"CWE-310"
] | openssl | ce325c60c74b0fa784f5872404b722e120e5cab0 | 162,977,574,820,741,730,000,000,000,000,000,000,000 | 284 | Only allow ephemeral RSA keys in export ciphersuites.
OpenSSL clients would tolerate temporary RSA keys in non-export
ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which
enabled this server side. Remove both options as they are a
protocol violation.
Thanks to Karthikeyan Bhargavan for reporting this issue.... |
PHP_HASH_API void PHP_HAVAL192Final(unsigned char *digest, PHP_HAVAL_CTX * context)
{
unsigned char bits[10];
unsigned int index, padLen;
/* Version, Passes, and Digest Length */
bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) |
((context->passes & 0x07) << 3) |
((context->output & 0x03) << 6);
bits[1] = (conte... | 0 | [] | php-src | 1390a5812b151e0ea8f74e64bfeaa5df4dd5b801 | 91,987,309,409,410,480,000,000,000,000,000,000,000 | 36 | Fix bug #70312 - HAVAL gives wrong hashes in specific cases |
TEST_F(HeaderToMetadataTest, HeaderIsPresentButRegexEmptiesIt) {
const std::string config = R"EOF(
request_rules:
- header: x-version
on_header_present:
metadata_namespace: envoy.lb
key: cluster
regex_value_rewrite:
pattern:
google_re2: {}
regex: "^foo"
subs... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 313,374,072,646,334,300,000,000,000,000,000,000,000 | 25 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len TSRMLS_DC)
{
HashTable *ht;
if (name) {
size_t name_esc_len;
char *tmp_buf, *name_esc;
name_esc = php_escape_html_entities(name, name_len, &name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
tmp_buf = emalloc(name_esc_len + size... | 1 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 337,220,904,660,544,900,000,000,000,000,000,000,000 | 61 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
static int tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key,
const struct in6_addr *daddr, struct in6_addr *saddr,
const struct tcphdr *th)
{
struct tcp_md5sig_pool *hp;
struct ahash_request *req;
hp = tcp_get_md5sig_pool();
if (!hp)
goto clear_hash_noput;
req = hp->md5_req;
... | 0 | [] | linux | 1d2f7b2d956e242179aaf4a08f3545f99c81f9a3 | 100,473,975,345,573,250,000,000,000,000,000,000,000 | 33 | net: ipv6: tcp reset, icmp need to consider L3 domain
Responses for packets to unused ports are getting lost with L3 domains.
IPv4 has ip_send_unicast_reply for sending TCP responses which accounts
for L3 domains; update the IPv6 counterpart tcp_v6_send_response.
For icmp the L3 master check needs to be moved up in i... |
static UINT video_control_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
VIDEO_CHANNEL_CALLBACK* callback = (VIDEO_CHANNEL_CALLBACK*)pChannelCallback;
VIDEO_PLUGIN* video;
VideoClientContext* context;
UINT ret = CHANNEL_RC_OK;
UINT32 cbSize, packetType;
video = (VIDEO_PLUGIN*)callba... | 0 | [
"CWE-190"
] | FreeRDP | 06c32f170093a6ecde93e3bc07fed6a706bfbeb3 | 38,089,609,329,974,102,000,000,000,000,000,000,000 | 35 | Fixed int overflow in PresentationContext_new
Thanks to hac425 CVE-2020-11038 |
gss_init_sec_context (minor_status,
claimant_cred_handle,
context_handle,
target_name,
req_mech_type,
req_flags,
time_req,
input_chan_bindings,
... | 1 | [
"CWE-415"
] | krb5 | 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf | 330,694,379,817,968,000,000,000,000,000,000,000,000 | 170 | Preserve GSS context on init/accept failure
After gss_init_sec_context() or gss_accept_sec_context() has created a
context, don't delete the mechglue context on failures from subsequent
calls, even if the mechanism deletes the mech-specific context (which
is allowed by RFC 2744 but not preferred). Check for union con... |
static GF_Err txtin_setup_srt(GF_Filter *filter, GF_TXTIn *ctx)
{
u32 ID, OCR_ES_ID, dsi_len, file_size;
u8 *dsi;
GF_TextSampleDescriptor *sd;
ctx->src = gf_fopen(ctx->file_name, "rb");
if (!ctx->src) return GF_URL_ERROR;
file_size = (u32) gf_fsize(ctx->src);
ctx->unicode_type = gf_text_get_utf_type(ctx->src)... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 79,891,236,649,331,090,000,000,000,000,000,000,000 | 75 | fixed #2061 |
readPixelData (InputStreamMutex *streamData,
DeepScanLineInputFile::Data *ifd,
int minY,
char *&buffer,
Int64 &packedDataSize,
Int64 &unpackedDataSize)
{
//
// Read a single line buffer from the input file.
//
// If the input fil... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 219,191,923,812,445,470,000,000,000,000,000,000,000 | 127 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int rtnl_net_dumpid_one(int id, void *peer, void *data)
{
struct rtnl_net_dump_cb *net_cb = (struct rtnl_net_dump_cb *)data;
int ret;
if (net_cb->idx < net_cb->s_idx)
goto cont;
net_cb->fillargs.nsid = id;
if (net_cb->fillargs.add_ref)
net_cb->fillargs.ref_nsid = __peernet2id(net_cb->ref_net, peer);
... | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 93,281,646,121,864,710,000,000,000,000,000,000,000 | 19 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
static loff_t smb3_llseek(struct file *file, struct cifs_tcon *tcon, loff_t offset, int whence)
{
struct cifsFileInfo *wrcfile, *cfile = file->private_data;
struct cifsInodeInfo *cifsi;
struct inode *inode;
int rc = 0;
struct file_allocated_range_buffer in_data, *out_data = NULL;
u32 out_data_len;
unsigned int x... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 70,456,727,953,784,955,000,000,000,000,000,000,000 | 83 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
CImg<T>& maxabs(const CImg<t>& img) {
const ulongT siz = size(), isiz = img.size();
if (siz && isiz) {
if (is_overlapped(img)) return maxabs(+img);
T *ptrd = _data, *const ptre = _data + siz;
if (siz>isiz) for (ulongT n = siz/isiz; n; --n)
for (const t *ptrs = img._data... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 93,287,449,158,627,200,000,000,000,000,000,000,000 | 12 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int32_t DecimalQuantity::fractionCount() const {
return -getLowerDisplayMagnitude();
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 168,599,192,207,965,680,000,000,000,000,000,000,000 | 3 | ICU-20246 Fixing another integer overflow in number parsing. |
int no_op(DviContext *dvi, int opcode)
{
SHOWCMD((dvi, "noop", -1, ""));
return 0;
} | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 292,412,272,059,523,940,000,000,000,000,000,000,000 | 5 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
PHP_METHOD(HttpParams, __construct)
{
zval *zcopy, *zparams = NULL, *param_sep = NULL, *arg_sep = NULL, *val_sep = NULL;
long flags = PHP_HTTP_PARAMS_DEFAULT;
zend_error_handling zeh;
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!/z/z/z/l", &zparams, ¶m_sep, &arg_sep, &val_sep... | 0 | [
"CWE-399",
"CWE-704"
] | ext-http | 17137d4ab1ce81a2cee0fae842340a344ef3da83 | 164,328,356,241,879,040,000,000,000,000,000,000,000 | 66 | fix bug #73055 |
static int cm_alloc_msg(struct cm_id_private *cm_id_priv,
struct ib_mad_send_buf **msg)
{
struct ib_mad_agent *mad_agent;
struct ib_mad_send_buf *m;
struct ib_ah *ah;
mad_agent = cm_id_priv->av.port->mad_agent;
ah = ib_create_ah(mad_agent->qp->pd, &cm_id_priv->av.ah_attr);
if (IS_ERR(ah))
return PTR_ERR(ah)... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 3,444,189,406,223,450,600,000,000,000,000,000,000 | 30 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
void vrend_renderer_detach_res_ctx(struct vrend_context *ctx,
struct virgl_resource *res)
{
if (!res->pipe_resource) {
if (ctx->untyped_resource_cache == res) {
ctx->untyped_resource_cache = NULL;
} else {
struct vrend_untyped_resource *iter;
... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 240,103,870,146,861,400,000,000,000,000,000,000,000 | 22 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
static bool ValidateHeader(const STPFileHeader &fileHeader)
{
if(std::memcmp(fileHeader.magic, "STP3", 4)
|| fileHeader.version > 2
|| fileHeader.numOrders > 128
|| fileHeader.numSamples >= MAX_SAMPLES
|| fileHeader.timerCount == 0
|| fileHeader.midiCount != 50)
{
return false;
}
return true;
} | 0 | [
"CWE-125"
] | openmpt | b60b322cf9f0ffa624018f1bb9783edf0dc908c3 | 96,307,775,996,305,620,000,000,000,000,000,000,000 | 13 | [Sec] STP: Possible out-of-bounds memory read with malformed STP files (caught with afl-fuzz).
Patch-by: sagamusix
(originally committed as part of r9568)
git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.27@9576 56274372-70c3-4bfc-bfc3-4c3a0b034d27 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.