func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bgp_attr_atomic (struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
const bgp_size_t length = args->length;
/* Length check. */
if (length != 0)
{
zlog (peer->log, LOG_ERR, "ATOMIC_AGGREGATE attribute length isn't 0 [%u]",
... | 0 | [] | quagga | 8794e8d229dc9fe29ea31424883433d4880ef408 | 276,007,668,524,411,160,000,000,000,000,000,000,000 | 21 | bgpd: Fix regression in args consolidation, total should be inited from args
* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args. |
static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)
{
struct fsl_hv_ioctl_memcpy param;
struct page **pages = NULL;
void *sg_list_unaligned = NULL;
struct fh_sg_list *sg_list = NULL;
unsigned int num_pages;
unsigned long lb_offset; /* Offset within a page of the local buffer */
unsigned int i;
lon... | 1 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 52,301,779,291,437,510,000,000,000,000,000,000,000 | 160 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
{
__skb_unlink(skb, &sk->sk_receive_queue);
if (!copied_early)
__kfree_skb(skb);
else
__skb_queue_tail(&sk->sk_async_wait_queue, skb);
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 86,205,071,330,480,740,000,000,000,000,000,000,000 | 8 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static void addranges_S(struct cstate *g)
{
addrange(g, 0, 0x9-1);
addrange(g, 0xD+1, 0x20-1);
addrange(g, 0x20+1, 0xA0-1);
addrange(g, 0xA0+1, 0x2028-1);
addrange(g, 0x2029+1, 0xFEFF-1);
addrange(g, 0xFEFF+1, 0xFFFF);
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 201,613,613,843,790,500,000,000,000,000,000,000,000 | 9 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs)
{
int i;
for (i = 0; i < EF_R0; i++)
grp[i] = 0;
grp[EF_R0] = 0;
for (i = 1; i <= 31; i++)
grp[EF_R0 + i] = (elf_greg_t) regs->regs[i];
grp[EF_R26] = 0;
grp[EF_R27] = 0;
grp[EF_LO] = (elf_greg_t) regs->lo;
grp[EF_HI] = (elf_greg_t) regs->hi... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 307,181,315,361,901,200,000,000,000,000,000,000,000 | 21 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
TEST_P(Http2IntegrationTest, Trailers) { testTrailers(1024, 2048); } | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 245,237,387,909,919,300,000,000,000,000,000,000,000 | 1 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp)
{
if (rdp->rc4_decrypt_key == NULL)
return FALSE;
if (rdp->decrypt_use_count >= 4096)
{
security_key_update(rdp->decrypt_key, rdp->decrypt_update_key, rdp->rc4_key_len);
crypto_rc4_free(rdp->rc4_decrypt_key);
rdp->rc4_decrypt_key = crypto_rc4_init(rd... | 0 | [
"CWE-476"
] | FreeRDP | 7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7 | 70,669,592,389,984,440,000,000,000,000,000,000,000 | 16 | security: add a NULL pointer check to fix a server crash. |
uid_t from_kuid_munged(struct user_namespace *targ, kuid_t kuid)
{
uid_t uid;
uid = from_kuid(targ, kuid);
if (uid == (uid_t) -1)
uid = overflowuid;
return uid;
} | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 75,363,641,158,737,580,000,000,000,000,000,000,000 | 9 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
static void log_connection(HTTPContext *c)
{
if (c->suppress_log)
return;
http_log("%s - - [%s] \"%s %s\" %d %"PRId64"\n",
inet_ntoa(c->from_addr.sin_addr), c->method, c->url,
c->protocol, (c->http_error ? c->http_error : 200), c->data_count);
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156 | 295,206,445,051,874,100,000,000,000,000,000,000,000 | 9 | ffserver: Check chunk size
Fixes out of array access
Fixes: poc_ffserver.py
Found-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void cit_model3_Packet1(struct gspca_dev *gspca_dev, u16 v1, u16 v2)
{
cit_write_reg(gspca_dev, 0x0078, 0x012d);
cit_write_reg(gspca_dev, v1, 0x012f);
cit_write_reg(gspca_dev, 0xd141, 0x0124);
cit_write_reg(gspca_dev, v2, 0x0127);
cit_write_reg(gspca_dev, 0xfea8, 0x0124);
} | 0 | [
"CWE-476"
] | linux | a246b4d547708f33ff4d4b9a7a5dbac741dc89d8 | 330,962,608,020,936,400,000,000,000,000,000,000,000 | 8 | media: xirlink_cit: add missing descriptor sanity checks
Make sure to check that we have two alternate settings and at least one
endpoint before accessing the second altsetting structure and
dereferencing the endpoint arrays.
This specifically avoids dereferencing NULL-pointers or corrupting
memory when a device does... |
bittypmodin(PG_FUNCTION_ARGS)
{
ArrayType *ta = PG_GETARG_ARRAYTYPE_P(0);
PG_RETURN_INT32(anybit_typmodin(ta, "bit"));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 266,256,566,142,483,640,000,000,000,000,000,000,000 | 6 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
_pango_ot_info_position (const PangoOTInfo *info,
const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
unsigned int i;
_hb_buffer_clear_positions (buffer->buffer);
hb_ot_layout_set_direction (info->layout,
buffer->rtl);
hb_ot_layout_set_hinting (info->layout,
buff... | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 328,392,369,147,468,370,000,000,000,000,000,000,000 | 72 | [HB] Remove all references to the old code! |
wkbReadLine(wkbObj *w, lineObj *line)
{
int i;
pointObj p;
int npoints = wkbReadInt(w);
line->numpoints = npoints;
line->point = msSmallMalloc(npoints * sizeof(pointObj));
for ( i = 0; i < npoints; i++ ) {
wkbReadPointP(w, &p);
line->point[i] = p;
}
} | 0 | [
"CWE-89"
] | mapserver | 3a10f6b829297dae63492a8c63385044bc6953ed | 270,566,001,365,821,100,000,000,000,000,000,000,000 | 13 | Fix potential SQL Injection with postgis TIME filters (#4834) |
static void compute_lowest_and_highest_weight(
unsigned int weight_count,
const float* dec_weight_quant_uvalue,
const float* dec_weight_quant_sig,
unsigned int max_angular_steps,
unsigned int max_quant_steps,
const float* offsets,
int* lowest_weight,
int* weight_span,
float* error,
float* cut_low_weight_error... | 0 | [
"CWE-787"
] | astc-encoder | 6ffb3058bfbcc836108c25274e955e399481e2b4 | 185,065,679,161,688,600,000,000,000,000,000,000,000 | 76 | Provide a fallback for blocks which find no valid encoding |
bool Filter::convertRequestHeadersForInternalRedirect(Http::RequestHeaderMap& downstream_headers,
const Http::HeaderEntry& internal_redirect,
uint64_t status_code) {
if (!downstream_headers.Path()) {
ENVOY_... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 75,684,261,221,174,140,000,000,000,000,000,000,000 | 110 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static void line6_destruct(struct snd_card *card)
{
struct usb_line6 *line6 = card->private_data;
struct usb_device *usbdev = line6->usbdev;
/* Free buffer memory first. We cannot depend on the existence of private
* data from the (podhd) module, it may be gone already during this call
*/
kfree(line6->buffer_m... | 0 | [
"CWE-476"
] | linux | 0b074ab7fc0d575247b9cc9f93bb7e007ca38840 | 277,966,134,589,368,670,000,000,000,000,000,000,000 | 19 | ALSA: line6: Assure canceling delayed work at disconnection
The current code performs the cancel of a delayed work at the late
stage of disconnection procedure, which may lead to the access to the
already cleared state.
This patch assures to call cancel_delayed_work_sync() at the beginning
of the disconnection proced... |
HttpHeader::packInto(Packable * p, bool mask_sensitive_info) const
{
HttpHeaderPos pos = HttpHeaderInitPos;
const HttpHeaderEntry *e;
assert(p);
debugs(55, 7, this << " into " << p <<
(mask_sensitive_info ? " while masking" : ""));
/* pack all entries one by one */
while ((e = getEntr... | 0 | [
"CWE-444"
] | squid | 9c8e2a71aa1d3c159a319d9365c346c48dc783a5 | 199,271,751,625,904,000,000,000,000,000,000,000,000 | 41 | Enforce token characters for field-name (#700)
RFC 7230 defines field-name as a token. Request splitting and cache
poisoning attacks have used non-token characters to fool broken HTTP
agents behind or in front of Squid for years. This change should
significantly reduce that abuse.
If we discover exceptional situatio... |
flatpak_context_free (FlatpakContext *context)
{
g_hash_table_destroy (context->env_vars);
g_hash_table_destroy (context->persistent);
g_hash_table_destroy (context->filesystems);
g_hash_table_destroy (context->session_bus_policy);
g_hash_table_destroy (context->system_bus_policy);
g_hash_table_destroy (con... | 0 | [
"CWE-20"
] | flatpak | 902fb713990a8f968ea4350c7c2a27ff46f1a6c4 | 224,313,398,242,236,930,000,000,000,000,000,000,000 | 10 | Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty. |
static void fdctrl_handle_readid(FDCtrl *fdctrl, int direction)
{
FDrive *cur_drv = get_cur_drv(fdctrl);
cur_drv->head = (fdctrl->fifo[1] >> 2) & 1;
timer_mod(fdctrl->result_timer,
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50));
} | 0 | [
"CWE-119"
] | qemu | e907746266721f305d67bc0718795fedee2e824c | 132,432,422,683,568,820,000,000,000,000,000,000,000 | 8 | fdc: force the fifo access to be in bounds of the allocated buffer
During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
get out of bounds leading to memory corruption with values coming
from the guest.
Fix this by making sure that the index i... |
void preproc_build_firejail_dir(void) {
struct stat s;
// CentOS 6 doesn't have /run directory
if (stat(RUN_FIREJAIL_BASEDIR, &s)) {
create_empty_dir_as_root(RUN_FIREJAIL_BASEDIR, 0755);
}
if (stat(RUN_FIREJAIL_DIR, &s)) {
create_empty_dir_as_root(RUN_FIREJAIL_DIR, 0755);
}
// restricted search permission... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 258,306,701,398,992,230,000,000,000,000,000,000,000 | 70 | fixing CVE-2022-31214 |
parse_ofp10_queue_rate(const struct ofp10_queue_prop_header *hdr,
uint16_t *rate)
{
const struct ofp10_queue_prop_rate *oqpr;
if (hdr->len == htons(sizeof *oqpr)) {
oqpr = (const struct ofp10_queue_prop_rate *) hdr;
*rate = ntohs(oqpr->rate);
return 0;
} else ... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 304,430,512,356,819,300,000,000,000,000,000,000,000 | 13 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struct console_font_op *op)
{
struct consolefontdesc cfdarg;
int i;
if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc)))
return -EFAULT;
switch (cmd) {
case PIO_FONTX:
if (!perm)
return -EPERM;
op->op = KD_FO... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 29,158,297,128,510,727,000,000,000,000,000,000,000 | 38 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
static void *add_to_trie(struct trie *root, const char *key, void *value)
{
struct trie *child;
void *old;
int i;
if (!*key) {
/* we have reached the end of the key */
old = root->value;
root->value = value;
return old;
}
for (i = 0; i < root->len; i++) {
if (root->contents[i] == key[i])
continue;
... | 0 | [
"CWE-125"
] | git | 11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d | 322,206,184,630,445,580,000,000,000,000,000,000,000 | 58 | is_ntfs_dotgit: use a size_t for traversing string
We walk through the "name" string using an int, which can
wrap to a negative value and cause us to read random memory
before our array (e.g., by creating a tree with a name >2GB,
since "int" is still 32 bits even on most 64-bit platforms).
Worse, this is easy to trigg... |
static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot)
{
return jhash_3words((__force u32)id << 16 | prot,
(__force u32)saddr, (__force u32)daddr,
ip4_frags.rnd) & (INETFRAGS_HASHSZ - 1);
} | 0 | [] | linux | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 | 124,855,680,550,307,400,000,000,000,000,000,000,000 | 6 | net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list,
required taking the hash writer lock. However, the LRU list isn't
tied to the hash at all, so we can use a separate lock for it.
Original-idea-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Je... |
static void tcp_check_sack_reordering(struct sock *sk, const u32 low_seq,
const int ts)
{
struct tcp_sock *tp = tcp_sk(sk);
const u32 mss = tp->mss_cache;
u32 fack, metric;
fack = tcp_highest_sack_seq(tp);
if (!before(low_seq, fack))
return;
metric = fack - low_seq;
if ((metric > tp->reordering * m... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 134,191,473,086,578,510,000,000,000,000,000,000,000 | 30 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
find_busiest_group(struct sched_domain *sd, int this_cpu,
unsigned long *imbalance, enum cpu_idle_type idle,
int *sd_idle, const cpumask_t *cpus, int *balance)
{
struct sched_group *busiest = NULL, *this = NULL, *group = sd->groups;
unsigned long max_load, avg_load, total_load, this_load, total_pwr;
unsign... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 77,859,414,415,763,750,000,000,000,000,000,000,000 | 297 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
{
#ifdef BN_COUNT
fprintf(stderr," bn_mul_low_normal %d * %d\n",n,n);
#endif
bn_mul_words(r,a,n,b[0]);
for (;;)
{
if (--n <= 0) return;
bn_mul_add_words(&(r[1]),a,n,b[1]);
if (--n <= 0) return;
bn_mul_add_words(&(r[2]),a,n,b[2]);
if (... | 0 | [
"CWE-20"
] | openssl | 7e4cae1d2f555cbe9226b377aff4b56c9f7ddd4d | 258,635,057,307,409,420,000,000,000,000,000,000,000 | 21 | PR: 2111
Submitted by: Martin Olsson <molsson@opera.com>
Check for bn_wexpand errors in bn_mul.c |
Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save)
{
#if defined(USE_ITHREADS) && !defined(WIN32)
/* only "parent" interpreter can diddle signals */
if (PL_curinterp != aTHX)
return -1;
#endif
*save = PerlProc_signal(signo, handler);
return (*save == (Sighandler_t) SIG_ERR) ? -1 ... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 230,026,995,865,155,960,000,000,000,000,000,000,000 | 10 | 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 ... |
RGWPutACLs() {
len = 0;
data = NULL;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 308,324,495,726,460,620,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
doit (struct query *z, int state)
{
char key[257];
char misc[20], header[12];
char *buf = 0, *cached = 0;
const char *whichserver = 0;
unsigned int rcode = 0;
unsigned int posanswers = 0;
unsigned int len = 0, cachedlen = 0;
uint16 numanswers = 0;
uint16 numauthority = 0;
unsig... | 1 | [
"CWE-362"
] | ndjbdns | 847523271f3966cf4618c5689b905703c41dec1c | 17,241,051,433,022,990,000,000,000,000,000,000,000 | 1,049 | Merge identical outgoing requests.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. This fixes one of the cache poisoning vulnerability
reported by Mr Mark Johnson
-> https://bugzilla.redhat.com/show_bug.cgi?id... |
size_t tls12_get_sig_algs(SSL *s, unsigned char *p)
{
const unsigned char *sigs;
size_t sigslen;
sigs = s->cert->conf_sigalgs;
if (sigs)
sigslen = s->cert->conf_sigalgslen;
else
{
sigs = tls12_sigalgs;
sigslen = sizeof(tls12_sigalgs);
#ifdef OPENSSL_FIPS
/* If FIPS mode don't include MD5 which is last ... | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 332,609,673,272,639,400,000,000,000,000,000,000,000 | 23 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
static inline void *hci_get_drvdata(struct hci_dev *hdev)
{
return dev_get_drvdata(&hdev->dev);
} | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 66,809,673,132,512,355,000,000,000,000,000,000,000 | 4 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
handler::ha_truncate()
{
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type == F_WRLCK);
mark_trx_read_write();
return truncate();
} | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 266,703,263,534,722,520,000,000,000,000,000,000,000 | 8 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
unsigned long addr)
{
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
pgoff_t index;
index = ((addr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
return mpol_shared_policy_lookup(&SHMEM_I(inode)->policy, index);
} | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 301,484,024,695,703,780,000,000,000,000,000,000,000 | 9 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
{
u32 pin_reg;
unsigned long flags;
unsigned int bank, i, pin_num;
struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
char *level_trig;
char *active_level;
char *interrupt_enable;
char *interrupt_mask;
char *wake_cntrl0;
char *wake_cntrl... | 0 | [
"CWE-415"
] | linux | 8dca4a41f1ad65043a78c2338d9725f859c8d2c3 | 159,437,023,495,590,930,000,000,000,000,000,000,000 | 143 | pinctrl/amd: Drop pinctrl_unregister for devm_ registered device
It's not necessary to unregister pin controller device registered
with devm_pinctrl_register() and using pinctrl_unregister() leads
to a double free.
Fixes: 3bfd44306c65 ("pinctrl: amd: Add support for additional GPIO")
Signed-off-by: Wei Yongjun <weiyo... |
void ogs_sbi_message_free(ogs_sbi_message_t *message)
{
int i;
ogs_assert(message);
if (message->NFProfile)
OpenAPI_nf_profile_free(message->NFProfile);
if (message->ProblemDetails)
OpenAPI_problem_details_free(message->ProblemDetails);
if (message->PatchItemList) {
OpenAPI... | 0 | [
"CWE-476",
"CWE-787"
] | open5gs | d919b2744cd05abae043490f0a3dd1946c1ccb8c | 28,238,121,992,705,165,000,000,000,000,000,000,000 | 119 | [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type |
transformIndexConstraints(CreateStmtContext *cxt)
{
IndexStmt *index;
List *indexlist = NIL;
ListCell *lc;
/*
* Run through the constraints that need to generate an index. For PRIMARY
* KEY, mark each column as NOT NULL and create an index. For UNIQUE or
* EXCLUDE, create an index as for PRIMARY KEY, b... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 4,653,017,428,344,984,500,000,000,000,000,000,000 | 101 | 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... |
_handle_groupchat(xmpp_stanza_t *const stanza)
{
xmpp_ctx_t *ctx = connection_get_ctx();
char *message = NULL;
const char *room_jid = xmpp_stanza_get_from(stanza);
Jid *jid = jid_create(room_jid);
// handle room subject
xmpp_stanza_t *subject = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_... | 0 | [
"CWE-20",
"CWE-346"
] | profanity | 8e75437a7e43d4c55e861691f74892e666e29b0b | 32,365,488,702,394,090,000,000,000,000,000,000,000 | 64 | Add carbons from check |
lyxml_parse_elem(struct ly_ctx *ctx, const char *data, unsigned int *len, struct lyxml_elem *parent, int options)
{
const char *c = data, *start, *e;
const char *lws; /* leading white space for handling mixed content */
int uc;
char *str;
char *prefix = NULL;
unsigned int prefix_len = 0;
... | 1 | [
"CWE-674"
] | libyang | 298b30ea4ebee137226acf9bb38678bd82704582 | 134,258,831,294,213,780,000,000,000,000,000,000,000 | 292 | common FEATURE add a hard limit for recursion
Fixes #1453 |
int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
{
int err = 0;
struct ip_mreqn imr;
__be32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
struct inet_sock *inet = inet_sk(sk);
struct ip_sf_socklist *newpsl, *psl;
struct net *net = sock_net(sk);
int l... | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 239,916,623,250,183,350,000,000,000,000,000,000,000 | 84 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
system_call_script(thread_master_t *m, int (*func) (thread_t *), void * arg, unsigned long timer, notify_script_t* script)
{
pid_t pid;
/* Daemonization to not degrade our scheduling timer */
#ifdef ENABLE_LOG_TO_FILE
if (log_file_name)
flush_log_file();
#endif
pid = local_fork();
if (pid < 0) {
/* fork err... | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 24,284,536,610,989,730,000,000,000,000,000,000,000 | 33 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
void ssl3_cbc_digest_record(
const EVP_MD *digest,
unsigned char* md_out,
size_t* md_out_size,
const unsigned char header[13],
const unsigned char *data,
size_t data_plus_mac_size,
size_t data_plus_mac_plus_padding_size,
const unsigned char *mac_secret,
unsigned mac_secret_length,
char is_sslv3)
{
union { d... | 1 | [
"CWE-310"
] | openssl | 40e0de03955e218f45a7979cb46fba193f4e7fc2 | 248,729,510,125,573,450,000,000,000,000,000,000,000 | 291 | s3/s3_cbc.c: allow for compilations with NO_SHA256|512.
(cherry picked from commit d5371324d978e4096bf99b9d0fe71b2cb65d9dc8) |
static int do_udpv6_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, int optlen)
{
struct udp_sock *up = udp_sk(sk);
int val;
int err = 0;
if(optlen<sizeof(int))
return -EINVAL;
if (get_user(val, (int __user *)optval))
return -EFAULT;
switch(optname) {
case UDP_CORK:
if (val... | 0 | [
"CWE-476"
] | linux-2.6 | 1e0c14f49d6b393179f423abbac47f85618d3d46 | 175,679,654,407,430,040,000,000,000,000,000,000,000 | 43 | [UDP]: Fix MSG_PROBE crash
UDP tracks corking status through the pending variable. The
IP layer also tracks it through the socket write queue. It
is possible for the two to get out of sync when MSG_PROBE is
used.
This patch changes UDP to check the write queue to ensure
that the two stay in sync.
Signed-off-by: He... |
free_command (void *vp, int *error)
{
struct command *command = vp;
struct buffer *buffer = command->slice.buffer;
if (buffer != NULL) {
if (--buffer->refs == 0) {
free (buffer->data);
free (buffer);
}
}
free (command);
return 1; /* auto-retires the command */
} | 1 | [
"CWE-252"
] | libnbd | 8d444b41d09a700c7ee6f9182a649f3f2d325abb | 120,060,916,740,719,910,000,000,000,000,000,000,000 | 16 | copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails
nbdcopy has a nasty bug when performing multi-threaded copies using
asynchronous nbd calls - it was blindly treating the completion of an
asynchronous command as successful, rather than checking the *error
parameter. This can result in the silent creation o... |
write_vim_spell(spellinfo_T *spin, char_u *fname)
{
FILE *fd;
int regionmask;
int round;
wordnode_T *tree;
int nodecount;
int i;
int l;
garray_T *gap;
fromto_T *ftp;
char_u *p;
int rr;
int retval = OK;
size_t fwv = 1; /* collect return value of fwrite() to avo... | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 176,998,832,017,728,560,000,000,000,000,000,000,000 | 413 | 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) |
int git_index_entry_cmp(const void *a, const void *b)
{
int diff;
const git_index_entry *entry_a = a;
const git_index_entry *entry_b = b;
diff = strcmp(entry_a->path, entry_b->path);
if (diff == 0)
diff = (GIT_IDXENTRY_STAGE(entry_a) - GIT_IDXENTRY_STAGE(entry_b));
return diff;
} | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 9,342,257,963,801,382,000,000,000,000,000,000,000 | 13 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
static int msr_open(struct inode *inode, struct file *file)
{
unsigned int cpu;
struct cpuinfo_x86 *c;
cpu = iminor(file->f_path.dentry->d_inode);
if (cpu >= nr_cpu_ids || !cpu_online(cpu))
return -ENXIO; /* No such CPU */
c = &cpu_data(cpu);
if (!cpu_has(c, X86_FEATURE_MSR))
return -EIO; /* MSR not support... | 1 | [
"CWE-284",
"CWE-264"
] | linux | c903f0456bc69176912dee6dd25c6a66ee1aed00 | 36,911,564,618,135,054,000,000,000,000,000,000,000 | 15 | x86/msr: Add capabilities check
At the moment the MSR driver only relies upon file system
checks. This means that anything as root with any capability set
can write to MSRs. Historically that wasn't very interesting but
on modern processors the MSRs are such that writing to them
provides several ways to execute arbita... |
special_mode_sync(int valid, double offset)
{
int step;
switch (mode) {
case REF_ModeInitStepSlew:
if (!valid) {
LOG(LOGS_WARN, "No suitable source for initstepslew");
end_ref_mode(0);
break;
}
step = fabs(offset) >= CNF_GetInitStepThreshold();
LOG(LOGS_INFO, "... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 51,716,247,153,415,560,000,000,000,000,000,000,000 | 51 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static bool is_dmar_unit_valid(const struct dmar_drhd_rt *dmar_unit, union pci_bdf sid)
{
bool valid = false;
if (dmar_unit == NULL) {
pr_err("no dmar unit found for device: %x:%x.%x", sid.bits.b, sid.bits.d, sid.bits.f);
} else if (dmar_unit->drhd->ignore) {
dev_dbg(DBG_LEVEL_IOMMU, "device is ignored : %x:%x.... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 258,817,031,410,145,520,000,000,000,000,000,000,000 | 14 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
void ListenerImpl::validateFilterChains(Network::Socket::Type socket_type) {
if (config_.filter_chains().empty() && (socket_type == Network::Socket::Type::Stream ||
!udp_listener_factory_->isTransportConnectionless())) {
// If we got here, this is a tcp listener or connec... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 132,239,664,268,287,120,000,000,000,000,000,000,000 | 19 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
*/
static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_)
{
struct sk_buff *skb = list_->next;
if (skb == (struct sk_buff *)list_)
skb = NULL;
return skb; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 156,279,956,820,105,140,000,000,000,000,000,000,000 | 8 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static ssize_t ucma_migrate_id(struct ucma_file *new_file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_migrate_id cmd;
struct rdma_ucm_migrate_resp resp;
struct ucma_context *ctx;
struct fd f;
struct ucma_file *cur_file;
int ret = 0;
if (copy_from_user(&cmd, inbuf, s... | 1 | [
"CWE-416"
] | linux | f5449e74802c1112dea984aec8af7a33c4516af1 | 33,133,943,079,336,014,000,000,000,000,000,000,000 | 65 | RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy
ucma_destroy_id() assumes that all things accessing the ctx will do so via
the xarray. This assumption violated only in the case the FD is being
closed, then the ctx is reached via the ctx_list. Normally this is OK
since ucma_destroy_id() cannot run concu... |
epass2003_gen_key(struct sc_card *card, sc_epass2003_gen_key_data * data)
{
int r;
size_t len = data->key_length;
struct sc_apdu apdu;
u8 rbuf[SC_MAX_EXT_APDU_BUFFER_SIZE] = { 0 };
u8 sbuf[SC_MAX_EXT_APDU_BUFFER_SIZE] = { 0 };
LOG_FUNC_CALLED(card->ctx);
if(len == 256)
{
sbuf[0] = 0x02;
}
else
{
sbuf[0... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 325,515,169,152,157,160,000,000,000,000,000,000,000 | 64 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
R_API void r_bin_java_print_inner_classes_attr_summary(RBinJavaAttrInfo *attr) {
RBinJavaClassesAttribute *icattr;
RListIter *iter, *iter_tmp;
if (!attr) {
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *InnerClasses.\n");
return;
}
Eprintf ("Inner Classes Attribute Information:\n");
Eprintf (" At... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 194,520,723,133,223,840,000,000,000,000,000,000,000 | 15 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
void CairoOutputDev::getScaledSize(int orig_width,
int orig_height,
int *scaledWidth,
int *scaledHeight) {
cairo_matrix_t matrix;
cairo_get_matrix(cairo, &matrix);
double xScale;
double yScale;
if (orig_width > orig_height)
get_singular_values (&matrix, &xScale, &yScale);
else
... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 334,213,101,851,351,800,000,000,000,000,000,000,000 | 42 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
errhint(const char *fmt,...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
recursion_depth++;
CHECK_STACK_DEPTH();
oldcontext = MemoryContextSwitchTo(edata->assoc_context);
EVALUATE_MESSAGE(edata->domain, hint, false, true);
MemoryContextSwitchTo(oldcontext);
recursion_de... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 85,147,834,790,840,500,000,000,000,000,000,000,000 | 15 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
void skip(
Protocol_* iprot,
ProtocolReaderStructReadState<Protocol_>& readState) {
readState.skip(iprot);
readState.readFieldEnd(iprot);
readState.readFieldBeginNoInline(iprot);
} | 0 | [
"CWE-763"
] | fbthrift | bfda1efa547dce11a38592820916db01b05b9339 | 286,237,859,347,160,000,000,000,000,000,000,000,000 | 7 | Fix handling of invalid union data in table-based serializer
Summary:
Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem... |
uint32_t TProtocol::skip_virt(TType type) {
return ::apache::thrift::protocol::skip(*this, type);
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 195,115,208,856,713,800,000,000,000,000,000,000,000 | 3 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
_cimg_math_parser(const _cimg_math_parser& mp):
mem(mp.mem),code(mp.code),p_code_end(mp.p_code_end),p_break(mp.p_break),
imgin(mp.imgin),listin(mp.listin),imgout(mp.imgout),listout(mp.listout),img_stats(mp.img_stats),
list_stats(mp.list_stats),list_median(mp.list_median),debug_indent(0),r... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 197,223,573,288,998,340,000,000,000,000,000,000,000 | 15 | . |
bool handOffRestoredDestinationConnections() const override { return false; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 98,602,971,244,902,190,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static void cmdloop(void)
{
int c, r = 0, mode;
static struct buf cmd, arg1, arg2, arg3, arg4;
char *p, *result, buf[1024];
const char *err;
uint32_t uid, last;
struct backend *be;
char curgroup[MAX_MAILBOX_BUFFER] = "";
allowanonymous = config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN);
... | 0 | [
"CWE-119"
] | cyrus-imapd | 0f8f026699829b65733c3081657b24e2174f4f4d | 98,586,449,225,423,570,000,000,000,000,000,000,000 | 735 | CVE-2011-3208 - fix buffer overflow in nntpd |
Pl_PNGFilter::processRow()
{
if (this->action == a_encode)
{
encodeRow();
}
else
{
decodeRow();
}
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 98,385,657,696,156,990,000,000,000,000,000,000,000 | 11 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
bool Default() {
return false;
} | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 179,106,039,987,517,860,000,000,000,000,000,000,000 | 3 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
static int ntop_get_ndpi_interface_flows_count(lua_State* vm) {
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_interface) {
lua_newtable(vm);
ntop_interface->getnDPIFlowsCount(vm);
}
return(CONST_LUA_OK)... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 18,191,959,670,031,004,000,000,000,000,000,000,000 | 12 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
int RGWPutACLs_ObjStore_S3::get_params()
{
int ret = RGWPutACLs_ObjStore::get_params();
if (ret >= 0) {
const int ret_auth = do_aws4_auth_completion();
if (ret_auth < 0) {
return ret_auth;
}
}
return ret;
} | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 81,928,506,599,886,510,000,000,000,000,000,000,000 | 11 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
Stream *Gfx::buildImageStream() {
Object dict;
Object obj;
char *key;
Stream *str;
// build dictionary
dict.initDict(xref);
parser->getObj(&obj);
while (!obj.isCmd("ID") && !obj.isEOF()) {
if (!obj.isName()) {
error(getPos(), "Inline image dictionary key must be a name object");
obj.fre... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 140,487,114,679,626,990,000,000,000,000,000,000,000 | 44 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
gs_lib_ctx_get_non_gc_memory_t()
{
return mem_err_print ? mem_err_print : NULL;
} | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 119,288,042,177,781,860,000,000,000,000,000,000,000 | 4 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
sys_var *find_sys_var_ex(THD *thd, const char *str, size_t length,
bool throw_error, bool locked)
{
sys_var *var;
sys_var_pluginvar *pi= NULL;
plugin_ref plugin;
DBUG_ENTER("find_sys_var_ex");
DBUG_PRINT("enter", ("var '%.*s'", (int)length, str));
if (!locked)
mysql_mutex_lock(... | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 215,336,411,366,355,830,000,000,000,000,000,000,000 | 36 | MDEV-26323 use-after-poison issue of MariaDB server |
static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
{
struct device_node *np = dev->of_node;
struct device_node *pp;
struct ad5755_platform_data *pdata;
unsigned int tmp;
unsigned int tmparray[3];
int devnr, i;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return NULL... | 1 | [
"CWE-787"
] | linux | 9d47964bfd471f0dd4c89f28556aec68bffa0020 | 213,951,652,980,067,830,000,000,000,000,000,000,000 | 114 | iio: ad5755: fix off-by-one on devnr limit check
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
compariso... |
static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
{
struct acm *acm = container_of(port, struct acm, port);
int retval = -ENODEV;
int i;
mutex_lock(&acm->mutex);
if (acm->disconnected)
goto disconnected;
retval = usb_autopm_get_interface(acm->control);
if (retval)
goto error_get_i... | 0 | [
"CWE-416"
] | linux | c52873e5a1ef72f845526d9f6a50704433f9c625 | 5,677,561,222,396,010,000,000,000,000,000,000,000 | 58 | usb: cdc-acm: make sure a refcount is taken early enough
destroy() will decrement the refcount on the interface, so that
it needs to be taken so early that it never undercounts.
Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: ... |
static int do_signal_stop(int signr)
{
struct signal_struct *sig = current->signal;
int notify;
if (!sig->group_stop_count) {
struct task_struct *t;
if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED) ||
unlikely(signal_group_exit(sig)))
return 0;
/*
* There is no group stop already in progress.
* ... | 0 | [] | linux-2.6 | da48524eb20662618854bb3df2db01fc65f3070c | 242,610,425,079,573,000,000,000,000,000,000,000,000 | 66 | Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
Userland should be able to trust the pid and uid of the sender of a
signal if the si_code is SI_TKILL.
Unfortunately, the kernel has historically allowed sigqueueinfo() to
send any si_code at all (as long as it was negative - to distinguish i... |
ModuleExport void UnregisterPSImage(void)
{
(void) UnregisterMagickInfo("EPI");
(void) UnregisterMagickInfo("EPS");
(void) UnregisterMagickInfo("EPSF");
(void) UnregisterMagickInfo("EPSI");
(void) UnregisterMagickInfo("PS");
} | 0 | [
"CWE-787"
] | ImageMagick | 34a6a5a45e83a4af852090b4e43f168a380df979 | 54,763,766,494,992,600,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/1523 |
void bond_queue_slave_event(struct slave *slave)
{
queue_delayed_work(slave->bond->wq, &slave->notify_work, 0);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 105cd17a866017b45f3c45901b394c711c97bf40 | 165,153,711,544,005,680,000,000,000,000,000,000,000 | 4 | bonding: fix null dereference in bond_ipsec_add_sa()
If bond doesn't have real device, bond->curr_active_slave is null.
But bond_ipsec_add_sa() dereferences bond->curr_active_slave without
null checking.
So, null-ptr-deref would occur.
Test commands:
ip link add bond0 type bond
ip link set bond0 up
ip x s... |
fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree _U_)
{
fp_info *fpi;
guint8 tfi, c_t;
int offset = 0, i=0, j=0, num_tbs, chan, tb_size, tb_bit_off;
gboo... | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 10,206,090,116,308,522,000,000,000,000,000,000,000 | 344 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
span_renderer_init (cairo_abstract_span_renderer_t *_r,
const cairo_composite_rectangles_t *composite,
cairo_antialias_t antialias,
cairo_bool_t needs_clip)
{
cairo_image_span_renderer_t *r = (cairo_image_span_renderer_t *)_r;
cairo_image_surface_t *dst = (cairo_image_surface_t *)composi... | 0 | [
"CWE-787"
] | cairo | c986a7310bb06582b7d8a566d5f007ba4e5e75bf | 179,590,657,964,422,800,000,000,000,000,000,000,000 | 123 | image: Enable inplace compositing with opacities for general routines
On a SNB i5-2500:
Speedups
========
firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup
swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup
ocitysmap 485.64 -> 431.94: 1.12x speedup
Slowdowns
===... |
XML_Parser OGRCreateExpatXMLParser()
{
XML_Memory_Handling_Suite memsuite;
memsuite.malloc_fcn = OGRExpatMalloc;
memsuite.realloc_fcn = OGRExpatRealloc;
memsuite.free_fcn = free;
XML_Parser hParser = XML_ParserCreate_MM(nullptr, &memsuite, nullptr);
XML_SetUnknownEncodingHandler(hParser,
... | 0 | [
"CWE-415"
] | gdal | 148115fcc40f1651a5d15fa34c9a8c528e7147bb | 277,552,050,502,073,800,000,000,000,000,000,000,000 | 14 | OGRExpatRealloc(): fix double-free when size to allocate is above the default 10MB threshold. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16178. Credit to OSS Fuzz |
int ssl3_send_client_verify(SSL *s)
{
unsigned char *p;
unsigned char data[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
EVP_PKEY *pkey;
EVP_PKEY_CTX *pctx=NULL;
EVP_MD_CTX mctx;
unsigned u=0;
unsigned long n;
int j;
EVP_MD_CTX_init(&mctx);
if (s->state == SSL3_ST_CW_CERT_VRFY_A)
{
p= ssl_handshake_start(s);
... | 0 | [] | openssl | 17160033765480453be0a41335fa6b833691c049 | 118,545,095,149,850,290,000,000,000,000,000,000,000 | 152 | Fix DTLS anonymous EC(DH) denial of service
CVE-2014-3510
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> |
_kill_all_active_steps(uint32_t jobid, int sig, bool batch)
{
List steps;
ListIterator i;
step_loc_t *stepd;
int step_cnt = 0;
int fd;
steps = stepd_available(conf->spooldir, conf->node_name);
i = list_iterator_create(steps);
while ((stepd = list_next(i))) {
if (stepd->jobid != jobid) {
/* multiple jobs ... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 94,773,370,088,103,750,000,000,000,000,000,000,000 | 45 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
static void hso_std_serial_write_bulk_callback(struct urb *urb)
{
struct hso_serial *serial = urb->context;
int status = urb->status;
unsigned long flags;
/* sanity check */
if (!serial) {
hso_dbg(0x1, "serial == NULL\n");
return;
}
spin_lock_irqsave(&serial->serial_lock, flags);
serial->tx_urb_used = 0;
... | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 222,888,001,214,842,500,000,000,000,000,000,000,000 | 25 | USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
The function hso_probe reads if_num from the USB device (as an u8) and uses
it without a length check to index an array, resulting in an OOB memory read
in hso_probe or hso_get_config_data.
Add a length check for both locations and updated hso_probe to ... |
static void nfs4_lock_done(struct rpc_task *task, void *calldata)
{
struct nfs4_lockdata *data = calldata;
dprintk("%s: begin!\n", __func__);
if (!nfs4_sequence_done(task, &data->res.seq_res))
return;
data->rpc_status = task->tk_status;
if (data->arg.new_lock_owner != 0) {
if (data->rpc_status == 0)
nfs_... | 0 | [
"CWE-119",
"CWE-401"
] | linux | 7d3e91a89b7adbc2831334def9e494dd9892f9af | 317,686,735,025,162,900,000,000,000,000,000,000,000 | 24 | NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in
__nfs4_get_acl_uncached" accidently dropped the checking for too small
result buffer length.
If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount
supporting ACLs, the ACL has not been cached and... |
int ssl3_client_hello(SSL *s)
{
unsigned char *buf;
unsigned char *p,*d;
int i;
unsigned long Time,l;
#ifndef OPENSSL_NO_COMP
int j;
SSL_COMP *comp;
#endif
buf=(unsigned char *)s->init_buf->data;
if (s->state == SSL3_ST_CW_CLNT_HELLO_A)
{
SSL_SESSION *sess = s->session;
if ((sess == NULL) ||
(sess->s... | 0 | [] | openssl | 0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c | 4,701,274,939,733,010,400,000,000,000,000,000,000 | 156 | Backport support for fixed DH ciphersuites (from HEAD) |
static void test_boolean_operators()
{
assert_true_rule(
"rule test { condition: true }", NULL);
assert_true_rule(
"rule test { condition: true or false }", NULL);
assert_true_rule(
"rule test { condition: true and true }", NULL);
assert_true_rule(
"rule test { condition: 0x1 and 0x2}... | 0 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 201,670,998,827,334,070,000,000,000,000,000,000,000 | 23 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
Device* KernelAndDeviceOp::InputDevice(int i) const {
return input_devices_[i];
} | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | da8558533d925694483d2c136a9220d6d49d843c | 31,942,420,418,350,555,000,000,000,000,000,000,000 | 3 | Fix undefined behavior in `tf.raw_ops.Switch` in eager mode.
PiperOrigin-RevId: 332578058
Change-Id: I9727571d2f21476b10d8aa27c1b7176564b76ac9 |
__acquires(bitlock)
{
struct ext4_free_extent ex;
int ret = 0;
trace_ext4_trim_extent(sb, group, start, count);
assert_spin_locked(ext4_group_lock_ptr(sb, group));
ex.fe_start = start;
ex.fe_group = group;
ex.fe_len = count;
/*
* Mark blocks used, so no one can reuse them while
* being trimmed.
*/
mb... | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 331,886,659,966,286,700,000,000,000,000,000,000,000 | 24 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
htp_status_t htp_tx_state_response_complete(htp_tx_t *tx) {
if (tx == NULL) return HTP_ERROR;
return htp_tx_state_response_complete_ex(tx, 1 /* hybrid mode */);
} | 0 | [] | libhtp | c7c03843cd6b1cbf44eb435d160ba53aec948828 | 119,822,002,204,427,260,000,000,000,000,000,000,000 | 4 | Harden decompress code against memory stress
Under severe memory pressure the decompress code can fail to setup
properly. Add checks before dereferencing pointers. |
call_func_retstr(
char_u *func,
int argc,
typval_T *argv)
{
typval_T rettv;
char_u *retval;
if (call_vim_function(func, argc, argv, &rettv) == FAIL)
return NULL;
retval = vim_strsave(tv_get_string(&rettv));
clear_tv(&rettv);
return retval;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 190,412,588,300,458,520,000,000,000,000,000,000,000 | 15 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
static void test_bug3796()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
const char *concat_arg0= "concat_with_";
enum { OUT_BUFF_SIZE= 30 };
char out_buff[OUT_BUFF_SIZE];
char canonical_buff[OUT_BUFF_SIZE];
ulong out_length;
const char *stmt_text;
int rc;
myheader("test_bug3796");
/* Create and fi... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 24,787,995,201,852,724,000,000,000,000,000,000,000 | 79 | 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 free_font_metrics(TFMInfo *info)
{
TFMPool *tfm;
if(tfmpool.count == 0)
return;
/* get the entry -- can't use the hash table for this, because
* we don't have the short name */
for(tfm = (TFMPool *)tfmpool.head; tfm; tfm = tfm->next)
if(info == &tfm->tfminfo)
break;
if(tfm == NULL)
return;
if(--t... | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 132,823,900,715,806,230,000,000,000,000,000,000,000 | 26 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
ufmt_getObject(const UFormattable *fmt, UErrorCode *status) {
const Formattable *obj = Formattable::fromUFormattable(fmt);
const void *ret = obj->getObject();
if( ret==NULL &&
(obj->getType() != Formattable::kObject) &&
U_SUCCESS( *status )) {
*status = U_INVALID_FORMAT_ERROR;
}
return ret;
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 262,129,876,991,308,300,000,000,000,000,000,000,000 | 11 | ICU-20246 Fixing another integer overflow in number parsing. |
static __always_inline void vmcs_write16(unsigned long field, u16 value)
{
vmcs_check16(field);
if (static_branch_unlikely(&enable_evmcs))
return evmcs_write16(field, value);
__vmcs_writel(field, value);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 225,197,042,552,893,650,000,000,000,000,000,000,000 | 8 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
get_bashpid (var)
SHELL_VAR *var;
{
int pid;
char *p;
pid = getpid ();
p = itos (pid);
FREE (value_cell (var));
VSETATTR (var, att_integer|att_readonly);
var_setvalue (var, p);
return (var);
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 282,291,080,316,433,170,000,000,000,000,000,000,000 | 14 | commit bash-20120224 snapshot |
void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches,
int64 samples_per_batch, int64 num_elements,
const BCastList<4>& bcast,
typename TTypes<T>::ConstFlat means,
typename TTypes<T>::ConstFlat stddevs,
typ... | 1 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 268,906,390,314,449,860,000,000,000,000,000,000,000 | 286 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
TORRENT_TEST(switch_buffer)
{
char b1[] = "d1:ai1e1:b3:foo1:cli1e-i2ee1:dd1:xi1eee";
char b2[] = "d1:ai1e1:b3:foo1:cli1e-i2ee1:dd1:xi1eee";
bdecode_node e;
error_code ec;
int pos;
int ret = bdecode(b1, b1 + sizeof(b1)-1, e, ec, &pos);
TEST_EQUAL(ret, -1);
TEST_EQUAL(pos, 22);
TEST_EQUAL(e.type(), bdecode_node... | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 167,168,480,156,947,200,000,000,000,000,000,000,000 | 23 | fix out-of-bounds read in bdecode
Fixes #2099 |
static int correct_orientation(struct image_data *image, unsigned char **work_buff_ptr)
{
uint16 mirror, rotation;
unsigned char *work_buff;
work_buff = *work_buff_ptr;
if ((image == NULL) || (work_buff == NULL))
{
TIFFError ("correct_orientatin", "Invalid image or buffer pointer");
return (-1);... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 188,129,670,126,066,540,000,000,000,000,000,000,000 | 50 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
bool __fastcall DoCustomCommandOptionsDialog(
const TCustomCommandType * Command, TStrings * CustomCommandOptions, TShortCut * ShortCut,
unsigned int Flags, TCustomCommand * CustomCommandForOptions,
const UnicodeString & Site, const TShortCuts * ShortCuts)
{
std::unique_ptr<TCustomCommandOptionsDialog> Dia... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 245,411,691,451,293,000,000,000,000,000,000,000,000 | 9 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
PrintUsageAndExit()
{
fprintf(stderr,
BANNER
"\n\nusage: mp42hls [options] <input>\n"
"Options:\n"
" --verbose\n"
" --show-info\n"
" --hls-version <n> (default: 3)\n"
" --pmt-pid <pid>\n"
" PID to use for the PM... | 0 | [
"CWE-703"
] | Bento4 | 33331ce2d35d45d855af7441db6116b4a9e2b70f | 184,235,760,506,406,180,000,000,000,000,000,000,000 | 67 | fix #691 |
void ItemStackMetadata::clear()
{
Metadata::clear();
updateToolCapabilities();
} | 0 | [
"CWE-74"
] | minetest | b5956bde259faa240a81060ff4e598e25ad52dae | 13,063,554,630,157,487,000,000,000,000,000,000,000 | 5 | Sanitize ItemStack meta text |
START_TEST(virgl_test_transfer_read_3d_bad_box)
{
struct virgl_renderer_resource_create_args res;
struct iovec iovs[1];
int niovs = 1;
int ret;
struct virgl_box box;
testvirgl_init_simple_1d_resource(&res, 1);
res.target = PIPE_TEXTURE_3D;
res.depth = 5;
ret = virgl_renderer_resource_create(&res, NU... | 0 | [
"CWE-909"
] | virglrenderer | b05bb61f454eeb8a85164c8a31510aeb9d79129c | 346,823,979,793,547,340,000,000,000,000,000,000 | 28 | vrend: clear memory when allocating a host-backed memory resource
Closes: #249
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
m4_len (struct obstack *obs, int argc, token_data **argv)
{
if (bad_argc (argv[0], argc, 2, 2))
return;
shipout_int (obs, strlen (ARG (1)));
} | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 171,835,053,461,621,860,000,000,000,000,000,000,000 | 6 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
struct file *out, loff_t *ppos,
size_t len, unsigned int flags)
{
unsigned nbuf;
unsigned idx;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud;
size_t rem;
ssize_t ret;
fud = fuse_get_dev(out);
if (!... | 1 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 152,696,463,349,528,800,000,000,000,000,000,000,000 | 83 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.