func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void print_xml_null_tag(FILE * xml_file, const char* sbeg,
const char* stag_atr, const char* sval,
const char* line_end)
{
fputs(sbeg, xml_file);
fputs("<", xml_file);
fputs(stag_atr, xml_file);
fputs("\"", xml_file);
print_quoted_xml(xml_fi... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 338,990,168,946,520,800,000,000,000,000,000,000,000 | 13 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
qf_winid(qf_info_T *qi)
{
win_T *win;
// The quickfix window can be opened even if the quickfix list is not set
// using ":copen". This is not true for location lists.
if (qi == NULL)
return 0;
win = qf_find_win(qi);
if (win != NULL)
return win->w_id;
return 0;
} | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 193,618,553,461,145,460,000,000,000,000,000,000,000 | 13 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static void _slurm_rpc_job_step_kill(uint32_t uid, slurm_msg_t * msg)
{
static int active_rpc_cnt = 0;
int error_code = SLURM_SUCCESS;
job_step_kill_msg_t *job_step_kill_msg =
(job_step_kill_msg_t *) msg->data;
if (slurmctld_conf.debug_flags & DEBUG_FLAG_STEPS) {
info("Processing RPC: REQUEST_CANCEL_JOB_STEP %... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 87,274,610,461,654,490,000,000,000,000,000,000,000 | 20 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
ossl_cipher_update(int argc, VALUE *argv, VALUE self)
{
EVP_CIPHER_CTX *ctx;
unsigned char *in;
long in_len, out_len;
VALUE data, str;
rb_scan_args(argc, argv, "11", &data, &str);
StringValue(data);
in = (unsigned char *)RSTRING_PTR(data);
if ((in_len = RSTRING_LEN(data)) == 0)
... | 1 | [
"CWE-326",
"CWE-310",
"CWE-703"
] | openssl | 8108e0a6db133f3375608303fdd2083eb5115062 | 30,972,844,889,583,204,000,000,000,000,000,000,000 | 34 | cipher: don't set dummy encryption key in Cipher#initialize
Remove the encryption key initialization from Cipher#initialize. This
is effectively a revert of r32723 ("Avoid possible SEGV from AES
encryption/decryption", 2011-07-28).
r32723, which added the key initialization, was a workaround for
Ruby Bug #2768. For s... |
static void free_pair_device_data(void *user_data)
{
struct pair_device_data *data = user_data;
g_free(data);
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 82,370,223,744,195,620,000,000,000,000,000,000,000 | 6 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
QPDF::replaceReserved(QPDFObjectHandle reserved,
QPDFObjectHandle replacement)
{
QTC::TC("qpdf", "QPDF replaceReserved");
reserved.assertReserved();
replaceObject(reserved.getObjGen(), replacement);
} | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 701b518d5c56a1449825a3a37a716c58e05e1c3e | 210,870,038,644,840,270,000,000,000,000,000,000,000 | 7 | Detect recursion loops resolving objects (fixes #51)
During parsing of an object, sometimes parts of the object have to be
resolved. An example is stream lengths. If such an object directly or
indirectly points to the object being parsed, it can cause an infinite
loop. Guard against all cases of re-entrant resolution ... |
grub_crypto_hmac_buffer (const struct gcry_md_spec *md,
const void *key, grub_size_t keylen,
const void *data, grub_size_t datalen, void *out)
{
struct grub_crypto_hmac_handle *hnd;
hnd = grub_crypto_hmac_init (md, key, keylen);
if (!hnd)
return GPG_ERR_OUT_OF_MEMORY;
grub_crypto_hmac_write (hnd, ... | 0 | [
"CWE-264"
] | grub | 451d80e52d851432e109771bb8febafca7a5f1f2 | 119,868,970,069,825,950,000,000,000,000,000,000,000 | 13 | Fix security issue when reading username and password
This patch fixes two integer underflows at:
* grub-core/lib/crypto.c
* grub-core/normal/auth.c
CVE-2015-8370
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
Also-By: Andrey Borzenkov <arvidjaar@... |
xps_parse_glyphs(xps_document *doc, const fz_matrix *ctm,
char *base_uri, xps_resource *dict, fz_xml *root)
{
fz_xml *node;
char *fill_uri;
char *opacity_mask_uri;
char *bidi_level_att;
char *fill_att;
char *font_size_att;
char *font_uri_att;
char *origin_x_att;
char *origin_y_att;
char *is_sideways_att;
... | 1 | [
"CWE-119"
] | mupdf | 60dabde18d7fe12b19da8b509bdfee9cc886aafc | 80,485,607,036,522,960,000,000,000,000,000,000,000 | 250 | 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... |
static int __unmap_and_move(struct page *page, struct page *newpage,
int force, enum migrate_mode mode)
{
int rc = -EAGAIN;
int page_was_mapped = 0;
struct anon_vma *anon_vma = NULL;
if (!trylock_page(page)) {
if (!force || mode == MIGRATE_ASYNC)
goto out;
/*
* It's not safe for direct compaction to... | 0 | [
"CWE-476"
] | linux | 42cb14b110a5698ccf26ce59c4441722605a3743 | 223,686,628,741,903,000,000,000,000,000,000,000,000 | 130 | mm: migrate dirty page without clear_page_dirty_for_io etc
clear_page_dirty_for_io() has accumulated writeback and memcg subtleties
since v2.6.16 first introduced page migration; and the set_page_dirty()
which completed its migration of PageDirty, later had to be moderated to
__set_page_dirty_nobuffers(); then PageSwa... |
static int process_one_ticket(struct ceph_auth_client *ac,
struct ceph_crypto_key *secret,
void **p, void *end)
{
struct ceph_x_info *xi = ac->private;
int type;
u8 tkt_struct_v, blob_struct_v;
struct ceph_x_ticket_handler *th;
void *dbuf = NULL;
void *dp, *dend;
int dlen;
char is_enc;
struct... | 0 | [
"CWE-399",
"CWE-119"
] | linux | c27a3e4d667fdcad3db7b104f75659478e0c68d8 | 28,482,720,030,762,660,000,000,000,000,000,000,000 | 121 | libceph: do not hard code max auth ticket len
We hard code cephx auth ticket buffer size to 256 bytes. This isn't
enough for any moderate setups and, in case tickets themselves are not
encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but
ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S... |
find_func_by_name(char_u *name, compiletype_T *compile_type)
{
char_u *arg = name;
char_u *fname;
ufunc_T *ufunc;
int is_global = FALSE;
if (STRNCMP(arg, "profile", 7) == 0 && VIM_ISWHITE(arg[7]))
{
*compile_type = CT_PROFILE;
arg = skipwhite(arg + 7);
}
else if (STRNCMP(arg, "debug"... | 0 | [
"CWE-416"
] | vim | 91c7cbfe31bbef57d5fcf7d76989fc159f73ef15 | 77,758,829,770,617,140,000,000,000,000,000,000,000 | 53 | patch 9.0.0225: using freed memory with multiple line breaks in expression
Problem: Using freed memory with multiple line breaks in expression.
Solution: Free eval_tofree later. |
DECODE_JSON(Int32) {
CHECK_TOKEN_BOUNDS;
CHECK_PRIMITIVE;
size_t tokenSize;
char* tokenData;
GET_TOKEN(tokenData, tokenSize);
UA_Int64 out = 0;
UA_StatusCode s = parseSignedInteger(tokenData, tokenSize, &out);
*dst = (UA_Int32)out;
if(moveToken)
parseCtx->index++;
retur... | 0 | [
"CWE-703",
"CWE-787"
] | open62541 | c800e2987b10bb3af6ef644b515b5d6392f8861d | 334,958,661,291,425,700,000,000,000,000,000,000,000 | 15 | fix(json): Check max recursion depth in more places |
void jpc_mqenc_setctxs(jpc_mqenc_t *mqenc, int numctxs, jpc_mqctx_t *ctxs)
{
jpc_mqstate_t **ctx;
int n;
ctx = mqenc->ctxs;
n = JAS_MIN(mqenc->maxctxs, numctxs);
while (--n >= 0) {
*ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps];
++ctx;
++ctxs;
}
n = mqenc->maxctxs - numctxs;
while (--n >= 0) {
*ctx = ... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 55,028,813,428,272,820,000,000,000,000,000,000,000 | 19 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
dump_cell_pool_usage(int severity)
{
circuit_t *c;
int n_circs = 0;
int n_cells = 0;
for (c = circuit_get_global_list_(); c; c = c->next) {
n_cells += c->n_chan_cells.n;
if (!CIRCUIT_IS_ORIGIN(c))
n_cells += TO_OR_CIRCUIT(c)->p_chan_cells.n;
++n_circs;
}
tor_log(severity, LD_MM,
... | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 237,231,050,148,726,550,000,000,000,000,000,000,000 | 16 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
int MAIN(int argc, char *argv[])
{
X509_VERIFY_PARAM *vpm = NULL;
int badarg = 0;
short port=PORT;
char *CApath=NULL,*CAfile=NULL;
char *chCApath=NULL,*chCAfile=NULL;
char *vfyCApath=NULL,*vfyCAfile=NULL;
unsigned char *context = NULL;
char *dhfile = NULL;
#ifndef OPENSSL_NO_ECDH
char *named_curve = NULL;
#en... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 224,705,763,620,451,760,000,000,000,000,000,000,000 | 1,213 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
GF_Filter *gf_filter_new(GF_FilterSession *fsess, const GF_FilterRegister *freg, const char *src_args, const char *dst_args, GF_FilterArgType arg_type, GF_Err *err, GF_Filter *multi_sink_target, Bool is_dynamic_filter)
{
char szName[200];
const char *dst_striped = NULL;
const char *src_striped = NULL;
GF_Filter *fi... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 165,298,265,915,516,530,000,000,000,000,000,000,000 | 188 | fixed crashes for very long path - cf #1908 |
reexec_userns_join (int userns, int mountns, char *pause_pid_file_path)
{
pid_t ppid = getpid ();
char uid[16];
char gid[16];
char **argv;
int pid;
char *cwd = getcwd (NULL, 0);
sigset_t sigset, oldsigset;
if (cwd == NULL)
{
fprintf (stderr, "error getting current working directory: %s\n", st... | 1 | [] | libpod | d400f0b5b2d68c4148a7c173e7fbbfd9b377a660 | 209,659,298,659,845,780,000,000,000,000,000,000,000 | 121 | rootless: fix segfault when open fd >= FD_SETSIZE
if there are more than FD_SETSIZE open fds passed down to the Podman
process, the initialization code could crash as it attempts to store
them into a fd_set. Use an array of fd_set structs, each of them
holding only FD_SETSIZE file descriptors.
Signed-off-by: Giusepp... |
__ioat1_dma_memcpy_issue_pending(struct ioat_dma_chan *ioat)
{
void __iomem *reg_base = ioat->base.reg_base;
dev_dbg(to_dev(&ioat->base), "%s: pending: %d\n",
__func__, ioat->pending);
ioat->pending = 0;
writeb(IOAT_CHANCMD_APPEND, reg_base + IOAT1_CHANCMD_OFFSET);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 107,513,405,903,753,430,000,000,000,000,000,000,000 | 9 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
size_t removeIf(const HeaderMap::HeaderMatchPredicate& predicate) override {
return HeaderMapImpl::removeIf(predicate);
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 152,044,841,527,189,170,000,000,000,000,000,000,000 | 3 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
PHP_MINIT_FUNCTION(filter)
{
ZEND_INIT_MODULE_GLOBALS(filter, php_filter_init_globals, NULL);
REGISTER_INI_ENTRIES();
REGISTER_LONG_CONSTANT("INPUT_POST", PARSE_POST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_GET", PARSE_GET, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_COOKIE... | 1 | [
"CWE-190"
] | php-src | da3886de6dc8edab3da14331227816d6ca8e9b96 | 138,363,734,648,109,240,000,000,000,000,000,000,000 | 76 | Wrong value for FILTER_SANITIZE_FULL_SPECIAL_CHARS in REGISTER_LONG_CONSTANT |
void rpc_wake_up_status(struct rpc_wait_queue *queue, int status)
{
struct rpc_task *task, *next;
struct list_head *head;
spin_lock_bh(&queue->lock);
head = &queue->tasks[queue->maxpriority];
for (;;) {
list_for_each_entry_safe(task, next, head, u.tk_wait.list) {
task->tk_status = status;
rpc_wake_up_task... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 250,125,506,716,643,800,000,000,000,000,000,000,000 | 18 | 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... |
Status AuthorizationSession::checkAuthForKillCursors(const NamespaceString& ns,
long long cursorID) {
// See implementation comments in checkAuthForGetMore(). This method looks very similar.
// SERVER-20364 Check for find or killCursor privileges until we h... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 286,934,159,470,398,200,000,000,000,000,000,000,000 | 32 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static void set_reg_mkey_segment(struct mlx5_mkey_seg *seg,
const struct ib_send_wr *wr)
{
const struct mlx5_umr_wr *umrwr = umr_wr(wr);
memset(seg, 0, sizeof(*seg));
if (wr->send_flags & MLX5_IB_SEND_UMR_DISABLE_MR)
seg->status = MLX5_MKEY_STATUS_FREE;
seg->flags = convert_access(umrwr->access_flags);
if... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 317,533,147,188,574,000,000,000,000,000,000,000,000 | 22 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
PHP_LIBXML_API void php_libxml_shutdown(void)
{
if (_php_libxml_initialized) {
#if defined(LIBXML_SCHEMAS_ENABLED)
xmlRelaxNGCleanupTypes();
#endif
xmlCleanupParser();
zend_hash_destroy(&php_libxml_exports);
xmlSetExternalEntityLoader(_php_libxml_default_entity_loader);
_php_libxml_initialized = 0;
}
} | 0 | [
"CWE-611"
] | php-src | de31324c221c1791b26350ba106cc26bad23ace9 | 35,552,176,249,977,097,000,000,000,000,000,000,000 | 13 | Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
The availability of entity loading is stored in a module global which
previously was only initialized in the GINIT constructor. This had the
effect that disabling the entity loader in one request caused
subsequent requests hitting the same ... |
ce_child_setup (gpointer user_data G_GNUC_UNUSED)
{
/* We are in the child process at this point */
pid_t pid = getpid ();
setpgid (pid, pid);
} | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 104,459,913,935,094,720,000,000,000,000,000,000,000 | 6 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
static void init_reg_state(struct bpf_verifier_env *env,
struct bpf_func_state *state)
{
struct bpf_reg_state *regs = state->regs;
int i;
for (i = 0; i < MAX_BPF_REG; i++) {
mark_reg_not_init(env, regs, i);
regs[i].live = REG_LIVE_NONE;
}
/* frame pointer */
regs[BPF_REG_FP].type = PTR_TO_STACK;
mark... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 190,846,869,648,702,650,000,000,000,000,000,000,000 | 20 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
njs_string_trim(const njs_value_t *value, njs_string_prop_t *string,
unsigned mode)
{
uint32_t cp, trim;
const u_char *p, *prev, *start, *end;
njs_unicode_decode_t ctx;
trim = 0;
njs_string_prop(string, value);
start = string->start;
end = string->start + string... | 0 | [
"CWE-125"
] | njs | b9aea5854bcf6f2de8f7a7f1550874e392b94be2 | 332,582,804,121,211,720,000,000,000,000,000,000,000 | 115 | Fixed String.prototype.trimEnd() with unicode string.
Previously, when the method was invoked with a string consisting of space
characters and at least one of them was a Unicode space separator (code
point above 127) it returned invalid string value with non-zero size
but zero length.
The fix is to update the size of... |
get_first_owned_block (const Dwg_Object *hdr)
{
Dwg_Data *dwg = hdr->parent;
Dwg_Version_Type version = dwg->header.version;
const Dwg_Object_BLOCK_HEADER *restrict _hdr
= hdr->tio.object->tio.BLOCK_HEADER;
if (hdr->type != DWG_TYPE_BLOCK_HEADER)
{
LOG_ERROR ("Invalid BLOCK_HEADER type %d", hdr-... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 318,256,880,669,657,050,000,000,000,000,000,000,000 | 33 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
void WebContents::EnableDeviceEmulation(
const blink::WebDeviceEmulationParams& params) {
if (type_ == Type::REMOTE)
return;
auto* frame_host = web_contents()->GetMainFrame();
if (frame_host) {
auto* widget_host =
frame_host ? frame_host->GetView()->GetRenderWidgetHost() : nullptr;
if (!w... | 0 | [
"CWE-284",
"CWE-693"
] | electron | 18613925610ba319da7f497b6deed85ad712c59b | 252,036,266,124,368,080,000,000,000,000,000,000,000 | 15 | refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL
* spec: add test for x-site _top navigation
* chore: old cod... |
static int check_setuid(void)
{
return 0;
} | 0 | [
"CWE-362"
] | cifs-utils | 810f7e4e0f2dbcbee0294d9b371071cb08268200 | 72,077,179,792,764,640,000,000,000,000,000,000,000 | 4 | mount.cifs: guard against signals by unprivileged users
If mount.cifs is setuid root, then the unprivileged user who runs the
program can send the mount.cifs process a signal and kill it. This is
not a huge problem unless we happen to be updating the mtab at the
time, in which case the mtab lockfiles might not get cle... |
png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
int freer, png_uint_32 mask)
{
png_debug(1, "in png_data_freer");
if (png_ptr == NULL || info_ptr == NULL)
return;
if (freer == PNG_DESTROY_WILL_FREE_DATA)
info_ptr->free_me |= mask;
else if (freer == PNG_USER_WILL_FREE_DATA)... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 58,724,235,919,936,880,000,000,000,000,000,000,000 | 17 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static void nfs4_open_confirm_release(void *calldata)
{
struct nfs4_opendata *data = calldata;
struct nfs4_state *state = NULL;
/* If this request hasn't been cancelled, do nothing */
if (data->cancelled == 0)
goto out_free;
/* In case of error, no cleanup! */
if (!data->rpc_done)
goto out_free;
state = nfs... | 1 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 260,049,327,130,643,660,000,000,000,000,000,000,000 | 17 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static void cgroup_kill(struct cgroup *cgrp)
{
struct cgroup_subsys_state *css;
struct cgroup *dsct;
lockdep_assert_held(&cgroup_mutex);
cgroup_for_each_live_descendant_pre(dsct, css, cgrp)
__cgroup_kill(dsct);
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 334,201,979,607,212,770,000,000,000,000,000,000,000 | 10 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
next_desc(struct usb_descriptor_header **t, u8 desc_type)
{
for (; *t; t++) {
if ((*t)->bDescriptorType == desc_type)
return t;
}
return NULL;
} | 0 | [
"CWE-476"
] | linux | 75e5b4849b81e19e9efe1654b30d7f3151c33c2c | 101,294,632,516,027,940,000,000,000,000,000,000,000 | 8 | USB: gadget: validate interface OS descriptor requests
Stall the control endpoint in case provided index exceeds array size of
MAX_CONFIG_INTERFACES or when the retrieved function pointer is null.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregk... |
nfsd4_layoutcommit(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate, union nfsd4_op_u *u)
{
struct nfsd4_layoutcommit *lcp = &u->layoutcommit;
const struct nfsd4_layout_seg *seg = &lcp->lc_seg;
struct svc_fh *current_fh = &cstate->current_fh;
const struct nfsd4_layout_ops *ops;
loff_t new_size = lcp->... | 0 | [
"CWE-476"
] | linux | 01310bb7c9c98752cc763b36532fab028e0f8f81 | 88,016,288,250,202,100,000,000,000,000,000,000,000 | 62 | nfsd: COPY and CLONE operations require the saved filehandle to be set
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.... |
NTSTATUS TCStartThreadInProcess (PKSTART_ROUTINE threadProc, PVOID threadArg, PKTHREAD *kThread, PEPROCESS process)
{
NTSTATUS status;
HANDLE threadHandle;
HANDLE processHandle = NULL;
OBJECT_ATTRIBUTES threadObjAttributes;
if (process)
{
status = ObOpenObjectByPointer (process, OBJ_KERNEL_HANDLE, NULL, 0, NUL... | 0 | [
"CWE-119",
"CWE-787"
] | VeraCrypt | f30f9339c9a0b9bbcc6f5ad38804af39db1f479e | 147,352,258,820,256,200,000,000,000,000,000,000,000 | 34 | Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison. |
my_decimal *Item_func_case::decimal_op(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
Item *item= find_item();
my_decimal *res;
if (!item)
{
null_value=1;
return 0;
}
res= item->val_decimal(decimal_value);
null_value= item->null_value;
return res;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 107,913,147,990,706,150,000,000,000,000,000,000,000 | 16 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
int acpi_map_lsapic(acpi_handle handle, int *pcpu)
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *obj;
struct acpi_table_lapic *lapic;
cpumask_t tmp_map, new_map;
u8 physid;
int cpu;
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer)))
return -EINVAL;
if (... | 0 | [] | linux-2.6 | f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff | 4,428,446,064,346,004,300,000,000,000,000,000,000 | 54 | [PATCH] i386: add HPET(s) into resource map
Add HPET(s) into resource map. This will allow for the HPET(s) to be
visibile within /proc/iomem.
Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de> |
int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
struct sk_buff *skb, struct qeth_hdr *hdr,
int elements_needed)
{
struct qeth_qdio_out_buffer *buffer;
int start_index;
int flush_count = 0;
int do_pack = 0;
int tmp;
int rc = 0;
/* spin until we get the queue ... */
while (atom... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 176,191,503,098,809,370,000,000,000,000,000,000,000 | 84 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static void ahci_init_d2h(AHCIDevice *ad)
{
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
if (ad->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(ad)) {
ad->init_d2h_sent = true;
/* We're emulating receiving the first Reg H2D Fis from the devi... | 0 | [
"CWE-772",
"CWE-401"
] | qemu | d68f0f778e7f4fbd674627274267f269e40f0b04 | 75,474,553,538,315,370,000,000,000,000,000,000,000 | 19 | ide: ahci: call cleanup function in ahci unit
This can avoid memory leak when hotunplug the ahci device.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn
Signed-off-by: John Snow <jsnow@redhat.com> |
ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternal (MonoMethod *method)
{
return mono_method_get_object (mono_domain_get (), method, NULL);
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 128,685,279,739,611,690,000,000,000,000,000,000,000 | 4 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
int bnxt_re_req_notify_cq(struct ib_cq *ib_cq,
enum ib_cq_notify_flags ib_cqn_flags)
{
struct bnxt_re_cq *cq = container_of(ib_cq, struct bnxt_re_cq, ib_cq);
int type = 0, rc = 0;
unsigned long flags;
spin_lock_irqsave(&cq->cq_lock, flags);
/* Trigger on the very next completion */
if (ib_cqn_flags & IB_CQ_... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4a9d46a9fe14401f21df69cea97c62396d5fb053 | 78,208,752,831,523,620,000,000,000,000,000,000,000 | 27 | RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Si... |
raise_error(codegen_scope *s, const char *msg)
{
int idx = new_lit(s, mrb_str_new_cstr(s->mrb, msg));
genop_1(s, OP_ERR, idx);
} | 0 | [
"CWE-415",
"CWE-122"
] | mruby | 38b164ace7d6ae1c367883a3d67d7f559783faad | 160,799,159,799,441,400,000,000,000,000,000,000,000 | 6 | codegen.c: fix a bug in `gen_values()`.
- Fix limit handling that fails 15 arguments method calls.
- Fix too early argument packing in arrays. |
static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVRational tb)
{
int i;
AVBPrint buf;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < sub->num_rects; i++) {
char *final_dialog;
const char *dialog;
AVSubtitleRect *rect = sub->rects... | 0 | [
"CWE-787"
] | FFmpeg | 2080bc33717955a0e4268e738acf8c1eeddbf8cb | 26,245,681,548,455,310,000,000,000,000,000,000,000 | 56 | avcodec/utils: correct align value for interplay
Fixes out of array access
Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
int mgr_log_mode(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) {
fm_mgr_config_errno_t res;
fm_msg_ret_code_t ret_code;
uint32_t logmode=0;
if (mgr == FM_MGR_PM) {
fprintf(stderr, "pmLogMode:\n");
fprintf(stderr, "\tThis command is not supported any more. The logging of the\n");
... | 0 | [
"CWE-362"
] | opa-fm | c5759e7b76f5bf844be6c6641cc1b356bbc83869 | 132,561,771,633,837,230,000,000,000,000,000,000,000 | 29 | Fix scripts and code that use well-known tmp files. |
static void exif_process_APP12(image_info_type *ImageInfo, char *buffer, size_t length TSRMLS_DC)
{
size_t l1, l2=0;
if ((l1 = php_strnlen(buffer+2, length-2)) > 0) {
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company", TAG_NONE, TAG_FMT_STRING, l1, buffer+2 TSRMLS_CC);
if (length > 2+l1+1) {
l2 = php_strnle... | 0 | [
"CWE-119"
] | php-src | ddb207e7fa2e9adeba021a1303c3781efda5409b | 162,885,495,437,596,770,000,000,000,000,000,000,000 | 15 | Fix bug #68113 (Heap corruption in exif_thumbnail()) |
const HeaderEntry* operator[](size_t i) const { return result_[i]; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 57,949,810,594,187,230,000,000,000,000,000,000,000 | 1 | 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... |
bool PlayerGeneric::setCurrentAudioDriverByName(const char* name)
{
if (name == NULL)
return false;
if (mixer)
{
bool res = mixer->setCurrentAudioDriverByName(name);
if (audioDriverName)
delete[] audioDriverName;
const char* curDrvName = getCurrentAudioDriverName();
ASSERT(curDrvName);
audioDriverN... | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 273,399,009,668,794,830,000,000,000,000,000,000,000 | 32 | Fix use-after-free in PlayerGeneric destructor |
void Logger::addPeer(const QString &ip, bool blocked, const QString &reason)
{
QWriteLocker locker(&lock);
Log::Peer temp = { peerCounter++, QDateTime::currentMSecsSinceEpoch(), Utils::String::toHtmlEscaped(ip), blocked, Utils::String::toHtmlEscaped(reason) };
m_peers.push_back(temp);
if (m_peers.size... | 0 | [
"CWE-20",
"CWE-79"
] | qBittorrent | 6ca3e4f094da0a0017cb2d483ec1db6176bb0b16 | 102,796,257,888,213,830,000,000,000,000,000,000,000 | 12 | Add Utils::String::toHtmlEscaped |
xmlRelaxNGValidErrorPop(xmlRelaxNGValidCtxtPtr ctxt)
{
xmlRelaxNGValidErrorPtr cur;
if (ctxt->errNr <= 0) {
ctxt->err = NULL;
return;
}
ctxt->errNr--;
if (ctxt->errNr > 0)
ctxt->err = &ctxt->errTab[ctxt->errNr - 1];
else
ctxt->err = NULL;
cur = &ctxt->errTab[... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 75,940,932,677,767,570,000,000,000,000,000,000,000 | 24 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
static void wstunnel_handler_ctx_free(void *gwhctx) {
handler_ctx *hctx = (handler_ctx *)gwhctx;
chunk_buffer_release(hctx->frame.payload);
} | 0 | [
"CWE-476"
] | lighttpd1.4 | 971773f1fae600074b46ef64f3ca1f76c227985f | 326,260,538,769,215,830,000,000,000,000,000,000,000 | 4 | [mod_wstunnel] fix crash with bad hybivers (fixes #3165)
(thx Michał Dardas)
x-ref:
"mod_wstunnel null pointer dereference"
https://redmine.lighttpd.net/issues/3165 |
static struct resv_map *resv_map_alloc(void)
{
struct resv_map *resv_map = kmalloc(sizeof(*resv_map), GFP_KERNEL);
if (!resv_map)
return NULL;
kref_init(&resv_map->refs);
INIT_LIST_HEAD(&resv_map->regions);
return resv_map;
} | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 27,893,852,474,668,516,000,000,000,000,000,000,000 | 11 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
static JSValue js_sys_load_script(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
const char *filename;
u8 *data=NULL;
u32 data_size;
JSValue res;
GF_Err e;
char *full_url = NULL;
if (!argc || !JS_IsString(argv[0])) return GF_JS_EXCEPTION(ctx);
filename = JS_ToCString(c... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 27,616,832,648,883,815,000,000,000,000,000,000,000 | 40 | fixed #2138 |
flow_mask_hash_fields(const struct flow *flow, struct flow_wildcards *wc,
enum nx_hash_fields fields)
{
int i;
switch (fields) {
case NX_HASH_FIELDS_ETH_SRC:
memset(&wc->masks.dl_src, 0xff, sizeof wc->masks.dl_src);
break;
case NX_HASH_FIELDS_SYMMETRIC_L4:
... | 0 | [
"CWE-400"
] | ovs | 79cec1a736b91548ec882d840986a11affda1068 | 89,625,799,152,516,240,000,000,000,000,000,000,000 | 72 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
int samdb_msg_add_delval(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx,
struct ldb_message *msg, const char *attr_name,
const char *value)
{
struct ldb_message_element *el;
struct ldb_val val;
char *v;
unsigned int i;
bool found = false;
int ret;
v = talloc_strdup(mem_ctx, value);
if (v == NULL) {
... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 194,994,530,561,375,830,000,000,000,000,000,000,000 | 47 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
int tty_unregister_ldisc(int disc)
{
unsigned long flags;
int ret = 0;
if (disc < N_TTY || disc >= NR_LDISCS)
return -EINVAL;
raw_spin_lock_irqsave(&tty_ldiscs_lock, flags);
if (tty_ldiscs[disc]->refcount)
ret = -EBUSY;
else
tty_ldiscs[disc] = NULL;
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
... | 0 | [
"CWE-200"
] | linux-stable | dd42bf1197144ede075a9d4793123f7689e164bc | 168,145,732,618,237,510,000,000,000,000,000,000,000 | 17 | tty: Prevent ldisc drivers from re-using stale tty fields
Line discipline drivers may mistakenly misuse ldisc-related fields
when initializing. For example, a failure to initialize tty->receive_room
in the N_GIGASET_M101 line discipline was recently found and fixed [1].
Now, the N_X25 line discipline has been discover... |
void mp4box_log(const char *fmt, ...)
{
va_list vl;
va_start(vl, fmt);
vfprintf(stderr, fmt, vlist);
fflush(stderr);
va_end(vl);
} | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 289ffce3e0d224d314f5f92a744d5fe35999f20b | 21,814,398,421,161,583,000,000,000,000,000,000,000 | 8 | fixed #1767 (fuzz) |
manager_maybe_stop_job_for_window (GSManager *manager,
GSWindow *window)
{
GSJob *job;
job = lookup_job_for_window (manager, window);
if (job == NULL) {
gs_debug ("Job not found for window");
return;
}
gs_job_... | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 279,837,710,066,938,300,000,000,000,000,000,000,000 | 14 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
xfs_attr_node_addname(xfs_da_args_t *args)
{
xfs_da_state_t *state;
xfs_da_state_blk_t *blk;
xfs_inode_t *dp;
xfs_mount_t *mp;
int committed, retval, error;
trace_xfs_attr_node_addname(args);
/*
* Fill in bucket of arguments/results/context to carry around.
*/
dp = args->dp;
mp = dp->i_mount;
restart:
s... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 32,629,789,079,802,930,000,000,000,000,000,000,000 | 264 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
void ConnectionManagerImpl::ActiveStreamDecoderFilter::encodeHeaders(ResponseHeaderMapPtr&& headers,
bool end_stream) {
parent_.response_headers_ = std::move(headers);
parent_.encodeHeaders(nullptr, *parent_.response_headers_, end_stream);
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 154,819,977,190,162,430,000,000,000,000,000,000,000 | 5 | 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... |
__be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp,
struct file *file, loff_t offset, loff_t len,
int flags)
{
int error;
if (!S_ISREG(file_inode(file)->i_mode))
return nfserr_inval;
error = vfs_fallocate(file, flags, offset, len);
if (!error)
error = commit_metadata(fhp);
ret... | 0 | [
"CWE-732"
] | linux | 22cf8419f1319ff87ec759d0ebdff4cbafaee832 | 268,977,047,206,500,150,000,000,000,000,000,000,000 | 15 | nfsd: apply umask on fs without ACL support
The server is failing to apply the umask when creating new objects on
filesystems without ACL support.
To reproduce this, you need to use NFSv4.2 and a client and server
recent enough to support umask, and you need to export a filesystem that
lacks ACL support (for example,... |
void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
if (protocol_version >= 30) {
uchar seedbuf[4];
md5_begin(&m);
if (proper_seed_order) {
if (checksum_seed) {
SIVALu(seedbuf, 0, checksum_seed);
md5_update(&m, seedbuf, 4);
}
md5_update(&m, (uchar *)buf, len);
} else {
md5... | 0 | [] | rsync | eac858085e3ac94ec0ab5061d11f52652c90a869 | 149,253,552,079,365,850,000,000,000,000,000,000,000 | 58 | Add compat flag to allow proper seed checksum order.
Fixes the equivalent of librsync's CVE-2014-8242 issue. |
QPDFPageObjectHelper::getMatrixForTransformations(bool invert)
{
QPDFObjectHandle::Matrix matrix(1, 0, 0, 1, 0, 0);
QPDFObjectHandle bbox = getTrimBox(false);
if (! bbox.isRectangle())
{
return matrix;
}
QPDFObjectHandle rotate_obj = getAttribute("/Rotate", false);
QPDFObjectHandle s... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 294,137,983,667,751,800,000,000,000,000,000,000,000 | 54 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
const unsigned char *limit, SSL_SESSION **ret)
{
/* Point after session ID in client hello */
const unsigned char *p = session_id + len;
unsigned short i;
*ret = NULL;
s->tlsext_ticket_expected = 0;
/*
... | 0 | [
"CWE-190"
] | openssl | a004e72b95835136d3f1ea90517f706c24c03da7 | 291,464,296,431,130,100,000,000,000,000,000,000,000 | 88 | Avoid some undefined pointer arithmetic
A common idiom in the codebase is:
if (p + len > limit)
{
return; /* Too long */
}
Where "p" points to some malloc'd data of SIZE bytes and
limit == p + SIZE
"len" here could be from some externally supplied data (e.g. from a TLS
message).
The rules of C pointer arithmet... |
SproutNote::SproutNote() {
a_pk = random_uint256();
rho = random_uint256();
r = random_uint256();
} | 0 | [
"CWE-755",
"CWE-787"
] | zcash | c1fbf8ab5d73cff5e1f45236995857c75ba4128d | 240,441,568,797,140,000,000,000,000,000,000,000,000 | 5 | Ignore exceptions when deserializing note plaintexts |
static int sctp_setsockopt_adaptation_layer(struct sock *sk, char __user *optval,
unsigned int optlen)
{
struct sctp_setadaptation adaptation;
if (optlen != sizeof(struct sctp_setadaptation))
return -EINVAL;
if (copy_from_user(&adaptation, optval, optlen))
return -EFAULT;
sctp_sk(sk)->adaptation_ind ... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 205,804,422,300,848,200,000,000,000,000,000,000,000 | 14 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static void qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
{
switch (le32_to_cpu(ext->cmd.type)) {
case QXL_CMD_SURFACE:
{
QXLSurfaceCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);
uint32_t id = le32_to_cpu(cmd->surface_id);
PANIC_ON(id >= NUM_SURFACES);... | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 217,249,818,955,611,020,000,000,000,000,000,000,000 | 32 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
smb2_get_enc_key(struct TCP_Server_Info *server, __u64 ses_id, int enc, u8 *key)
{
struct cifs_ses *ses;
u8 *ses_enc_key;
spin_lock(&cifs_tcp_ses_lock);
list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
if (ses->Suid == ses_id) {
... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 203,075,107,506,638,050,000,000,000,000,000,000,000 | 21 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
static int csnmp_config_add_data_instance(data_definition_t *dd,
oconfig_item_t *ci) {
char buffer[DATA_MAX_NAME_LEN];
int status;
status = cf_util_get_string_buffer(ci, buffer, sizeof(buffer));
if (status != 0)
return status;
if (dd->is_table) {
/* Instance... | 0 | [
"CWE-415"
] | collectd | d16c24542b2f96a194d43a73c2e5778822b9cb47 | 87,960,695,689,091,220,000,000,000,000,000,000,000 | 24 | snmp plugin: Fix double free of request PDU
snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org> |
int HttpDownstreamConnection::noop() { return 0; } | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 304,192,849,730,947,040,000,000,000,000,000,000,000 | 1 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
Log_to_csv_event_handler::~Log_to_csv_event_handler()
{
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 159,483,869,853,216,860,000,000,000,000,000,000,000 | 3 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
{
uint8_t **p = ptr;
if (min_size > SIZE_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
av_freep(p);
*size = 0;
return;
}
if (!ff_fast_malloc(p, size, min_size + FF_INPUT_BUFFER_PADDING_SIZE, 1))
memset(*p ... | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 115,557,815,116,687,640,000,000,000,000,000,000,000 | 11 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
GF_Err gf_isom_get_track_matrix(GF_ISOFile *the_file, u32 trackNumber, u32 matrix[9])
{
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !trak->Header) return GF_BAD_PARAM;
memcpy(matrix, trak->Header->matrix, sizeof(trak->Header->matrix));
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 135,548,964,937,187,290,000,000,000,000,000,000,000 | 7 | fixed #2120 |
MagickPrivate void ConvertRGBToHSI(const double red,const double green,
const double blue,double *hue,double *saturation,double *intensity)
{
double
alpha,
beta;
/*
Convert RGB to HSI colorspace.
*/
assert(hue != (double *) NULL);
assert(saturation != (double *) NULL);
assert(intensity != (do... | 0 | [
"CWE-369"
] | ImageMagick | fbd9a963db1ae5551c45dc8af57db0abd7695774 | 45,943,125,651,981,760,000,000,000,000,000,000,000 | 28 | https://github.com/ImageMagick/ImageMagick/issues/3077 |
parse_char_class(Node** np, Node** asc_np, OnigToken* tok, UChar** src, UChar* end,
ScanEnv* env)
{
int r, neg, len, fetched, and_start;
OnigCodePoint v, vs;
UChar *p;
Node* node;
Node* asc_node;
CClassNode *cc, *prev_cc;
CClassNode *asc_cc, *asc_prev_cc;
CClassNode work_cc, asc_work_cc;
enum CCST... | 0 | [
"CWE-125"
] | Onigmo | 29e7e6aedebafd5efbbd90655c8e0d495035d7b4 | 150,432,889,701,649,220,000,000,000,000,000,000,000 | 379 | bug: Fix out of bounds read
Add boundary check before PFETCH.
Based on the following commits on https://github.com/kkos/oniguruma ,
but not the same.
* 68c395576813b3f9812427f94d272bcffaca316c
* dc0a23eb16961f98d2a5a2128d18bd4602058a10
* 5186c7c706a7f280110e6a0b060f87d0f7d790ce
* 562bf4825b301693180c674994bf708b28b0... |
option_system_no_talk_name_cb (const gchar *option_name,
const gchar *value,
gpointer data,
GError **error)
{
FlatpakContext *context = data;
if (!flatpak_verify_dbus_name (value, error))
return FALSE;
flatp... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b | 59,282,036,481,372,250,000,000,000,000,000,000,000 | 13 | context: Add --env-fd option
This allows environment variables to be added to the context without
making their values visible to processes running under a different uid,
which might be significant if the variable's value is a token or some
other secret value.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of... |
snmp_split_pdu(netsnmp_pdu *pdu, int skip_count, int copy_count)
{
netsnmp_pdu *newpdu;
newpdu = _clone_pdu_header(pdu);
newpdu = _copy_pdu_vars(pdu, newpdu, 0, /* don't drop any variables */
skip_count, copy_count);
return newpdu;
} | 0 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 34,195,618,722,717,490,000,000,000,000,000,000,000 | 9 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. |
GF_Box *iinf_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ItemInfoBox, GF_ISOM_BOX_TYPE_IINF);
tmp->item_infos = gf_list_new();
return (GF_Box *)tmp;
} | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 286,495,493,894,464,950,000,000,000,000,000,000,000 | 6 | fixed #1786 (fuzz) |
GF_Err ctts_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
u32 sampleCount;
GF_CompositionOffsetBox *ptr = (GF_CompositionOffsetBox *)s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->nb_entries > ptr->size / 8 || (u64)ptr->nb_entries > (u64)SIZE_MAX/sizeof(GF_DttsEntry) ) {
GF_LOG... | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 198,985,166,492,322,000,000,000,000,000,000,000,000 | 35 | fixed #2046 |
int dtls1_send_client_certificate(SSL *s)
{
X509 *x509=NULL;
EVP_PKEY *pkey=NULL;
int i;
unsigned long l;
if (s->state == SSL3_ST_CW_CERT_A)
{
if ((s->cert == NULL) ||
(s->cert->key->x509 == NULL) ||
(s->cert->key->privatekey == NULL))
s->state=SSL3_ST_CW_CERT_B;
else
s->state=SSL3_ST_CW_CERT_C... | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 8,105,474,867,117,511,000,000,000,000,000,000,000 | 80 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
static int rps_ipi_queued(struct softnet_data *sd)
{
#ifdef CONFIG_RPS
struct softnet_data *mysd = &__get_cpu_var(softnet_data);
if (sd != mysd) {
sd->rps_ipi_next = mysd->rps_ipi_list;
mysd->rps_ipi_list = sd;
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
return 1;
}
#endif /* CONFIG_RPS */
return 0;
} | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 238,921,248,708,240,300,000,000,000,000,000,000,000 | 15 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
long kvm_arch_dev_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
if (ioctl == KVM_S390_ENABLE_SIE)
return s390_enable_sie();
return -EINVAL;
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 237,290,385,343,765,930,000,000,000,000,000,000,000 | 7 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
au_remove_cmds(AutoPat *ap)
{
AutoCmd *ac;
for (ac = ap->cmds; ac != NULL; ac = ac->next)
VIM_CLEAR(ac->cmd);
au_need_clean = TRUE;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089 | 339,832,392,432,749,740,000,000,000,000,000,000,000 | 8 | patch 9.0.0061: ml_get error with nested autocommand
Problem: ml_get error with nested autocommand.
Solution: Also check line numbers for a nested autocommand. (closes #10761) |
static int cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)
{
int sx = 0, sy = 0;
int dx = 0, dy = 0;
int depth = 0;
int notify = 0;
/* make sure to only copy if it's a plain copy ROP */
if (*s->cirrus_rop == cirrus_bitblt_rop_fwd_src ||
*s->cirrus_rop == cirrus_bitblt_... | 0 | [
"CWE-125"
] | qemu | f153b563f8cf121aebf5a2fff5f0110faf58ccb3 | 131,478,015,534,790,410,000,000,000,000,000,000,000 | 74 | cirrus: handle negative pitch in cirrus_invalidate_region()
cirrus_invalidate_region() calls memory_region_set_dirty()
on a per-line basis, always ranging from off_begin to
off_begin+bytesperline. With a negative pitch off_begin
marks the top most used address and thus we need to do an
initial shift backwards by a lin... |
hashTableIterNext(HASH_TABLE_ITER *iter) {
while (iter->p != iter->end) {
NAMED *tem = *(iter->p)++;
if (tem)
return tem;
}
return NULL;
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 24,846,538,810,742,630,000,000,000,000,000,000,000 | 8 | xmlparse.c: Deny internal entities closing the doctype |
bool fuse_write_update_size(struct inode *inode, loff_t pos)
{
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_inode *fi = get_fuse_inode(inode);
bool ret = false;
spin_lock(&fc->lock);
fi->attr_version = ++fc->attr_version;
if (pos > inode->i_size) {
i_size_write(inode, pos);
ret = true;
}
spin_u... | 0 | [
"CWE-399",
"CWE-835"
] | linux | 3ca8138f014a913f98e6ef40e939868e1e9ea876 | 307,333,315,120,276,500,000,000,000,000,000,000,000 | 16 | fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by c... |
SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
{
struct fd f = fdget(fd);
int error = -EBADF;
if (!f.file)
goto out;
error = mnt_want_write_file(f.file);
if (error)
goto out_fput;
audit_inode(NULL, f.file->f_path.dentry, 0);
error = chown_common(&f.file->f_path, user, group);
mnt_dro... | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 142,435,743,459,925,900,000,000,000,000,000,000,000 | 19 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static void opj_get_all_encoding_parameters(const opj_image_t *p_image,
const opj_cp_t *p_cp,
OPJ_UINT32 tileno,
OPJ_UINT32 * p_tx0,
OPJ_UINT32 * p_tx1,
OPJ_UINT32 * p_ty0,
OPJ_UINT32 * p_ty1,
OPJ_UINT32 * p_dx_min,
OPJ_UINT32 * p_dy_min,
OPJ_UINT3... | 1 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 144,865,729,773,668,080,000,000,000,000,000,000,000 | 131 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
{
// This function calculates the ordering of objects, divides them
// into the appropriate parts, and computes some values for the
// linearization parameter dictionary and hint tables. The file
// must be optimized (via ca... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 93,901,887,257,931,330,000,000,000,000,000,000,000 | 590 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
ngx_mail_verify_cert(ngx_mail_session_t *s, ngx_connection_t *c)
{
long rc;
X509 *cert;
ngx_mail_ssl_conf_t *sslcf;
ngx_mail_core_srv_conf_t *cscf;
sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module);
if (!sslcf->verify) {
retu... | 0 | [
"CWE-284",
"CWE-295"
] | nginx | 173f16f736c10eae46cd15dd861b04b82d91a37a | 18,636,993,469,565,625,000,000,000,000,000,000,000 | 62 | Mail: max_errors directive.
Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands
in Exim, specifies the number of errors after which the connection is closed. |
http_escape_string (const char *string, const char *specials)
{
int n;
char *buf;
n = insert_escapes (NULL, string, specials);
buf = xtrymalloc (n+1);
if (buf)
{
insert_escapes (buf, string, specials);
buf[n] = 0;
}
return buf;
} | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 208,996,079,478,463,080,000,000,000,000,000,000,000 | 14 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
static inline uint16_t vring_desc_flags(hwaddr desc_pa, int i)
{
hwaddr pa;
pa = desc_pa + sizeof(VRingDesc) * i + offsetof(VRingDesc, flags);
return lduw_phys(&address_space_memory, pa);
} | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 128,129,108,339,582,120,000,000,000,000,000,000,000 | 6 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
int CServerBan::BanAddr(const NETADDR *pAddr, int Seconds, const char *pReason)
{
return BanExt(&m_BanAddrPool, pAddr, Seconds, pReason);
} | 0 | [
"CWE-20"
] | teeworlds | a766cb44bcffcdb0b88e776d01c5ee1323d44f85 | 86,261,538,184,927,280,000,000,000,000,000,000,000 | 4 | fixed a server crash |
parse_range_dec64(const char **str_num, uint8_t dig, int64_t *num)
{
const char *ptr;
int minus = 0;
int64_t ret = 0;
int8_t str_exp, str_dig = -1, trailing_zeros = 0;
ptr = *str_num;
if (ptr[0] == '-') {
minus = 1;
++ptr;
} else if (ptr[0] == '+') {
++ptr;
}
... | 0 | [
"CWE-617"
] | libyang | 5ce30801f9ccc372bbe9b7c98bb5324b15fb010a | 199,923,603,041,239,320,000,000,000,000,000,000,000 | 95 | schema tree BUGFIX freeing nodes with no module set
Context must be passed explicitly for these cases.
Fixes #1452 |
TEST(RegexMatchExpression, MalformedRegexAcceptedButMatchesNothing) {
RegexMatchExpression regex("a", "[(*ACCEPT)", "");
ASSERT_FALSE(regex.matchesBSON(BSON("a"
<< "")));
ASSERT_FALSE(regex.matchesBSON(BSON("a"
<< "[")));
} | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 53,344,960,387,358,330,000,000,000,000,000,000,000 | 7 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
struct mm_struct *mm_for_maps(struct task_struct *task)
{
struct mm_struct *mm;
int err;
err = mutex_lock_killable(&task->signal->cred_guard_mutex);
if (err)
return ERR_PTR(err);
mm = get_task_mm(task);
if (mm && mm != current->mm &&
!ptrace_may_access(task, PTRACE_MODE_READ)) {
mmput(mm);
mm = ERR_PT... | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 62,186,124,447,195,610,000,000,000,000,000,000,000 | 19 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
StringVal EncryptionFunctions::aes_decrypt(FunctionContext* ctx, const StringVal& src,
const StringVal& key) {
return aes_decrypt(ctx, src, key, StringVal::null(), StringVal("AES_128_ECB"));
} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 209,464,642,906,283,000,000,000,000,000,000,000,000 | 4 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static GF_Err nhmldmx_init_parsing(GF_Filter *filter, GF_NHMLDmxCtx *ctx)
{
GF_Err e;
Bool inRootOD;
u32 i, tkID, mtype, streamType, codecid, specInfoSize, par_den, par_num;
GF_XMLAttribute *att;
u32 width, height, codec_tag, sample_rate, nb_channels, version, revision, vendor_code, temporal_quality, spatial_qual... | 0 | [
"CWE-787"
] | gpac | 74695dea7278e78af3db467e586233fe8773c07e | 47,636,465,621,100,880,000,000,000,000,000,000,000 | 475 | fixed #1910 #1911 |
static unsigned int rgb_to_pixel16_dup(unsigned int r, unsigned int g, unsigned b)
{
unsigned int col;
col = rgb_to_pixel16(r, g, b);
col |= col << 16;
return col;
} | 0 | [
"CWE-200"
] | qemu | c1b886c45dc70f247300f549dce9833f3fa2def5 | 140,120,652,599,655,240,000,000,000,000,000,000,000 | 7 | vbe: rework sanity checks
Plug a bunch of holes in the bochs dispi interface parameter checking.
Add a function doing verification on all registers. Call that
unconditionally on every register write. That way we should catch
everything, even changing one register affecting the valid range of
another register.
Some ... |
static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
u32 idx, u64 offset, u64 length,
u32 *op_status, int opnum, int error)
{
struct nfs4_ff_layout_mirror *mirror;
u32 status = *op_status;
int err;
if (status == 0) {
switch (error) {
case -ETIMEDOUT:
case -EPFNOSUPPORT:
case ... | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 220,799,155,530,918,800,000,000,000,000,000,000,000 | 58 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.