func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
rb_str_getbyte(VALUE str, VALUE index)
{
long pos = NUM2LONG(index);
if (pos < 0)
pos += RSTRING_LEN(str);
if (pos < 0 || RSTRING_LEN(str) <= pos)
return Qnil;
return INT2FIX((unsigned char)RSTRING_PTR(str)[pos]);
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 156,686,019,461,653,370,000,000,000,000,000,000,000 | 11 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
nv_replace(cmdarg_T *cap)
{
char_u *ptr;
int had_ctrl_v;
long n;
if (checkclearop(cap->oap))
return;
#ifdef FEAT_JOB_CHANNEL
if (bt_prompt(curbuf) && !prompt_curpos_editable())
{
clearopbeep(cap->oap);
return;
}
#endif
// get another character
if (cap->nchar == Ctrl_V)
{
h... | 0 | [
"CWE-416"
] | vim | e2fa213cf571041dbd04ab0329303ffdc980678a | 51,052,599,413,423,350,000,000,000,000,000,000,000 | 201 | patch 8.2.5024: using freed memory with "]d"
Problem: Using freed memory with "]d".
Solution: Copy the pattern before searching. |
static void cmd_anal_rtti(RCore *core, const char *input) {
switch (input[0]) {
case '\0': // "avr"
case 'j': // "avrj"
r_anal_rtti_print_at_vtable (core->anal, core->offset, input[0]);
break;
case 'a': // "avra"
r_anal_rtti_print_all (core->anal, input[1]);
break;
case 'D': { // "avrD"
char *dup = strdu... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | a1bc65c3db593530775823d6d7506a457ed95267 | 267,909,386,247,056,900,000,000,000,000,000,000,000 | 28 | Fix #12375 - Crash in bd+ao (#12382) |
static int piv_general_mutual_authenticate(sc_card_t *card,
unsigned int key_ref, unsigned int alg_id)
{
int r;
#ifdef ENABLE_OPENSSL
int N;
int locked = 0;
u8 rbuf[4096];
u8 *nonce = NULL;
size_t nonce_len;
u8 *p;
u8 *key = NULL;
size_t keylen;
u8 *plain_text = NULL;
size_t plain_text_len = 0;
u8 *tmp;
s... | 1 | [] | OpenSC | 456ac566938a1da774db06126a2fa6c0cba514b3 | 242,759,350,926,489,900,000,000,000,000,000,000,000 | 298 | PIV Improved parsing of data from the card
Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced
with sc_asn1_read_tag. The input is also tested that the
expected tag is the first byte. Additional tests are also add.
sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs
do not ... |
GF_Err dimm_box_size(GF_Box *s)
{
s->size += 8;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 172,599,404,420,492,140,000,000,000,000,000,000,000 | 5 | fixed #1587 |
int rdbSave(char *filename, rdbSaveInfo *rsi) {
char tmpfile[256];
char cwd[MAXPATHLEN]; /* Current working dir path for error messages. */
FILE *fp = NULL;
rio rdb;
int error = 0;
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
fp = fopen(tmpfile,"w");
if (!fp) {
char *cwd... | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 119,484,217,380,614,570,000,000,000,000,000,000,000 | 67 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
NumberFormatTest::escape(UnicodeString& s)
{
UnicodeString buf;
for (int32_t i=0; i<s.length(); ++i)
{
UChar c = s[(int32_t)i];
if (c <= (UChar)0x7F) buf += c;
else {
buf += (UChar)0x5c; buf += (UChar)0x55;
buf += toHexString((c & 0xF000) >> 12);
b... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 127,063,463,748,388,600,000,000,000,000,000,000,000 | 17 | ICU-20246 Fixing another integer overflow in number parsing. |
flatpak_context_features_to_args (FlatpakContextFeatures features,
FlatpakContextFeatures valid,
GPtrArray *args)
{
return flatpak_context_bitmask_to_args (features, valid, flatpak_context_features, "--allow", "--disallow", args);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b | 45,293,999,261,678,800,000,000,000,000,000,000,000 | 6 | context: Add --env-fd option
This allows environment variables to be added to the context without
making their values visible to processes running under a different uid,
which might be significant if the variable's value is a token or some
other secret value.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of... |
_XimCommitedWcString(
Xim im,
Xic ic,
XPointer buf)
{
CARD16 *buf_s = (CARD16 *)buf;
XimCommitInfo info;
int len;
int new_len;
char *commit;
wchar_t *new_commit = (wchar_t *)NULL;
char *str;
Status status;
len = 0;
for (info = ic->private.proto.comm... | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 62,275,959,503,530,450,000,000,000,000,000,000,000 | 49 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
md_is_html_cdata(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
{
static const CHAR open_str[] = _T("<![CDATA[");
static const SZ open_size = SIZEOF_ARRAY(open_str) - 1;
OFF off = beg;
if(off + open_size >= lines[0].end)
return FALSE;
if(memcmp(STR(off), ... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 124,618,004,239,666,640,000,000,000,000,000,000,000 | 19 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
static int hns_roce_del_gid(struct ib_device *device, u8 port_num,
unsigned int index, void **context)
{
struct hns_roce_dev *hr_dev = to_hr_dev(device);
struct ib_gid_attr zattr = { };
union ib_gid zgid = { {0} };
u8 port = port_num - 1;
unsigned long flags;
int ret;
if (port >= hr_dev->caps.num_ports)
... | 0 | [
"CWE-665"
] | kernel | 72be029e947510dd6cbbbaf51879622af26e4200 | 205,218,757,088,552,300,000,000,000,000,000,000,000 | 21 | RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427
FATE#326416).
suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a |
Check if the IMAP stream is still active */
PHP_FUNCTION(imap_ping)
{
zval *streamind;
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
return;
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) {
RETURN_FALSE;
... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 171,357,674,279,930,200,000,000,000,000,000,000,000 | 15 | Disable rsh/ssh functionality in imap by default (bug #77153) |
put_tv32(struct timeval32 __user *o, struct timeval *i)
{
return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
(__put_user(i->tv_sec, &o->tv_sec) |
__put_user(i->tv_usec, &o->tv_usec)));
} | 0 | [
"CWE-703",
"CWE-264",
"CWE-189"
] | linux | 21c5977a836e399fc710ff2c5367845ed5c2527f | 303,453,143,264,721,700,000,000,000,000,000,000,000 | 6 | alpha: fix several security issues
Fix several security issues in Alpha-specific syscalls. Untested, but
mostly trivial.
1. Signedness issue in osf_getdomainname allows copying out-of-bounds
kernel memory to userland.
2. Signedness issue in osf_sysinfo allows copying large amounts of
kernel memory to userland.
3. ... |
static int annotate_dbname_mbentry(const mbentry_t *mbentry,
char **fnamep)
{
const char *conf_fname;
if (mbentry) {
/* per-mbox database */
conf_fname = mbentry_metapath(mbentry, META_ANNOTATIONS, /*isnew*/0);
if (!conf_fname)
return IMAP_... | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 145,193,754,857,462,070,000,000,000,000,000,000,000 | 24 | annotate: don't allow everyone to write shared server entries |
bfad_im_num_of_discovered_ports_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct Scsi_Host *shost = class_to_shost(dev);
struct bfad_im_port_s *im_port =
(struct bfad_im_port_s *) shost->hostdata[0];
struct bfad_port_s *port = im_port->port;
struct bfad_s *bfad = im_port-... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 0e62395da2bd5166d7c9e14cbc7503b256a34cb0 | 28,025,894,648,183,782,000,000,000,000,000,000,000 | 24 | scsi: bfa: release allocated memory in case of error
In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to
be released.
Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Martin K. Petersen <m... |
static int fsmClose(int *wfdp)
{
int rc = 0;
if (wfdp && *wfdp >= 0) {
int myerrno = errno;
static int oneshot = 0;
static int flush_io = 0;
int fdno = *wfdp;
if (!oneshot) {
flush_io = (rpmExpandNumeric("%{?_flush_io}") > 0);
oneshot = 1;
}
if (flush_io) {
fsync(fdno);
}
if (close(fdno... | 0 | [] | rpm | 25a435e90844ea98fe5eb7bef22c1aecf3a9c033 | 82,285,006,525,153,740,000,000,000,000,000,000,000 | 28 | Set file metadata via fd-based ops for everything but symlinks
Regular file ops are fd-based already, for the rest we need to open them
manually. Files with temporary suffix must never be followed, for
directories (and pre-existing FA_TOUCHed files) use the rpm symlink
"root or target owner allowed" rule wrt following... |
static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)
{
int kcmp;
struct rb_node *rbp;
struct epitem *epi, *epir = NULL;
struct epoll_filefd ffd;
ep_set_ffd(&ffd, file, fd);
for (rbp = ep->rbr.rb_node; rbp; ) {
epi = rb_entry(rbp, struct epitem, rbn);
kcmp = ep_cmp_ffd(&ffd, &epi->ff... | 0 | [] | linux-2.6 | 28d82dc1c4edbc352129f97f4ca22624d1fe61de | 123,098,535,809,421,490,000,000,000,000,000,000,000 | 23 | epoll: limit paths
The current epoll code can be tickled to run basically indefinitely in
both loop detection path check (on ep_insert()), and in the wakeup paths.
The programs that tickle this behavior set up deeply linked networks of
epoll file descriptors that cause the epoll algorithms to traverse them
indefinitel... |
qb_ipcs_connection_alloc(struct qb_ipcs_service *s)
{
struct qb_ipcs_connection *c =
calloc(1, sizeof(struct qb_ipcs_connection));
if (c == NULL) {
return NULL;
}
c->pid = 0;
c->euid = -1;
c->egid = -1;
c->receive_buf = NULL;
c->context = NULL;
c->fc_enabled = QB_FALSE;
c->state = QB_IPCS_CONNECTION_... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 107,872,544,814,251,030,000,000,000,000,000,000,000 | 38 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
ATPrepAddOids(List **wqueue, Relation rel, bool recurse, AlterTableCmd *cmd, LOCKMODE lockmode)
{
/* If we're recursing to a child table, the ColumnDef is already set up */
if (cmd->def == NULL)
{
ColumnDef *cdef = makeNode(ColumnDef);
cdef->colname = pstrdup("oid");
cdef->typeName = makeTypeNameFromOid(OIDO... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 135,948,280,781,147,200,000,000,000,000,000,000,000 | 21 | 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 int gg_send_queued_data(struct gg_session *sess)
{
int res;
if (sess->send_buf == NULL || sess->send_left == 0)
return 0;
gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd() sending %d bytes of queued data\n", sess->send_left);
res = send(sess->fd, sess->send_buf, sess->send_left, 0);
if (res ==... | 0 | [
"CWE-310"
] | libgadu | 035e3cf6227995bdbe95f663a938a3838131e022 | 333,270,217,426,094,150,000,000,000,000,000,000,000 | 37 | Dla GG_SSL_REQUIRED sprawdzamy certyfikat serwera z certyfikatami zainstalowanymi w systemie (Radhesh Krishnan K., Bartosz Brachaczek) |
static u64 floatSwap(u64 in){
union {
u64 r;
u32 i[2];
} u;
u32 t;
u.r = in;
t = u.i[0];
u.i[0] = u.i[1];
u.i[1] = t;
return u.r;
} | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 242,660,170,253,325,130,000,000,000,000,000,000,000 | 13 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
void MonClient::handle_command_reply(MCommandReply *reply)
{
MonCommand *r = NULL;
uint64_t tid = reply->get_tid();
if (tid == 0 && !mon_commands.empty()) {
r = mon_commands.begin()->second;
ldout(cct, 10) << __func__ << " has tid 0, assuming it is " << r->tid
<< dendl;
} else {
auto p = mon_c... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 20,580,437,899,895,483,000,000,000,000,000,000,000 | 26 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
static GFINLINE u8 gf_bs_load_byte(GF_BitStream *bs, Bool *is_eos)
{
u8 res;
if (bs->cache_read) {
if (bs->cache_read_pos == bs->cache_read_size) {
bs->cache_read_size = (u32) gf_fread(bs->cache_read, bs->cache_read_alloc, bs->stream);
bs->cache_read_pos = 0;
if (!bs->cache_read_size) {
*is_eos = GF_TR... | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 169,079,291,777,624,790,000,000,000,000,000,000,000 | 19 | fixed #2165 |
static void __sctp_write_space(struct sctp_association *asoc)
{
struct sock *sk = asoc->base.sk;
if (sctp_wspace(asoc) <= 0)
return;
if (waitqueue_active(&asoc->wait))
wake_up_interruptible(&asoc->wait);
if (sctp_writeable(sk)) {
struct socket_wq *wq;
rcu_read_lock();
wq = rcu_dereference(sk->sk_wq);
... | 0 | [
"CWE-617",
"CWE-362"
] | linux | 2dcab598484185dea7ec22219c76dcdd59e3cb90 | 288,405,887,165,748,800,000,000,000,000,000,000,000 | 29 | sctp: avoid BUG_ON on sctp_wait_for_sndbuf
Alexander Popov reported that an application may trigger a BUG_ON in
sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is
waiting on it to queue more data and meanwhile another thread peels off
the association being used by the first thread.
This patch replaces ... |
static void psched_tick(unsigned long dummy)
{
if (sizeof(cycles_t) == sizeof(u32)) {
psched_time_t dummy_stamp;
PSCHED_GET_TIME(dummy_stamp);
psched_timer.expires = jiffies + 1*HZ;
add_timer(&psched_timer);
}
} | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 193,705,911,324,185,570,000,000,000,000,000,000,000 | 9 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static auth_result url_add_listener (auth_client *auth_user)
{
client_t *client = auth_user->client;
auth_t *auth = client->auth;
auth_url *url = auth->state;
int res = 0, port;
const char *agent;
char *user_agent, *username, *password;
const char *mountreq;
char *mount, *ipaddr, *server... | 0 | [
"CWE-119"
] | icecast-server | b21a7283bd1598c5af0bbb250a041ba8198f98f2 | 317,331,833,161,369,550,000,000,000,000,000,000,000 | 147 | Fix: Fixed buffer overflows in URL auth code.
See: #2342 |
STATIC regnode_offset
S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
{
dVAR;
regnode_offset ret = 0;
I32 flags = 0;
char *parse_start;
U8 op;
int invert = 0;
U8 arg;
GET_RE_DEBUG_FLAGS_DECL;
*flagp = WORST; /* Tentatively. */
DEBUG_PARSE("atom");
PERL_... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 50,312,417,015,342,730,000,000,000,000,000,000,000 | 1,504 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
hup_cliparound(x, y)
int x UNUSED, y UNUSED;
{
return;
} | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 143,559,508,415,255,640,000,000,000,000,000,000,000 | 5 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
void DL_Dxf::writeImageDef(DL_WriterA& dw,
int handle,
const DL_ImageData& data) {
/*if (data.file.empty()) {
std::cerr << "DL_Dxf::writeImage: "
<< "Image file must not be empty\n";
return;
}*/
dw.dxfString(0, "IMAGEDEF");
if (... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 157,331,456,836,616,280,000,000,000,000,000,000,000 | 34 | check vertexIndex which might be -1 for broken DXF |
void DoNonMaxSuppressionOp(OpKernelContext* context, const Tensor& scores,
int num_boxes, const Tensor& max_output_size,
const T similarity_threshold,
const T score_threshold, const T soft_nms_sigma,
const std::f... | 1 | [
"CWE-703",
"CWE-681"
] | tensorflow | 3a7362750d5c372420aa8f0caf7bf5b5c3d0f52d | 39,186,091,057,577,500,000,000,000,000,000,000,000 | 134 | Prevent crash/heap OOB due to integer conversion to unsigned in NMS kernels
PiperOrigin-RevId: 387938262
Change-Id: Id361a715307e7179977cf5c64391c199a966f2ad |
CurlIo::CurlImpl::CurlImpl(const std::wstring& wurl, size_t blockSize):Impl(wurl, blockSize)
{
std::string url;
url.assign(wurl.begin(), wurl.end());
path_ = url;
// init curl pointer
curl_ = curl_easy_init();
if(!curl_) {
throw Error(1, "Uable to ini... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 340,243,656,039,977,500,000,000,000,000,000,000,000 | 19 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static struct dentry *proc_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
int err;
struct super_block *sb;
struct pid_namespace *ns;
struct proc_inode *ei;
char *options;
if (flags & MS_KERNMOUNT) {
ns = (struct pid_namespace *)data;
options = NULL;
} else {
ns = c... | 1 | [] | linux-2.6 | 99663be772c827b8f5f594fe87eb4807be1994e5 | 247,544,142,407,216,900,000,000,000,000,000,000,000 | 45 | proc: fix mount -t proc -o AAA
The proc_parse_options() call from proc_mount() runs only once at boot
time. So on any later mount attempt, any mount options are ignored
because ->s_root is already initialized.
As a consequence, "mount -o <options>" will ignore the options. The
only way to change mount options is "m... |
void WebContents::Replace(const base::string16& word) {
web_contents()->Replace(word);
} | 0 | [
"CWE-284",
"CWE-693"
] | electron | 18613925610ba319da7f497b6deed85ad712c59b | 196,165,810,634,058,930,000,000,000,000,000,000,000 | 3 | refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL
* spec: add test for x-site _top navigation
* chore: old cod... |
get_marked_for_offline (EBookBackend *backend)
{
ESource *source;
ESourceOffline *extension;
if (!E_IS_BOOK_BACKEND (backend))
return FALSE;
source = e_backend_get_source (E_BACKEND (backend));
extension = e_source_get_extension (source, E_SOURCE_EXTENSION_OFFLINE);
return e_source_offline_get_stay_synchroni... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 134,135,669,868,976,600,000,000,000,000,000,000,000 | 13 | Bug 796174 - strcat() considered unsafe for buffer overflow |
void decoder_context::init_thread_context(thread_context* tctx)
{
// zero scrap memory for coefficient blocks
memset(tctx->_coeffBuf, 0, sizeof(tctx->_coeffBuf)); // TODO: check if we can safely remove this
tctx->currentQG_x = -1;
tctx->currentQG_y = -1;
// --- find QPY that was active at the end of the ... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 168,351,431,153,588,270,000,000,000,000,000,000,000 | 40 | fix streams where SPS image size changes without refreshing PPS (#299) |
static int __netif_receive_skb(struct sk_buff *skb)
{
struct packet_type *ptype, *pt_prev;
rx_handler_func_t *rx_handler;
struct net_device *orig_dev;
struct net_device *master;
struct net_device *null_or_orig;
struct net_device *orig_or_bond;
int ret = NET_RX_DROP;
__be16 type;
if (!netdev_tstamp_prequeue)
... | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 159,927,136,563,436,230,000,000,000,000,000,000,000 | 138 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
static int login_global_init(void)
{
login_fail_command = xstrdup("boot");
globalvar_add_simple_int("login.timeout", &login_timeout, "%d");
globalvar_add_simple_string("login.fail_command", &login_fail_command);
return 0;
} | 0 | [
"CWE-200",
"CWE-203"
] | barebox | a3337563c705bc8e0cf32f910b3e9e3c43d962ff | 337,710,136,381,610,280,000,000,000,000,000,000,000 | 9 | password: Use crypto_memneq() to compare hashes
Cryptographic verifications should be time-constant so that an attacker
cannot get information about the secrets used by observing the system,
so use crypto_memneq() rather than memcmp() to compare password hashes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
frame_display_row (Frame_Chunk *fc, int *need_col_headers, unsigned int *max_regs)
{
unsigned int r;
char tmp[100];
if (*max_regs != fc->ncols)
*max_regs = fc->ncols;
if (*need_col_headers)
{
*need_col_headers = 0;
printf ("%-*s CFA ", eh_addr_size * 2, " LOC");
for (r = 0; ... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 189,809,638,479,862,900,000,000,000,000,000,000,000 | 69 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
void imap_bodystructure_write(const struct message_part *part,
string_t *dest, bool extended)
{
if ((part->flags & MESSAGE_PART_FLAG_MULTIPART) != 0)
part_write_body_multipart(part, dest, extended);
else
part_write_body(part, dest, extended);
} | 0 | [
"CWE-20"
] | core | 266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19 | 140,043,287,021,857,240,000,000,000,000,000,000,000 | 8 | lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit
If the last MIME part was message/rfc822 and its child was truncated away,
BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by
writing empty dummy ones. |
static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
unsigned long arg)
{
struct mm_struct *mm = ctx->mm;
struct vm_area_struct *vma, *prev, *cur;
int ret;
struct uffdio_range uffdio_unregister;
unsigned long new_flags;
bool found;
unsigned long start, end, vma_end;
const void __user *buf = (voi... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 3,904,598,841,105,508,000,000,000,000,000,000,000 | 150 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
static void __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
{
struct ip6_tnl *t = netdev_priv(dev);
struct net *net = dev_net(dev);
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
ip6_tnl_dev_init_gen(dev);
t->parms.proto = IPPROTO_IPV6;
dev_hold(dev);
ip6n->tnls_wc[0] = t;
} | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 13,167,465,154,282,303,000,000,000,000,000,000,000 | 11 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static const char *fieldtype2str(enum enum_field_types type)
{
switch (type) {
case MYSQL_TYPE_BIT: return "BIT";
case MYSQL_TYPE_BLOB: return "BLOB";
case MYSQL_TYPE_DATE: return "DATE";
case MYSQL_TYPE_DATETIME: return "DATETIME";
case MYSQL_TYPE_NEWDECIMAL: return "NEW... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 226,390,277,989,252,870,000,000,000,000,000,000,000 | 32 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static inline int io_rw_prep_async(struct io_kiocb *req, int rw)
{
struct io_async_rw *iorw = req->async_data;
struct iovec *iov = iorw->fast_iov;
int ret;
ret = io_import_iovec(rw, req, &iov, &iorw->iter, false);
if (unlikely(ret < 0))
return ret;
iorw->bytes_done = 0;
iorw->free_iovec = iov;
if (iov)
re... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 306,294,372,416,730,380,000,000,000,000,000,000,000 | 16 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static int file_out_fptr(void *f, const char *text, int size)
{
fputs(text, (FILE *)f);
return 0;
} | 0 | [
"CWE-125"
] | php-src | 780ff63c377dc79de2c04d6b341913ab0102135b | 103,655,832,762,232,880,000,000,000,000,000,000,000 | 5 | MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error
when given bad data). |
void set_write_last_frame_with_duration(bool write_last_frame_with_duration) {
write_last_frame_with_duration_ = write_last_frame_with_duration;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 225,762,103,834,689,500,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
{
struct ieee80211_local *local = sta->local;
int err = 0;
might_sleep();
err = sta_info_insert_check(sta);
if (err) {
rcu_read_lock();
goto out_free;
}
mutex_lock(&local->sta_mtx);
err = sta_info_insert_finish(sta);
if (err)
goto out_free... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 168,089,892,366,538,320,000,000,000,000,000,000,000 | 25 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
isdn_ppp_read(int min, struct file *file, char __user *buf, int count)
{
struct ippp_struct *is;
struct ippp_buf_queue *b;
u_long flags;
u_char *save_buf;
is = file->private_data;
if (!(is->state & IPPP_OPEN))
return 0;
if (!access_ok(VERIFY_WRITE, buf, count))
return -EFAULT;
spin_lock_irqsave(&is->buf... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 100,327,715,014,052,720,000,000,000,000,000,000,000 | 34 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static void gfar_init_tx_rx_base(struct gfar_private *priv)
{
struct gfar __iomem *regs = priv->gfargrp[0].regs;
u32 __iomem *baddr;
int i;
baddr = ®s->tbase0;
for (i = 0; i < priv->num_tx_queues; i++) {
gfar_write(baddr, priv->tx_queue[i]->tx_bd_dma_base);
baddr += 2;
}
baddr = ®s->rbase0;
for (i =... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 333,582,281,031,512,070,000,000,000,000,000,000,000 | 18 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
int nft_data_init(const struct nft_ctx *ctx,
struct nft_data *data, unsigned int size,
struct nft_data_desc *desc, const struct nlattr *nla)
{
struct nlattr *tb[NFTA_DATA_MAX + 1];
int err;
err = nla_parse_nested_deprecated(tb, NFTA_DATA_MAX, nla,
nft_data_policy, NULL);
if (err < 0)
return err;
... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 340,102,304,760,768,700,000,000,000,000,000,000,000 | 19 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
dns_zone_getadded(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->added);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 58,143,265,708,829,450,000,000,000,000,000,000,000 | 4 | 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. |
static int snd_rawmidi_output_status(struct snd_rawmidi_substream *substream,
struct snd_rawmidi_status64 *status)
{
struct snd_rawmidi_runtime *runtime = substream->runtime;
memset(status, 0, sizeof(*status));
status->stream = SNDRV_RAWMIDI_STREAM_OUTPUT;
spin_lock_irq(&runtime->lock);
status->avail = r... | 0 | [
"CWE-416"
] | linux | c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d | 238,806,300,589,463,540,000,000,000,000,000,000,000 | 12 | ALSA: rawmidi: Fix racy buffer resize under concurrent accesses
The rawmidi core allows user to resize the runtime buffer via ioctl,
and this may lead to UAF when performed during concurrent reads or
writes: the read/write functions unlock the runtime lock temporarily
during copying form/to user-space, and that's the ... |
allow_gpm_mouse(SCREEN *sp GCC_UNUSED)
{
bool result = FALSE;
#if USE_WEAK_SYMBOLS
/* Danger Robinson: do not use dlopen for libgpm if already loaded */
if ((Gpm_Wgetch) != 0) {
if (!sp->_mouse_gpm_loaded) {
T(("GPM library was already dlopen'd, not by us"));
}
} else
#endif
/* GPM does printf'... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 152,961,426,663,780,850,000,000,000,000,000,000,000 | 35 | 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... |
static bool ctnetlink_needs_filter(u8 family, const struct nlattr * const *cda)
{
return family || cda[CTA_MARK] || cda[CTA_FILTER];
} | 0 | [
"CWE-120"
] | linux | 1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6 | 28,363,253,343,194,960,000,000,000,000,000,000,000 | 4 | netfilter: ctnetlink: add a range check for l3/l4 protonum
The indexes to the nf_nat_l[34]protos arrays come from userspace. So
check the tuple's family, e.g. l3num, when creating the conntrack in
order to prevent an OOB memory access during setup. Here is an example
kernel panic on 4.14.180 when userspace passes in ... |
int bnx2x_issue_dmae_with_comp(struct bnx2x *bp, struct dmae_command *dmae,
u32 *comp)
{
int cnt = CHIP_REV_IS_SLOW(bp) ? (400000) : 4000;
int rc = 0;
bnx2x_dp_dmae(bp, dmae, BNX2X_MSG_DMAE);
/* Lock the dmae channel. Disable BHs to prevent a dead-lock
* as long as this code is called both from syscal... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 88,089,093,905,047,040,000,000,000,000,000,000,000 | 46 | 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... |
static void ssl_reset_retransmit_timeout( mbedtls_ssl_context *ssl )
{
ssl->handshake->retransmit_timeout = ssl->conf->hs_timeout_min;
MBEDTLS_SSL_DEBUG_MSG( 3, ( "update timeout value to %lu millisecs",
(unsigned long) ssl->handshake->retransmit_timeout ) );
} | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 75,070,617,947,162,340,000,000,000,000,000,000,000 | 6 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
void __init acpi_debugfs_init(void)
{
acpi_debugfs_dir = debugfs_create_dir("acpi", NULL);
acpi_custom_method_init();
} | 1 | [
"CWE-284",
"CWE-264"
] | linux | 526b4af47f44148c9d665e57723ed9f86634c6e3 | 45,292,335,462,181,550,000,000,000,000,000,000,000 | 6 | ACPI: Split out custom_method functionality into an own driver
With /sys/kernel/debug/acpi/custom_method root can write
to arbitrary memory and increase his priveleges, even if
these are restricted.
-> Make this an own debug .config option and warn about the
security issue in the config description.
-> Still keep ac... |
explicit StageClearOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | cebe3c45d76357d201c65bdbbf0dbe6e8a63bbdb | 66,834,884,068,931,400,000,000,000,000,000,000,000 | 1 | Fix tf.raw_ops.StagePeek vulnerability with invalid `index`.
Check that input is actually a scalar before treating it as such.
PiperOrigin-RevId: 445524908 |
static struct request_s *process_request (struct conn_s *connptr,
orderedmap hashofheaders)
{
char *url;
struct request_s *request;
int ret, skip_trans;
size_t request_len;
skip_trans = 0;
/* NULL out all the fields so frees don... | 1 | [
"CWE-200"
] | tinyproxy | 3764b8551463b900b5b4e3ec0cd9bb9182191cb7 | 125,292,646,856,234,710,000,000,000,000,000,000,000 | 193 | prevent junk from showing up in error page in invalid requests
fixes #457 |
static void __fanout_link(struct sock *sk, struct packet_sock *po)
{
struct packet_fanout *f = po->fanout;
spin_lock(&f->lock);
f->arr[f->num_members] = sk;
smp_wmb();
f->num_members++;
spin_unlock(&f->lock);
} | 1 | [
"CWE-362"
] | linux | 2bd624b4611ffee36422782d16e1c944d1351e98 | 179,854,886,080,078,100,000,000,000,000,000,000,000 | 10 | packet: Do not call fanout_release from atomic contexts
Commit 6664498280cf ("packet: call fanout_release, while UNREGISTERING a
netdev"), unfortunately, introduced the following issues.
1. calling mutex_lock(&fanout_mutex) (fanout_release()) from inside
rcu_read-side critical section. rcu_read_lock disables preempti... |
onig_region_copy(OnigRegion* to, OnigRegion* from)
{
#define RREGC_SIZE (sizeof(int) * from->num_regs)
int i;
if (to == from) return;
if (to->allocated == 0) {
if (from->num_regs > 0) {
to->beg = (int* )xmalloc(RREGC_SIZE);
if (IS_NULL(to->beg)) return;
to->end = (int* )xmalloc(RREGC_SIZ... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 223,243,667,954,116,670,000,000,000,000,000,000,000 | 38 | fix heap-buffer-overflow |
static status ParsePlayList (AFfilehandle filehandle, AFvirtualfile *fp,
uint32_t id, size_t size)
{
_Instrument *instrument;
uint32_t segmentCount;
int segment;
af_read_uint32_le(&segmentCount, fp);
if (segmentCount == 0)
{
filehandle->instrumentCount = 0;
filehandle->instruments = NULL;
return AF_SUCC... | 0 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 165,158,703,866,620,490,000,000,000,000,000,000,000 | 27 | Fix decoding of multi-channel ADPCM audio files. |
static int validate_apple_certificate_chain(json_t * j_params, gnutls_x509_crt_t cert_leaf, cbor_item_t * x5c_array) {
int ret = G_OK;
size_t i, x5c_array_size = cbor_array_size(x5c_array);
gnutls_x509_crt_t cert_x509[x5c_array_size], root_x509 = NULL;
gnutls_x509_trust_list_t tlist = NULL;
gnutls_datum_t cer... | 0 | [
"CWE-787"
] | glewlwyd | 4c5597c155bfbaf6491cf6b83479d241ae66940a | 256,810,590,438,551,250,000,000,000,000,000,000,000 | 58 | Fix possible buffer overflow |
TEST_F(QueryPlannerTest, CompoundIndexBoundsNotEqualsNull) {
addIndex(BSON("a" << 1 << "b" << 1));
runQuery(fromjson("{a: {$gt: 'foo'}, b: {$ne: null}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: null, node: {ixscan: {filter... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 190,893,369,066,634,870,000,000,000,000,000,000,000 | 11 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
GF_Err prft_box_size(GF_Box *s)
{
GF_ProducerReferenceTimeBox *ptr = (GF_ProducerReferenceTimeBox*)s;
ptr->size += 4+8+ (ptr->version ? 8 : 4);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 281,066,283,635,470,200,000,000,000,000,000,000,000 | 7 | fixed #2255 |
drill_add_drill_hole (gerbv_image_t *image, drill_state_t *state,
gerbv_drill_stats_t *stats, gerbv_net_t *curr_net)
{
gerbv_render_size_t *bbox;
double r;
/* Add one to drill stats for the current tool */
drill_stats_increment_drill_counter(image->drill_stats->drill_list,
state->current_tool);... | 0 | [
"CWE-787"
] | gerbv | 672214abb47a802fc000125996e6e0a46c623a4e | 264,769,390,417,685,180,000,000,000,000,000,000,000 | 53 | Add test to demonstrate buffer overrun |
static void autocomplete_minus(RCore *core, RLineCompletion *completion, const char *str) {
r_return_if_fail (str);
int count;
int length = strlen (str);
char **keys = r_cmd_alias_keys(core->rcmd, &count);
if (!keys) {
return;
}
int i;
for (i = 0; i < count; i++) {
if (!strncmp (keys[i], str, length)) {
... | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 41,992,136,917,202,227,000,000,000,000,000,000,000 | 15 | Fix #16303 - c->table_query double free (#16318) |
NukePending()
{/* Nuke pending output in current display, clear screen */
register int len;
int oldtop = D_top, oldbot = D_bot;
struct mchar oldrend;
int oldkeypad = D_keypad, oldcursorkeys = D_cursorkeys;
int oldcurvis = D_curvis;
int oldmouse = D_mouse;
int oldextmouse = D_extmouse;
oldrend = D_rend;... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 126,891,278,733,554,660,000,000,000,000,000,000,000 | 83 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
TEST_F(QuicServerTransportTest, RecvRstStreamFrame) {
clientNextAppDataPacketNum = 3;
std::array<std::string, 4> words = {
"Hey Bob, this is Alice, for real.",
"What message did I send you last time?",
"You don't sound like Alice",
"You are a liar!",
};
StreamId streamId = 0x00;
auto ... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 255,116,991,909,364,240,000,000,000,000,000,000,000 | 57 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
const char *cgit_httpscheme(void)
{
if (ctx.env.https && !strcmp(ctx.env.https, "on"))
return "https://";
else
return "http://";
} | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 325,019,574,446,730,070,000,000,000,000,000,000,000 | 7 | ui-shared: prevent malicious filename from injecting headers |
uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len)
{
TSC210xState *s = opaque;
uint32_t ret = 0;
if (len != 16)
hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len);
/* TODO: sequential reads etc - how do we make sure the host doesn't
* unintentionally read out a co... | 0 | [
"CWE-119"
] | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | 70,262,330,660,473,470,000,000,000,000,000,000,000 | 18 | tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst... |
int __init tcp4_proc_init(void)
{
return register_pernet_subsys(&tcp4_net_ops);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 295,742,037,065,889,200,000,000,000,000,000,000,000 | 4 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
**/
CImg<T>& operator++() {
if (is_empty()) return *this;
cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=524288))
cimg_rof(*this,ptrd,T) ++*ptrd;
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 43,694,107,821,692,775,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int legacy_parse_monolithic(struct fs_context *fc, void *data)
{
struct legacy_fs_context *ctx = fc->fs_private;
if (ctx->param_type != LEGACY_FS_UNSET_PARAMS) {
pr_warn("VFS: Can't mix monolithic and individual options\n");
return -EINVAL;
}
ctx->legacy_data = data;
ctx->param_type = LEGACY_FS_MONOLI... | 0 | [
"CWE-787"
] | linux | 722d94847de29310e8aa03fcbdb41fc92c521756 | 335,507,368,564,457,420,000,000,000,000,000,000,000 | 18 | vfs: fs_context: fix up param length parsing in legacy_parse_param
The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an
unsigned type so a large value of "size" results in a high positive
value instead of a negative value as expected. Fix this by getting rid
of the subtraction.
Signed-off-by: Jamie H... |
static inline struct io_kiocb *io_put_req_find_next(struct io_kiocb *req)
{
struct io_kiocb *nxt = NULL;
if (req_ref_put_and_test(req)) {
nxt = io_req_find_next(req);
__io_free_req(req);
}
return nxt;
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 306,844,073,674,307,500,000,000,000,000,000,000,000 | 10 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
ipf_get_v4_enabled(struct ipf *ipf)
{
bool ifp_v4_enabled_;
atomic_read_relaxed(&ipf->ifp_v4_enabled, &ifp_v4_enabled_);
return ifp_v4_enabled_;
} | 0 | [
"CWE-401"
] | ovs | 803ed12e31b0377c37d7aa8c94b3b92f2081e349 | 235,858,769,686,019,250,000,000,000,000,000,000,000 | 6 | ipf: release unhandled packets from the batch
Since 640d4db788ed ("ipf: Fix a use-after-free error, ...") the ipf
framework unconditionally allocates a new dp_packet to track
individual fragments. This prevents a use-after-free. However, an
additional issue was present - even when the packet buffer is cloned,
if the... |
static MagickBooleanType SetGrayscaleImage(Image *image,
ExceptionInfo *exception)
{
CacheView
*image_view;
MagickBooleanType
status;
PixelInfo
*colormap;
register ssize_t
i;
ssize_t
*colormap_index,
j,
y;
assert(image != (Image *) NULL);
assert(image->signature == Magic... | 0 | [
"CWE-703",
"CWE-772"
] | ImageMagick | 0417cea1b6d72f90bd4f1f573f91e42a8ba66a89 | 310,871,037,157,909,750,000,000,000,000,000,000,000 | 154 | https://github.com/ImageMagick/ImageMagick/issues/574 |
static pngquant_error rwpng_write_image_init(rwpng_png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, int fast_compression)
{
/* could also replace libpng warning-handler (final NULL), but no need: */
*png_ptr_p = png_create_write_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr, rwpng_error_han... | 0 | [
"CWE-190",
"CWE-787"
] | pngquant | b7c217680cda02dddced245d237ebe8c383be285 | 182,070,086,112,850,060,000,000,000,000,000,000,000 | 31 | Fix integer overflow in rwpng.h (CVE-2016-5735)
Reported by Choi Jaeseung
Found with Sparrow (http://ropas.snu.ac.kr/sparrow) |
static int command_read(struct pci_dev *dev, int offset, u16 *value, void *data)
{
int i;
int ret;
ret = xen_pcibk_read_config_word(dev, offset, value, data);
if (!pci_is_enabled(dev))
return ret;
for (i = 0; i < PCI_ROM_RESOURCE; i++) {
if (dev->resource[i].flags & IORESOURCE_IO)
*value |= PCI_COMMAND_IO... | 1 | [
"CWE-284",
"CWE-264"
] | linux | af6fc858a35b90e89ea7a7ee58e66628c55c776b | 138,738,500,849,670,280,000,000,000,000,000,000,000 | 18 | xen-pciback: limit guest control of command register
Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal ... |
static inline int mlock_future_check(struct mm_struct *mm,
unsigned long flags,
unsigned long len)
{
unsigned long locked, lock_limit;
/* mlock MCL_FUTURE? */
if (flags & VM_LOCKED) {
locked = len >> PAGE_SHIFT;
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= ... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 39,301,900,076,549,794,000,000,000,000,000,000,000 | 17 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static int sctp_v4_protosw_init(void)
{
int rc;
rc = proto_register(&sctp_prot, 1);
if (rc)
return rc;
/* Register SCTP(UDP and TCP style) with socket layer. */
inet_register_protosw(&sctp_seqpacket_protosw);
inet_register_protosw(&sctp_stream_protosw);
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | 138,414,214,871,580,280,000,000,000,000,000,000,000 | 14 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... |
u2 InstanceKlass::enclosing_method_data(int offset) const {
const Array<jushort>* const inner_class_list = inner_classes();
if (inner_class_list == NULL) {
return 0;
}
const int length = inner_class_list->length();
if (length % inner_class_next_offset == 0) {
return 0;
}
const int index = length -... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 37,429,666,913,948,313,000,000,000,000,000,000,000 | 13 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
d2flac24_array (const double *src, int32_t *dest, int count, int normalize)
{ double normfact = normalize ? (1.0 * 0x7FFFFF) : 1.0 ;
while (--count >= 0)
dest [count] = lrint (src [count] * normfact) ;
} /* d2flac24_array */ | 0 | [
"CWE-119",
"CWE-369"
] | libsndfile | 60b234301adf258786d8b90be5c1d437fc8799e0 | 63,517,922,834,365,940,000,000,000,000,000,000,000 | 6 | src/flac.c: Improve error handling
Especially when dealing with corrupt or malicious files. |
GF_EXPORT
const u32 *gf_isom_get_track_switch_parameter(GF_ISOFile *movie, u32 trackNumber, u32 group_index, u32 *switchGroupID, u32 *criteriaListSize)
{
GF_TrackBox *trak;
GF_UserDataMap *map;
GF_TrackSelectionBox *tsel;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!group_index || !trak || !trak->... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 43,546,300,810,653,620,000,000,000,000,000,000,000 | 18 | fixed #1706 |
MagickPrivate void XColorBrowserWidget(Display *display,XWindows *windows,
const char *action,char *reply)
{
#define CancelButtonText "Cancel"
#define ColornameText "Name:"
#define ColorPatternText "Pattern:"
#define GrabButtonText "Grab"
#define ResetButtonText "Reset"
char
**colorlist,
primary_selec... | 0 | [] | ImageMagick | 17619a5e3a2c8f1e6296a9d38a10d8da97da8fd9 | 285,192,374,005,158,550,000,000,000,000,000,000,000 | 1,160 | https://github.com/ImageMagick/ImageMagick/issues/3334 |
int page_symlink(struct inode *inode, const char *symname, int len)
{
return __page_symlink(inode, symname, len,
!mapping_gfp_constraint(inode->i_mapping, __GFP_FS));
} | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 222,817,612,793,891,530,000,000,000,000,000,000,000 | 5 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
GF_Err gf_isom_vvc_config_new(GF_ISOFile *the_file, u32 trackNumber, GF_VVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
{
GF_TrackBox *trak;
GF_Err e;
u32 dataRefIndex;
GF_SampleDescriptionBox *stsd;
GF_MPEGVisualSampleEntryBox *entry;
e = CanAccessMovie(the_file, GF_ISOM_OPEN... | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 7,163,695,478,722,625,000,000,000,000,000,000,000 | 36 | fixed #1785 (fuzz) |
uint SoundTouch::numUnprocessedSamples() const
{
FIFOSamplePipe * psp;
if (pTDStretch)
{
psp = pTDStretch->getInput();
if (psp)
{
return psp->numSamples();
}
}
return 0;
}
| 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 42,986,179,344,241,420,000,000,000,000,000,000,000 | 13 | Replaced illegal-number-of-channel assertions with run-time exception |
Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table)
{
Field *field;
if (group)
{
/*
We must store both value and counter in the temporary table in one field.
The easiest way is to do this is to store both value in a string
and unpack on access.
*/
field= new Field_st... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 255,767,706,420,762,060,000,000,000,000,000,000,000 | 20 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
virDomainChrDefValidate(const virDomainChrDef *chr,
const virDomainDef *def)
{
return virDomainChrSourceDefValidate(chr->source, chr, def);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 68,397,115,759,980,720,000,000,000,000,000,000,000 | 5 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void ExportBGRQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
unsigned char *magick_restrict q,ExceptionInfo *exception)
{
QuantumAny
range;
ssize_t
x;
ssize_t
bit;
assert(exception != (ExceptionInfo *) NULL);
... | 0 | [
"CWE-190"
] | ImageMagick | 5af1dffa4b6ab984b5f13d1e91c95760d75f12a6 | 274,126,891,162,020,670,000,000,000,000,000,000,000 | 299 | outside the range of representable values of type 'unsigned char' (#3083)
Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> |
static size_t WritePSDChannel(const PSDInfo *psd_info,
const ImageInfo *image_info,Image *image,Image *next_image,
const QuantumType quantum_type, unsigned char *compact_pixels,
MagickOffsetType size_offset,const MagickBooleanType separate,
ExceptionInfo *exception)
{
int
y;
MagickBooleanType
monoc... | 0 | [
"CWE-400",
"CWE-703"
] | ImageMagick | 47e8e6ceef979327614d0b8f0c76c6ecb18e09cf | 260,357,349,874,475,400,000,000,000,000,000,000,000 | 129 | Fixed memory leak. |
get_prop_name(
Display *dpy,
XFontStruct *fs)
{
unsigned long fp;
if (XGetFontProperty(fs, XA_FONT, &fp))
return XGetAtomName(dpy, fp);
return (char *) NULL;
} | 0 | [
"CWE-190"
] | libx11 | acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d | 244,603,134,600,490,230,000,000,000,000,000,000,000 | 11 | Fix an integer overflow in init_om()
CVE-2020-14363
This can lead to a double free later, as reported by Jayden Rivers.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
HANDLE create_named_pipe(MYSQL *mysql, uint connect_timeout, char **arg_host,
char **arg_unix_socket)
{
HANDLE hPipe=INVALID_HANDLE_VALUE;
char pipe_name[1024];
DWORD dwMode;
int i;
my_bool testing_named_pipes=0;
char *host= *arg_host, *unix_socket= *arg_unix_socket;
if ( ! unix_socket || (unix_socke... | 0 | [
"CWE-254"
] | mysql-server | 13380bf81f6bc20d39549f531f9acebdfb5a8c37 | 49,362,506,436,339,520,000,000,000,000,000,000,000 | 66 | Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM |
static void perf_event_for_each(struct perf_event *event,
void (*func)(struct perf_event *))
{
struct perf_event_context *ctx = event->ctx;
struct perf_event *sibling;
WARN_ON_ONCE(ctx->parent_ctx);
mutex_lock(&ctx->mutex);
event = event->group_leader;
perf_event_for_each_child(event, func);
list_for_eac... | 1 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 22,384,791,404,276,013,000,000,000,000,000,000,000 | 15 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
bool excl_dep_on_grouping_fields(st_select_lex *sel)
{ return (*ref)->excl_dep_on_grouping_fields(sel); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 308,209,517,807,362,580,000,000,000,000,000,000,000 | 2 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int on_part_data(
multipart_parser *parser, const char *at, size_t length)
{
multipart_parser_data_t *data = NULL;
ogs_assert(parser);
data = multipart_parser_get_data(parser);
ogs_assert(data);
if (data->num_of_part < OGS_SBI_MAX_NUM_OF_PART && at && length) {
SWITCH(data->... | 0 | [
"CWE-476",
"CWE-787"
] | open5gs | d919b2744cd05abae043490f0a3dd1946c1ccb8c | 211,221,141,706,658,750,000,000,000,000,000,000,000 | 50 | [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type |
static void io_poll_remove_all(struct io_ring_ctx *ctx)
{
struct hlist_node *tmp;
struct io_kiocb *req;
int posted = 0, i;
spin_lock_irq(&ctx->completion_lock);
for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) {
struct hlist_head *list;
list = &ctx->cancel_hash[i];
hlist_for_each_entry_safe(req, tmp, li... | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 111,271,842,566,040,700,000,000,000,000,000,000,000 | 19 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
void ssh_print_hexa(const char *descr, const unsigned char *what, size_t len) {
char *hexa = ssh_get_hexa(what, len);
if (hexa == NULL) {
return;
}
printf("%s: %s\n", descr, hexa);
free(hexa);
} | 0 | [
"CWE-200"
] | libssh | 4e6ff36a9a3aef72aa214f6fb267c28953b80060 | 1,017,322,133,005,848,100,000,000,000,000,000,000 | 10 | dh: Fix CVE-2016-0739
Due to a byte/bit confusion, the DH secret was too short. This file was
completely reworked and will be commited in a future version.
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org> |
pixGlobalNormRGB(PIX *pixd,
PIX *pixs,
l_int32 rval,
l_int32 gval,
l_int32 bval,
l_int32 mapval)
{
l_int32 w, h, d, i, j, ncolors, rv, gv, bv, wpl;
l_int32 *rarray, *garray, *barray;
l_uint32 *data, *line;
NUMA *... | 0 | [
"CWE-125"
] | leptonica | 3c18c43b6a3f753f0dfff99610d46ad46b8bfac4 | 53,889,743,217,708,350,000,000,000,000,000,000,000 | 73 | Fixing oss-fuzz issue 22512: Heap-buffer-overflow in rasteropGeneralLow()
* Simplified the hole-filling function
` |
Perl_rsignal_state(pTHX_ int signo)
{
dVAR;
Sighandler_t oldsig;
#if defined(USE_ITHREADS) && !defined(WIN32)
/* only "parent" interpreter can diddle signals */
if (PL_curinterp != aTHX)
return (Sighandler_t) SIG_ERR;
#endif
PL_sig_trapped = 0;
oldsig = PerlProc_signal(signo, sig_trap);
P... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 170,572,617,157,032,120,000,000,000,000,000,000,000 | 18 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.