func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline void sock_rps_record_flow(const struct sock *sk)
{
#ifdef CONFIG_RPS
struct rps_sock_flow_table *sock_flow_table;
rcu_read_lock();
sock_flow_table = rcu_dereference(rps_sock_flow_table);
rps_record_sock_flow(sock_flow_table, sk->sk_rxhash);
rcu_read_unlock();
#endif
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 79,759,792,698,822,570,000,000,000,000,000,000,000 | 11 | 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... |
xps_parse_rectangle(xps_document *doc, char *text, fz_rect *rect)
{
float args[4];
char *s = text;
int i;
args[0] = 0; args[1] = 0;
args[2] = 1; args[3] = 1;
for (i = 0; i < 4 && *s; i++)
{
args[i] = fz_atof(s);
while (*s && *s != ',')
s++;
if (*s == ',')
s++;
}
rect->x0 = args[0];
rect->y0 = a... | 0 | [
"CWE-119"
] | mupdf | 60dabde18d7fe12b19da8b509bdfee9cc886aafc | 117,976,236,232,119,550,000,000,000,000,000,000,000 | 23 | 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... |
int BN_set_word(BIGNUM *a, BN_ULONG w)
{
bn_check_top(a);
if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
return (0);
a->neg = 0;
a->d[0] = w;
a->top = (w ? 1 : 0);
bn_check_top(a);
return (1);
} | 0 | [
"CWE-310"
] | openssl | aab7c770353b1dc4ba045938c8fb446dd1c4531e | 290,428,363,320,557,160,000,000,000,000,000,000,000 | 11 | Elliptic curve scalar multiplication with timing attack defenses
Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com>
Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi>
Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt... |
static int bnx2x_init_hw_common(struct bnx2x *bp)
{
u32 val;
DP(NETIF_MSG_HW, "starting common init func %d\n", BP_ABS_FUNC(bp));
/*
* take the RESET lock to protect undi_unload flow from accessing
* registers while we're resetting the chip
*/
bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RESET);
bnx2x_rese... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 189,867,487,002,796,000,000,000,000,000,000,000,000 | 440 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static int gnutls_system_mutex_deinit(void **priv)
{
DeleteCriticalSection((CRITICAL_SECTION *) * priv);
free(*priv);
return 0;
} | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 25,579,862,503,252,517,000,000,000,000,000,000,000 | 7 | env: use secure_getenv when reading environment variables |
void kvm_vcpu_block(struct kvm_vcpu *vcpu)
{
DEFINE_WAIT(wait);
for (;;) {
prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE);
if (kvm_arch_vcpu_runnable(vcpu)) {
kvm_make_request(KVM_REQ_UNHALT, vcpu);
break;
}
if (kvm_cpu_has_pending_timer(vcpu))
break;
if (signal_pending(current))
break;... | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 193,547,995,462,040,120,000,000,000,000,000,000,000 | 21 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
static jlong find_member_field_offset(oop mname, bool must_be_static, TRAPS) {
if (mname == NULL ||
java_lang_invoke_MemberName::vmtarget(mname) == NULL) {
THROW_MSG_0(vmSymbols::java_lang_InternalError(), "mname not resolved");
} else {
int flags = java_lang_invoke_MemberName::flags(mname);
if ((... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 136,789,050,434,633,170,000,000,000,000,000,000,000 | 18 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static int serdes_update_mcb_s1g(struct regmap *regmap, u8 macro)
{
return __serdes_write_mcb_s1g(regmap, macro,
HSIO_MCB_S1G_ADDR_CFG_SERDES1G_RD_ONE_SHOT);
} | 0 | [
"CWE-125"
] | linux | 6acb47d1a318e5b3b7115354ebc4ea060c59d3a1 | 248,382,016,136,865,650,000,000,000,000,000,000,000 | 5 | phy: ocelot-serdes: fix out-of-bounds read
Currently, there is an out-of-bounds read on array ctrl->phys,
once variable i reaches the maximum array size of SERDES_MAX
in the for loop.
Fix this by changing the condition in the for loop from
i <= SERDES_MAX to i < SERDES_MAX.
Addresses-Coverity-ID: 1473966 ("Out-of-bo... |
*/
static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
{
/* OBJECTS_FIXME */
zval **ent, *fname, **varname;
zval *retval = NULL;
const char *key;
ulong idx;
char tmp_buf[WDDX_BUF_LEN];
HashTable *objhash, *sleephash;
TSRMLS_FETCH();
MAKE_STD_ZVAL(fname);
ZVAL_STRING(fname, "__sleep", 1);
... | 1 | [
"CWE-476"
] | php-src | 6045de69c7dedcba3eadf7c4bba424b19c81d00d | 231,922,921,749,829,660,000,000,000,000,000,000,000 | 96 | Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
Proper soltion would be to call serialize/unserialize and deal with the result,
but this requires more work that should be done by wddx maintainer (not me). |
f_gettabwinvar(typval_T *argvars, typval_T *rettv)
{
getwinvar(argvars, rettv, 1);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 172,676,156,702,604,250,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static void *sysvipc_proc_start(struct seq_file *s, loff_t *pos)
{
struct ipc_proc_iter *iter = s->private;
struct ipc_proc_iface *iface = iter->iface;
struct ipc_ids *ids;
ids = &iter->ns->ids[iface->ids];
/*
* Take the lock - this will be released by the corresponding
* call to stop().
*/
down_read(&ids... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 327,900,029,720,085,060,000,000,000,000,000,000,000 | 25 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
int jpc_firstone(int x)
{
int n;
/* The argument must be nonnegative. */
assert(x >= 0);
n = -1;
while (x > 0) {
x >>= 1;
++n;
}
return n;
} | 1 | [
"CWE-617"
] | jasper | e6c8d5a838b49f94616be14753aa5c89d64605b5 | 276,648,297,181,809,600,000,000,000,000,000,000,000 | 14 | jpc_math: split jpc_firstone() in int/jpc_fix_t overloads
Fixes CVE-2018-9055 (denial of service via a reachable assertion due
to integer overflow).
Based on a patch from Fridrich Strba <fstrba@suse.com>. Instead of
switching to `int_fast32_t`, this patch splits jpc_firstone() into two
overloads, one for `int` and o... |
GF_AVCConfig *gf_isom_mvc_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex)
{
GF_TrackBox *trak;
GF_MPEGVisualSampleEntryBox *entry;
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !trak->Media || !DescriptionIndex) return NULL;
if (gf_isom_get_avc_svc_type(the_file, t... | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 260,660,899,808,549,720,000,000,000,000,000,000,000 | 13 | fixed #1785 (fuzz) |
static GRANT_NAME *name_hash_search(HASH *name_hash,
const char *host,const char* ip,
const char *db,
const char *user, const char *tname,
bool exact, bool name_tolower)
{
ch... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 224,733,036,608,486,200,000,000,000,000,000,000,000 | 39 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
void wakeup_subsequent_commits(int wakeup_error)
{
if (wait_for_commit_ptr)
wait_for_commit_ptr->wakeup_subsequent_commits(wakeup_error);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 182,587,206,253,245,170,000,000,000,000,000,000,000 | 5 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
bool HasDynamicTensor(const TfLiteContext& context,
const TfLiteIntArray* int_array) {
return HasDynamicTensorImpl(context, TfLiteIntArrayView{int_array});
} | 0 | [
"CWE-20",
"CWE-787"
] | tensorflow | d58c96946b2880991d63d1dacacb32f0a4dfa453 | 175,455,113,968,292,800,000,000,000,000,000,000,000 | 4 | [tflite] Ensure inputs and outputs don't overlap.
If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen.
PiperOrigin-RevId: 332522916
Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a |
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
{
const struct in6_addr *dest, *src;
__u16 destp, srcp;
int timer_active;
unsigned long timer_expires;
struct inet_sock *inet = inet_sk(sp);
struct tcp_sock *tp = tcp_sk(sp);
const struct inet_connection_sock *icsk = inet_csk(sp);
struct ip... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 298,789,448,010,795,540,000,000,000,000,000,000,000 | 55 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
void Server::Handle(ConnectionPtr connection) {
auto request = connection->request();
const Url& url = request->url();
LOG_INFO("Request URL path: %s", url.path().c_str());
UrlArgs args;
auto view = FindView(request->method(), url.path(), &args);
if (!view) {
LOG_WARN("No view matches the request: %s... | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 122,431,830,358,181,530,000,000,000,000,000,000,000 | 42 | fix static file serving security issue; fix url path encoding issue |
static void mld_ifc_start_work(struct inet6_dev *idev, unsigned long delay)
{
unsigned long tv = prandom_u32() % delay;
if (!mod_delayed_work(mld_wq, &idev->mc_ifc_work, tv + 2))
in6_dev_hold(idev);
} | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 153,533,314,331,716,600,000,000,000,000,000,000,000 | 7 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
static char *print_string(cJSON *item,printbuffer *p) {return print_string_ptr(item->valuestring,p);} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 19,559,506,071,567,257,000,000,000,000,000,000,000 | 1 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static FP32 half_to_float(FP16 h) {
static const FP32 magic = {113 << 23};
static const unsigned int shifted_exp = 0x7c00
<< 13; // exponent mask after shift
FP32 o;
o.u = (h.u & 0x7fffU) << 13U; // exponent/mantissa bits
unsigned int exp_ = shifted_exp & ... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 39,332,602,123,910,480,000,000,000,000,000,000,000 | 22 | Make line_no with too large value(2**20) invalid. Fixes #124 |
void unit_dump(Unit *u, FILE *f, const char *prefix) {
char *t, **j;
UnitDependency d;
Iterator i;
_cleanup_free_ char *p2 = NULL;
const char *prefix2;
char
timestamp1[FORMAT_TIMESTAMP_MAX],
timestamp2[FORMAT_TIMESTAMP_MAX],
... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 325,879,604,824,907,740,000,000,000,000,000,000,000 | 152 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
int epo_stroke_path(gx_device *dev, const gs_gstate *pgs, gx_path *ppath,
const gx_stroke_params *params,
const gx_drawing_color *pdcolor, const gx_clip_path *pcpath)
{
int code = epo_handle_erase_page(dev);
if (code != 0)
return code;
return dev_proc(dev, stroke_path)(dev, pgs, ppath, para... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 223,779,045,833,361,250,000,000,000,000,000,000,000 | 10 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
{
if (group->meth->point_set_to_infinity == 0)
{
ECerr(EC_F_EC_POINT_SET_TO_INFINITY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
if (group->meth != point->meth)
{
ECerr(EC_F_EC_POINT_SET_TO_INFINITY, EC_R_INCOMPATIBLE_OBJECTS);
r... | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 128,692,358,497,460,020,000,000,000,000,000,000,000 | 14 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
static spl_ptr_llist *spl_ptr_llist_init(spl_ptr_llist_ctor_func ctor, spl_ptr_llist_dtor_func dtor) /* {{{ */
{
spl_ptr_llist *llist = emalloc(sizeof(spl_ptr_llist));
llist->head = NULL;
llist->tail = NULL;
llist->count = 0;
llist->dtor = dtor;
llist->ctor = ctor;
return llist;
} | 0 | [] | php-src | df78c48354f376cf419d7a97f88ca07d572f00fb | 160,242,996,628,689,060,000,000,000,000,000,000,000 | 12 | Fixed Bug #67538 (SPL Iterators use-after-free) |
regulator_register(const struct regulator_desc *regulator_desc,
const struct regulator_config *config)
{
const struct regulation_constraints *constraints = NULL;
const struct regulator_init_data *init_data;
static atomic_t regulator_no = ATOMIC_INIT(0);
struct regulator_dev *rdev;
struct device *dev;
int ret... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 127,241,410,895,876,870,000,000,000,000,000,000,000 | 192 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
TEST(QuantizedPoolingOpTest, AveragePoolPaddingValidStride1) {
// Choose the input ranges carefully so that the dequantized output matches
// the results of the float model above.
// Input Range[0, 15.9375] --> [Scale{0.0625}, zero_point{0}]
QuantizedPoolingOpModel m(
BuiltinOperator_AVERAGE_POOL_2D,
... | 0 | [
"CWE-369"
] | tensorflow | 5f7975d09eac0f10ed8a17dbb6f5964977725adc | 317,068,598,349,104,700,000,000,000,000,000,000,000 | 19 | Prevent another div by 0 in optimized pooling implementations TFLite
PiperOrigin-RevId: 370800091
Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b |
static void pxa2xx_ssp_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
sdc->init = pxa2xx_ssp_init;
} | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 124,469,493,523,643,560,000,000,000,000,000,000,000 | 6 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
static int usb_reset_and_verify_device(struct usb_device *udev)
{
struct usb_device *parent_hdev = udev->parent;
struct usb_hub *parent_hub;
struct usb_hcd *hcd = bus_to_hcd(udev->bus);
struct usb_device_descriptor descriptor = udev->descriptor;
struct usb_host_bos *bos;
int i, j, ret = 0;
int port1 ... | 0 | [
"CWE-703"
] | linux | e50293ef9775c5f1cf3fcc093037dd6a8c5684ea | 12,925,574,614,601,230,000,000,000,000,000,000,000 | 151 | USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. ... |
int rpc_type_of_NPNVariable(int variable)
{
int type;
switch (variable) {
case NPNVjavascriptEnabledBool:
case NPNVasdEnabledBool:
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
case NPNVnetscapeWindow:
type = RPC_... | 1 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 312,657,907,041,785,350,000,000,000,000,000,000,000 | 25 | Support all the new variables added |
static st32 getregmemend(const char *input) {
st32 res;
if (!input || !*input || !r_str_endswith (input, "]")) {
return -1;
}
char *temp = r_str_ndup (input, strlen (input) - 1);
if (!temp) {
return -1;
}
res = getreg (temp);
free (temp);
return res;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7 | 126,409,311,702,322,140,000,000,000,000,000,000,000 | 14 | Fix #12417/#12418 (arm assembler heap overflows) |
void pdo_stmt_init(TSRMLS_D)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "PDOStatement", pdo_dbstmt_functions);
pdo_dbstmt_ce = zend_register_internal_class(&ce TSRMLS_CC);
pdo_dbstmt_ce->get_iterator = pdo_stmt_iter_get;
pdo_dbstmt_ce->create_object = pdo_dbstmt_new;
zend_class_implements(pdo_dbstmt_ce TSRMLS_... | 1 | [
"CWE-476"
] | php-src | 6045de69c7dedcba3eadf7c4bba424b19c81d00d | 272,935,012,265,413,560,000,000,000,000,000,000,000 | 24 | Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
Proper soltion would be to call serialize/unserialize and deal with the result,
but this requires more work that should be done by wddx maintainer (not me). |
static int tg3_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
{
struct tg3 *tp = netdev_priv(dev);
info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_RX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE |
SOF_TIMESTAMPING_TX_HARDWARE |
SOF_TIMESTAMPING_RX_HARDWARE |
... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 152,342,349,364,664,160,000,000,000,000,000,000,000 | 24 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
TEST(HeaderMapImplTest, TestInlineHeaderAdd) {
TestRequestHeaderMapImpl foo;
foo.addCopy(LowerCaseString(":path"), "GET");
EXPECT_EQ(foo.size(), 1);
EXPECT_TRUE(foo.Path() != nullptr);
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 60,796,716,802,022,880,000,000,000,000,000,000,000 | 6 | 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... |
static int vmw_legacy_srf_dma(struct vmw_resource *res,
struct ttm_validate_buffer *val_buf,
bool bind)
{
SVGAGuestPtr ptr;
struct vmw_fence_obj *fence;
uint32_t submit_size;
struct vmw_surface *srf = vmw_res_to_srf(res);
uint8_t *cmd;
struct vmw_private *dev_priv = res->dev_priv;
BUG_ON(!val_... | 0 | [
"CWE-20"
] | linux | ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf | 171,634,532,912,502,670,000,000,000,000,000,000,000 | 38 | drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is
a user-controlled 'uint32_t' value which is used as a loop count limit.
This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'.
References:
https://bugzill... |
int mysql_multi_update_prepare(THD *thd)
{
LEX *lex= thd->lex;
TABLE_LIST *table_list= lex->query_tables;
TABLE_LIST *tl;
Multiupdate_prelocking_strategy prelocking_strategy;
uint table_count= lex->table_count;
DBUG_ENTER("mysql_multi_update_prepare");
/*
Open tables and create derived ones, but do n... | 0 | [
"CWE-617"
] | server | ecb6f9c894d3ebafeff1c6eb3b65cd248062296f | 297,346,884,324,122,270,000,000,000,000,000,000,000 | 82 | MDEV-28095 crash in multi-update and implicit grouping
disallow implicit grouping in multi-update.
explicit GROUP BY is not allowed by the grammar. |
static inline struct xfrm6_tunnel_net *xfrm6_tunnel_pernet(struct net *net)
{
return net_generic(net, xfrm6_tunnel_net_id);
} | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 199,351,006,248,715,700,000,000,000,000,000,000,000 | 4 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
ldns_rdf_type_maybe_quoted(ldns_rdf_type rdf_type)
{
return rdf_type == LDNS_RDF_TYPE_STR ||
rdf_type == LDNS_RDF_TYPE_LONG_STR ||
rdf_type == LDNS_RDF_TYPE_MULTI_STR;
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 194,322,562,768,784,930,000,000,000,000,000,000,000 | 6 | CAA and URI |
nautilus_file_info_providers_done (NautilusFile *file)
{
eel_g_list_free_deep (file->details->extension_emblems);
file->details->extension_emblems = file->details->pending_extension_emblems;
file->details->pending_extension_emblems = NULL;
if (file->details->extension_attributes) {
g_hash_table_destroy (file->de... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 226,178,415,891,303,160,000,000,000,000,000,000,000 | 15 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static inline pte_t pte_clear_flags(pte_t pte, pteval_t clear)
{
pteval_t v = native_pte_val(pte);
return native_make_pte(v & ~clear);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 027ef6c87853b0a9df53175063028edb4950d476 | 222,697,839,097,422,900,000,000,000,000,000,000,000 | 6 | mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP
In many places !pmd_present has been converted to pmd_none. For pmds
that's equivalent and pmd_none is quicker so using pmd_none is better.
However (unless we delete pmd_present) we should provide an accurate
pmd_present too. This will avoid the ri... |
R_API void r_bin_java_print_unknown_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Unknown.\n");
return;
}
printf ("Unknown Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x "\n", attr->file_offset);
printf (" Attribut... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 252,711,616,682,061,100,000,000,000,000,000,000,000 | 10 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static int scoop_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
ScoopInfo *s = SCOOP(dev);
s->status = 0x02;
qdev_init_gpio_out(dev, s->handler, 16);
qdev_init_gpio_in(dev, scoop_gpio_set, 16);
memory_region_init_io(&s->iomem, OBJECT(s), &scoop_ops, s, "scoop", 0x1000);
sysbus_i... | 0 | [
"CWE-119"
] | qemu | 52f91c3723932f8340fe36c8ec8b18a757c37b2b | 166,063,784,241,847,570,000,000,000,000,000,000,000 | 14 | zaurus: fix buffer overrun on invalid state load
CVE-2013-4540
Within scoop_gpio_handler_update, if prev_level has a high bit set, then
we get bit > 16 and that causes a buffer overrun.
Since prev_level comes from wire indirectly, this can
happen on invalid state load.
Similarly for gpio_level and gpio_dir.
To fix... |
num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
{
BIGNUM *bn;
if (NIL_P(obj))
ossl_raise(rb_eTypeError, "Can't convert nil into Integer");
bn = GetBNPtr(obj);
if (!(ai = BN_to_ASN1_INTEGER(bn, ai)))
ossl_raise(eOSSLError, NULL);
return ai;
} | 0 | [
"CWE-119"
] | openssl | 1648afef33c1d97fb203c82291b8a61269e85d3b | 264,979,626,103,821,300,000,000,000,000,000,000,000 | 14 | asn1: fix out-of-bounds read in decoding constructed objects
OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds
read. int_ossl_asn1_decode0_cons() does not give the correct available
length to ossl_asn1_decode() when decoding the inner components of a
constructed object. This can cause out-of-bound... |
int jbd2_journal_extend(handle_t *handle, int nblocks, int revoke_records)
{
transaction_t *transaction = handle->h_transaction;
journal_t *journal;
int result;
int wanted;
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
result = 1;
read_lock(&journal->j_state_lock);
/* Do... | 0 | [
"CWE-416"
] | linux | cc16eecae687912238ee6efbff71ad31e2bc414e | 36,743,663,040,201,880,000,000,000,000,000,000,000 | 58 | jbd2: fix use-after-free of transaction_t race
jbd2_journal_wait_updates() is called with j_state_lock held. But if
there is a commit in progress, then this transaction might get committed
and freed via jbd2_journal_commit_transaction() ->
jbd2_journal_free_transaction(), when we release j_state_lock.
So check for jou... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
if (output->type == kTfLiteFloat32) {
EvalAddN<float>(context, node);
} else if (output->type == kTfLiteInt32) {
EvalAddN<int32_t>(context, node);
} else {
context->Rep... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 223,985,594,075,579,270,000,000,000,000,000,000,000 | 14 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
unsigned lodepng_chunk_check_crc(const unsigned char* chunk)
{
unsigned length = lodepng_chunk_length(chunk);
unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]);
/*the CRC is taken of the data and the 4 chunk type letters, not the length*/
unsigned checksum = lodepng_crc32(&chunk[4], length + 4);
if(CRC ... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 215,000,240,216,107,500,000,000,000,000,000,000,000 | 9 | Fixed #5645: realloc return handling |
struct razer_report razer_chroma_standard_matrix_effect_breathing_single(unsigned char variable_storage, unsigned char led_id, struct razer_rgb *rgb1)
{
struct razer_report report = get_razer_report(0x03, 0x0A, 0x08);
report.arguments[0] = 0x03; // Effect ID
report.arguments[1] = 0x01; // Breathing type
... | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 244,786,112,175,721,500,000,000,000,000,000,000,000 | 11 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
string_getsize(register PyObject *op)
{
char *s;
Py_ssize_t len;
if (PyString_AsStringAndSize(op, &s, &len))
return -1;
return len;
} | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 275,407,998,595,675,500,000,000,000,000,000,000,000 | 8 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
static bool vmci_transport_old_proto_override(bool *old_pkt_proto)
{
if (PROTOCOL_OVERRIDE != -1) {
if (PROTOCOL_OVERRIDE == 0)
*old_pkt_proto = true;
else
*old_pkt_proto = false;
pr_info("Proto override in use\n");
return true;
}
return false;
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 101,914,057,665,625,580,000,000,000,000,000,000,000 | 14 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
partial_free(partial_T *pt)
{
int i;
for (i = 0; i < pt->pt_argc; ++i)
clear_tv(&pt->pt_argv[i]);
vim_free(pt->pt_argv);
dict_unref(pt->pt_dict);
if (pt->pt_name != NULL)
{
func_unref(pt->pt_name);
vim_free(pt->pt_name);
}
else
func_ptr_unref(pt->pt_func);
// "out_up" is no lon... | 0 | [
"CWE-823"
] | vim | 8b91e71441069b1dde9ac9ff9d9a829b1b4aecca | 154,836,603,450,035,810,000,000,000,000,000,000,000 | 32 | patch 8.2.4774: crash when using a number for lambda name
Problem: Crash when using a number for lambda name.
Solution: Check the type of the lambda reference. |
CodeSignatureDir* Binary::code_signature_dir() {
return const_cast<CodeSignatureDir*>(static_cast<const Binary*>(this)->code_signature_dir());
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 320,557,482,283,520,960,000,000,000,000,000,000,000 | 3 | Resolve #764 |
lua_call_throttle::lua_call_throttle(CLua *_lua)
: lua(_lua)
{
lua->init_throttle();
if (!lua->mixed_call_depth++)
lua_map[lua->state()] = lua;
} | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 244,801,570,621,842,000,000,000,000,000,000,000,000 | 7 | Disable lua load(), loadstring() bytcode loading |
static int check_insn_config_length(struct comedi_insn *insn,
unsigned int *data)
{
if (insn->n < 1)
return -EINVAL;
switch (data[0]) {
case INSN_CONFIG_DIO_OUTPUT:
case INSN_CONFIG_DIO_INPUT:
case INSN_CONFIG_DISARM:
case INSN_CONFIG_RESET:
if (insn->n == 1)
return 0;
break;
case INSN_CONFIG_A... | 0 | [
"CWE-200"
] | linux | 819cbb120eaec7e014e5abd029260db1ca8c5735 | 310,047,641,935,011,900,000,000,000,000,000,000,000 | 62 | staging: comedi: fix infoleak to userspace
driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: stable <sta... |
evbuffer_add_reference(struct evbuffer *outbuf,
const void *data, size_t datlen,
evbuffer_ref_cleanup_cb cleanupfn, void *extra)
{
struct evbuffer_chain *chain;
struct evbuffer_chain_reference *info;
int result = -1;
chain = evbuffer_chain_new(sizeof(struct evbuffer_chain_reference));
if (!chain)
return... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 284,954,509,631,644,300,000,000,000,000,000,000,000 | 38 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
ipcp_lattice<valtype>::set_to_bottom ()
{
bool ret = !bottom;
bottom = true;
return ret;
} | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 190,809,396,840,565,350,000,000,000,000,000,000,000 | 6 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_async_msghdr iomsg, *kmsg;
struct io_sr_msg *sr = &req->sr_msg;
struct socket *sock;
unsigned flags;
int min_ret = 0;
int ret;
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
if (req_has_async_data(re... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 329,557,084,239,098,800,000,000,000,000,000,000,000 | 57 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
static int gather_pte_stats(pmd_t *pmd, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
struct numa_maps *md;
spinlock_t *ptl;
pte_t *orig_pte;
pte_t *pte;
md = walk->private;
spin_lock(&walk->mm->page_table_lock);
if (pmd_trans_huge(*pmd)) {
if (pmd_trans_splitting(*pmd)) {
spin_unlock(&w... | 1 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 97,333,093,395,368,240,000,000,000,000,000,000,000 | 40 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static int selinux_vm_enough_memory(struct mm_struct *mm, long pages)
{
int rc, cap_sys_admin = 0;
rc = cred_has_capability(current_cred(), CAP_SYS_ADMIN,
SECURITY_CAP_NOAUDIT, true);
if (rc == 0)
cap_sys_admin = 1;
return cap_sys_admin;
} | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 132,725,065,181,983,770,000,000,000,000,000,000,000 | 11 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
array_init(&EX_T(opline->result.u.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
} else {
return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HA... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 190,050,445,805,969,130,000,000,000,000,000,000,000 | 13 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
zfs_ace_fuid_get_mask(void *acep)
{
return (((zfs_ace_hdr_t *)acep)->z_access_mask);
} | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 256,302,862,968,595,600,000,000,000,000,000,000,000 | 4 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
explicit Iterator(const typename Iterator::Params& params)
: DatasetIterator<Dataset<T>>(params),
num_elements_(params.dataset->sparse_tensor_.shape()[0]),
dense_shape_(DT_INT64, {params.dataset->sparse_tensor_.dims() - 1}),
group_iterable_(params.dataset->sparse_tensor_.group(... | 0 | [
"CWE-476"
] | tensorflow | 02cc160e29d20631de3859c6653184e3f876b9d7 | 325,836,712,353,649,720,000,000,000,000,000,000,000 | 11 | Prevent nullptr deref in SparseTensorSliceDataset
The arguments must determine a valid sparse tensor. This means that when indices are empty then the values must be empty too (and the reverse).
Also added test, by modifying existing test with empty sparse tensor to now run with an invalid sparse tensor input.
PiperO... |
DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
const unsigned char **srcPlanes, int width, const int *strides, int height,
int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual,
int flags)
{
int i, row, retval=0, alloc=1; JSAMPROW *inbuf[MAX_COMPONENTS];
int pw[MAX_COMPONENTS... | 0 | [] | libjpeg-turbo | dab6be4cfb2f9307b5378d2d1dc74d9080383dc2 | 39,071,198,681,370,066,000,000,000,000,000,000,000 | 138 | tjDecompressToYUV*(): Fix OOB write/double free
... when attempting to decompress grayscale JPEG images with sampling
factors != 1.
Fixes #387 |
poppler_fonts_iter_get_font_type (PopplerFontsIter *iter)
{
FontInfo *info;
g_return_val_if_fail (iter != nullptr, POPPLER_FONT_TYPE_UNKNOWN);
info = (FontInfo *)iter->items->get (iter->index);
return (PopplerFontType)info->getType ();
} | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 84,865,954,875,858,590,000,000,000,000,000,000,000 | 10 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
~_functor4d_streamline_expr() { mp->end(); delete mp; } | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 270,754,425,167,909,850,000,000,000,000,000,000,000 | 1 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int local_LZ4_compress_limitedOutput(const char* in, char* out, int inSize)
{
return LZ4_compress_limitedOutput(in, out, inSize, LZ4_compressBound(inSize));
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 132,016,484,625,277,050,000,000,000,000,000,000,000 | 4 | Fixed : issue 52 (reported by Ludwig Strigeus) |
int window_x() const {
return _window_x;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 41,542,997,037,941,777,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int getStrrtokenPos(char* str, int savedPos)
{
int result =-1;
int i;
for(i=savedPos-1; i>=0; i--) {
if(isIDSeparator(*(str+i)) ){
/* delimiter found; check for singleton */
if(i>=2 && isIDSeparator(*(str+i-2)) ){
/* a singleton; so send the position of token before the singleton */
result = ... | 0 | [
"CWE-125"
] | php-src | 97eff7eb57fc2320c267a949cffd622c38712484 | 47,025,904,046,942,060,000,000,000,000,000,000,000 | 23 | Fix bug #72241: get_icu_value_internal out-of-bounds read |
e_util_debug_printv (const gchar *domain,
const gchar *format,
va_list args)
{
GString *str;
GDateTime *dt;
if (!domain)
domain = "???";
str = g_string_new ("");
g_string_vprintf (str, format, args);
dt = g_date_time_new_now_local ();
if (dt) {
g_print ("[%s] %04d-%02d-%02d %02d:%02d:%02d.%0... | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 306,879,361,005,279,050,000,000,000,000,000,000,000 | 32 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
POINTER_NEW_UPDATE* update_read_pointer_new(rdpUpdate* update, wStream* s)
{
POINTER_NEW_UPDATE* pointer_new = calloc(1, sizeof(POINTER_NEW_UPDATE));
if (!pointer_new)
goto fail;
if (Stream_GetRemainingLength(s) < 2)
goto fail;
Stream_Read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
if ((pointer... | 0 | [
"CWE-125"
] | FreeRDP | 0332cad015fdf7fac7e5c6863484f18a554e0fcf | 214,889,354,523,854,530,000,000,000,000,000,000,000 | 27 | Fixed oob read in update_recv
properly use update_type_to_string to print update type.
Thanks to hac425 CVE-2020-11019 |
u32 gf_isom_get_next_alternate_group_id(GF_ISOFile *movie)
{
u32 id = 0;
u32 i=0;
while (i< gf_isom_get_track_count(movie) ) {
GF_TrackBox *trak = gf_isom_get_track_from_file(movie, i+1);
if (trak->Header->alternate_group > id)
id = trak->Header->alternate_group;
i++;
}
return id+1;
} | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 146,170,079,563,604,800,000,000,000,000,000,000,000 | 13 | fixed #2120 |
static void php_wddx_serialize_unset(wddx_packet *packet)
{
php_wddx_add_chunk_static(packet, WDDX_NULL);
} | 0 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 99,620,247,524,157,680,000,000,000,000,000,000,000 | 4 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
static inline void io_queue_sqe(struct io_kiocb *req)
__must_hold(&req->ctx->uring_lock)
{
if (likely(!(req->flags & (REQ_F_FORCE_ASYNC | REQ_F_FAIL))))
__io_queue_sqe(req);
else
io_queue_sqe_fallback(req); | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 73,130,559,777,345,590,000,000,000,000,000,000,000 | 7 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
void InstanceKlass::check_valid_for_instantiation(bool throwError, TRAPS) {
if (is_interface() || is_abstract()) {
ResourceMark rm(THREAD);
THROW_MSG(throwError ? vmSymbols::java_lang_InstantiationError()
: vmSymbols::java_lang_InstantiationException(), external_name());
}
if (this == vmClas... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 231,830,325,004,629,070,000,000,000,000,000,000,000 | 12 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
void DefragTrackerFree(DefragTracker *dt)
{
if (dt != NULL) {
DefragTrackerClearMemory(dt);
SCMutexDestroy(&dt->lock);
SCFree(dt);
(void) SC_ATOMIC_SUB(defrag_memuse, sizeof(DefragTracker));
}
} | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 9,478,096,366,190,272,000,000,000,000,000,000,000 | 10 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
inline WireFormatLite::CppType WireFormatLite::FieldTypeToCppType(
FieldType type) {
return kFieldTypeToCppTypeMap[type];
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 189,676,301,483,951,870,000,000,000,000,000,000,000 | 4 | Apply patch |
GF_Err lsr1_Size(GF_Box *s)
{
GF_Err e;
GF_LASeRSampleEntryBox *ptr = (GF_LASeRSampleEntryBox *)s;
s->size += 8;
if (ptr->lsr_config) {
e = gf_isom_box_size((GF_Box *)ptr->lsr_config);
if (e) return e;
ptr->size += ptr->lsr_config->size;
}
if (ptr->descr) {
e = gf_isom_box_size((GF_Box *)ptr->descr);
i... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 206,806,570,790,770,770,000,000,000,000,000,000,000 | 18 | fixed 2 possible heap overflows (inc. #1088) |
generate_user_id (KBNODE keyblock)
{
char *p;
p = ask_user_id (1, 1, keyblock);
if (!p)
return NULL; /* Canceled. */
return uid_from_string (p);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 44,167,810,308,352,880,000,000,000,000,000,000,000 | 9 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static int TS_RESP_sign(TS_RESP_CTX *ctx)
{
int ret = 0;
PKCS7 *p7 = NULL;
PKCS7_SIGNER_INFO *si;
STACK_OF(X509) *certs; /* Certificates to include in sc. */
ESS_SIGNING_CERT *sc = NULL;
ASN1_OBJECT *oid;
BIO *p7bio = NULL;
int i;
/* Check if signcert and pkey match. */
if (!X509_check_private_key(ctx->sign... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 190,647,047,890,173,100,000,000,000,000,000,000,000 | 111 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
int i2d_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO *a)
{
return ASN1_i2d_bio(i2d_TS_TST_INFO, bp, (unsigned char *) a);
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 52,679,174,518,732,030,000,000,000,000,000,000,000 | 4 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
remote_filter_load (GFile *path, GError **error)
{
RemoteFilter *filter;
g_autofree char *data = NULL;
gsize data_size;
GTimeVal mtime;
g_autoptr(GRegex) allow_refs = NULL;
g_autoptr(GRegex) deny_refs = NULL;
/* Save mtime before loading to avoid races */
if (!get_mtime (path, &mtime, NULL, error))
... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 44,830,978,600,957,460,000,000,000,000,000,000,000 | 38 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *this_branch = env->cur_state;
struct bpf_verifier_state *other_branch;
struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs;
struct bpf_reg_state *dst_reg, *o... | 1 | [
"CWE-203"
] | linux | 9183671af6dbf60a1219371d4ed73e23f43b49db | 128,024,063,629,609,230,000,000,000,000,000,000,000 | 177 | bpf: Fix leakage under speculation on mispredicted branches
The verifier only enumerates valid control-flow paths and skips paths that
are unreachable in the non-speculative domain. And so it can miss issues
under speculative execution on mispredicted branches.
For example, a type confusion has been demonstrated with... |
bool submitMetadata(const MetadataMapVector& metadata_map_vector, int32_t stream_id) override {
// Creates metadata payload.
encoder_.createPayload(metadata_map_vector);
for (uint8_t flags : encoder_.payloadFrameFlagBytes()) {
int result = nghttp2_submit_extension(session(), ::Envoy::Http::METADATA_... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 9,223,828,383,723,293,000,000,000,000,000,000,000 | 14 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
onig_get_retry_limit_in_match(void)
{
#ifdef USE_RETRY_LIMIT_IN_MATCH
return RetryLimitInMatch;
#else
/* return ONIG_NO_SUPPORT_CONFIG; */
return 0;
#endif
} | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 284,527,580,114,708,330,000,000,000,000,000,000,000 | 9 | fix heap-buffer-overflow |
static void set_private_data_ptrs(compiler_common *common, int *private_data_start, PCRE2_SPTR ccend)
{
PCRE2_SPTR cc = common->start;
PCRE2_SPTR alternative;
PCRE2_SPTR end = NULL;
int private_data_ptr = *private_data_start;
int space, size, bracketlen;
BOOL repeat_check = TRUE;
while (cc < ccend)
{
space = 0;
... | 0 | [
"CWE-125"
] | pcre2 | 50a51cb7e67268e6ad417eb07c9de9bfea5cc55a | 306,014,428,918,373,520,000,000,000,000,000,000,000 | 184 | Fixed a unicode properrty matching issue in JIT |
yang_read_extcomplex_str(struct lys_module *module, struct lys_ext_instance_complex *ext, const char *arg_name,
const char *parent_name, char **value, int parent_stmt, LY_STMT stmt)
{
int c;
const char **str, ***p = NULL;
void *reallocated;
struct lyext_substmt *info;
c = 0... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 321,430,410,307,135,700,000,000,000,000,000,000,000 | 105 | yang parser BUGFIX double free
Fixes #742 |
void pre_next_partition(ha_rows rownum)
{
add_value_to_items();
curr_rownum= rownum;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 204,282,370,964,759,200,000,000,000,000,000,000,000 | 5 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
void AVI_set_video(avi_t *AVI, int width, int height, double fps, char *compressor)
{
/* may only be called if file is open for writing */
if(AVI->mode==AVI_MODE_READ) return;
AVI->width = width;
AVI->height = height;
AVI->fps = fps;
if(strncmp(compressor, "RGB", 3)==0) {
memset(AVI->compressor, 0, 4);
... | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 314,287,863,541,279,100,000,000,000,000,000,000,000 | 20 | fixed #2159 |
**/
inline char *strellipsize(char *const str, const unsigned int l=64,
const bool is_ending=true) {
if (!str) return str;
const unsigned int nl = l<5?5:l, ls = (unsigned int)std::strlen(str);
if (ls<=nl) return str;
if (is_ending) std::strcpy(str + nl - 5,"... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 117,555,352,337,337,370,000,000,000,000,000,000,000 | 14 | Fix other issues in 'CImg<T>::load_bmp()'. |
int __kvm_set_memory_region(struct kvm *kvm,
const struct kvm_userspace_memory_region *mem)
{
int r;
gfn_t base_gfn;
unsigned long npages;
struct kvm_memory_slot *slot;
struct kvm_memory_slot old, new;
struct kvm_memslots *slots = NULL, *old_memslots;
int as_id, id;
enum kvm_mr_change change;
r = check... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cfa39381173d5f969daf43582c95ad679189cbc9 | 158,457,116,008,858,100,000,000,000,000,000,000,000 | 161 | kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device t... |
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
unsigned int id)
{
struct kvm_vcpu *vcpu;
unsigned long vm_base = kvm->arch.vm_base;
int r;
int cpu;
BUG_ON(sizeof(struct kvm_vcpu) > VCPU_STRUCT_SIZE/2);
r = -EINVAL;
if (id >= KVM_MAX_VCPUS) {
printk(KERN_ERR"kvm: Can't configure vcpus > %ld",
KV... | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 127,192,698,325,001,430,000,000,000,000,000,000,000 | 39 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
static void intel_pmu_enable_all(int added)
{
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
intel_pmu_pebs_enable_all();
intel_pmu_lbr_enable_all();
wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL,
x86_pmu.intel_ctrl & ~cpuc->intel_ctrl_guest_mask);
if (test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) {
... | 0 | [
"CWE-20",
"CWE-401"
] | linux | f1923820c447e986a9da0fc6bf60c1dccdf0408e | 297,530,012,769,284,430,000,000,000,000,000,000,000 | 19 | perf/x86: Fix offcore_rsp valid mask for SNB/IVB
The valid mask for both offcore_response_0 and
offcore_response_1 was wrong for SNB/SNB-EP,
IVB/IVB-EP. It was possible to write to
reserved bit and cause a GP fault crashing
the kernel.
This patch fixes the problem by correctly marking the
reserved bits in the valid m... |
int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 fl6;
struct dst_entry *dst;
int res;
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
sk->sk_err_soft = -PTR_ERR(dst);
sk->sk_route_caps = 0;
kfree_skb(skb);
r... | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 194,395,861,651,786,270,000,000,000,000,000,000,000 | 26 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
static enum auth_db_rule auth_db_rule_parse(const char *str)
{
if (strcmp(str, "return") == 0)
return AUTH_DB_RULE_RETURN;
if (strcmp(str, "return-ok") == 0)
return AUTH_DB_RULE_RETURN_OK;
if (strcmp(str, "return-fail") == 0)
return AUTH_DB_RULE_RETURN_FAIL;
if (strcmp(str, "continue") == 0)
return AUTH_DB_... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 16,092,325,727,920,442,000,000,000,000,000,000,000 | 16 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
virDomainMemoryFindByDef(virDomainDefPtr def,
virDomainMemoryDefPtr mem)
{
return virDomainMemoryFindByDefInternal(def, mem, false);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 115,512,134,612,596,000,000,000,000,000,000,000,000 | 5 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
inline uint32_t convertWordToUint32(Word w) { return static_cast<uint32_t>(w.u64_); } | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 20,425,544,489,805,912,000,000,000,000,000,000,000 | 1 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
TEST_P(Http2CodecImplTest, Invalid204WithContentLengthAllowed) {
stream_error_on_invalid_http_messaging_ = true;
initialize();
MockStreamCallbacks request_callbacks;
request_encoder_->getStream().addCallbacks(request_callbacks);
TestRequestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 312,465,531,694,671,980,000,000,000,000,000,000,000 | 38 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
server_set_opcode(struct xrdp_mod* mod, int opcode)
{
struct xrdp_painter* p;
p = (struct xrdp_painter*)(mod->painter);
if (p == 0)
{
return 0;
}
p->rop = opcode;
return 0;
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 86,034,976,340,318,980,000,000,000,000,000,000,000 | 12 | move temp files from /tmp to /tmp/.xrdp |
static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
{
if (vcpu->arch.rmode.active)
rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
vmcs_writel(GUEST_RFLAGS, rflags);
} | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 213,352,523,035,683,300,000,000,000,000,000,000,000 | 6 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
struct timespec64 timespec64_trunc(struct timespec64 t, unsigned gran)
{
/* Avoid division in the common cases 1 ns and 1 s. */
if (gran == 1) {
/* nothing */
} else if (gran == NSEC_PER_SEC) {
t.tv_nsec = 0;
} else if (gran > 1 && gran < NSEC_PER_SEC) {
t.tv_nsec -= t.tv_nsec % gran;
} else {
WARN(1, "ill... | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 79,296,913,589,505,260,000,000,000,000,000,000,000 | 14 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
before_quit_autocmds(win_T *wp, int quit_all, int forceit)
{
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, wp->w_buffer);
// Bail out when autocommands closed the window.
// Refuse to quit when the buffer in the last window is being closed (can
// only happen in autocommands).
if (!win_valid(wp)... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 202,850,603,257,186,400,000,000,000,000,000,000,000 | 25 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.