func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
isdn_ppp_cleanup(void)
{
int i;
for (i = 0; i < ISDN_MAX_CHANNELS; i++)
kfree(ippp_table[i]);
#ifdef CONFIG_ISDN_MPP
kfree(isdn_ppp_bundle_arr);
#endif /* CONFIG_ISDN_MPP */
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 166,850,293,280,222,300,000,000,000,000,000,000,000 | 12 | 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... |
xps_parse_float_array(char *s, int num, float *x)
{
int k = 0;
if (s == NULL || *s == 0)
return NULL;
while (*s)
{
while (*s == 0x0d || *s == '\t' || *s == ' ' || *s == 0x0a)
s++;
x[k] = (float)strtod(s, &s);
while (*s == 0x0d || *s == '\t' || *s == ' ' || *s == 0x0a)
s++;
if (*s == ',')
s++;
... | 0 | [
"CWE-119"
] | mupdf | 60dabde18d7fe12b19da8b509bdfee9cc886aafc | 71,485,554,321,056,390,000,000,000,000,000,000,000 | 21 | Bug 694957: fix stack buffer overflow in xps_parse_color
xps_parse_color happily reads more than FZ_MAX_COLORS values out of a
ContextColor array which overflows the passed in samples array.
Limiting the number of allowed samples to FZ_MAX_COLORS and make sure
to use that constant for all callers fixes the problem.
T... |
is_clause_nested (MonoExceptionClause *clause, MonoExceptionClause *nested)
{
if (clause->flags == MONO_EXCEPTION_CLAUSE_FILTER && is_clause_inside_range (nested, clause->data.filter_offset, clause->handler_offset))
return TRUE;
return is_clause_inside_range (nested, clause->try_offset, clause->try_offset + clause-... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 35,931,256,870,817,273,000,000,000,000,000,000,000 | 7 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
{
int i;
if (ci) {
zval certhash;
for (i=0; i<ci->num_of_certs; i++) {
struct curl_slist *slist;
array_init(&certhash);
for (slist = ci->certinfo[i]; slist; slist = slist->next) {
int len;
char s[64];
char *tmp;
strn... | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 47,565,249,651,650,790,000,000,000,000,000,000,000 | 38 | Fixed bug #68739 #68740 #68741 |
static MagickBooleanType InverseFourierTransformChannel(
const Image *magnitude_image,const Image *phase_image,
const PixelChannel channel,const MagickBooleanType modulus,
Image *fourier_image,ExceptionInfo *exception)
{
fftw_complex
*inverse_pixels;
FourierInfo
fourier_info;
MagickBooleanType
... | 0 | [
"CWE-125"
] | ImageMagick | 7c2c5ba5b8e3a0b2b82f56c71dfab74ed4006df7 | 197,984,675,193,258,380,000,000,000,000,000,000,000 | 49 | https://github.com/ImageMagick/ImageMagick/issues/1588 |
static int io_uring_create(unsigned entries, struct io_uring_params *p)
{
struct user_struct *user = NULL;
struct io_ring_ctx *ctx;
bool account_mem;
int ret;
if (!entries || entries > IORING_MAX_ENTRIES)
return -EINVAL;
/*
* Use twice as many entries for the CQ ring. It's possible for the
* application t... | 1 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 1,110,412,827,861,920,200,000,000,000,000,000,000 | 96 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
void mysql_close_slow_part(MYSQL *mysql)
{
if (mysql->net.pvio)
{
free_old_query(mysql);
mysql->status=MYSQL_STATUS_READY; /* Force command */
mysql->options.reconnect=0;
if (mysql->net.pvio && mysql->net.buff)
ma_simple_command(mysql, COM_QUIT,NullS,0,1,0);
end_server(mysql);
}
} | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 328,234,525,684,634,740,000,000,000,000,000,000,000 | 12 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
void LibRaw::nikon_load_sraw()
{
// We're already seeked to data!
unsigned char *rd = (unsigned char *)malloc(3*(imgdata.sizes.raw_width+2));
if(!rd) throw LIBRAW_EXCEPTION_ALLOC;
try {
int row,col;
for(row = 0; row < imgdata.sizes.raw_height; row++)
{
checkCancel();
libraw_interna... | 0 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 146,558,312,903,932,820,000,000,000,000,000,000,000 | 81 | 0.18.17 |
static const char *quote_arg(const char *arg)
{
/* count chars to quote */
int len = 0, n = 0;
int force_quotes = 0;
char *q, *d;
const char *p = arg;
if (!*p) force_quotes = 1;
while (*p) {
if (isspace(*p) || *p == '*' || *p == '?' || *p == '{' || *p == '\'')
force_quotes = 1;
else if (*p == '"')
n++;... | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 258,376,991,668,409,120,000,000,000,000,000,000,000 | 57 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
template<typename t>
CImg<Tfloat> get_atan2(const CImg<t>& img) const {
return CImg<Tfloat>(*this,false).atan2(img); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 3,599,907,481,271,993,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline int get_block_rate(MpegEncContext *s, int16_t block[64],
int block_last_index, uint8_t scantable[64])
{
int last = 0;
int j;
int rate = 0;
for (j = 1; j <= block_last_index; j++) {
const int index = scantable[j];
int level = block[index];
... | 0 | [
"CWE-20"
] | FFmpeg | 6bbef938839adc55e8e048bc9cc2e0fafe2064df | 67,015,998,570,568,990,000,000,000,000,000,000,000 | 26 | avcodec/mpeg4videoenc: Use 64 bit for times in mpeg4_encode_gop_header()
Fixes truncation
Fixes Assertion n <= 31 && value < (1U << n) failed at libavcodec/put_bits.h:169
Fixes: ffmpeg_crash_2.avi
Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart... |
ExprCreateAction(xkb_atom_t name, ExprDef *args)
{
EXPR_CREATE(ExprAction, expr, EXPR_ACTION_DECL, EXPR_TYPE_UNKNOWN);
expr->action.name = name;
expr->action.args = args;
return expr;
} | 0 | [
"CWE-476"
] | libxkbcommon | e3cacae7b1bfda0d839c280494f23284a1187adf | 280,579,267,092,851,920,000,000,000,000,000,000,000 | 7 | xkbcomp: fix crashes in the parser when geometry tokens appear
In the XKB format, floats and various keywords can only be used in the
xkb_geometry section. xkbcommon removed support xkb_geometry, but still
parses it for backward compatibility. As part of ignoring it, the float
AST node and various keywords were remove... |
format_ip6addr(netdissect_options *ndo, const u_char *cp)
{
if (is_ipv4_mapped_address(cp))
return ipaddr_string(ndo, cp + IPV4_MAPPED_HEADING_LEN);
else
return ip6addr_string(ndo, cp);
} | 0 | [
"CWE-125"
] | tcpdump | 83a412a5275cac973c5841eca3511c766bed778d | 199,687,226,884,785,800,000,000,000,000,000,000,000 | 7 | (for 4.9.3) CVE-2018-16228/HNCP: make buffer access safer
print_prefix() has a buffer and does not initialize it. It may call
decode_prefix6(), which also does not initialize the buffer on invalid
input. When that happens, make sure to return from print_prefix() before
trying to print the [still uninitialized] buffer.... |
static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *buf, ut64 loadaddr, Sdb *sdb) {
QnxObj *qo = R_NEW0 (QnxObj);
if (!qo) {
return false;
}
lmf_record lrec;
lmf_resource lres;
lmf_data ldata;
ut64 offset = QNX_RECORD_SIZE;
RList *sections = NULL;
RList *fixups = NULL;
if (!qo) {
goto beach;
... | 1 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 128,791,315,306,875,940,000,000,000,000,000,000,000 | 99 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
static int rev_body(int s, int stype, unsigned char *context)
{
char *buf = NULL;
int i;
int ret = 1;
SSL *con;
BIO *io, *ssl_bio, *sbio;
buf = app_malloc(bufsize, "server rev buffer");
io = BIO_new(BIO_f_buffer());
ssl_bio = BIO_new(BIO_f_ssl());
if ((io == NULL) || (ssl_bio == NUL... | 0 | [
"CWE-399"
] | openssl | 380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e | 98,049,326,359,220,210,000,000,000,000,000,000,000 | 153 | CVE-2016-0798: avoid memory leak in SRP
The SRP user database lookup method SRP_VBASE_get_by_user had confusing
memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no
way of distinguishing these two cases.
Specifically, SRP servers t... |
static int dtls1_query_mtu(SSL *s)
{
if (s->d1->link_mtu) {
s->d1->mtu =
s->d1->link_mtu - BIO_dgram_get_mtu_overhead(SSL_get_wbio(s));
s->d1->link_mtu = 0;
}
/* AHA! Figure out the MTU, and stick to the right size */
if (s->d1->mtu < dtls1_min_mtu(s)) {
if (!(SSL_g... | 0 | [
"CWE-399"
] | openssl | 00a4c1421407b6ac796688871b0a49a179c694d9 | 161,163,520,198,341,050,000,000,000,000,000,000,000 | 29 | Fix DTLS buffered message DoS attack
DTLS can handle out of order record delivery. Additionally since
handshake messages can be bigger than will fit into a single packet, the
messages can be fragmented across multiple records (as with normal TLS).
That means that the messages can arrive mixed up, and we have to
reasse... |
string_toupper (char *string)
{
while (string && string[0])
{
if ((string[0] >= 'a') && (string[0] <= 'z'))
string[0] -= ('a' - 'A');
string = utf8_next_char (string);
}
} | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 143,015,144,933,163,010,000,000,000,000,000,000,000 | 9 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
static int fill_route(struct sk_buff *skb, struct net_device *dev, u8 dst,
u32 portid, u32 seq, int event)
{
struct rtmsg *rtm;
struct nlmsghdr *nlh;
nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), 0);
if (nlh == NULL)
return -EMSGSIZE;
rtm = nlmsg_data(nlh);
rtm->rtm_family = AF_PHONET;
rtm->rtm_d... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 226,339,217,755,322,900,000,000,000,000,000,000,000 | 29 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk,
virDomainBlockJobInfoPtr info, unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(dom, "disk=%s, info=%p, flags=%x", disk, info, flags);
virResetLastError();
if (info)
memset(info, 0, sizeof(*info));... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 328,598,675,922,536,380,000,000,000,000,000,000,000 | 32 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
__rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task)
{
if (!task->tk_timeout)
return;
dprintk("RPC: %5u setting alarm for %lu ms\n",
task->tk_pid, task->tk_timeout * 1000 / HZ);
task->u.tk_wait.expires = jiffies + task->tk_timeout;
if (list_empty(&queue->timer_list.list) || time_before(task->... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 183,173,478,218,985,650,000,000,000,000,000,000,000 | 13 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
struct vm_area_struct *vma;
struct vm_unmapped_area_info info;
if (len > TASK_SIZE)
return -ENOMEM;
/* handle MAP_FIXED */
if (flags & MAP_FIXED)
return addr;
... | 1 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 250,010,748,716,782,640,000,000,000,000,000,000,000 | 55 | 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 ... |
ves_icall_InternalExecute (MonoReflectionMethod *method, MonoObject *this, MonoArray *params, MonoArray **outArgs)
{
MonoDomain *domain = mono_object_domain (method);
MonoMethod *m = method->method;
MonoMethodSignature *sig = mono_method_signature (m);
MonoArray *out_args;
MonoObject *result;
int i, j, outarg_c... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 153,755,980,610,599,920,000,000,000,000,000,000,000 | 129 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static int snd_pcm_release(struct inode *inode, struct file *file)
{
struct snd_pcm *pcm;
struct snd_pcm_substream *substream;
struct snd_pcm_file *pcm_file;
pcm_file = file->private_data;
substream = pcm_file->substream;
if (snd_BUG_ON(!substream))
return -ENXIO;
pcm = substream->pcm;
/* block until the de... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 302,901,845,135,037,850,000,000,000,000,000,000,000 | 24 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
static int em28xx_duplicate_dev(struct em28xx *dev)
{
int nr;
struct em28xx *sec_dev = kmemdup(dev, sizeof(*sec_dev), GFP_KERNEL);
if (!sec_dev) {
dev->dev_next = NULL;
return -ENOMEM;
}
/* Check to see next free device and mark as used */
do {
nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
... | 0 | [
"CWE-416"
] | linux | c08eadca1bdfa099e20a32f8fa4b52b2f672236d | 241,190,076,674,992,450,000,000,000,000,000,000,000 | 27 | media: em28xx: initialize refcount before kref_get
The commit 47677e51e2a4("[media] em28xx: Only deallocate struct
em28xx after finishing all extensions") adds kref_get to many init
functions (e.g., em28xx_audio_init). However, kref_init is called too
late in em28xx_usb_probe, since em28xx_init_dev before will invoke
... |
bool exec_context_may_touch_console(const ExecContext *ec) {
return exec_context_may_touch_tty(ec) &&
tty_may_match_dev_console(exec_context_tty_path(ec));
} | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 108,721,348,931,093,720,000,000,000,000,000,000,000 | 5 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
BPF_CALL_3(__skb_get_nlattr, struct sk_buff *, skb, u32, a, u32, x)
{
struct nlattr *nla;
if (skb_is_nonlinear(skb))
return 0;
if (skb->len < sizeof(struct nlattr))
return 0;
if (a > skb->len - sizeof(struct nlattr))
return 0;
nla = nla_find((struct nlattr *) &skb->data[a], skb->len - a, x);
if (nla)
... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 168,979,874,361,191,470,000,000,000,000,000,000,000 | 19 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
void ndpi_default_ports_tree_node_t_walker(const void *node, const ndpi_VISIT which, const int depth) {
ndpi_default_ports_tree_node_t *f = *(ndpi_default_ports_tree_node_t **) node;
printf("<%d>Walk on node %s (%u)\n", depth,
which == ndpi_preorder ?
"ndpi_preorder" :
which == ndpi_postorder ?
"ndpi_posto... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 95,189,728,125,870,830,000,000,000,000,000,000,000 | 11 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
static void __init spec_v2_user_print_cond(const char *reason, bool secure)
{
if (boot_cpu_has_bug(X86_BUG_SPECTRE_V2) != secure)
pr_info("spectre_v2_user=%s forced on command line.\n", reason);
} | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 176,999,051,966,795,800,000,000,000,000,000,000,000 | 5 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
MagickExport double InterpretSiPrefixValue(const char *magick_restrict string,
char **magick_restrict sentinal)
{
char
*q;
double
value;
value=InterpretLocaleValue(string,&q);
if (q != string)
{
if ((*q >= 'E') && (*q <= 'z'))
{
double
e;
switch ((i... | 0 | [
"CWE-190"
] | ImageMagick | be90a5395695f0d19479a5d46b06c678be7f7927 | 155,945,112,383,648,160,000,000,000,000,000,000,000 | 62 | https://github.com/ImageMagick/ImageMagick/issues/1721 |
Statement_Ptr Expand::operator()(Each_Ptr e)
{
std::vector<std::string> variables(e->variables());
Expression_Obj expr = e->list()->perform(&eval);
List_Obj list = 0;
Map_Obj map;
if (expr->concrete_type() == Expression::MAP) {
map = Cast<Map>(expr);
}
else if (Selector_List_Ptr ls... | 0 | [
"CWE-476"
] | libsass | 0bc35e3d26922229d5a3e3308860cf0fcee5d1cf | 109,533,014,264,152,130,000,000,000,000,000,000,000 | 83 | Fix segfault on empty custom properties
Originally reported in sass/sassc#225
Fixes sass/sassc#225
Spec sass/sass-spec#1249 |
static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
{
struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr;
struct sock *sk = sock->sk;
struct llc_sock *llc = llc_sk(sk);
struct llc_sap *sap;
int rc = -EINVAL;
lock_sock(sk);
if (unlikely(!sock_flag(sk, SOCK_ZAPPED) || addrlen !=... | 0 | [
"CWE-703"
] | linux | 764f4eb6846f5475f1244767d24d25dd86528a4a | 217,395,740,702,800,300,000,000,000,000,000,000,000 | 87 | llc: fix netdevice reference leaks in llc_ui_bind()
Whenever llc_ui_bind() and/or llc_ui_autobind()
took a reference on a netdevice but subsequently fail,
they must properly release their reference
or risk the infamous message from unregister_netdevice()
at device dismantle.
unregister_netdevice: waiting for eth0 to ... |
asmlinkage int __exception do_debug_exception(unsigned long addr,
unsigned int esr,
struct pt_regs *regs)
{
const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
struct siginfo info;
if (!inf->fn(addr, esr, regs))
return 1;
pr_alert("Unhandled debug exception: %s (0x%08x) at ... | 0 | [] | linux | 1d18c47c735e8adfe531fc41fae31e98f86b68fe | 34,348,066,361,830,678,000,000,000,000,000,000,000 | 21 | arm64: MMU fault handling and page table management
This patch adds support for the handling of the MMU faults (exception
entry code introduced by a previous patch) and page table management.
The user translation table is pointed to by TTBR0 and the kernel one
(swapper_pg_dir) by TTBR1. There is no translation inform... |
_outPlannerGlobal(StringInfo str, const PlannerGlobal *node)
{
WRITE_NODE_TYPE("PLANNERGLOBAL");
/* NB: this isn't a complete set of fields */
WRITE_NODE_FIELD(subplans);
WRITE_BITMAPSET_FIELD(rewindPlanIDs);
WRITE_NODE_FIELD(finalrtable);
WRITE_NODE_FIELD(finalrowmarks);
WRITE_NODE_FIELD(resultRelations);
WRI... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 34,318,393,082,143,910,000,000,000,000,000,000,000 | 17 | 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... |
htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
htmlDocDumpMemoryFormat(cur, mem, size, 1);
} | 0 | [
"CWE-79"
] | libxml2 | c1ba6f54d32b707ca6d91cb3257ce9de82876b6f | 288,911,423,226,665,500,000,000,000,000,000,000,000 | 3 | Revert "Do not URI escape in server side includes"
This reverts commit 960f0e275616cadc29671a218d7fb9b69eb35588.
This commit introduced
- an infinite loop, found by OSS-Fuzz, which could be easily fixed.
- an algorithm with quadratic runtime
- a security issue, see
https://bugzilla.gnome.org/show_bug.cgi?id=769760... |
std::string RGWFormPost::get_current_content_type() const
{
try {
const auto& field = current_data_part->fields.at("Content-Type");
return field.val;
} catch (std::out_of_range&) {
/* NOP */;
}
return std::string();
} | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 233,254,321,960,688,220,000,000,000,000,000,000,000 | 11 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
{
SSL_CTX *ret=NULL;
if (meth == NULL)
{
SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_NULL_SSL_METHOD_PASSED);
return(NULL);
}
#ifdef OPENSSL_FIPS
if (FIPS_mode() && (meth->version < TLS1_VERSION))
{
SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE);
retu... | 0 | [
"CWE-310"
] | openssl | 6bfe55380abbf7528e04e59f18921bd6c896af1c | 94,004,566,072,373,720,000,000,000,000,000,000,000 | 202 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Rich Salz <rsalz@openssl.org> |
GF_Err dimm_dump(GF_Box *a, FILE * trace)
{
GF_DIMMBox *p;
p = (GF_DIMMBox *)a;
gf_isom_box_dump_start(a, "ImmediateDataBytesBox", trace);
fprintf(trace, "BytesSent=\""LLD"\">\n", LLD_CAST p->nbBytes);
gf_isom_box_dump_done("ImmediateDataBytesBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 334,235,109,131,800,300,000,000,000,000,000,000,000 | 9 | fixed 2 possible heap overflows (inc. #1088) |
static int jpc_dec_process_eoc(jpc_dec_t *dec, jpc_ms_t *ms)
{
int tileno;
jpc_dec_tile_t *tile;
/* Eliminate compiler warnings about unused variables. */
ms = 0;
for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno,
++tile) {
if (tile->state == JPC_TILE_ACTIVE) {
if (jpc_dec_tiledecode(d... | 1 | [
"CWE-476"
] | jasper | 69a1439a5381e42b06ec6a06ed2675eb793babee | 270,189,290,729,289,500,000,000,000,000,000,000,000 | 23 | The member (pi) in tiles was not properly initialized.
This is now corrected.
Also, each tile is now only cleaned up once. |
read_gif(Gif_Reader *grr, int read_flags,
const char* landmark, Gif_ReadErrorHandler handler)
{
Gif_Stream *gfs;
Gif_Image *gfi;
Gif_Context gfc;
int unknown_block_type = 0;
if (gifgetc(grr) != 'G' ||
gifgetc(grr) != 'I' ||
gifgetc(grr) != 'F')
return 0;
(void)gifgetc(grr);
(void)gifget... | 0 | [
"CWE-415"
] | gifsicle | 118a46090c50829dc543179019e6140e1235f909 | 113,086,923,069,063,950,000,000,000,000,000,000,000 | 137 | gif_read: Set last_name = NULL unconditionally.
With a non-malicious GIF, last_name is set to NULL when a name
extension is followed by an image. Reported in #117, via
Debian, via a KAIST fuzzing program. |
static int fd_sector(FDrive *drv)
{
return fd_sector_calc(drv->head, drv->track, drv->sect, drv->last_sect,
NUM_SIDES(drv));
} | 0 | [
"CWE-119"
] | qemu | e907746266721f305d67bc0718795fedee2e824c | 157,823,602,007,909,160,000,000,000,000,000,000,000 | 5 | 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... |
feTurbulence_turbulence (RsvgFilterPrimitiveTurbulence * filter,
int nColorChannel, double *point,
double fTileX, double fTileY, double fTileWidth, double fTileHeight)
{
struct feTurbulence_StitchInfo stitch;
struct feTurbulence_StitchInfo *pStitchInfo = NULL; /... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 180,263,031,496,756,860,000,000,000,000,000,000,000 | 68 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
{
START_TIMING("");
cm_return_if_fail(mimeinfo != NULL);
cm_return_if_fail(fp != NULL);
textview->loading = TRUE;
textview->stop_loading = FALSE;
textview_clear(textview);
if (mimeinfo->type == MIMETYPE_MULTIPART ||
(mimeinfo->type... | 0 | [
"CWE-601"
] | claws | ac286a71ed78429e16c612161251b9ea90ccd431 | 159,499,748,422,020,980,000,000,000,000,000,000,000 | 27 | harden link checker before accepting click |
static struct dentry *f2fs_fh_to_dentry(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
f2fs_nfs_get_inode);
} | 0 | [
"CWE-284"
] | linux | b9dd46188edc2f0d1f37328637860bb65a771124 | 128,639,183,510,932,630,000,000,000,000,000,000,000 | 6 | f2fs: sanity check segment count
F2FS uses 4 bytes to represent block address. As a result, supported
size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
Signed-off-by: Jin Qian <jinqian@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd,
const char *URL, const char *encoding, int options)
{
xmlParserInputBufferPtr input;
xmlParserInputPtr stream;
if (fd < 0)
return (NULL);
if (ctxt == NULL)
return (NULL);
htmlCtxtReset(ctxt);
input = xmlParserInputB... | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 37,252,498,936,629,400,000,000,000,000,000,000,000 | 25 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
static void gen9_enable_guc_interrupts(struct intel_guc *guc)
{
struct intel_gt *gt = guc_to_gt(guc);
assert_rpm_wakelock_held(>->i915->runtime_pm);
spin_lock_irq(>->irq_lock);
if (!guc->interrupts.enabled) {
WARN_ON_ONCE(intel_uncore_read(gt->uncore, GEN8_GT_IIR(2)) &
gt->pm_guc_events);
guc->int... | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 184,390,673,417,473,400,000,000,000,000,000,000,000 | 15 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename,
int recovery) {
return(xmlSAXParseFileWithData(sax,filename,recovery,NULL));
} | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 168,744,548,512,404,900,000,000,000,000,000,000,000 | 4 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
int PublicKeyWrapper::luaGet(lua_State* state) {
if (public_key_.empty()) {
lua_pushnil(state);
} else {
lua_pushstring(state, public_key_.c_str());
}
return 1;
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 199,382,234,099,681,900,000,000,000,000,000,000,000 | 8 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
void Item_param::sync_clones()
{
Item_param **c_ptr= m_clones.begin();
Item_param **end= m_clones.end();
for ( ; c_ptr < end; c_ptr++)
{
Item_param *c= *c_ptr;
/* Scalar-type members: */
c->maybe_null= maybe_null;
c->null_value= null_value;
c->max_length= max_length;
c->decimals= decimal... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 218,812,372,025,824,360,000,000,000,000,000,000,000 | 28 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
static int reds_set_video_codecs_from_string(RedsState *reds, const char *codecs,
unsigned int *installed)
{
char *encoder_name, *codec_name;
GArray *video_codecs;
int invalid_codecs = 0;
g_return_val_if_fail(codecs != NULL, -1);
if (strcmp(codecs, "aut... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 264,143,980,072,921,870,000,000,000,000,000,000,000 | 60 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
}
u32 parse_store_mode(char *arg_val, u32 opt)
{
do_save = GF_TRUE;
if ((opt == 0) || (opt == 1)) {
interleaving_time = atof(arg_val) / 1000;
if (!interleaving_time) do_flat = 2;
open_edit = GF_TRUE;
no_inplace = GF_TRUE;
if (opt==1) old_interleave = 1;
} else if (opt==2) {
interleaving_time = atof(arg_v... | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 108,720,397,884,413,530,000,000,000,000,000,000,000 | 19 | fixed #2216 |
cudnnFilterDescriptor_t handle() const { return handle_.get(); } | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 284,139,905,676,259,540,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
MaybeLocal<Object> GetLastIssuedCert(
X509Pointer* cert,
const SSLPointer& ssl,
Local<Object> issuer_chain,
Environment* const env) {
Local<Context> context = env->isolate()->GetCurrentContext();
while (X509_check_issued(cert->get(), cert->get()) != X509_V_OK) {
X509* ca;
if (SSL_CTX_get_iss... | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 290,294,596,132,196,140,000,000,000,000,000,000,000 | 33 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
ebb_ews_store_photo_check_date (EContact *contact,
const gchar *value)
{
gchar *today_str = NULL;
g_return_if_fail (E_IS_CONTACT (contact));
if (!value) {
today_str = ebb_ews_get_today_as_string ();
value = today_str;
}
ebb_ews_store_x_attribute (contact, X_EWS_PHOTO_CHECK_DATE, value);
g_free (today_... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 48,051,353,182,276,935,000,000,000,000,000,000,000 | 16 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
INLINE BOOL gdi_CopyRect(HGDI_RECT dst, HGDI_RECT src)
{
dst->left = src->left;
dst->top = src->top;
dst->right = src->right;
dst->bottom = src->bottom;
return TRUE;
} | 0 | [
"CWE-190"
] | FreeRDP | ce21b9d7ecd967e0bc98ed31a6b3757848aa6c9e | 63,993,032,359,710,610,000,000,000,000,000,000,000 | 8 | Fix CVE-2020-11523: clamp invalid rectangles to size 0
Thanks to Sunglin and HuanGMz from Knownsec 404 |
static __init void svm_adjust_mmio_mask(void)
{
unsigned int enc_bit, mask_bit;
u64 msr, mask;
/* If there is no memory encryption support, use existing mask */
if (cpuid_eax(0x80000000) < 0x8000001f)
return;
/* If memory encryption is not enabled, use existing mask */
rdmsrl(MSR_AMD64_SYSCFG, msr);
if (!(ms... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 7,603,946,932,192,854,000,000,000,000,000,000,000 | 34 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
TEST_F(HeaderUtilityTest, RemovePortsFromHostConnect) {
const std::vector<std::pair<std::string, std::string>> host_headers{
{"localhost:443", "localhost:443"},
};
for (const auto& host_pair : host_headers) {
auto& host_header = hostHeaderEntry(host_pair.first, true);
HeaderUtility::stripPortFromHos... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 76,771,244,733,689,650,000,000,000,000,000,000,000 | 10 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
void enable_mem_log_termination(void)
{
atexit(keepalived_free_final);
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 135,193,786,521,236,770,000,000,000,000,000,000,000 | 4 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
proto_register_plugin(const proto_plugin *plug)
{
if (!plug) {
/* XXX print useful warning */
return;
}
dissector_plugins = g_slist_prepend(dissector_plugins, (proto_plugin *)plug);
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 98,803,135,384,448,780,000,000,000,000,000,000,000 | 8 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static inline input_translation_t *GetTranslationTable(exporter_ipfix_domain_t *exporter, uint16_t id) {
input_translation_t *table;
if ( exporter->current_table && ( exporter->current_table->id == id ) )
return exporter->current_table;
table = exporter->input_translation_table;
while ( table ) {
if ( table->i... | 0 | [] | nfdump | ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8 | 79,856,088,669,184,130,000,000,000,000,000,000,000 | 22 | Fix security issues in netflow_v9.c and ipfix.c |
void init_bgscan_params(struct rsi_common *common)
{
memset((u8 *)&common->bgscan, 0, sizeof(struct rsi_bgscan_params));
common->bgscan.bgscan_threshold = RSI_DEF_BGSCAN_THRLD;
common->bgscan.roam_threshold = RSI_DEF_ROAM_THRLD;
common->bgscan.bgscan_periodicity = RSI_BGSCAN_PERIODICITY;
common->bgscan.num_bgscan_... | 0 | [
"CWE-400",
"CWE-401"
] | linux | d563131ef23cbc756026f839a82598c8445bc45f | 256,956,399,196,247,500,000,000,000,000,000,000,000 | 11 | rsi: release skb if rsi_prepare_beacon fails
In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
static UINT gdi_SurfaceCommand_AVC420(rdpGdi* gdi, RdpgfxClientContext* context,
const RDPGFX_SURFACE_COMMAND* cmd)
{
#ifdef WITH_GFX_H264
INT32 rc;
UINT status = CHANNEL_RC_OK;
UINT32 i;
gdiGfxSurface* surface;
RDPGFX_H264_METABLOCK* meta;
RDPGFX_AVC420_BITMAP_STREAM* bs;
... | 0 | [
"CWE-190"
] | FreeRDP | e08a23f93136f59a52651f66d064b8d4303872e1 | 211,037,465,650,352,850,000,000,000,000,000,000,000 | 77 | Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen |
auto Phase3() -> Local<Value> final {
return result->TransferIn();
} | 0 | [
"CWE-703",
"CWE-913"
] | isolated-vm | 27151bfecc260e96714443613880e3b2e6596704 | 220,813,349,332,433,200,000,000,000,000,000,000,000 | 3 | Disallow NativeModule creation unless main isolate |
image_as_dict(Image *img) {
#define U(x) #x, img->x
return Py_BuildValue("{sI sI sI sI sK sI sO sO sN}",
U(texture_id), U(client_id), U(width), U(height), U(internal_id), U(refcnt),
"data_loaded", img->data_loaded ? Py_True : Py_False,
"is_4byte_aligned", img->load_data.is_4byte_aligned ? Py... | 0 | [
"CWE-787"
] | kitty | 82c137878c2b99100a3cdc1c0f0efea069313901 | 200,583,336,769,425,800,000,000,000,000,000,000,000 | 11 | Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters
Fixes #3128 |
char *msPostGISEscapeSQLParam(layerObj *layer, const char *pszString)
{
#ifdef USE_POSTGIS
msPostGISLayerInfo *layerinfo = NULL;
int nError;
size_t nSrcLen;
char* pszEscapedStr =NULL;
if (layer && pszString && strlen(pszString) > 0) {
if(!msPostGISLayerIsOpen(layer))
msPostGISLayerOpen(layer);
... | 0 | [
"CWE-89"
] | mapserver | 3a10f6b829297dae63492a8c63385044bc6953ed | 37,859,139,419,902,820,000,000,000,000,000,000,000 | 31 | Fix potential SQL Injection with postgis TIME filters (#4834) |
static void mt_feature_mapping(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage)
{
struct mt_device *td = hid_get_drvdata(hdev);
switch (usage->hid) {
case HID_DG_CONTACTMAX:
mt_get_feature(hdev, field->report);
td->maxcontacts = field->value[0];
if (!td->maxcontacts &&
field... | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 331,454,539,095,360,800,000,000,000,000,000,000,000 | 36 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
static void sit_exit_net(struct net *net)
{
struct sit_net *sitn;
sitn = net_generic(net, sit_net_id);
rtnl_lock();
sit_destroy_tunnels(sitn);
unregister_netdevice(sitn->fb_tunnel_dev);
rtnl_unlock();
kfree(sitn);
} | 0 | [
"CWE-399"
] | linux-2.6 | 36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02 | 136,983,634,834,489,840,000,000,000,000,000,000,000 | 11 | sit: Add missing kfree_skb() on pskb_may_pull() failure.
Noticed by Paul Marks <paul@pmarks.net>.
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void cleanChildren()
{
#ifdef HAVE_WAITPID
int stat_loc;
#elif HAVE_WAIT3
struct rusage rusage;
#if defined(__NeXT__)
/* some systems need a union wait as argument to wait3 */
union wait status;
#else
int status;
#endif
#endif
#if defined(HAVE_WAITPID) || defined(HAVE_WAIT3)
int c... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 66,720,117,430,228,640,000,000,000,000,000,000,000 | 35 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
struct reloc_t* MACH0_(get_relocs)(struct MACH0_(obj_t)* bin) {
struct reloc_t *relocs;
int i = 0, len;
ulebr ur = {NULL};
int wordsize = MACH0_(get_bits)(bin) / 8;
if (bin->dyld_info) {
ut8 *opcodes,*end, type = 0, rel_type = 0;
int lib_ord, seg_idx = -1, sym_ord = -1;
size_t j, count, skip, bind_size, lazy... | 1 | [
"CWE-416"
] | radare2 | d1e8ac62c6d978d4662f69116e30230d43033c92 | 39,091,866,468,573,324,000,000,000,000,000,000,000 | 207 | Fix null deref and uaf in mach0 parser |
static void kvm_init_tsc_catchup(struct kvm_vcpu *vcpu, u32 this_tsc_khz)
{
/* Compute a scale to convert nanoseconds in TSC cycles */
kvm_get_time_scale(this_tsc_khz, NSEC_PER_SEC / 1000,
&vcpu->arch.tsc_catchup_shift,
&vcpu->arch.tsc_catchup_mult);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 302,290,972,821,780,720,000,000,000,000,000,000,000 | 7 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
Upstream *Downstream::get_upstream() const { return upstream_; } | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 268,335,813,887,748,460,000,000,000,000,000,000,000 | 1 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
m_amjd(union DateData *x)
{
VALUE r, sf;
int df;
r = m_real_jd(x);
if (FIXNUM_P(r) && FIX2LONG(r) >= (FIXNUM_MIN + 2400001)) {
long ir = FIX2LONG(r);
ir -= 2400001;
r = rb_rational_new1(LONG2FIX(ir));
}
else
r = rb_rational_new1(f_sub(m_real_jd(x),
INT2FIX(2400001)));
if (simple... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 309,404,517,788,759,400,000,000,000,000,000,000,000 | 27 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
void smtp_server_connection_input_unlock(struct smtp_server_connection *conn)
{
conn->input_locked = FALSE;
smtp_server_connection_input_resume(conn);
} | 0 | [
"CWE-77"
] | core | 321c339756f9b2b98fb7326359d1333adebb5295 | 82,423,682,754,064,230,000,000,000,000,000,000,000 | 5 | lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability. |
acl_fetch_chdr_val(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
if (!txn)
return 0;
if (txn->req.msg_state < HTTP_MSG_BODY)
return 0;
if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
/* ensure the indexes are not affect... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 259,985,066,094,224,300,000,000,000,000,000,000,000 | 17 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
comp_distance_value(MinMax* d1, MinMax* d2, int v1, int v2)
{
if (v2 <= 0) return -1;
if (v1 <= 0) return 1;
v1 *= distance_value(d1);
v2 *= distance_value(d2);
if (v2 > v1) return 1;
if (v2 < v1) return -1;
if (d2->min < d1->min) return 1;
if (d2->min > d1->min) return -1;
return 0;
} | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 178,334,490,072,994,900,000,000,000,000,000,000,000 | 15 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
static inline void bs(struct vc_data *vc)
{
if (vc->state.x) {
vc->vc_pos -= 2;
vc->state.x--;
vc->vc_need_wrap = 0;
notify_write(vc, '\b');
}
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 249,388,811,593,083,140,000,000,000,000,000,000,000 | 9 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
void headerMergeLegacySigs(Header h, Header sigh)
{
HeaderIterator hi;
struct rpmtd_s td;
hi = headerInitIterator(sigh);
for (; headerNext(hi, &td); rpmtdFreeData(&td))
{
switch (td.tag) {
/* XXX Translate legacy signature tag values. */
case RPMSIGTAG_SIZE:
td.tag = RPMTAG_SIGSIZE;
br... | 1 | [
"CWE-347",
"CWE-345"
] | rpm | d6a86b5e69e46cc283b1e06c92343319beb42e21 | 204,606,162,333,716,000,000,000,000,000,000,000,000 | 73 | Be much more careful about copying data from the signature header
Only look for known tags, and ensure correct type and size where known
before copying over. Bump the old arbitrary 16k count limit to 16M limit
though, it's not inconceivable that a package could have that many files.
While at it, ensure none of these t... |
dissect_rpcap_heur_tcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if (check_rpcap_heur (tvb, TRUE)) {
/* This is probably a rpcap tcp package */
tcp_dissect_pdus (tvb, pinfo, tree, rpcap_desegment, 8,
get_rpcap_pdu_len, dissect_rpcap, data);
return TRUE;
}... | 0 | [
"CWE-20"
] | wireshark | 2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7 | 65,015,299,037,033,925,000,000,000,000,000,000,000 | 12 | The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr.
We now require that. Make it so.
Bug: 12440
Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76
Reviewed-on: https://code.wireshark.org/review/15424
Reviewed-by: Guy Harris <guy@alum.mit.edu> |
proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, const nstime_t *value_ptr)
{
proto_item *pi;
header_field_info *hfinfo;
CHECK_FOR_NULL_TREE(tree);
TRY_TO_FAKE_THIS_ITEM(tree, hfindex, hfinfo);
DISSECTOR_ASSERT_FIELD_TYPE_IS_TIME(hfinfo);
pi = proto_tree_add_p... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 213,523,226,640,185,380,000,000,000,000,000,000,000 | 17 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
vhost_user_net_set_mtu(struct virtio_net **pdev, struct VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
if (msg->payload.u64 < VIRTIO_MIN_MTU ||
msg->payload.u64 > VIRTIO_MAX_MTU) {
RTE_LOG(ERR, VHOST_CONFIG, "Invalid MTU size (%"PRIu64")\n",
msg->payload.u64);
return RTE... | 1 | [] | dpdk | bf472259dde6d9c4dd3ebad2c2b477a168c6e021 | 22,649,090,411,078,157,000,000,000,000,000,000,000 | 16 | vhost: fix possible denial of service by leaking FDs
A malicious Vhost-user master could send in loop hand-crafted
vhost-user messages containing more file descriptors the
vhost-user slave expects. Doing so causes the application using
the vhost-user library to run out of FDs.
This issue has been assigned CVE-2019-14... |
json_const_array_iterator ArrayEnd(const json &o) {
#ifdef TINYGLTF_USE_RAPIDJSON
return o.End();
#else
return o.end();
#endif
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 286,059,598,777,628,000,000,000,000,000,000,000,000 | 7 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
make_file_name(const char *name, const char *prog, const char *namespace, const char *instance)
{
const char *extn_start;
const char *dir_end;
size_t len;
char *file_name;
if (!name)
return NULL;
len = strlen(name);
if (prog)
len += strlen(prog) + 1;
if (namespace)
len += strlen(namespace) + 1;
if (ins... | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 147,295,570,780,807,380,000,000,000,000,000,000,000 | 40 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
**/
bool is_empty() const {
return (!_data || !_width); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 206,602,616,413,159,970,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
my_decimal *Item_func_neg::decimal_op(my_decimal *decimal_value)
{
my_decimal val, *value= args[0]->val_decimal(&val);
if (!(null_value= args[0]->null_value))
{
my_decimal2decimal(value, decimal_value);
my_decimal_neg(decimal_value);
return decimal_value;
}
return 0;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 64,708,206,334,750,180,000,000,000,000,000,000,000 | 11 | 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... |
int WavInFile::readHeaderBlock()
{
char label[5];
string sLabel;
// lead label string
if (fread(label, 1, 4, fptr) !=4) return -1;
label[4] = 0;
if (isAlphaStr(label) == 0) return -1; // not a valid label
// Decode blocks according to their label
if (strcmp(label, fmtSt... | 1 | [
"CWE-119"
] | soundtouch | 9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e | 258,336,193,046,510,750,000,000,000,000,000,000,000 | 117 | Added minimum size check for WAV header block lengh values |
static int fts3DoclistOrMerge(
int bDescDoclist, /* True if arguments are desc */
char *a1, int n1, /* First doclist */
char *a2, int n2, /* Second doclist */
char **paOut, int *pnOut /* OUT: Malloc'd doclist */
){
int rc = SQLITE_OK;
sqlite3_int64 i1 = 0;
... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 293,272,043,604,477,570,000,000,000,000,000,000,000 | 89 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
static void DeleteChar(int n)
{
int y = curr->w_y, x = curr->w_x;
if (x == cols)
x--;
save_mline(&curr->w_mlines[y], cols);
MScrollH(curr, n, y, x, curr->w_width - 1, curr->w_rend.colorbg);
LScrollH(&curr->w_layer, n, y, x, curr->w_width - 1, curr->w_rend.colorbg, &mline_old);
LGotoPos(&curr->w_layer, x, y);
} | 0 | [
"CWE-119"
] | screen | c336a32a1dcd445e6b83827f83531d4c6414e2cd | 98,329,075,050,357,100,000,000,000,000,000,000,000 | 11 | Fix stack overflow due to too deep recursion
Bug: 45713
How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'
screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge. |
parse_cmdline(int argc, char **argv)
{
int c;
bool reopen_log = false;
int signum;
struct utsname uname_buf;
int longindex;
int curind;
bool bad_option = false;
unsigned facility;
mode_t new_umask_val;
struct option long_options[] = {
{"use-file", required_argument, NULL, 'f'},
#if defined _WITH_VRRP_ && ... | 1 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 148,996,226,122,398,310,000,000,000,000,000,000,000 | 356 | 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... |
nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len)
{
if (strchr(clp->cl_ipaddr, ':') != NULL)
return scnprintf(buf, len, "tcp6");
else
return scnprintf(buf, len, "tcp");
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 256,435,488,034,552,200,000,000,000,000,000,000,000 | 7 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
int ssl3_get_next_proto(SSL *s)
{
int ok;
int proto_len, padding_len;
long n;
const unsigned char *p;
/*
* Clients cannot send a NextProtocol message if we didn't see the
* extension in their ClientHello
*/
if (!s->s3->next_proto_neg_seen) {
SSLerr(SSL_F_SSL3_GET_NEXT_PRO... | 0 | [
"CWE-362"
] | openssl | 3c66a669dfc7b3792f7af0758ea26fe8502ce70c | 290,277,238,276,837,000,000,000,000,000,000,000,000 | 74 | Fix PSK handling.
The PSK identity hint should be stored in the SSL_SESSION structure
and not in the parent context (which will overwrite values used
by other SSL structures with the same SSL_CTX).
Use BUF_strndup when copying identity as it may not be null terminated.
Reviewed-by: Tim Hudson <tjh@openssl.org> |
static void __reg_combine_64_into_32(struct bpf_reg_state *reg)
{
__mark_reg32_unbounded(reg);
if (__reg64_bound_s32(reg->smin_value) && __reg64_bound_s32(reg->smax_value)) {
reg->s32_min_value = (s32)reg->smin_value;
reg->s32_max_value = (s32)reg->smax_value;
}
if (__reg64_bound_u32(reg->umin_value))
reg->u... | 1 | [
"CWE-682"
] | linux | 10bf4e83167cc68595b85fd73bb91e8f2c086e36 | 17,257,050,684,244,085,000,000,000,000,000,000,000 | 21 | bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds
Similarly as b02709587ea3 ("bpf: Fix propagation of 32-bit signed bounds
from 64-bit bounds."), we also need to fix the propagation of 32 bit
unsigned bounds from 64 bit counterparts. That is, really only set the
u32_{min,max}_value when /both/ {umin,um... |
b9_add_helper(struct dlz_example_data *state,
const char *helper_name, void *ptr)
{
if (strcmp(helper_name, "log") == 0)
state->log = (log_t *)ptr;
if (strcmp(helper_name, "putrr") == 0)
state->putrr = (dns_sdlz_putrr_t *)ptr;
if (strcmp(helper_name, "putnamedrr") == 0)
state->putnamedrr = (dns_sdlz_put... | 0 | [
"CWE-732"
] | bind9 | 34348d9ee4db15307c6c42db294419b4df569f76 | 46,671,227,365,090,470,000,000,000,000,000,000,000 | 12 | denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283) |
bool InstanceKlass::should_be_initialized() const {
return !is_initialized();
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 273,689,341,795,390,700,000,000,000,000,000,000,000 | 3 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void __execlists_reset_reg_state(const struct intel_context *ce,
const struct intel_engine_cs *engine)
{
u32 *regs = ce->lrc_reg_state;
int x;
x = lrc_ring_mi_mode(engine);
if (x != -1) {
regs[x + 1] &= ~STOP_RING;
regs[x + 1] |= STOP_RING << 16;
}
} | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 207,227,874,543,314,900,000,000,000,000,000,000,000 | 12 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
ebews_populate_emails_ex (EBookBackendEws *bbews,
EContact *contact,
EEwsItem *item,
gboolean require_smtp_prefix,
gboolean use_primary_address)
{
if (set_email_address (contact, E_CONTACT_EMAIL_1, item, "EmailAddress1", require_smtp_prefix) && use_primary_address)
return;
if (set_email_address... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 89,696,287,063,092,340,000,000,000,000,000,000,000 | 15 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static av_always_inline uint8_t clamp_add_subtract_half(int a, int b, int c)
{
int d = a + b >> 1;
return av_clip_uint8(d + (d - c) / 2);
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 291,251,484,186,350,820,000,000,000,000,000,000,000 | 5 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
struct avdtp_service_capability *avdtp_get_codec(struct avdtp_remote_sep *sep)
{
return sep->codec;
} | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 223,798,882,500,286,780,000,000,000,000,000,000,000 | 4 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
TRIO_PUBLIC_STRING int trio_xstring_equal_case_max TRIO_ARGS3((self, max, other),
trio_string_t* self, size_t max,
TRIO_CONST char* other)
{
assert(self);
assert(other);
return trio_equal_case... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 153,110,701,176,232,150,000,000,000,000,000,000,000 | 9 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int HistogramCompare(const void *x,const void *y)
{
const PixelInfo
*color_1,
*color_2;
color_1=(const PixelInfo *) x;
color_2=(const PixelInfo *) y;
if (color_2->red != color_1->red)
return((int) color_1->red-(int) color_2->red);
if (color_2->green != color_1->green)
return((int) colo... | 1 | [
"CWE-190"
] | ImageMagick | 94691f00839dbdf43edb1508af945ab19b388573 | 53,079,965,696,465,340,000,000,000,000,000,000,000 | 16 | https://github.com/ImageMagick/ImageMagick/issues/1750 |
int HBasicBlock::LoopNestingDepth() const {
const HBasicBlock* current = this;
int result = (current->IsLoopHeader()) ? 1 : 0;
while (current->parent_loop_header() != NULL) {
current = current->parent_loop_header();
result++;
}
return result;
} | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 209,576,229,844,940,200,000,000,000,000,000,000,000 | 9 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static void snd_usbmidi_emagic_finish_out(struct snd_usb_midi_out_endpoint *ep)
{
static const u8 finish_data[] = {
/* switch to patch mode with last preset */
0xf0,
0x00, 0x20, 0x31, /* Emagic */
0x64, /* Unitor8 */
0x10, /* patch switch command */
0x00, /* command version */
0x7f, /* to all box... | 0 | [
"CWE-703"
] | linux | 07d86ca93db7e5cdf4743564d98292042ec21af7 | 218,629,282,822,016,700,000,000,000,000,000,000,000 | 15 | ALSA: usb-audio: avoid freeing umidi object twice
The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.
Found by KASAN.
Signed-off-by: Andrey Konovalov <a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.