func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
AddLedMap(CompatInfo *info, LedInfo *new, bool same_file)
{
enum led_field collide;
const int verbosity = xkb_context_get_log_verbosity(info->ctx);
const bool report = (same_file && verbosity > 0) || verbosity > 9;
for (xkb_led_index_t i = 0; i < info->num_leds; i++) {
LedInfo *old = &info->led... | 0 | [
"CWE-476"
] | libxkbcommon | 96df3106d49438e442510c59acad306e94f3db4d | 215,706,827,610,762,550,000,000,000,000,000,000,000 | 67 | xkbcomp: Don't crash on no-op modmask expressions
If we have an expression of the form 'l1' in an interp section, we
unconditionally try to dereference its args, even if it has none.
Signed-off-by: Daniel Stone <daniels@collabora.com> |
static int snd_pcm_status_user32(struct snd_pcm_substream *substream,
struct snd_pcm_status32 __user * _status,
bool ext)
{
struct snd_pcm_status64 status64;
struct snd_pcm_status32 status32;
int res;
memset(&status64, 0, sizeof(status64));
memset(&status32, 0, sizeof(status32));
/*
* with extension,... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 133,483,835,514,194,220,000,000,000,000,000,000,000 | 48 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops)
{
return ERR_PTR(-EOPNOTSUPP);
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 107,348,955,137,286,100,000,000,000,000,000,000,000 | 4 | 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 js_fileio_finalize(JSRuntime *rt, JSValue obj)
{
FILE *f = JS_GetOpaque(obj, file_class_id);
if (!f) return;
gf_fclose(f); | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 255,774,307,304,223,000,000,000,000,000,000,000,000 | 6 | fixed #2138 |
g_file_start_mountable (GFile *file,
GDriveStartFlags flags,
GMountOperation *start_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer ... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 300,574,674,671,567,700,000,000,000,000,000,000,000 | 29 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
bgp_open_print(netdissect_options *ndo,
const u_char *dat, int length)
{
struct bgp_open bgpo;
struct bgp_opt bgpopt;
const u_char *opt;
int i;
ND_TCHECK2(dat[0], BGP_OPEN_SIZE);
memcpy(&bgpo, dat, BGP_OPEN_SIZE);
ND_PRINT((ndo, "\n\t Version %d, ", bgpo.bgpo_version));
ND_PRINT((ndo, "my AS %... | 0 | [
"CWE-125"
] | tcpdump | 86326e880d31b328a151d45348c35220baa9a1ff | 303,770,193,202,172,000,000,000,000,000,000,000,000 | 61 | (for 4.9.3) CVE-2018-14881/BGP: Fix BGP_CAPCODE_RESTART.
Add a bounds check and a comment to bgp_capabilities_print().
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s). |
static NTSTATUS parent_dirname_compatible_open(connection_struct *conn,
const struct smb_filename *smb_fname_dst_in)
{
struct smb_filename *smb_fname_parent = NULL;
struct file_id id;
files_struct *fsp = NULL;
int ret;
NTSTATUS status;
status = SMB_VFS_PARENT_PATHNAME(conn,
talloc_tos(),
smb_fna... | 0 | [
"CWE-200"
] | samba | 3ddc9344c2fa7461336899fbddb0bb80995e9170 | 92,269,421,574,895,300,000,000,000,000,000,000,000 | 37 | CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro.
Fixes the raw.write.bad-write test.
NB. We need the two (==0) changes in source3/smbd/smb2_reply.c
as the gcc optimizer now knows that the return from
smbreq_bufrem() can never be less than zero.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085
Remove... |
PJ_DEF(pj_status_t) pjmedia_rtcp_fb_parse_pli(
const void *buf,
pj_size_t length)
{
pjmedia_rtcp_fb_common *hdr = (pjmedia_rtcp_fb_common*) buf;
PJ_ASSERT_RETURN(buf, PJ_EINVAL);
if (length < 12)
return PJ_ETOOSMALL;
/* PLI uses pt==RTCP_PSFB and FMT==1 */
if (hdr->rtcp_common.pt !... | 0 | [
"CWE-200",
"CWE-787"
] | pjproject | 11559e49e65bdf00922ad5ae28913ec6a198d508 | 301,101,433,976,930,030,000,000,000,000,000,000,000 | 17 | Merge pull request from GHSA-vhxv-phmx-g52q
* Prevent OOB read/write when parsing RTCP FB RPSI
* Add log information
* Modification based on comments. |
static unsigned long xdp_get_metalen(const struct xdp_buff *xdp)
{
return xdp_data_meta_unsupported(xdp) ? 0 :
xdp->data - xdp->data_meta;
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 79,849,203,719,616,980,000,000,000,000,000,000,000 | 5 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static void rbd_osd_format_write(struct ceph_osd_request *osd_req)
{
struct rbd_obj_request *obj_request = osd_req->r_priv;
osd_req->r_flags = CEPH_OSD_FLAG_WRITE;
ktime_get_real_ts64(&osd_req->r_mtime);
osd_req->r_data_offset = obj_request->ex.oe_off;
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 152,967,189,731,698,190,000,000,000,000,000,000,000 | 8 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
static unsigned int crypto_ablkcipher_ctxsize(struct crypto_alg *alg, u32 type,
u32 mask)
{
return alg->cra_ctxsize;
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 254,360,353,872,089,840,000,000,000,000,000,000,000 | 5 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
**/
CImg<T>& tensor() {
return get_tensor().move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 217,053,147,176,638,250,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
int rdp_recv_message_channel_pdu(rdpRdp* rdp, wStream* s, UINT16 securityFlags)
{
if (securityFlags & SEC_AUTODETECT_REQ)
{
/* Server Auto-Detect Request PDU */
return rdp_recv_autodetect_request_packet(rdp, s);
}
if (securityFlags & SEC_AUTODETECT_RSP)
{
/* Client Auto-Detect Response PDU */
return rdp_r... | 0 | [
"CWE-125"
] | FreeRDP | 9301bfe730c66180263248b74353daa99f5a969b | 276,232,785,522,157,800,000,000,000,000,000,000,000 | 28 | Fixed #6007: Boundary checks in rdp_read_flow_control_pdu |
PrincipalSet::NameIterator AuthorizationManager::getAuthenticatedPrincipalNames() {
return _authenticatedPrincipals.getNames();
} | 0 | [
"CWE-264"
] | mongo | 23344f8b7506df694f66999693ee3c00dfd6afae | 10,662,619,885,406,004,000,000,000,000,000,000,000 | 3 | SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user.
Uncorrected, this can cause replica set heartbeats to stall behind operations
that hold the read lock for a long time. |
lldp_decode(struct lldpd *cfg, char *frame, int s,
struct lldpd_hardware *hardware,
struct lldpd_chassis **newchassis, struct lldpd_port **newport)
{
struct lldpd_chassis *chassis;
struct lldpd_port *port;
const char lldpaddr[] = LLDP_MULTICAST_ADDR;
const char dot1[] = LLDP_TLV_ORG_DOT1;
const char dot3[]... | 1 | [
"CWE-617",
"CWE-703"
] | lldpd | 9221b5c249f9e4843f77c7f888d5705348d179c0 | 24,008,441,118,108,575,000,000,000,000,000,000,000 | 598 | protocols: don't use assert on paths that can be reached
Malformed packets should not make lldpd crash. Ensure we can handle them
by not using assert() in this part. |
void vStreamBufferSetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer,
UBaseType_t uxStreamBufferNumber )
{
xStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber;
}
| 0 | [
"CWE-190"
] | FreeRTOS-Kernel | d05b9c123f2bf9090bce386a244fc934ae44db5b | 132,909,892,232,919,790,000,000,000,000,000,000,000 | 5 | Add addition overflow check for stream buffer (#226) |
static void FVMenuBitmaps(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
BitmapDlg(fv,NULL,mi->mid==MID_RemoveBitmaps?-1:(mi->mid==MID_AvailBitmaps) );
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 87,934,261,352,884,920,000,000,000,000,000,000,000 | 4 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static int selinux_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
{
return may_link(dir, old_dentry, MAY_LINK);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 170,689,528,229,106,730,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... |
bool Item_name_const::fix_fields(THD *thd, Item **ref)
{
if ((!value_item->fixed &&
value_item->fix_fields(thd, &value_item)) ||
(!name_item->fixed &&
name_item->fix_fields(thd, &name_item)) ||
!value_item->const_item() ||
!name_item->const_item())
{
my_error(ER_RESERVED_SYNTAX, ... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 299,123,136,477,843,520,000,000,000,000,000,000,000 | 21 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
send_init_strings(int fd GCC_UNUSED, TTY * old_settings)
{
int i;
bool need_flush = FALSE;
(void) old_settings;
#ifdef TAB3
if (old_settings != 0 &&
old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) {
old_settings->c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET);
SET_TTY(fd, old_settings);
}
#... | 1 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 335,937,451,824,292,960,000,000,000,000,000,000,000 | 71 | 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... |
circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint)
{
// log_fn(LOG_INFO,"Considering: layer_hint is %s",
// layer_hint ? "defined" : "null");
while ((layer_hint ? layer_hint->deliver_window : circ->deliver_window) <=
CIRCWINDOW_START - CIRCWINDOW_INCREMENT) {
log_debug(L... | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 282,352,684,654,654,540,000,000,000,000,000,000,000 | 19 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
int clientsArePaused(void) {
if (server.clients_paused &&
server.clients_pause_end_time < server.mstime)
{
listNode *ln;
listIter li;
client *c;
server.clients_paused = 0;
/* Put all the clients in the unblocked clients queue in order to
* force the re-... | 0 | [
"CWE-254"
] | redis | 874804da0c014a7d704b3d285aa500098a931f50 | 3,149,869,289,852,451,000,000,000,000,000,000,000 | 25 | Security: Cross Protocol Scripting protection.
This is an attempt at mitigating problems due to cross protocol
scripting, an attack targeting services using line oriented protocols
like Redis that can accept HTTP requests as valid protocol, by
discarding the invalid parts and accepting the payloads sent, for
example, ... |
static NTSTATUS do_map_to_guest(NTSTATUS status,
auth_serversupplied_info **server_info,
const char *user, const char *domain)
{
if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
if ((lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_USER) ||
(lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD)) {
DEBUG(... | 0 | [
"CWE-119"
] | samba | 9280051bfba337458722fb157f3082f93cbd9f2b | 193,973,128,294,439,970,000,000,000,000,000,000,000 | 23 | s3: Fix an uninitialized variable read
Found by Laurent Gaffie <laurent.gaffie@gmail.com>
Thanks for that,
Volker
Fix bug #7254 (An uninitialized variable read could cause an smbd crash). |
void bat_socket_receive_packet(struct icmp_packet_rr *icmp_packet,
size_t icmp_len)
{
struct socket_client *hash = socket_client_hash[icmp_packet->uid];
if (hash)
bat_socket_add_packet(hash, icmp_packet, icmp_len);
} | 0 | [
"CWE-119"
] | linux-2.6 | b5a1eeef04cc7859f34dec9b72ea1b28e4aba07c | 25,184,672,198,999,520,000,000,000,000,000,000,000 | 8 | batman-adv: Only write requested number of byte to user buffer
Don't write more than the requested number of bytes of an batman-adv icmp
packet to the userspace buffer. Otherwise unrelated userspace memory might get
overridden by the kernel.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lind... |
//! Convert 3D object into a CImg3d representation \overloading.
CImg<T>& object3dtoCImg3d(const bool full_check=true) {
return get_object3dtoCImg3d(full_check).move_to(*this); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 15,010,523,997,404,600,000,000,000,000,000,000,000 | 3 | . |
uint_t aubio_tempo_was_tatum (aubio_tempo_t *o)
{
uint_t last_tatum_distance = o->total_frames - o->last_tatum;
smpl_t beat_period = aubio_tempo_get_period(o);
smpl_t tatum_period = beat_period / o->tatum_signature;
if (last_tatum_distance < o->hop_size) {
o->last_tatum = o->last_beat;
return 2;
}
e... | 0 | [] | aubio | b1559f4c9ce2b304d8d27ffdc7128b6795ca82e5 | 21,118,783,382,059,983,000,000,000,000,000,000,000 | 19 | [tempo] fix buffer overflow in method parser |
int EVP_DecodeValid(unsigned char *buf, int len)
{
int i, num = 0, bad = 0;
if (len == 0)
return (-1);
while (conv_ascii2bin(*buf) == B64_WS) {
buf++;
len--;
if (len == 0)
return (-1);
}
for (i = len; i >= 4; i -= 4) {
if ((conv_ascii2bin(buf[0])... | 0 | [
"CWE-190",
"CWE-189"
] | openssl | 5b814481f3573fa9677f3a31ee51322e2a22ee6a | 276,219,173,528,137,340,000,000,000,000,000,000,000 | 29 | Avoid overflow in EVP_EncodeUpdate
An overflow can occur in the EVP_EncodeUpdate function which is used for
Base64 encoding of binary data. If an attacker is able to supply very large
amounts of input data then a length check can overflow resulting in a heap
corruption. Due to the very large amounts of data involved t... |
BOOL license_read_error_alert_packet(rdpLicense* license, wStream* s)
{
UINT32 dwErrorCode;
UINT32 dwStateTransition;
if (Stream_GetRemainingLength(s) < 8)
return FALSE;
Stream_Read_UINT32(s, dwErrorCode); /* dwErrorCode (4 bytes) */
Stream_Read_UINT32(s, dwStateTransition); /* dwStateTransition (4 bytes) */
... | 0 | [] | FreeRDP | f1d6afca6ae620f9855a33280bdc6f3ad9153be0 | 308,209,649,660,520,160,000,000,000,000,000,000,000 | 48 | Fix CVE-2014-0791
This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc(). |
bufIsChanged(buf_T *buf)
{
return
#ifdef FEAT_QUICKFIX
!bt_dontwrite(buf) &&
#endif
(buf->b_changed || file_ff_differs(buf, TRUE));
} | 0 | [
"CWE-190"
] | vim | 3eb1637b1bba19519885dd6d377bd5596e91d22c | 337,023,700,278,841,930,000,000,000,000,000,000,000 | 8 | patch 8.0.0377: possible overflow when reading corrupted undo file
Problem: Possible overflow when reading corrupted undo file.
Solution: Check if allocated size is not too big. (King) |
int cil_gen_pcidevicecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
int rc = SEPOL_ERR;
struct cil_pcide... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 263,949,293,977,343,440,000,000,000,000,000,000,000 | 49 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static struct tun_struct *tun_enable_queue(struct tun_file *tfile)
{
struct tun_struct *tun = tfile->detached;
tfile->detached = NULL;
list_del_init(&tfile->next);
--tun->numdisabled;
return tun;
} | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 168,767,236,891,231,600,000,000,000,000,000,000,000 | 9 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
int FS_GetModList( char *listbuf, int bufsize ) {
int nMods, i, j, nTotal, nLen, nPaks, nPotential, nDescLen;
char **pFiles = NULL;
char **pPaks = NULL;
char *name, *path;
char description[MAX_OSPATH];
int dummy;
char **pFiles0 = NULL;
char **pFiles1 = NULL;
char **pFiles2 = NULL;
char **pFiles3 = NULL;
qb... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 180,941,880,823,563,420,000,000,000,000,000,000,000 | 100 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio)
{
int class = IOPRIO_PRIO_CLASS(ioprio);
int data = IOPRIO_PRIO_DATA(ioprio);
struct task_struct *p, *g;
struct user_struct *user;
struct pid *pgrp;
kuid_t uid;
int ret;
switch (class) {
case IOPRIO_CLASS_RT:
if (!capable(CAP_SYS_ADMIN))
r... | 0 | [
"CWE-362"
] | linux-stable | 8ba8682107ee2ca3347354e018865d8e1967c5f4 | 162,587,844,796,575,530,000,000,000,000,000,000,000 | 83 | block: fix use-after-free in sys_ioprio_get()
get_task_ioprio() accesses the task->io_context without holding the task
lock and thus can race with exit_io_context(), leading to a
use-after-free. The reproducer below hits this within a few seconds on
my 4-core QEMU VM:
#define _GNU_SOURCE
#include <assert.h>
#include ... |
bool looks_like_pbl(const std::string& file)
{
return utils::wildcard_string_match(utils::lowercase(file), "*.pbl");
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 253,441,298,955,114,700,000,000,000,000,000,000,000 | 4 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
const std::string& HeaderToMetadataFilter::decideNamespace(const std::string& nspace) const {
return nspace.empty() ? HttpFilterNames::get().HeaderToMetadata : nspace;
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 304,416,967,931,629,440,000,000,000,000,000,000,000 | 3 | 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... |
g_chown(const char* name, int uid, int gid)
{
return chown(name, uid, gid);
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 223,795,866,843,699,700,000,000,000,000,000,000,000 | 4 | move temp files from /tmp to /tmp/.xrdp |
*/
int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
{
int i;
for (i=0 ; (uint) i < found_sets ; i++)
if (found_set[i].table_offset == table_offset &&
found_set[i].found_offset == found_offset)
return -i-2;
found_set[i].table_offset=table_offset;
found_set[i].found_offset=foun... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 16,940,443,438,875,257,000,000,000,000,000,000,000 | 12 | 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... |
void xen_netbk_check_rx_xenvif(struct xenvif *vif)
{
int more_to_do;
RING_FINAL_CHECK_FOR_REQUESTS(&vif->tx, more_to_do);
if (more_to_do)
xen_netbk_schedule_xenvif(vif);
} | 0 | [
"CWE-399"
] | linux | 7d5145d8eb2b9791533ffe4dc003b129b9696c48 | 32,658,710,054,530,770,000,000,000,000,000,000,000 | 9 | xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int usb_set_configuration(struct usb_device *dev, int configuration)
{
int i, ret;
struct usb_host_config *cp = NULL;
struct usb_interface **new_interfaces = NULL;
struct usb_hcd *hcd = bus_to_hcd(dev->bus);
int n, nintf;
if (dev->authorized == 0 || configuration == -1)
configuration = 0;
else {
for (i = 0;... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2e1c42391ff2556387b3cb6308b24f6f65619feb | 103,403,595,875,926,430,000,000,000,000,000,000,000 | 217 | 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... |
void srpp_del(GF_Box *s)
{
GF_SRTPProcessBox *ptr = (GF_SRTPProcessBox *)s;
if (ptr->info) gf_isom_box_del((GF_Box*)ptr->info);
if (ptr->scheme_type) gf_isom_box_del((GF_Box*)ptr->scheme_type);
gf_free(s);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 318,898,617,988,529,440,000,000,000,000,000,000,000 | 7 | prevent dref memleak on invalid input (#1183) |
static int l2tp_ip6_backlog_recv(struct sock *sk, struct sk_buff *skb)
{
int rc;
/* Charge it to the socket, dropping if the queue is full. */
rc = sock_queue_rcv_skb(sk, skb);
if (rc < 0)
goto drop;
return 0;
drop:
IP_INC_STATS(&init_net, IPSTATS_MIB_INDISCARDS);
kfree_skb(skb);
return -1;
} | 0 | [
"CWE-20"
] | net | 85fbaa75037d0b6b786ff18658ddf0b4014ce2a4 | 311,318,462,486,208,900,000,000,000,000,000,000,000 | 16 | inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage
of uninitialized memory to user in recv syscalls") conditionally updated
addr_len if the msg_name is written to. The recv_error and rxpmtu
functions relied on the re... |
static void usb_device_handle_destroy(USBDevice *dev)
{
USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev);
if (klass->handle_destroy) {
klass->handle_destroy(dev);
}
} | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 58,541,192,936,253,080,000,000,000,000,000,000,000 | 7 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
List all algorithms in "module_dir" */
PHP_FUNCTION(mcrypt_list_algorithms)
{
char **modules;
char *lib_dir = MCG(algorithms_dir);
int lib_dir_len;
int i, count;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s",
&lib_dir, &lib_dir_len) == FAILURE) {
return;
}
array_init(return_value);
modu... | 0 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 131,099,043,111,176,050,000,000,000,000,000,000,000 | 23 | Fix bug #72455: Heap Overflow due to integer overflows |
set_attributes_get_info_callback (GObject *source_object,
GAsyncResult *res,
gpointer callback_data)
{
NautilusFileOperation *op;
GFileInfo *new_info;
GError *error;
op = callback_data;
error = NULL;
new_info = g_file_query_info_finish (G_FILE (source_object), res, &error);
if (new_info != NULL) {... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 121,108,319,064,839,590,000,000,000,000,000,000,000 | 21 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
QPDF::getLinearizedParts(
std::map<int, int> const& object_stream_data,
std::vector<QPDFObjectHandle>& part4,
std::vector<QPDFObjectHandle>& part6,
std::vector<QPDFObjectHandle>& part7,
std::vector<QPDFObjectHandle>& part8,
std::vector<QPDFObjectHandle>& part9)
{
calculateLinearizationData(o... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 272,544,962,194,280,170,000,000,000,000,000,000,000 | 15 | 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 ... |
ip6_packet_match(const struct sk_buff *skb,
const char *indev,
const char *outdev,
const struct ip6t_ip6 *ip6info,
unsigned int *protoff,
int *fragoff, bool *hotdrop)
{
unsigned long ret;
const struct ipv6hdr *ipv6 = ipv6_hdr(skb);
#define FWINV(bool, invflg) ((bool) ^ !!(ip6info->invflags & (invflg))... | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 322,829,959,828,967,350,000,000,000,000,000,000,000 | 79 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
Opal::Call::is_outgoing () const
{
return outgoing;
} | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 251,681,074,839,831,530,000,000,000,000,000,000,000 | 4 | Validate UTF-8 strings before showing them
Closes bug #653009. |
void CConnectionTransportUDP::TransportConnectionStateChanged( ESteamNetworkingConnectionState eOldState )
{
CConnectionTransport::TransportConnectionStateChanged( eOldState );
switch ( ConnectionState() )
{
case k_ESteamNetworkingConnectionState_FindingRoute: // not used for raw UDP
default:
Assert( false )... | 0 | [
"CWE-703"
] | GameNetworkingSockets | d944a10808891d202bb1d5e1998de6e0423af678 | 315,025,943,490,924,400,000,000,000,000,000,000,000 | 27 | Tweak pointer math to avoid possible integer overflow |
static enum ipi_vector ipi_from_irq(unsigned irq)
{
struct irq_info *info = info_for_irq(irq);
BUG_ON(info == NULL);
BUG_ON(info->type != IRQT_IPI);
return info->u.ipi;
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 247,267,082,042,211,500,000,000,000,000,000,000,000 | 9 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
void __scm_destroy(struct scm_cookie *scm)
{
struct scm_fp_list *fpl = scm->fp;
int i;
if (fpl) {
scm->fp = NULL;
for (i=fpl->count-1; i>=0; i--)
fput(fpl->fp[i]);
free_uid(fpl->user);
kfree(fpl);
}
} | 0 | [
"CWE-399"
] | linux | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | 46,079,683,922,848,960,000,000,000,000,000,000,000 | 13 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit ... |
static ctmbstr GetNameFromVers(uint vers)
{
uint i;
for (i = 0; W3C_Doctypes[i].name; ++i)
if (W3C_Doctypes[i].vers == vers)
return W3C_Doctypes[i].name;
return NULL;
} | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 228,782,598,748,293,800,000,000,000,000,000,000,000 | 10 | Issue #217 - avoid len going negative, ever... |
void Transform::interpolate_bilinear( RawTile& in, unsigned int resampled_width, unsigned int resampled_height ){
// Pointer to input buffer
unsigned char *input = (unsigned char*) in.data;
int channels = in.channels;
unsigned int width = in.width;
unsigned int height = in.height;
// Define a max index p... | 1 | [
"CWE-190"
] | iipsrv | 882925b295a80ec992063deffc2a3b0d803c3195 | 199,575,290,481,727,200,000,000,000,000,000,000,000 | 81 | - Modified TileManager.cc to verify that malloc() has correctly allocated memory.
- Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve... |
Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
{
enum_parsing_place place= NO_MATTER;
bool field_found= (*from_field != not_found_field);
bool upward_lookup= FALSE;
TABLE_LIST *table_list;
/* Calculate the TABLE_LIST for the table */
table_list= (cached_table ? cached_table :
... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 178,281,310,874,381,700,000,000,000,000,000,000,000 | 305 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
size_t parse_core(const char *s, size_t n, SemanticValues & /*sv*/,
Context &c, any & /*dt*/) const override {
auto len = codepoint_length(s, n);
if (len < 1) {
c.set_error_pos(s);
return static_cast<size_t>(-1);
}
return len;
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 259,176,618,767,170,200,000,000,000,000,000,000,000 | 9 | Fix #122 |
UnicodeString::releaseBuffer(int32_t newLength) {
if(fUnion.fFields.fLengthAndFlags&kOpenGetBuffer && newLength>=-1) {
// set the new fLength
int32_t capacity=getCapacity();
if(newLength==-1) {
// the new length is the string length, capped by fCapacity
const UChar *array=getArrayStart(), *p=a... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 151,759,919,707,425,380,000,000,000,000,000,000,000 | 18 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
static void parse_rtcp_fb(pjmedia_rtcp_session *sess,
const void *pkt,
pj_size_t size)
{
unsigned cnt = 1;
pjmedia_rtcp_fb_nack nack[1];
//pjmedia_rtcp_fb_sli sli[1];
//pjmedia_rtcp_fb_rpsi rpsi;
pjmedia_event ev;
pj_timestamp ts_now;
pj_get_timestamp(&ts_now);
if (pjmedia_rt... | 0 | [
"CWE-125"
] | pjproject | 8b621f192cae14456ee0b0ade52ce6c6f258af1e | 5,933,975,271,209,084,000,000,000,000,000,000,000 | 38 | Merge pull request from GHSA-3qx3-cg72-wrh9 |
fill_yin_type(struct lys_module *module, struct lys_node *parent, struct lyxml_elem *yin, struct lys_type *type,
int parenttype, struct unres_schema *unres)
{
const char *value, *name, *module_name = NULL;
struct lys_node *siter;
struct lyxml_elem *next, *next2, *node, *child, exts;
struct... | 0 | [
"CWE-252"
] | libyang | a3917d95d516e3de267d3cfa5d4d3715a90e8777 | 306,980,811,912,074,430,000,000,000,000,000,000,000 | 1,120 | yin parser BUGFIX invalid memory access
... in case there were some unresolved
extensions.
Fixes #1454
Fixes #1455 |
int bpf_check(struct bpf_prog **prog, union bpf_attr *attr)
{
struct bpf_verifier_env *env;
struct bpf_verifer_log *log;
int ret = -EINVAL;
/* no program is valid */
if (ARRAY_SIZE(bpf_verifier_ops) == 0)
return -EINVAL;
/* 'struct bpf_verifier_env' can be global, but since it's not small,
* allocate/free i... | 0 | [
"CWE-20"
] | linux | c131187db2d3fa2f8bf32fdf4e9a4ef805168467 | 266,029,281,097,615,930,000,000,000,000,000,000,000 | 133 | bpf: fix branch pruning logic
when the verifier detects that register contains a runtime constant
and it's compared with another constant it will prune exploration
of the branch that is guaranteed not to be taken at runtime.
This is all correct, but malicious program may be constructed
in such a way that it always has... |
affitem2flag(
int flagtype,
char_u *item,
char_u *fname,
int lnum)
{
unsigned res;
char_u *p = item;
res = get_affitem(flagtype, &p);
if (res == 0)
{
if (flagtype == AFT_NUM)
smsg((char_u *)_("Flag is not a number in %s line %d: %s"),
fname, lnum, item);
else
... | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 51,811,610,305,028,590,000,000,000,000,000,000,000 | 27 | patch 8.0.0322: possible overflow with corrupted spell file
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking) |
static int match_prepare_for_sleep(sd_bus_message *message, void *userdata, sd_bus_error *ret_error) {
Manager *m = userdata;
int b, r;
assert(message);
r = sd_bus_message_read(message, "b", &b);
if (r < 0) {
log_debug_errno(r, "Failed to parse PrepareForSleep s... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 147,743,297,279,237,960,000,000,000,000,000,000,000 | 21 | 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 php_sqlite_generic_function_callback(sqlite_func *func, int argc, const char **argv)
{
zval *retval = NULL;
zval ***zargs = NULL;
zval funcname;
int i, res;
char *callable = NULL, *errbuf=NULL;
TSRMLS_FETCH();
/* sanity check the args */
if (argc == 0) {
sqlite_set_result_error(func, "not enough ... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 20,616,126,936,760,206,000,000,000,000,000,000,000 | 87 | - 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 |
get_bundled_machine_config (void)
{
const gchar *machine_config;
MONO_ARCH_SAVE_REGS;
machine_config = mono_get_machine_config ();
if (!machine_config)
return NULL;
return mono_string_new (mono_domain_get (), machine_config);
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 198,427,390,853,408,030,000,000,000,000,000,000,000 | 13 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static int hash_name(struct fuse *f, struct node *node, fuse_ino_t parentid,
const char *name)
{
size_t hash = name_hash(f, parentid, name);
struct node *parent = get_node(f, parentid);
node->name = strdup(name);
if (node->name == NULL)
return -1;
parent->refctr ++;
... | 0 | [] | ntfs-3g | fb28eef6f1c26170566187c1ab7dc913a13ea43c | 338,749,151,258,046,200,000,000,000,000,000,000,000 | 15 | Hardened the checking of directory offset requested by a readdir
When asked for the next directory entries, make sure the chunk offset
is within valid values, otherwise return no more entries in chunk. |
void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id,
QXLDevSurfaceCreate *surface)
{
ssd->worker->create_primary_surface(ssd->worker, id, surface);
} | 1 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 24,282,327,614,667,914,000,000,000,000,000,000,000 | 5 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
int wc_ecc_shared_secret_ex(ecc_key* private_key, ecc_point* point,
byte* out, word32 *outlen)
{
int err;
if (private_key == NULL || point == NULL || out == NULL ||
outlen == NULL) {
return BAD_FUNC_ARG;
}
... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 339,823,260,019,232,500,000,000,000,000,000,000,000 | 66 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
void padb_del(GF_Box *s)
{
GF_PaddingBitsBox *ptr = (GF_PaddingBitsBox *) s;
if (ptr == NULL) return;
if (ptr->padbits) gf_free(ptr->padbits);
gf_free(ptr);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 62,484,024,439,343,450,000,000,000,000,000,000,000 | 7 | prevent dref memleak on invalid input (#1183) |
isAnonAuth(relpTcp_t *pThis)
{
return pThis->ownCertFile == NULL;
} | 0 | [
"CWE-787"
] | librelp | 2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf | 104,200,890,755,816,120,000,000,000,000,000,000,000 | 4 | unify error message generation |
static int unix_getpw(UNUSED void *instance, REQUEST *request,
VALUE_PAIR **vp_list)
{
const char *name;
const char *encrypted_pass;
#ifdef HAVE_GETSPNAM
struct spwd *spwd = NULL;
#endif
#ifdef OSFC2
struct pr_passwd *pr_pw;
#else
struct passwd *pwd;
#endif
#ifdef HAVE_GETUSERSHELL
char *shell;
#endif
V... | 0 | [
"CWE-522",
"CWE-255"
] | freeradius-server | 1b1ec5ce75e224bd1755650c18ccdaa6dc53e605 | 89,685,228,042,692,650,000,000,000,000,000,000,000 | 147 | heck for account and password expiration |
Field_iterator_table_ref::get_natural_column_ref()
{
Natural_join_column *nj_col;
DBUG_ASSERT(field_it == &natural_join_it);
/*
The field belongs to a NATURAL join, therefore the column reference was
already created via one of the two constructor calls above. In this case
we just return the already c... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 314,710,485,037,522,120,000,000,000,000,000,000,000 | 16 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
TEST(UpstreamInfoImplTest, DumpState) {
UpstreamInfoImpl upstream_info;
{
std::stringstream out;
upstream_info.dumpState(out, 0);
std::string state = out.str();
EXPECT_THAT(state, testing::HasSubstr("upstream_connection_id_: null"));
}
upstream_info.setUpstreamConnectionId(5);
{
std::stri... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 336,680,136,958,136,000,000,000,000,000,000,000,000 | 17 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
txtwrite_get_params(gx_device * dev, gs_param_list * plist)
{
int code;
bool bool_T = true;
gs_param_string ofns;
gx_device_txtwrite_t *const tdev = (gx_device_txtwrite_t *) dev;
code = gx_default_get_params(dev, plist);
if (code < 0)
return code;
ofns.data = (const byte *)tdev->fn... | 0 | [
"CWE-476"
] | ghostpdl | 407c98a38c3a6ac1681144ed45cc2f4fc374c91f | 2,661,885,154,400,464,000,000,000,000,000,000,000 | 33 | txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values
Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref"
Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph
name or Unicode code point from the glyph ID, as this is not a valid
ID. |
static inline int is_ctext(char ch)
{
unsigned char uch = (unsigned char) ch;
if (is_no_ws_ctl(ch))
return TRUE;
if (uch < 33)
return FALSE;
if ((uch == 40) || (uch == 41))
return FALSE;
if (uch == 92)
return FALSE;
if (uch == 127)
return FALSE;
return TRUE;
} | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 171,409,106,390,105,470,000,000,000,000,000,000,000 | 21 | Fixed crash #274 |
find_matching_ref (GHashTable *refs,
const char *name,
const char *opt_branch,
const char *opt_default_branch,
const char *opt_arch,
const char *opt_collection_id,
FlatpakKinds kinds,
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 62,388,127,396,472,050,000,000,000,000,000,000,000 | 67 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
string_extract (string, sindex, charlist, flags)
char *string;
int *sindex;
char *charlist;
int flags;
{
register int c, i;
int found;
size_t slen;
char *temp;
DECLARE_MBSTATE;
slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
i = *sindex;
found = 0;
while (c = st... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 36,289,792,684,662,196,000,000,000,000,000,000,000 | 56 | bash-4.4-rc2 release |
static void virtio_gpu_cursor_bh(void *opaque)
{
VirtIOGPU *g = opaque;
virtio_gpu_handle_cursor(&g->parent_obj, g->cursor_vq);
} | 0 | [] | qemu | acfc4846508a02cc4c83aa27799fd74ac280bdb2 | 164,331,724,012,191,280,000,000,000,000,000,000,000 | 5 | virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS
The value is defined in virtio_gpu.h already (changing from 4 to 16).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
libssh2_session_flag(LIBSSH2_SESSION * session, int flag, int value)
{
switch(flag) {
case LIBSSH2_FLAG_SIGPIPE:
session->flag.sigpipe = value;
break;
case LIBSSH2_FLAG_COMPRESS:
session->flag.compress = value;
break;
default:
/* unknown flag */
return LIB... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 112,809,311,081,859,910,000,000,000,000,000,000,000 | 16 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
static int internal_get_user_pages_fast(unsigned long start, int nr_pages,
unsigned int gup_flags,
struct page **pages)
{
unsigned long addr, len, end;
int nr_pinned = 0, ret = 0;
if (WARN_ON_ONCE(gup_flags & ~(FOLL_WRITE | FOLL_LONGTERM |
FOLL_FORCE | FOLL_PIN | FOLL_GET)))
return -EINVAL;
... | 1 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 327,886,645,833,141,730,000,000,000,000,000,000,000 | 48 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
static ssize_t bfq_var_show(unsigned int var, char *page)
{
return sprintf(page, "%u\n", var); | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 103,079,096,907,059,700,000,000,000,000,000,000,000 | 4 | 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... |
START_TEST(SecureChannel_sendSymmetricMessage_modeNone) {
// initialize dummy message
UA_ReadRequest dummyMessage;
UA_ReadRequest_init(&dummyMessage);
UA_DataType dummyType = UA_TYPES[UA_TYPES_READREQUEST];
testChannel.securityMode = UA_MESSAGESECURITYMODE_NONE;
UA_StatusCode retval = UA_Secur... | 0 | [
"CWE-703",
"CWE-770"
] | open62541 | b79db1ac78146fc06b0b8435773d3967de2d659c | 92,906,049,316,730,010,000,000,000,000,000,000,000 | 14 | fix(plugin): Add default limits for chunks and message size
Based on a reported DoS vulnerability reported by Team82 (Claroty
Research). |
TEST_P(ProxyProtocolTest, V2BadCommand) {
// A non local/proxy command (0x29 in b13) is rejected
constexpr uint8_t buffer[] = {
0x0d, 0x0a, 0x0d, 0x0a, 0x00, 0x0d, 0x0a, 0x51, 0x55, 0x49, 0x54, 0x0a, 0x29, 0x32, 0x00,
0x14, 0x00, 0x01, 0x01, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 252,538,462,307,976,830,000,000,000,000,000,000,000 | 11 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
pk_transaction_required_by (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
guint length;
PkBitfield filter;
gchar **package_ids;
gboolean recursive;
_cleanup_error_free_ GError *error = NULL;
_cleanup_free_ gchar *package_ids_temp = NULL;
g_return_... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 255,317,921,901,165,420,000,000,000,000,000,000,000 | 66 | 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... |
xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaPtr schema, xmlNodePtr node,
int *hasRestrictionOrExtension)
{
xmlSchemaTypePtr type;
xmlNodePtr child = NULL;
xmlAttrPtr attr;
if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
(hasRestri... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 259,073,084,393,268,000,000,000,000,000,000,000,000 | 82 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
string t_go_generator::render_fastbinary_includes() {
return "";
} | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 85,639,400,912,204,450,000,000,000,000,000,000,000 | 3 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
static inline int nfs4_server_supports_acls(struct nfs_server *server)
{
return server->caps & NFS_CAP_ACLS;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 232,777,681,069,546,530,000,000,000,000,000,000,000 | 4 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static void binder_wakeup_thread_ilocked(struct binder_proc *proc,
struct binder_thread *thread,
bool sync)
{
assert_spin_locked(&proc->inner_lock);
if (thread) {
if (sync)
wake_up_interruptible_sync(&thread->wait);
else
wake_up_interruptible(&thread->wait);
return;
}
/* Didn't find a thre... | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 66,035,589,578,715,435,000,000,000,000,000,000,000 | 29 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
static void acm_write_done(struct acm *acm, struct acm_wb *wb)
{
wb->use = 0;
acm->transmitting--;
usb_autopm_put_interface_async(acm->control);
} | 0 | [
"CWE-703"
] | linux | 8835ba4a39cf53f705417b3b3a94eb067673f2c9 | 137,525,341,732,832,400,000,000,000,000,000,000,000 | 6 | USB: cdc-acm: more sanity checking
An attack has become available which pretends to be a quirky
device circumventing normal sanity checks and crashes the kernel
by an insufficient number of interfaces. This patch adds a check
to the code path for quirky devices.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: sta... |
static void cpu_unregister_map_client_do(MapClient *client)
{
QLIST_REMOVE(client, link);
g_free(client);
} | 0 | [] | qemu | e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83 | 75,525,991,317,819,440,000,000,000,000,000,000,000 | 5 | exec: clamp accesses against the MemoryRegionSection
Because the clamping was done against the MemoryRegion,
address_space_rw was effectively broken if a write spanned
multiple sections that are not linear in underlying memory
(with the memory not being under an IOMMU).
This is visible with the MIPS rc4030 IOMMU, whi... |
static void __tcp_alloc_md5sig_pool(void)
{
struct crypto_ahash *hash;
int cpu;
hash = crypto_alloc_ahash("md5", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(hash))
return;
for_each_possible_cpu(cpu) {
void *scratch = per_cpu(tcp_md5sig_pool, cpu).scratch;
struct ahash_request *req;
if (!scratch) {
scratch = kma... | 0 | [
"CWE-399",
"CWE-835"
] | linux | ccf7abb93af09ad0868ae9033d1ca8108bdaec82 | 214,727,715,683,969,400,000,000,000,000,000,000,000 | 39 | tcp: avoid infinite loop in tcp_splice_read()
Splicing from TCP socket is vulnerable when a packet with URG flag is
received and stored into receive queue.
__tcp_splice_read() returns 0, and sk_wait_data() immediately
returns since there is the problematic skb in queue.
This is a nice way to burn cpu (aka infinite l... |
int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, bpfptr_t uattr)
{
u64 start_time = ktime_get_ns();
struct bpf_verifier_env *env;
struct bpf_verifier_log *log;
int i, len, ret = -EINVAL;
bool is_priv;
/* no program is valid */
if (ARRAY_SIZE(bpf_verifier_ops) == 0)
return -EINVAL;
/* 'struct bpf_... | 0 | [
"CWE-787"
] | linux | 64620e0a1e712a778095bd35cbb277dc2259281f | 117,189,147,013,366,740,000,000,000,000,000,000,000 | 236 | bpf: Fix out of bounds access for ringbuf helpers
Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM
in their bpf_func_proto definition as their first argument. They both expect
the result from a prior bpf_ringbuf_reserve() call which has a return type of
RET_PTR_TO_ALLOC_MEM_OR_NULL.
Meani... |
static int init_inodecache(void)
{
shmem_inode_cachep = kmem_cache_create("shmem_inode_cache",
sizeof(struct shmem_inode_info),
0, SLAB_PANIC, init_once);
return 0;
} | 0 | [
"CWE-200"
] | linux-2.6 | e84e2e132c9c66d8498e7710d4ea532d1feaaac5 | 246,253,118,275,473,540,000,000,000,000,000,000,000 | 7 | tmpfs: restore missing clear_highpage
tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Sig... |
CompilationCache* compilation_cache() { return compilation_cache_; } | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 304,243,484,925,045,200,000,000,000,000,000,000,000 | 1 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
Status GetPyArrayDescrForTensor(const TF_Tensor* tensor,
PyArray_Descr** descr) {
if (TF_TensorType(tensor) == TF_RESOURCE) {
PyObject* field = PyTuple_New(3);
#if PY_MAJOR_VERSION < 3
PyTuple_SetItem(field, 0, PyBytes_FromString("resource"));
#else
PyTuple_SetItem(field, 0... | 0 | [
"CWE-476",
"CWE-843"
] | tensorflow | 030af767d357d1b4088c4a25c72cb3906abac489 | 122,033,321,364,629,270,000,000,000,000,000,000,000 | 29 | Fix `tf.raw_ops.ResourceCountUpTo` null pointer dereference.
PiperOrigin-RevId: 368294347
Change-Id: I2c16fbfc9b4966c402c3d8e311f0d665a9c852d8 |
TfLiteStatus PopulateConvolutionQuantizationParams(
TfLiteContext* context, const TfLiteTensor* input,
const TfLiteTensor* filter, const TfLiteTensor* bias, TfLiteTensor* output,
const TfLiteFusedActivation& activation, int32_t* multiplier, int* shift,
int32_t* output_activation_min, int32_t* output_act... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 00302787b788c5ff04cb6f62aed5a74d936e86c0 | 86,461,751,135,545,600,000,000,000,000,000,000,000 | 74 | [tflite] Make `GetOptionalInputTensor` the same as `GetInput`.
With the previous change, there is no more need for two separate APIs. We would deprecate `GetOptionalInputTensor` in the future.
PiperOrigin-RevId: 332513386
Change-Id: Id7110271c25ebd6126ad8c82a493e37e0e0756b3 |
void zzlNext(unsigned char *zl, unsigned char **eptr, unsigned char **sptr) {
unsigned char *_eptr, *_sptr;
serverAssert(*eptr != NULL && *sptr != NULL);
_eptr = ziplistNext(zl,*sptr);
if (_eptr != NULL) {
_sptr = ziplistNext(zl,_eptr);
serverAssert(_sptr != NULL);
} else {
... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 66,118,023,434,645,590,000,000,000,000,000,000,000 | 16 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
static int pte_list_add(struct kvm_vcpu *vcpu, u64 *spte,
struct kvm_rmap_head *rmap_head)
{
struct pte_list_desc *desc;
int count = 0;
if (!rmap_head->val) {
rmap_printk("%p %llx 0->1\n", spte, *spte);
rmap_head->val = (unsigned long)spte;
} else if (!(rmap_head->val & 1)) {
rmap_printk("%p %llx 1->many\... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 49,119,127,552,154,830,000,000,000,000,000,000,000 | 35 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
void perf_trace_del(struct perf_event *p_event, int flags)
{
struct ftrace_event_call *tp_event = p_event->tp_event;
hlist_del_rcu(&p_event->hlist_entry);
tp_event->class->reg(tp_event, TRACE_REG_PERF_DEL, p_event);
} | 0 | [] | linux | ced39002f5ea736b716ae233fb68b26d59783912 | 31,900,699,898,589,878,000,000,000,000,000,000,000 | 6 | ftrace, perf: Add support to use function tracepoint in perf
Adding perf registration support for the ftrace function event,
so it is now possible to register it via perf interface.
The perf_event struct statically contains ftrace_ops as a handle
for function tracer. The function tracer is registered/unregistered
in ... |
**/
CImg<T>& sort(const bool is_increasing=true, const char axis=0) {
if (is_empty()) return *this;
CImg<uintT> perm;
switch (cimg::lowercase(axis)) {
case 0 :
_quicksort(0,size() - 1,perm,is_increasing,false);
break;
case 'x' : {
perm.assign(_width);
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 89,318,358,292,880,360,000,000,000,000,000,000,000 | 39 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int dn_dev_set_ifa(struct net_device *dev, struct dn_ifaddr *ifa)
{
struct dn_dev *dn_db = rtnl_dereference(dev->dn_ptr);
int rv;
if (dn_db == NULL) {
int err;
dn_db = dn_dev_create(dev, &err);
if (dn_db == NULL)
return err;
}
ifa->ifa_dev = dn_db;
if (dev->flags & IFF_LOOPBACK)
ifa->ifa_scop... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 218,225,191,762,489,470,000,000,000,000,000,000,000 | 22 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static int qcow2_probe(const uint8_t *buf, int buf_size, const char *filename)
{
const QCowHeader *cow_header = (const void *)buf;
if (buf_size >= sizeof(QCowHeader) &&
be32_to_cpu(cow_header->magic) == QCOW_MAGIC &&
be32_to_cpu(cow_header->version) >= 2)
return 100;
else
re... | 0 | [
"CWE-476"
] | qemu | 11b128f4062dd7f89b14abc8877ff20d41b28be9 | 186,590,581,192,144,500,000,000,000,000,000,000,000 | 11 | qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshot... |
zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
dns_name_t *owner)
{
isc_result_t result;
char ownerbuf[DNS_NAME_FORMATSIZE];
char namebuf[DNS_NAME_FORMATSIZE];
char altbuf[DNS_NAME_FORMATSIZE];
dns_fixedname_t fixed;
dns_name_t *foundname;
int level;
/*
* "." means the services does... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 299,268,723,153,084,670,000,000,000,000,000,000,000 | 85 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.