func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data)
{
int ret, pid;
struct userns_fn_data d;
char c = '1';
int p[2];
struct lxc_list *idmap;
ret = pipe(p);
if (ret < 0) {
SYSERROR("opening pipe");
return -1;
}
d.fn = fn;
d.arg = data;
d.p[0] = p[0];
d.p[1] = p[1];
pid = lxc_clone(r... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 31,254,189,121,326,140,000,000,000,000,000,000,000 | 53 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
file_path_add(gs_main_instance * minst, gs_file_path * pfp, const char *dirs)
{
uint len = r_size(&pfp->list);
const char *dpath = dirs;
int code;
if (dirs == 0)
return 0;
for (;;) { /* Find the end of the next directory name. */
const char *npath = dpath;
... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 16,005,364,848,029,091,000,000,000,000,000,000,000 | 33 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
entry_guards_expand_sample(guard_selection_t *gs)
{
tor_assert(gs);
const or_options_t *options = get_options();
if (live_consensus_is_missing(gs)) {
log_info(LD_GUARD, "Not expanding the sample guard set; we have "
"no live consensus.");
return NULL;
}
int n_sampled = smartlist_len(gs-... | 0 | [
"CWE-200"
] | tor | 665baf5ed5c6186d973c46cdea165c0548027350 | 216,187,392,325,787,960,000,000,000,000,000,000,000 | 60 | Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.
This patch makes the guard_restriction_t code ... |
int ssl_read( ssl_context *ssl, unsigned char *buf, size_t len )
{
int ret;
size_t n;
SSL_DEBUG_MSG( 2, ( "=> read" ) );
if( ssl->state != SSL_HANDSHAKE_OVER )
{
if( ( ret = ssl_handshake( ssl ) ) != 0 )
{
SSL_DEBUG_RET( 1, "ssl_handshake", ret );
return( re... | 0 | [
"CWE-310"
] | polarssl | 4582999be608c9794d4518ae336b265084db9f93 | 72,170,712,253,724,540,000,000,000,000,000,000,000 | 116 | Fixed timing difference resulting from badly formatted padding. |
bool Field_newdate::send_binary(Protocol *protocol)
{
MYSQL_TIME tm;
Field_newdate::get_date(&tm,0);
return protocol->store_date(&tm);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 260,518,879,921,684,850,000,000,000,000,000,000,000 | 6 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
void nfs_force_lookup_revalidate(struct inode *dir)
{
NFS_I(dir)->cache_change_attribute += 2;
} | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 319,523,551,480,874,000,000,000,000,000,000,000,000 | 4 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
void Scanner::lex_c_comment()
{
loop:
#line 3710 "src/parse/lex.cc"
{
unsigned char yych;
if ((lim - cur) < 2) { if (!fill(2)) { error("unexpected end of input"); exit(1); } }
yych = (unsigned char)*cur;
if (yych <= '\f') {
if (yych <= 0x00) goto yy408;
if (yych == '\n') goto yy411;
goto yy409;
} else {
i... | 0 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 291,726,248,868,417,300,000,000,000,000,000,000,000 | 49 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
void CLASS canon_600_correct()
{
int row, col, val;
static const short mul[4][2] =
{ { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } };
for (row=0; row < height; row++)
for (col=0; col < width; col++) {
if ((val = BAYER(row,col) - black) < 0) val = 0;
val = val * mul[row & 3][col & 1... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 176,596,090,531,784,920,000,000,000,000,000,000,000 | 18 | cumulated data checks patch |
static gboolean avdtp_parse_rej(struct avdtp *session,
struct avdtp_stream *stream,
uint8_t transaction, uint8_t signal_id,
void *buf, int size)
{
struct avdtp_error err;
uint8_t acp_seid;
struct avdtp_local_sep *sep = stream ? stream->lsep : NULL;
switch (signal_id) {
case AVDTP_DISCOVER:
if (!s... | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 225,000,291,050,738,230,000,000,000,000,000,000,000 | 104 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
set_ics(E1000State *s, int index, uint32_t val)
{
DBGOUT(INTERRUPT, "set_ics %x, ICR %x, IMR %x\n", val, s->mac_reg[ICR],
s->mac_reg[IMS]);
set_interrupt_cause(s, 0, val | s->mac_reg[ICR]);
} | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 305,628,130,532,768,740,000,000,000,000,000,000,000 | 6 | e1000: Discard packets that are too long if !SBP and !LPE
The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.
Signed-off-by: Michael Contreras <michael@inet... |
_equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b)
{
COMPARE_NODE_FIELD(relations);
COMPARE_SCALAR_FIELD(restart_seqs);
COMPARE_SCALAR_FIELD(behavior);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 15,649,793,338,186,943,000,000,000,000,000,000,000 | 8 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void conn_llist_dtor(void *user, void *element)
{
struct connectdata *conn = element;
(void)user;
conn->bundle = NULL;
} | 0 | [] | curl | 058f98dc3fe595f21dc26a5b9b1699e519ba5705 | 116,082,916,530,904,150,000,000,000,000,000,000,000 | 6 | conncache: include the zone id in the "bundle" hashkey
Make connections to two separate IPv6 zone ids create separate
connections.
Reported-by: Harry Sintonen
Bug: https://curl.se/docs/CVE-2022-27775.html
Closes #8747 |
static inline int skb_inner_transport_offset(const struct sk_buff *skb)
{
return skb_inner_transport_header(skb) - skb->data; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 167,748,812,328,760,590,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static int hiddev_fasync(int fd, struct file *file, int on)
{
struct hiddev_list *list = file->private_data;
return fasync_helper(fd, file, on, &list->fasync);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 93a2001bdfd5376c3dc2158653034c20392d15c5 | 96,074,763,936,964,700,000,000,000,000,000,000,000 | 6 | HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap... |
update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
/*
* We are starting a new run period:
*/
se->exec_start = rq_of(cfs_rq)->clock;
} | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 164,010,406,815,698,610,000,000,000,000,000,000,000 | 7 | sched: simplify sched_slice()
Use the existing calc_delta_mine() calculation for sched_slice(). This
saves a divide and simplifies the code because we share it with the
other /cfs_rq->load users.
It also improves code size:
text data bss dec hex filename
42659 2740 144 45543 b1e... |
static void nci_nfcee_discover_req(struct nci_dev *ndev, const void *opt)
{
struct nci_nfcee_discover_cmd cmd;
__u8 action = (unsigned long)opt;
cmd.discovery_action = action;
nci_send_cmd(ndev, NCI_OP_NFCEE_DISCOVER_CMD, 1, &cmd);
} | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 255,631,344,783,419,720,000,000,000,000,000,000,000 | 9 | NFC: add NCI_UNREG flag to eliminate the race
There are two sites that calls queue_work() after the
destroy_workqueue() and lead to possible UAF.
The first site is nci_send_cmd(), which can happen after the
nci_close_device as below
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
f... |
decompileINITARRAY(int n, SWF_ACTION *actions, int maxn)
{
struct SWF_ACTIONPUSHPARAM *nparam;
nparam=pop();
push(newVar_N("","","","[", nparam->p.Integer,"]"));
return 0;
} | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 82,123,587,377,201,790,000,000,000,000,000,000,000 | 7 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
void lxc_putlock(struct lxc_lock *l)
{
if (!l)
return;
switch(l->type) {
case LXC_LOCK_ANON_SEM:
if (l->u.sem) {
sem_destroy(l->u.sem);
free(l->u.sem);
l->u.sem = NULL;
}
break;
case LXC_LOCK_FLOCK:
if (l->u.f.fd != -1) {
close(l->u.f.fd);
l->u.f.fd = -1;
}
free(l->u.f.fname);
l->u.f.... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 72cf81f6a3404e35028567db2c99a90406e9c6e6 | 316,128,142,523,291,950,000,000,000,000,000,000,000 | 23 | CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc
This prevents an unprivileged user to use LXC to create arbitrary file
on the filesystem.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com> |
void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int)
{
int i;
u16 j;
struct hc_sp_status_block_data sp_sb_data;
int func = BP_FUNC(bp);
#ifdef BNX2X_STOP_ON_ERROR
u16 start = 0, end = 0;
u8 cos;
#endif
if (IS_PF(bp) && disable_int)
bnx2x_int_disable(bp);
bp->stats_state = STATS_STATE_DISABLED;
bp->eth_... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 329,614,334,958,172,870,000,000,000,000,000,000,000 | 282 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))
{
SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb);
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 264,076,298,048,043,540,000,000,000,000,000,000,000 | 4 | Add Next Protocol Negotiation. |
void CL_ServerStatus_f(void) {
netadr_t to, *toptr = NULL;
char *server;
serverStatus_t *serverStatus;
int argc;
netadrtype_t family = NA_UNSPEC;
argc = Cmd_Argc();
if ( argc != 2 && argc != 3 )
{
if (clc.state != CA_ACTIVE || clc.demoplaying)
{
Com_Printf ("Not connected to a server.\n");
Com_Pr... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 230,219,069,618,342,900,000,000,000,000,000,000,000 | 51 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
struct rfcomm_dlc *dlc = dev->dlc;
u8 v24_sig;
BT_DBG("tty %p dev %p set 0x%02x clear 0x%02x", tty, dev, set, clear);
rfcomm_dlc_get_modem_status(dlc, &v... | 0 | [
"CWE-200"
] | linux | f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a | 70,355,863,323,121,570,000,000,000,000,000,000,000 | 32 | Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)
The RFCOMM code fails to initialize the two padding bytes of struct
rfcomm_dev_list_req inserted for alignment before copying it to
userland. Additionally there are two padding bytes in each instance of
struct rfcomm_dev_info. The ioctl() that for disclosure... |
int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request,
__u8 requesttype, __u16 value, __u16 index, void *data,
__u16 size, int timeout)
{
struct usb_ctrlrequest *dr;
int ret;
dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
if (!dr)
return -ENOMEM;
dr->bRequestType = re... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2e1c42391ff2556387b3cb6308b24f6f65619feb | 185,639,225,843,117,350,000,000,000,000,000,000,000 | 23 | USB: core: harden cdc_parse_cdc_header
Andrey Konovalov reported a possible out-of-bounds problem for the
cdc_parse_cdc_header function. He writes:
It looks like cdc_parse_cdc_header() doesn't validate buflen
before accessing buffer[1], buffer[2] and so on. The only check
present is while (buflen > 0).
So fix thi... |
static int decode_coeff_abs_level_greater2(thread_context* tctx,
int cIdx, // int i,int n,
int ctxSet)
{
logtrace(LogSlice,"# coeff_abs_level_greater2\n");
int ctxIdxInc = ctxSet;
if (cIdx>0) ctxIdxInc+=4;
int bit = decode_CABAC_bit(&tctx->cabac_decoder,
&tctx->ct... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 170,637,670,456,814,100,000,000,000,000,000,000,000 | 17 | fix check for valid PPS idx (#298) |
prefix_components (char *filename, bool checkdirs)
{
int count = 0;
struct stat stat_buf;
int stat_result;
char *f = filename + FILE_SYSTEM_PREFIX_LEN (filename);
if (*f)
while (*++f)
if (ISSLASH (f[0]) && ! ISSLASH (f[-1]))
{
if (checkdirs)
{
*f = '\0';
stat_result = safe_st... | 0 | [
"CWE-476"
] | patch | f290f48a621867084884bfff87f8093c15195e6a | 228,428,185,138,818,300,000,000,000,000,000,000,000 | 25 | Fix segfault with mangled rename patch
http://savannah.gnu.org/bugs/?53132
* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
for renames and copies (fix the existing check). |
bool CanonicalQuery::isSimpleIdQuery(const BSONObj& query) {
bool hasID = false;
BSONObjIterator it(query);
while (it.more()) {
BSONElement elt = it.next();
if (elt.fieldNameStringData() == "_id") {
// Verify that the query on _id is a simple equality.
hasID = true;
... | 0 | [
"CWE-755"
] | mongo | c8ced6df8f620daaa2e539f192f2eef356c63e9c | 250,983,924,630,274,900,000,000,000,000,000,000,000 | 28 | SERVER-47773 Error consistently when tailable cursors and $near are used together |
static void macvtap_sock_destruct(struct sock *sk)
{
skb_queue_purge(&sk->sk_receive_queue);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | b92946e2919134ebe2a4083e4302236295ea2a73 | 312,191,320,812,454,900,000,000,000,000,000,000,000 | 4 | macvtap: zerocopy: validate vectors before building skb
There're several reasons that the vectors need to be validated:
- Return error when caller provides vectors whose num is greater than UIO_MAXIOV.
- Linearize part of skb when userspace provides vectors grater than MAX_SKB_FRAGS.
- Return error when userspace pro... |
GF_Err HintFile(GF_ISOFile *file, u32 MTUSize, u32 max_ptime, u32 rtp_rate, u32 base_flags, Bool copy_data, Bool interleave, Bool regular_iod, Bool single_group, Bool hint_no_offset)
{
GF_ESD *esd;
GF_InitialObjectDescriptor *iod;
u32 i, val, res, streamType;
u32 sl_mode, prev_ocr, single_ocr, nb_done, tot_bw, bw, ... | 0 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 220,294,580,854,900,180,000,000,000,000,000,000,000 | 178 | fixed #1565 |
PHP_FUNCTION(ldap_mod_del)
{
php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_DELETE);
} | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 133,648,206,558,701,600,000,000,000,000,000,000,000 | 4 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
long BlockGroup::Parse() {
const long status = m_block.Parse(m_pCluster);
if (status)
return status;
m_block.SetKey((m_prev > 0) && (m_next <= 0));
return 0;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 275,669,274,490,794,600,000,000,000,000,000,000,000 | 10 | 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 |
static int dread(DviContext *dvi, char *buffer, size_t len)
{
if(NEEDBYTES(dvi, len) && get_bytes(dvi, len) == -1)
return -1;
memcpy(buffer, dvi->buffer.data + dvi->buffer.pos, len);
dvi->buffer.pos += len;
return 0;
} | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 198,614,252,426,964,720,000,000,000,000,000,000,000 | 8 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
GF_Err adaf_dump(GF_Box *a, FILE * trace)
{
GF_AdobeDRMAUFormatBox *ptr = (GF_AdobeDRMAUFormatBox *)a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "AdobeDRMAUFormatBox ", trace);
fprintf(trace, "SelectiveEncryption=\"%d\" IV_length=\"%d\">\n", ptr->selective_enc ? 1 : 0, ptr->IV_length);
gf_isom_box_dum... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 15,896,345,017,880,102,000,000,000,000,000,000,000 | 9 | fixed 2 possible heap overflows (inc. #1088) |
xmlXPathNodeSetClear(xmlNodeSetPtr set, int hasNsNodes)
{
if ((set == NULL) || (set->nodeNr <= 0))
return;
else if (hasNsNodes) {
int i;
xmlNodePtr node;
for (i = 0; i < set->nodeNr; i++) {
node = set->nodeTab[i];
if ((node != NULL) &&
(node->type == XML_NAMESPACE_DECL))
xmlXPathNodeSetFreeNs... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 109,341,600,527,106,350,000,000,000,000,000,000,000 | 17 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static struct pbase_tree_cache *pbase_tree_get(const unsigned char *sha1)
{
struct pbase_tree_cache *ent, *nent;
void *data;
unsigned long size;
enum object_type type;
int neigh;
int my_ix = pbase_tree_cache_ix(sha1);
int available_ix = -1;
/* pbase-tree-cache acts as a limited hashtable.
* your object will ... | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 141,273,634,612,118,200,000,000,000,000,000,000,000 | 66 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
__s32 *array, int bytes)
{
memset(array, 0, bytes);
array[DEVCONF_FORWARDING] = cnf->forwarding;
array[DEVCONF_HOPLIMIT] = cnf->hop_limit;
array[DEVCONF_MTU6] = cnf->mtu6;
array[DEVCONF_ACCEPT_RA] = cnf->accept_ra;
array[DEVCONF_ACCEPT_REDIRECTS]... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 315,608,834,993,406,550,000,000,000,000,000,000,000 | 24 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
dump_track_compose_groups(void)
{
int i;
for (i = 0; i < (1<<17); i++)
{
if (compose_groups[i] == 0)
continue;
#undef printf
printf("COMPOSE_GROUPS: %04x:%d\n", i, compose_groups[i]);
}
} | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 56,608,749,536,230,160,000,000,000,000,000,000,000 | 12 | Bug 701795: Segv due to image mask issue |
static void php_zlib_output_compression_start(TSRMLS_D)
{
zval *zoh;
php_output_handler *h;
switch (ZLIBG(output_compression)) {
case 0:
break;
case 1:
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
/* break omitted intentionally */
default:
if ( php_zlib_output_encoding(TSRMLS_C) &&... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 290,748,936,970,704,750,000,000,000,000,000,000,000 | 25 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
static int vmx_get_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
switch (msr_index) {
case MSR_IA32_VMX_BASIC:
*pdata = vmx->nested.nested_vmx_basic;
break;
case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
case MSR_IA32_VMX_PINBASED_CTLS:
*pdata = vmx_control_msr(
... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 290,857,315,090,535,700,000,000,000,000,000,000,000 | 78 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
RZ_API const char *rz_bin_dwarf_get_lang_name(ut64 lang) {
if (lang >= RZ_ARRAY_SIZE(dwarf_langs)) {
return NULL;
}
return dwarf_langs[lang];
} | 0 | [
"CWE-787"
] | rizin | aa6917772d2f32e5a7daab25a46c72df0b5ea406 | 128,835,508,183,447,470,000,000,000,000,000,000,000 | 6 | Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086) |
str_to_key(unsigned char *str, unsigned char *key)
{
int i;
key[0] = str[0] >> 1;
key[1] = ((str[0] & 0x01) << 6) | (str[1] >> 2);
key[2] = ((str[1] & 0x03) << 5) | (str[2] >> 3);
key[3] = ((str[2] & 0x07) << 4) | (str[3] >> 4);
key[4] = ((str[3] & 0x0F) << 3) | (str[4] >> 5);
key[5] = ((str[4] & 0x1F) << 2) | ... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 06deeec77a5a689cc94b21a8a91a76e42176685d | 89,705,900,275,548,760,000,000,000,000,000,000,000 | 15 | cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack
smbencrypt() points a scatterlist to the stack, which is breaks if
CONFIG_VMAP_STACK=y.
Fix it by switching to crypto_cipher_encrypt_one(). The new code
should be considerably faster as an added benefit.
This code is nearly identical to some code th... |
get_ssa(
Operation *op,
BerElement *ber,
Filter *f,
const char **text )
{
ber_tag_t tag;
ber_len_t len;
int rc;
struct berval desc, value, nvalue;
char *last;
SubstringsAssertion ssa;
*text = "error decoding filter";
Debug( LDAP_DEBUG_FILTER, "begin get_ssa\n", 0, 0, 0 );
if ( ber_scanf( ber, "{m" /*}... | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 30,879,359,782,068,890,000,000,000,000,000,000,000 | 166 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
Network::ConnectionBalancer& connectionBalancer() override { return connection_balancer_; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 136,939,902,401,007,570,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int audit_compare_dname_path(const char *dname, const char *path,
int *dirlen)
{
int dlen, plen;
const char *p;
if (!dname || !path)
return 1;
dlen = strlen(dname);
plen = strlen(path);
if (plen < dlen)
return 1;
/* disregard trailing slashes */
p = path + plen - 1;
while ((*p == '/') && (p > pa... | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 335,389,654,084,182,370,000,000,000,000,000,000,000 | 35 | 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 void __bfq_set_in_service_queue(struct bfq_data *bfqd,
struct bfq_queue *bfqq)
{
if (bfqq) {
bfq_clear_bfqq_fifo_expire(bfqq);
bfqd->budgets_assigned = (bfqd->budgets_assigned * 7 + 256) / 8;
if (time_is_before_jiffies(bfqq->last_wr_start_finish) &&
bfqq->wr_coeff > 1 &&
bfqq->wr... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 189,708,428,757,098,400,000,000,000,000,000,000,000 | 52 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
int btd_adapter_disconnect_device(struct btd_adapter *adapter,
const bdaddr_t *bdaddr,
uint8_t bdaddr_type)
{
struct mgmt_cp_disconnect cp;
memset(&cp, 0, sizeof(cp));
bacpy(&cp.addr.bdaddr, bdaddr);
cp.addr.type = bdaddr_type;
if (mgmt_send(adapter->mgmt, MGMT_OP_DISCONNECT,
adapter->dev_id, si... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 182,682,165,176,245,500,000,000,000,000,000,000,000 | 18 | 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. |
static bool exclusive_event_installable(struct perf_event *event,
struct perf_event_context *ctx)
{
struct perf_event *iter_event;
struct pmu *pmu = event->pmu;
if (!(pmu->capabilities & PERF_PMU_CAP_EXCLUSIVE))
return true;
list_for_each_entry(iter_event, &ctx->event_list, event_entry) {
if (exclusive_e... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 78,908,540,908,341,240,000,000,000,000,000,000,000 | 16 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
size_t mingw_strftime(char *s, size_t max,
const char *format, const struct tm *tm)
{
size_t ret = strftime(s, max, format, tm);
if (!ret && errno == EINVAL)
die("invalid strftime format: '%s'", format);
return ret;
} | 0 | [
"CWE-59",
"CWE-61"
] | git | 684dd4c2b414bcf648505e74498a608f28de4592 | 323,143,416,439,950,400,000,000,000,000,000,000,000 | 9 | checkout: fix bug that makes checkout follow symlinks in leading path
Before checking out a file, we have to confirm that all of its leading
components are real existing directories. And to reduce the number of
lstat() calls in this process, we cache the last leading path known to
contain only directories. However, wh... |
static zend_object *spl_filesystem_object_new_ex(zend_class_entry *class_type)
{
spl_filesystem_object *intern;
intern = ecalloc(1, sizeof(spl_filesystem_object) + zend_object_properties_size(class_type));
/* intern->type = SPL_FS_INFO; done by set 0 */
intern->file_class = spl_ce_SplFileObject;
intern->info_clas... | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 246,239,478,456,423,200,000,000,000,000,000,000,000 | 15 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
miniflow_expand(const struct miniflow *src, struct flow *dst)
{
memset(dst, 0, sizeof *dst);
flow_union_with_miniflow(dst, src);
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 20,604,897,447,535,213,000,000,000,000,000,000,000 | 5 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
const set<CString>& CUser::GetAllowedHosts() const { return m_ssAllowedHosts; } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 228,951,363,225,131,260,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static inline void switch_fpu_finish(struct fpu *new_fpu)
{
u32 pkru_val = init_pkru_value;
struct pkru_state *pk;
if (!static_cpu_has(X86_FEATURE_FPU))
return;
set_thread_flag(TIF_NEED_FPU_LOAD);
if (!cpu_feature_enabled(X86_FEATURE_OSPKE))
return;
/*
* PKRU state is switched eagerly because it needs t... | 0 | [
"CWE-119",
"CWE-732",
"CWE-787"
] | linux | 59c4bd853abcea95eccc167a7d7fd5f1a5f47b98 | 68,248,021,913,808,370,000,000,000,000,000,000,000 | 24 | x86/fpu: Don't cache access to fpu_fpregs_owner_ctx
The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing
to the context that is currently loaded. It never changed during the
lifetime of a task - it remained stable/constant.
After deferred FPU registers loading until return to userland was
implement... |
static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
unsigned long address,
pmd_t *pmdp)
{
pmd_t pmd = *pmdp;
pmd_clear(mm, address, pmdp);
return pmd;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 163,726,713,593,665,170,000,000,000,000,000,000,000 | 8 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static inline bool IsSafeAltName(const char* name, size_t length, bool utf8) {
for (size_t i = 0; i < length; i++) {
char c = name[i];
switch (c) {
case '"':
case '\\':
// These mess with encoding rules.
// Fall through.
case ',':
// Commas make it impossible to split the list of... | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 204,889,266,348,218,700,000,000,000,000,000,000,000 | 37 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
static int cap_task_setrlimit(unsigned int resource, struct rlimit *new_rlim)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 187,609,585,767,027,470,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static void event_server_info(IRC_SERVER_REC *server, const char *data)
{
char *params, *ircd_version, *usermodes, *chanmodes;
g_return_if_fail(server != NULL);
params = event_get_params(data, 5, NULL, NULL, &ircd_version, &usermodes, &chanmodes);
/* check if server understands I and e channel modes */
if (strc... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 81,408,643,688,066,800,000,000,000,000,000,000,000 | 18 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
static inline MagickOffsetType ReadPixelCacheRegion(
const CacheInfo *magick_restrict cache_info,const MagickOffsetType offset,
const MagickSizeType length,unsigned char *magick_restrict buffer)
{
register MagickOffsetType
i;
ssize_t
count;
#if !defined(MAGICKCORE_HAVE_PREAD)
if (lseek(cache_info->f... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | aecd0ada163a4d6c769cec178955d5f3e9316f2f | 307,166,086,621,905,050,000,000,000,000,000,000,000 | 33 | Set pixel cache to undefined if any resource limit is exceeded |
static int ssl_parse_signature_algorithms_ext( ssl_context *ssl,
const unsigned char *buf,
size_t len )
{
size_t sig_alg_list_size;
const unsigned char *p;
sig_alg_list_size = ( ( buf[0] << 8 ) | ( buf[1] ) );
... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 10,573,084,394,159,315,000,000,000,000,000,000,000 | 68 | RSA blinding on CRT operations to counter timing attacks |
static bool manager_check_idle(void *userdata) {
Manager *m = userdata;
Link *link;
Iterator i;
assert(m);
HASHMAP_FOREACH(link, m->links, i) {
/* we are not woken on udev activity, so let's just wait for the
* pending udev event */
... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 218,489,670,730,873,260,000,000,000,000,000,000,000 | 28 | networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRout... |
static void sanitize_dead_code(struct bpf_verifier_env *env)
{
struct bpf_insn_aux_data *aux_data = env->insn_aux_data;
struct bpf_insn trap = BPF_JMP_IMM(BPF_JA, 0, 0, -1);
struct bpf_insn *insn = env->prog->insnsi;
const int insn_cnt = env->prog->len;
int i;
for (i = 0; i < insn_cnt; i++) {
if (aux_data[i].s... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 65,040,683,058,580,090,000,000,000,000,000,000,000 | 14 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
bool tipc_link_is_blocked(struct tipc_link *l)
{
return l->state & (LINK_RESETTING | LINK_PEER_RESET | LINK_FAILINGOVER);
} | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 33,142,046,434,042,680,000,000,000,000,000,000,000 | 4 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
static inline void exit_io_context(struct task_struct *task)
{
} | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | linux | b69f2292063d2caf37ca9aec7d63ded203701bf3 | 265,828,953,028,305,440,000,000,000,000,000,000,000 | 3 | block: Fix io_context leak after failure of clone with CLONE_IO
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never
decremented whenever copy_process() fails afterwards, which prevents
exit_io_context() from calling IO schedulers exit functions.
Give a task_struct to exit_io_context(), and call exi... |
void KrecipesView::addCategoriesPanelAction( KAction * action )
{
categoriesPanel->addAction( action );
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 200,640,752,617,661,600,000,000,000,000,000,000,000 | 4 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
parse_service(const char *svc_name)
{
char lin[MAXBUF];
SERVICE *res;
BACKEND *be;
MATCHER *m;
int ign_case;
if((res = (SERVICE *)malloc(sizeof(SERVICE))) == NULL)
conf_err("Service config: out of memory - aborted");
memset(res, 0, sizeof(SERVICE));
re... | 0 | [] | pound | a0c52c542ca9620a96750f9877b26bf4c84aef1b | 4,233,580,930,030,371,600,000,000,000,000,000,000 | 156 | SSL Compression Disable patch for 2.6f
This patch disables SSL/TLS compression entirely. There is no config option.
This prevents CRIME attacks against SSL. Note that HTTP compression is still
an option.
Test your server at https://www.ssllabs.com/ssldb/
Original patch by Hereward Cooper <coops@fawk.eu>
Openssl 0... |
UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) {
fUnion.fFields.fLengthAndFlags = 0;
if(count <= 0 || (uint32_t)c > 0x10ffff) {
// just allocate and do not do anything else
allocate(capacity);
} else if(c <= 0xffff) {
int32_t length = count;
if(capacity < length) {
... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 16,925,462,953,984,902,000,000,000,000,000,000,000 | 40 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
std::string index(SHalfloop_iterator l) const
{ return SLI(l,verbose); } | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 290,958,106,733,336,250,000,000,000,000,000,000,000 | 2 | Fix Nef_3 |
Status GetAxisForPackAndUnpack(InferenceContext* c, int32_t rank_after_pack,
int32* axis) {
TF_RETURN_IF_ERROR(c->GetAttr("axis", axis));
if (*axis < -1 * rank_after_pack || *axis >= rank_after_pack) {
return errors::InvalidArgument("Invalid axis: ", *axis, "; must be in [",
... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | c79ba87153ee343401dbe9d1954d7f79e521eb14 | 284,060,641,152,344,340,000,000,000,000,000,000,000 | 11 | Make Transpose's shape inference function validate that negative `perm` values are within the tensor's rank.
PiperOrigin-RevId: 403252853
Change-Id: Ia6b31b45b237312668bb31c2c3b3c7bbce2d2610 |
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
is_identical_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_var(&opline->op2, EX(... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 104,171,096,256,793,830,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 |
SSLNetVConnection::protocol_contains(std::string_view prefix) const
{
const char *retval = nullptr;
std::string_view tag = map_tls_protocol_to_tag(getSSLProtocol());
if (prefix.size() <= tag.size() && strncmp(tag.data(), prefix.data(), prefix.size()) == 0) {
retval = tag.data();
} else {
retval = supe... | 0 | [
"CWE-284"
] | trafficserver | d3f36f79820ea10c26573c742b1bbc370c351716 | 173,122,298,791,034,520,000,000,000,000,000,000,000 | 11 | Bug fix in origin connection handling (#8731)
Co-authored-by: Takuya Kitano <tkitano@yahoo-corp.jp> |
onig_get_syntax_op(OnigSyntaxType* syntax)
{
return syntax->op;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 337,737,244,650,794,800,000,000,000,000,000,000,000 | 4 | onig-5.9.2 |
int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
{
struct net_device *dev = skb->dev;
int fhoff, nhoff, ret;
struct frag_hdr *fhdr;
struct frag_queue *fq;
struct ipv6hdr *hdr;
u8 prevhdr;
/* Jumbo payload inhibits frag. header */
if (ipv6_hdr(skb)->payload_len == 0) {
pr_debug("payload ... | 0 | [
"CWE-787"
] | linux | 9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa | 123,456,595,361,449,880,000,000,000,000,000,000,000 | 53 | netfilter: ipv6: nf_defrag: drop mangled skb on ream error
Dmitry Vyukov reported GPF in network stack that Andrey traced down to
negative nh offset in nf_ct_frag6_queue().
Problem is that all network headers before fragment header are pulled.
Normal ipv6 reassembly will drop the skb when errors occur further down
th... |
image_is_64_bit(EFI_IMAGE_OPTIONAL_HEADER_UNION *PEHdr)
{
/* .Magic is the same offset in all cases */
if (PEHdr->Pe32Plus.OptionalHeader.Magic
== EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC)
return 1;
return 0;
} | 0 | [
"CWE-787"
] | shim | 159151b6649008793d6204a34d7b9c41221fb4b0 | 108,723,114,576,730,220,000,000,000,000,000,000,000 | 8 | Also avoid CVE-2022-28737 in verify_image()
PR 446 ("Add verify_image") duplicates some of the code affected by
Chris Coulson's defense in depth patch against CVE-2022-28737 ("pe:
Perform image verification earlier when loading grub").
This patch makes the same change to the new function.
Signed-off-by: Peter Jones ... |
flow_set_vlan_pcp(struct flow *flow, uint8_t pcp)
{
pcp &= 0x07;
flow->vlans[0].tci &= ~htons(VLAN_PCP_MASK);
flow->vlans[0].tci |= htons((pcp << VLAN_PCP_SHIFT) | VLAN_CFI);
} | 0 | [
"CWE-400"
] | ovs | 79cec1a736b91548ec882d840986a11affda1068 | 240,007,937,661,970,100,000,000,000,000,000,000,000 | 6 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
DwaCompressor::LossyDctDecoderBase::execute ()
{
int numComp = _rowPtrs.size();
int lastNonZero = 0;
int numBlocksX = (int) ceil ((float)_width / 8.0f);
int numBlocksY = (int) ceil ((float)_height / 8.0f);
int leftoverX = _width - (numBlocksX-1) * 8;
int leftoverY =... | 0 | [
"CWE-284"
] | openexr | 49db4a4192482eec9c27669f75db144cf5434804 | 88,902,422,598,077,540,000,000,000,000,000,000,000 | 471 | Add additional input validation in an attempt to resolve issue #232 |
xcf_load_old_paths (XcfInfo *info,
GimpImage *image)
{
guint32 num_paths;
guint32 last_selected_row;
GimpVectors *active_vectors;
info->cp += xcf_read_int32 (info->fp, &last_selected_row, 1);
info->cp += xcf_read_int32 (info->fp, &num_paths, 1);
while (num_paths-- > 0)
... | 0 | [
"CWE-416"
] | gimp | e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f | 182,796,726,158,912,550,000,000,000,000,000,000,000 | 22 | Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing...
...XCF channel and layer properties
The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION,
PROP_ACTIVE_CHANNEL saves the current object pointer the @info
structure. Others like PROP_SELECTION (for channel) and
PROP_GROUP_ITEM (for layer) will de... |
long long Block::GetTimeCode(const Cluster* pCluster) const {
if (pCluster == 0)
return m_timecode;
const long long tc0 = pCluster->GetTimeCode();
assert(tc0 >= 0);
// Check if tc0 + m_timecode would overflow.
if (tc0 < 0 || LLONG_MAX - tc0 < m_timecode) {
return -1;
}
const long long tc = tc0 ... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 325,469,338,844,778,470,000,000,000,000,000,000,000 | 16 | 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 |
pk_transaction_distro_upgrade_cb (PkBackendJob *job,
PkDistroUpgrade *item,
PkTransaction *transaction)
{
PkUpdateStateEnum state;
_cleanup_free_ gchar *name = NULL;
_cleanup_free_ gchar *summary = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NU... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 191,081,136,309,641,500,000,000,000,000,000,000,000 | 36 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
{
if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) ==
NOTIFY_STOP)
return;
#ifdef CONFIG_MCA
/*
* Might actually be able to figure out what the guilty party
* is:
*/
if (MCA_bus) {
mca_handle_nmi();
return;
}
#endif
pr_emerg... | 0 | [
"CWE-400"
] | linux-stable-rt | e5d4e1c3ccee18c68f23d62ba77bda26e893d4f0 | 95,123,745,460,955,020,000,000,000,000,000,000,000 | 24 | x86: Do not disable preemption in int3 on 32bit
Preemption must be disabled before enabling interrupts in do_trap
on x86_64 because the stack in use for int3 and debug is a per CPU
stack set by th IST. But 32bit does not have an IST and the stack
still belongs to the current task and there is no problem in scheduling
... |
static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
char buf[16];
/* bypass padding bytes */
avio_r8(pb);
avio_r8(pb);
avio_r8(pb);
snprintf(buf, sizeof(buf), "%d", avio_r8(pb));
av_dict_se... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 689e59b7ffed34eba6159dcc78e87133862e3746 | 16,106,986,686,261,848,000,000,000,000,000,000,000 | 15 | mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
~RequestNote() {
delete errorReport;
} | 0 | [
"CWE-59"
] | passenger | 9dda49f4a3ebe9bafc48da1bd45799f30ce19566 | 49,565,086,088,977,440,000,000,000,000,000,000,000 | 3 | Fixed a problem with graceful web server restarts.
This problem was introduced in 4.0.6 during the attempt to fix issue #910. |
GF_Err flac_dmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
{
const GF_PropertyValue *p;
GF_FLACDmxCtx *ctx = gf_filter_get_udta(filter);
if (is_remove) {
ctx->ipid = NULL;
if (ctx->opid) {
gf_filter_pid_remove(ctx->opid);
ctx->opid = NULL;
}
return GF_OK;
}
if (! gf_filter_p... | 0 | [
"CWE-787"
] | gpac | da69ad1f970a7e17c865eaec9af98cc84df10d5b | 228,994,666,777,681,830,000,000,000,000,000,000,000 | 31 | fixed 1718 |
mj_v_skip(int n, gx_device_printer *pdev, gp_file *stream)
{
/* This is a kind of magic number. */
static const int max_y_step = (256 * 15 + 255);
int l = n - max_y_step;
for (; l > 0; l -= max_y_step) { /* move 256 * 15 + 255 dots at once*/
gp_fwrite("\033(v\2\0\xff\x0f", sizeof(byte), 7, stream)... | 0 | [
"CWE-120"
] | ghostpdl | 849e74e5ab450dd581942192da7101e0664fa5af | 84,657,932,766,978,400,000,000,000,000,000,000,000 | 21 | Bug 701799: avoid out-of-range array access in mj_color_correct().
Code is obscure, so this fix merely avoids out-of-range access in the simplest
way possible, without understanding what the code is trying to do.
Fixes:
./sanbin/gs -sOutputFile=tmp -sDEVICE=mj6000c ../bug-701799.pdf |
void Item_field::set_field(Field *field_par)
{
field=result_field=field_par; // for easy coding with fields
maybe_null=field->maybe_null();
decimals= field->decimals();
table_name= *field_par->table_name;
field_name= field_par->field_name;
db_name= field_par->table->s->db.str;
alias_name_used= field_par... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 129,470,617,939,154,530,000,000,000,000,000,000,000 | 20 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
void cgit_snapshot_link(const char *name, const char *title, const char *class,
const char *head, const char *rev,
const char *archivename)
{
reporevlink("snapshot", name, title, class, head, rev, archivename);
} | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 12,225,074,665,269,607,000,000,000,000,000,000,000 | 6 | ui-shared: prevent malicious filename from injecting headers |
inline void Pad(const tflite::PadParams& op_params,
const RuntimeShape& input_shape, const int32* input_data,
const int32* pad_value_ptr, const RuntimeShape& output_shape,
int32* output_data) {
PadImpl(op_params, input_shape, input_data, pad_value_ptr, output_shape,
... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 299,386,837,445,734,330,000,000,000,000,000,000,000 | 7 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
evbuffer_write(struct evbuffer *buffer, evutil_socket_t fd)
{
return evbuffer_write_atmost(buffer, fd, -1);
} | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 94,432,373,477,869,460,000,000,000,000,000,000,000 | 4 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
rfbHandleAuthResult(rfbClient* client)
{
uint32_t authResult=0, reasonLen=0;
char *reason=NULL;
if (!ReadFromRFBServer(client, (char *)&authResult, 4)) return FALSE;
authResult = rfbClientSwap32IfLE(authResult);
switch (authResult) {
case rfbVncAuthOK:
rfbClientLog("VNC authentication s... | 1 | [
"CWE-787"
] | libvncserver | a83439b9fbe0f03c48eb94ed05729cb016f8b72f | 51,055,663,918,022,560,000,000,000,000,000,000,000 | 38 | LibVNCClient: fix three possible heap buffer overflows
An attacker could feed `0xffffffff`, causing a `malloc(0)` for the
buffers which are subsequently written to.
Closes #247 |
void slice_segment_header::reset()
{
pps = NULL;
slice_index = 0;
first_slice_segment_in_pic_flag = 0;
no_output_of_prior_pics_flag = 0;
slice_pic_parameter_set_id = 0;
dependent_slice_segment_flag = 0;
slice_segment_address = 0;
slice_type = 0;
pic_output_flag = 0;
colour_plane_id = 0;
slice_p... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 9,434,955,028,214,127,000,000,000,000,000,000,000 | 109 | fix check for valid PPS idx (#298) |
MagickExport MagickBooleanType DrawGradientImage(Image *image,
const DrawInfo *draw_info,ExceptionInfo *exception)
{
CacheView
*image_view;
const GradientInfo
*gradient;
const SegmentInfo
*gradient_vector;
double
length;
MagickBooleanType
status;
PixelInfo
zero;
PointInfo
... | 0 | [] | ImageMagick | f4cdb3f3aab28273960ffacf1d356312b56ffd27 | 117,730,287,321,605,190,000,000,000,000,000,000,000 | 231 | https://github.com/ImageMagick/ImageMagick/issues/3338 |
static struct inode *sock_alloc_inode(struct super_block *sb)
{
struct socket_alloc *ei;
ei = kmem_cache_alloc(sock_inode_cachep, GFP_KERNEL);
if (!ei)
return NULL;
init_waitqueue_head(&ei->socket.wq.wait);
ei->socket.wq.fasync_list = NULL;
ei->socket.wq.flags = 0;
ei->socket.state = SS_UNCONNECTED;
ei->soc... | 0 | [] | linux | d69e07793f891524c6bbf1e75b9ae69db4450953 | 202,969,234,705,980,950,000,000,000,000,000,000,000 | 19 | net: disallow ancillary data for __sys_{send,recv}msg_file()
Only io_uring uses (and added) these, and we want to disallow the
use of sendmsg/recvmsg for anything but regular data transfers.
Use the newly added prep helper to split the msghdr copy out from
the core function, to check for msg_control and msg_controllen... |
static int pxa2xx_i2c_slave_init(I2CSlave *i2c)
{
/* Nothing to do. */
return 0;
} | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 302,007,676,579,676,700,000,000,000,000,000,000,000 | 5 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
callbacks_update_ruler_scales (void) {
double xStart, xEnd, yStart, yEnd;
xStart = screenRenderInfo.lowerLeftX;
yStart = screenRenderInfo.lowerLeftY;
xEnd = screenRenderInfo.lowerLeftX + (screenRenderInfo.displayWidth / screenRenderInfo.scaleFactorX);
yEnd = screenRenderInfo.lowerLeftY + (screenRenderInfo.display... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 80,287,876,116,658,770,000,000,000,000,000,000,000 | 24 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
decrypt (gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey )
{
gcry_mpi_t t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
mpi_normalize (a);
mpi_normalize (b);
/* output = b/(a^x) mod p */
mpi_powm( t1, a, skey->x, skey->p );
mpi_invm( t1, t1, skey->p );
mpi_mulm( output, b, t1, sk... | 1 | [
"CWE-200"
] | libgcrypt | 410d70bad9a650e3837055e36f157894ae49a57d | 261,666,230,547,360,070,000,000,000,000,000,000,000 | 23 | cipher: Use ciphertext blinding for Elgamal decryption.
* cipher/elgamal.c (USE_BLINDING): New.
(decrypt): Rewrite to use ciphertext blinding.
--
CVE-id: CVE-2014-3591
As a countermeasure to a new side-channel attacks on sliding windows
exponentiation we blind the ciphertext for Elgamal decryption. This
is similar ... |
TABLE *get_null_ref_table() const { return null_ref_table; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 70,646,341,186,603,840,000,000,000,000,000,000,000 | 1 | 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.... |
void dev_error(struct cgpu_info *dev, enum dev_reason reason)
{
dev->device_last_not_well = time(NULL);
dev->device_not_well_reason = reason;
switch (reason) {
case REASON_THREAD_FAIL_INIT:
dev->thread_fail_init_count++;
break;
case REASON_THREAD_ZERO_HASH:
dev->thread_zero_hash_count++;
break;
ca... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 183,454,579,470,284,050,000,000,000,000,000,000,000 | 38 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
DeepScanLineInputFile::readPixelSampleCounts (int scanline1, int scanline2)
{
Int64 savedFilePos = 0;
if(!_data->frameBufferValid)
{
throw IEX_NAMESPACE::ArgExc("readPixelSampleCounts called with no valid frame buffer");
}
try
{
Lock lock (*_data->_streamData);
sav... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 327,546,663,053,120,770,000,000,000,000,000,000,000 | 77 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
rdpsnd_init_packet(uint8 type, uint16 size)
{
STREAM s;
s = channel_init(rdpsnd_channel, size + 4);
out_uint8(s, type);
out_uint8(s, 0); /* protocol-mandated padding */
out_uint16_le(s, size);
return s;
} | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 194,088,273,298,150,140,000,000,000,000,000,000,000 | 10 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static inline uint64_t readNumber(const unsigned char *p, unsigned *off, unsigned len, char *ok)
{
uint64_t n=0;
unsigned i, newoff, lim, p0 = p[*off], shift=0;
lim = p0 - 0x60;
if (lim > 0x10) {
cli_errmsg("Invalid number type: %c\n", p0);
*ok = 0;
return 0;
}
newoff = *off +lim+1;
if (... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 234,314,027,890,622,780,000,000,000,000,000,000,000 | 38 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
void uncache_tmp_xattrs(void)
{
if (prior_xattr_count != (size_t)-1) {
rsync_xa_list *xa_list_item = rsync_xal_l.items;
rsync_xa_list *xa_list_start = xa_list_item + prior_xattr_count;
xa_list_item += rsync_xal_l.count;
rsync_xal_l.count = prior_xattr_count;
while (xa_list_item-- > xa_list_start) {
struct... | 0 | [
"CWE-125"
] | rsync | 47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1 | 287,513,763,004,759,060,000,000,000,000,000,000,000 | 47 | Enforce trailing \0 when receiving xattr name values.
Fixes bug 13112. |
int __udp_lib_get_port(struct sock *sk, unsigned short snum,
struct hlist_head udptable[], int *port_rover,
int (*saddr_comp)(const struct sock *sk1,
const struct sock *sk2 ) )
{
struct hlist_node *node;
struct hlist_head *head;
struct sock *sk2;
int error = 1;
write_lock_bh(&udp_has... | 1 | [] | linux-2.6 | 32c1da70810017a98aa6c431a5494a302b6b9a30 | 203,541,452,275,097,500,000,000,000,000,000,000,000 | 78 | [UDP]: Randomize port selection.
This patch causes UDP port allocation to be randomized like TCP.
The earlier code would always choose same port (ie first empty list).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static const char *req_filename_field(request_rec *r)
{
return r->filename;
} | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 330,476,379,507,598,000,000,000,000,000,000,000,000 | 4 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.