func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bind_unix_address(int sock_fd, const char *addr, int flags)
{
union sockaddr_all saddr;
if (snprintf(saddr.un.sun_path, sizeof (saddr.un.sun_path), "%s", addr) >=
sizeof (saddr.un.sun_path)) {
DEBUG_LOG("Unix socket path %s too long", addr);
return 0;
}
saddr.un.sun_family = AF_UNIX;
if (!UTI_... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 288,639,177,411,089,980,000,000,000,000,000,000,000 | 28 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
bool samdb_set_ntds_invocation_id(struct ldb_context *ldb, const struct GUID *invocation_id_in)
{
return samdb_set_ntds_GUID(ldb,
invocation_id_in,
"invocationId",
"cache.invocation_id");
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 329,101,249,684,962,950,000,000,000,000,000,000,000 | 7 | 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... |
char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) /* {{{ */
{
xmlURI *uri;
xmlChar *escsource;
char *file_dest;
int isFileUri = 0;
uri = xmlCreateURI();
escsource = xmlURIEscapeStr(source, ":");
xmlParseURIReference(uri, escsource);
xmlFree(escsource);
if (ur... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 34,572,095,136,904,980,000,000,000,000,000,000,000 | 52 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
static int whereLoopCheaperProperSubset(
const WhereLoop *pX, /* First WhereLoop to compare */
const WhereLoop *pY /* Compare against this WhereLoop */
){
int i, j;
if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
return 0; /* X is not a subset of Y */
}
if( pX->rRun>pY->rRun && pX->nOut... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 17,582,084,229,870,411,000,000,000,000,000,000,000 | 23 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
bool is_update_query(enum enum_sql_command command)
{
DBUG_ASSERT(command <= SQLCOM_END);
return (sql_command_flags[command] & CF_CHANGES_DATA) != 0;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 141,097,663,831,455,870,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 xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
unsigned int *size)
{
const struct xt_match *match = m->u.kernel.match;
struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m;
int pad, off = xt_compat_match_offset(match);
u_int16_t msize = cm->u.user.match_size;
char... | 1 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 25,705,493,760,357,324,000,000,000,000,000,000,000 | 28 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
int ssh_client_dh_init(ssh_session session){
ssh_string e = NULL;
int rc;
if (ssh_dh_generate_x(session) < 0) {
goto error;
}
if (ssh_dh_generate_e(session) < 0) {
goto error;
}
e = ssh_dh_get_e(session);
if (e == NULL) {
goto error;
}
rc = ssh_buffer_pack(session->out_buffer, "bS", S... | 0 | [
"CWE-200"
] | libssh | 4e6ff36a9a3aef72aa214f6fb267c28953b80060 | 6,748,257,323,776,404,000,000,000,000,000,000,000 | 35 | dh: Fix CVE-2016-0739
Due to a byte/bit confusion, the DH secret was too short. This file was
completely reworked and will be commited in a future version.
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org> |
Item_func_if::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
args[0]->top_level_item();
if (Item_func::fix_fields(thd, ref))
return 1;
return 0;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 80,051,967,547,767,945,000,000,000,000,000,000,000 | 10 | 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 ... |
ldns_str2rdf_hip(ldns_rdf **rd, const char *str)
{
const char *hit = strchr(str, ' ') + 1;
const char *pk = hit == NULL ? NULL : strchr(hit, ' ') + 1;
size_t hit_size = hit == NULL ? 0
: pk == NULL ? strlen(hit) : (size_t) (pk - hit) - 1;
size_t pk_size = pk == NULL ? 0 : strlen(pk);
size_t hi... | 0 | [] | ldns | 3bdeed02505c9bbacb3b64a97ddcb1de967153b7 | 333,104,584,188,539,620,000,000,000,000,000,000,000 | 90 | bugfix #1257: Free after reallocing to 0 size
Thanks Stephan Zeisberg |
ImageChecker::ImageChecker(int n) :
Pipeline("image checker", 0),
n(n),
offset(0),
okay(true)
{
} | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 3,424,901,979,875,117,000,000,000,000,000,000,000 | 7 | 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 ... |
static void sctp_process_ext_param(struct sctp_association *asoc,
union sctp_params param)
{
__u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr);
int i;
for (i = 0; i < num_ext; i++) {
switch (param.ext->chunks[i]) {
case SCTP_CID_RECONF:
if (asoc->ep->reconf_enable)
asoc->peer.r... | 0 | [
"CWE-704"
] | linux | a2d859e3fc97e79d907761550dbc03ff1b36479c | 41,423,770,001,234,960,000,000,000,000,000,000,000 | 37 | sctp: account stream padding length for reconf chunk
sctp_make_strreset_req() makes repeated calls to sctp_addto_chunk()
which will automatically account for padding on each call. inreq and
outreq are already 4 bytes aligned, but the payload is not and doing
SCTP_PAD4(a + b) (which _sctp_make_chunk() did implicitly he... |
long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum ucount_type type)
{
/* Caller must hold a reference to ucounts */
struct ucounts *iter;
long max = LONG_MAX;
long dec, ret = 0;
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
long new = atomic_long_add_return(1, &iter->ucount[type]);
if (new < ... | 0 | [
"CWE-416"
] | linux | f9d87929d451d3e649699d0f1d74f71f77ad38f5 | 307,623,114,151,794,800,000,000,000,000,000,000,000 | 31 | ucount: Make get_ucount a safe get_user replacement
When the ucount code was refactored to create get_ucount it was missed
that some of the contexts in which a rlimit is kept elevated can be
the only reference to the user/ucount in the system.
Ordinary ucount references exist in places that also have a reference
to ... |
int nghttp2_session_close_stream(nghttp2_session *session, int32_t stream_id,
uint32_t error_code) {
int rv;
nghttp2_stream *stream;
nghttp2_mem *mem;
int is_my_stream_id;
mem = &session->mem;
stream = nghttp2_session_get_stream(session, stream_id);
if (!stream) {
re... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 46,558,729,132,128,520,000,000,000,000,000,000,000 | 87 | Add nghttp2_option_set_max_outbound_ack |
int streamParseIntervalIDOrReply(client *c, robj *o, streamID *id, int *exclude, uint64_t missing_seq) {
char *p = o->ptr;
size_t len = sdslen(p);
int invalid = 0;
if (exclude != NULL) *exclude = (len > 1 && p[0] == '(');
if (exclude != NULL && *exclude) {
robj *t = createStringObject(p... | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 270,220,101,636,750,550,000,000,000,000,000,000,000 | 16 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info,
ExceptionInfo *exception)
{
const char
*option;
const StringInfo
*layer_info;
Image
*layers;
PSDInfo
info;
register ssize_t
i;
if (GetImageListLength(image) != 1)
return;
if ((image_info->number_sc... | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 98,631,721,882,054,000,000,000,000,000,000,000,000 | 85 | Fix ultra rare but potential memory-leak |
GlyphCache::Loader::Loader(const Face & face, const bool dumb_font)
: _head(face, Tag::head),
_hhea(face, Tag::hhea),
_hmtx(face, Tag::hmtx),
_glyf(face, Tag::glyf),
_loca(face, Tag::loca),
_long_fmt(false),
_has_boxes(false),
_num_glyphs_graphics(0),
_num_glyphs_attributes(0),
_num_attrs(0)
{
if ... | 1 | [
"CWE-476"
] | graphite | db132b4731a9b4c9534144ba3a18e65b390e9ff6 | 103,601,340,989,818,290,000,000,000,000,000,000,000 | 74 | Deprecate and make ineffective gr_face_dumbRendering |
void xmlrpc_process(char *buffer, void *userdata)
{
int retVal = 0;
XMLRPCCmd *current = NULL;
XMLRPCCmd *xml;
char *tmp;
int ac;
char **av = NULL;
char *name = NULL;
xmlrpc_error_code = 0;
if (!buffer)
{
xmlrpc_error_code = -1;
return;
}
tmp = xmlrpc_parse(buffer);
if (tmp)
{
name = xmlrpc_metho... | 0 | [
"CWE-119",
"CWE-787"
] | atheme | 87580d767868360d2fed503980129504da84b63e | 132,751,582,991,001,980,000,000,000,000,000,000,000 | 73 | Do not copy more bytes than were allocated |
void LIRGenerator::do_FmaIntrinsic(Intrinsic* x) {
assert(x->number_of_arguments() == 3, "wrong type");
assert(UseFMA, "Needs FMA instructions support.");
LIRItem value(x->argument_at(0), this);
LIRItem value1(x->argument_at(1), this);
LIRItem value2(x->argument_at(2), this);
value2.set_destroys_register()... | 0 | [] | jdk17u | 268c0159253b3de5d72eb826ef2329b27bb33fea | 149,096,133,673,710,340,000,000,000,000,000,000,000 | 25 | 8272014: Better array indexing
Reviewed-by: thartmann
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
TPM2B_ECC_POINT_Unmarshal(TPM2B_ECC_POINT *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
INT32 startSize;
if (rc == TPM_RC_SUCCESS) {
rc = UINT16_Unmarshal(&target->size, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
if (target->size == 0) {
rc = TPM_RC_SIZE;
}
}
... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 97,132,095,904,939,780,000,000,000,000,000,000,000 | 27 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
int ssl3_client_hello(SSL *s)
{
unsigned char *buf;
unsigned char *p, *d;
int i;
unsigned long l;
int al = 0;
#ifndef OPENSSL_NO_COMP
int j;
SSL_COMP *comp;
#endif
buf = (unsigned char *)s->init_buf->data;
if (s->state == SSL3_ST_CW_CLNT_HELLO_A) {
SSL_SESSION *sess = s->ses... | 0 | [
"CWE-310"
] | openssl | e1b568dd2462f7cacf98f3d117936c34e2849a6b | 74,466,768,420,708,840,000,000,000,000,000,000,000 | 204 | Prevent handshake with unseeded PRNG
Fix security issue where under certain conditions a client can complete a
handshake with an unseeded PRNG. The conditions are:
- Client is on a platform where the PRNG has not been seeded, and the
user has not seeded manually
- A protocol specific client method version has been use... |
void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{
unsigned type = field->report_type;
struct hiddev_usage_ref uref;
uref.report_type =
(type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT :
((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 93a2001bdfd5376c3dc2158653034c20392d15c5 | 242,007,171,307,014,450,000,000,000,000,000,000,000 | 18 | HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap... |
mwifiex_cmd_uap_sys_config(struct host_cmd_ds_command *cmd, u16 cmd_action,
u32 type, void *cmd_buf)
{
u8 *tlv;
u16 cmd_size, param_size, ie_size;
struct host_cmd_ds_sys_config *sys_cfg;
cmd->command = cpu_to_le16(HostCmd_CMD_UAP_SYS_CONFIG);
cmd_size = (u16)(sizeof(struct host_cmd_ds_sys_config) + S_DS_GEN... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 7caac62ed598a196d6ddf8d9c121e12e082cac3a | 162,959,364,399,517,900,000,000,000,000,000,000,000 | 32 | mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and
mwifiex_set_wmm_params() call memcpy() without checking
the destination size.Since the source is given from
user-space, this may trigger a heap buffer overflow.
Fix them by putting the length... |
void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
{
unsigned long flags;
struct rq *rq;
rq = task_rq_lock(p, &flags);
BUG_ON(p->state != TASK_RUNNING);
update_rq_clock(rq);
p->prio = effective_prio(p);
if (!p->sched_class->task_new || !current->se.on_rq) {
activate_task(rq, p, 0);
} e... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 180,762,825,580,241,700,000,000,000,000,000,000,000 | 28 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static int rtreeDestroy(sqlite3_vtab *pVtab){
Rtree *pRtree = (Rtree *)pVtab;
int rc;
char *zCreate = sqlite3_mprintf(
"DROP TABLE '%q'.'%q_node';"
"DROP TABLE '%q'.'%q_rowid';"
"DROP TABLE '%q'.'%q_parent';",
pRtree->zDb, pRtree->zName,
pRtree->zDb, pRtree->zName,
pRtree->zDb, pRtree->zN... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 301,340,653,434,808,670,000,000,000,000,000,000,000 | 24 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
static void snd_msndmidi_input_drop(struct snd_msndmidi *mpu)
{
u16 tail;
tail = readw(mpu->dev->MIDQ + JQS_wTail);
writew(tail, mpu->dev->MIDQ + JQS_wHead);
} | 0 | [
"CWE-125",
"CWE-401"
] | linux | 20e2b791796bd68816fa115f12be5320de2b8021 | 159,203,079,567,773,150,000,000,000,000,000,000,000 | 7 | ALSA: msnd: Optimize / harden DSP and MIDI loops
The ISA msnd drivers have loops fetching the ring-buffer head, tail
and size values inside the loops. Such codes are inefficient and
fragile.
This patch optimizes it, and also adds the sanity check to avoid the
endless loops.
Bugzilla: https://bugzilla.kernel.org/sho... |
void CModule::OnPart(const CNick& Nick, CChan& Channel,
const CString& sMessage) {} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 130,237,976,263,680,170,000,000,000,000,000,000,000 | 2 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static int rtw_wx_set_gen_ie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct adapter *padapter = rtw_netdev_priv(dev);
return rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
} | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 323,635,544,258,581,500,000,000,000,000,000,000,000 | 8 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *in_mont)
{
int i, bits, ret = 0, window, wvalue;
int top;
BN_MONT_CTX *mont = NULL;
int numPowers;
unsigned char *powerb... | 1 | [
"CWE-200"
] | openssl | 8fc8f486f7fa098c9fbb6a6ae399e3c6856e0d87 | 112,276,394,203,481,420,000,000,000,000,000,000,000 | 496 | crypto/bn/x86_64-mont5.pl: constant-time gather procedure.
At the same time remove miniscule bias in final subtraction.
Performance penalty varies from platform to platform, and even with
key length. For rsa2048 sign it was observed to be 4% for Sandy
Bridge and 7% on Broadwell.
CVE-2016-0702
Reviewed-by: Richard Le... |
njs_vmcode_typeof(njs_vm_t *vm, njs_value_t *value, njs_value_t *invld)
{
/* ECMAScript 5.1: null, array and regexp are objects. */
static const njs_value_t *types[NJS_VALUE_TYPE_MAX] = {
&njs_string_object,
&njs_string_undefined,
&njs_string_boolean,
&njs_string_number,
... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 222d6fdcf0c6485ec8e175f3a7b70d650c234b4e | 333,119,091,731,278,220,000,000,000,000,000,000,000 | 38 | Fixed njs_vmcode_interpreter() when "toString" conversion fails.
Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens. This is not correct
because the current frame has to be unwound (or exception caught)
first.
The fix is exit through only 5 appropr... |
find_termcode(char_u *name)
{
int i;
for (i = 0; i < tc_len; ++i)
if (termcodes[i].name[0] == name[0] && termcodes[i].name[1] == name[1])
return termcodes[i].code;
return NULL;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 120,227,256,235,467,770,000,000,000,000,000,000,000 | 9 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
const std::string& backingString() const { return result_backing_string_; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 4,651,636,560,568,374,500,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... |
onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
OnigErrorInfo* einfo)
{
#define COMPILE_INIT_SIZE 20
int r, init_size;
Node* root;
ScanEnv scan_env;
#ifdef USE_CALL
UnsetAddrList uslist;
#endif
root = 0;
if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
#ifde... | 1 | [
"CWE-476"
] | oniguruma | 410f5916429e7d2920e1d4867388514f605413b8 | 272,992,931,985,823,230,000,000,000,000,000,000,000 | 169 | fix #87: Read unknown address in onig_error_code_to_str() |
static void print_tracking(struct kmem_cache *s, void *object)
{
unsigned long pr_time = jiffies;
if (!(s->flags & SLAB_STORE_USER))
return;
print_track("Allocated", get_track(s, object, TRACK_ALLOC), pr_time);
print_track("Freed", get_track(s, object, TRACK_FREE), pr_time);
} | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 113,733,309,295,805,080,000,000,000,000,000,000,000 | 9 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
const AST *ast_nil(const loc_t &loc)
{
return new AST(loc, AST::NIL);
} | 0 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 58,591,284,343,527,360,000,000,000,000,000,000,000 | 4 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
static int hwsim_register_received_nl(struct sk_buff *skb_2,
struct genl_info *info)
{
struct net *net = genl_info_net(info);
struct mac80211_hwsim_data *data;
int chans = 1;
spin_lock_bh(&hwsim_radio_lock);
list_for_each_entry(data, &hwsim_radios, list)
chans = max(chans, data->channels);
spin_unloc... | 0 | [
"CWE-703",
"CWE-772"
] | linux | 0ddcff49b672239dda94d70d0fcf50317a9f4b51 | 137,383,824,941,503,900,000,000,000,000,000,000,000 | 30 | mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <we... |
int crypt_dump(struct crypt_device *cd)
{
if (!cd)
return -EINVAL;
if (isLUKS1(cd->type))
return _luks_dump(cd);
else if (isLUKS2(cd->type))
return LUKS2_hdr_dump(cd, &cd->u.luks2.hdr);
else if (isVERITY(cd->type))
return _verity_dump(cd);
else if (isTCRYPT(cd->type))
return TCRYPT_dump(cd, &cd->u.tcrypt... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 155,242,137,282,661,400,000,000,000,000,000,000,000 | 20 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
static void destroy_pit_timer(struct kvm_pit *pit)
{
hrtimer_cancel(&pit->pit_state.timer);
flush_kthread_work(&pit->expired);
} | 0 | [
"CWE-362"
] | kvm | 2febc839133280d5a5e8e1179c94ea674489dae2 | 264,048,104,072,248,000,000,000,000,000,000,000,000 | 5 | KVM: x86: Improve thread safety in pit
There's a race condition in the PIT emulation code in KVM. In
__kvm_migrate_pit_timer the pit_timer object is accessed without
synchronization. If the race condition occurs at the wrong time this
can crash the host kernel.
This fixes CVE-2014-3611.
Cc: stable@vger.kernel.org
... |
xfs_agf_verify(
struct xfs_buf *bp)
{
struct xfs_mount *mp = bp->b_mount;
struct xfs_agf *agf = XFS_BUF_TO_AGF(bp);
if (xfs_sb_version_hascrc(&mp->m_sb)) {
if (!uuid_equal(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid))
return __this_address;
if (!xfs_log_check_lsn(mp,
be64_to_cpu(XFS_BUF_TO_AGF(bp)->agf_lsn... | 1 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | d0c7feaf87678371c2c09b3709400be416b2dc62 | 55,833,904,787,485,160,000,000,000,000,000,000,000 | 56 | xfs: add agf freeblocks verify in xfs_agf_verify
We recently used fuzz(hydra) to test XFS and automatically generate
tmp.img(XFS v5 format, but some metadata is wrong)
xfs_repair information(just one AG):
agf_freeblks 0, counted 3224 in ag 0
agf_longest 536874136, counted 3224 in ag 0
sb_fdblocks 613, counted 3228
T... |
Status CanonicalQuery::init(OperationContext* opCtx,
boost::intrusive_ptr<ExpressionContext> expCtx,
std::unique_ptr<QueryRequest> qr,
bool canHaveNoopMatchNodes,
std::unique_ptr<MatchExpression> root,
... | 0 | [
"CWE-755"
] | mongo | c8ced6df8f620daaa2e539f192f2eef356c63e9c | 248,536,925,388,790,800,000,000,000,000,000,000,000 | 53 | SERVER-47773 Error consistently when tailable cursors and $near are used together |
int imap_open_connection(struct ImapAccountData *adata)
{
if (mutt_socket_open(adata->conn) < 0)
return -1;
adata->state = IMAP_CONNECTED;
if (imap_cmd_step(adata) != IMAP_RES_OK)
{
imap_close_connection(adata);
return -1;
}
if (mutt_istr_startswith(adata->buf, "* OK"))
{
if (!mutt_istr... | 0 | [
"CWE-522",
"CWE-287",
"CWE-755"
] | neomutt | 9c36717a3e2af1f2c1b7242035455ec8112b4b06 | 72,296,476,132,372,140,000,000,000,000,000,000,000 | 98 | imap: close connection on all failures
Thanks to Gabriel Salles-Loustau for spotting the problem.
Co-authored-by: Kevin McCarthy <kevin@8t8.us> |
DU_cechoStatusString(Uint16 statusCode)
{
const char *s = NULL;
if (statusCode == STATUS_Success)
s = "Success";
else {
sprintf(staticBuf, "Unknown Status: 0x%x", (unsigned int)statusCode);
s = staticBuf;
}
return s;
} | 0 | [
"CWE-476",
"CWE-787"
] | dcmtk | 5c14bf53fb42ceca12bbcc0016e8704b1580920d | 323,454,348,852,433,400,000,000,000,000,000,000,000 | 12 | Fixed possible NULL pointer dereference.
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch. |
int jas_image_readcmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x,
jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height,
long *buf)
{
jas_image_cmpt_t *cmpt;
jas_image_coord_t i;
jas_image_coord_t j;
long v;
long *bufptr;
if (cmptno < 0 || cmptno >= image->numcmpts_)
goto error;... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 196,689,809,930,478,500,000,000,000,000,000,000,000 | 34 | 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... |
static void swap_byte(unsigned char &a, unsigned char &b)
{
unsigned char t;
t = a;
a = b;
b = t;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 163,220,528,643,256,900,000,000,000,000,000,000,000 | 8 | 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 ... |
static struct dentry *udf_get_parent(struct dentry *child)
{
struct kernel_lb_addr tloc;
struct inode *inode = NULL;
struct qstr dotdot = QSTR_INIT("..", 2);
struct fileIdentDesc cfi;
struct udf_fileident_bh fibh;
if (!udf_find_entry(child->d_inode, &dotdot, &fibh, &cfi))
return ERR_PTR(-EACCES);
if (fibh.sb... | 0 | [
"CWE-17"
] | linux | 0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14 | 266,445,818,429,331,760,000,000,000,000,000,000,000 | 22 | udf: Check path length when reading symlink
Symlink reading code does not check whether the resulting path fits into
the page provided by the generic code. This isn't as easy as just
checking the symlink size because of various encoding conversions we
perform on path. So we have to check whether there is still enough ... |
_set_batch_job_limits(slurm_msg_t *msg)
{
int i;
uint32_t alloc_lps = 0, last_bit = 0;
bool cpu_log = slurm_get_debug_flags() & DEBUG_FLAG_CPU_BIND;
slurm_cred_arg_t arg;
batch_job_launch_msg_t *req = (batch_job_launch_msg_t *)msg->data;
if (slurm_cred_get_args(req->cred, &arg) != SLURM_SUCCESS)
return;
req->... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 183,635,989,761,915,800,000,000,000,000,000,000,000 | 61 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
static int ocfs2_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
{
int ret;
struct buffer_head *di_bh = NULL;
struct inode *inode = mapping->host;
ret = ocfs2_inode_lock(inode, &di_bh, 1);
if (ret) {
mlog... | 0 | [
"CWE-20"
] | linux-2.6 | 272b62c1f0f6f742046e45b50b6fec98860208a0 | 252,642,286,191,463,340,000,000,000,000,000,000,000 | 42 | Treat writes as new when holes span across page boundaries
When a hole spans across page boundaries, the next write forces
a read of the block. This could end up reading existing garbage
data from the disk in ocfs2_map_page_blocks. This leads to
non-zero holes. In order to avoid this, mark the writes as new
when the h... |
Bool sg_rap_compare_entry(void *udta, void *entry)
{
u32 *num_leading_samples = (u32 *) udta;
if (*num_leading_samples == ((GF_VisualRandomAccessEntry *)entry)->num_leading_samples) return GF_TRUE;
return GF_FALSE;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 318,212,991,719,158,100,000,000,000,000,000,000,000 | 6 | fixed #1706 |
void ax25_clear_queues(ax25_cb *ax25)
{
skb_queue_purge(&ax25->write_queue);
skb_queue_purge(&ax25->ack_queue);
skb_queue_purge(&ax25->reseq_queue);
skb_queue_purge(&ax25->frag_queue);
} | 0 | [
"CWE-476"
] | linux | fc6d01ff9ef03b66d4a3a23b46fc3c3d8cf92009 | 130,954,409,471,246,670,000,000,000,000,000,000,000 | 7 | ax25: Fix NULL pointer dereferences in ax25 timers
The previous commit 7ec02f5ac8a5 ("ax25: fix NPD bug in ax25_disconnect")
move ax25_disconnect into lock_sock() in order to prevent NPD bugs. But
there are race conditions that may lead to null pointer dereferences in
ax25_heartbeat_expiry(), ax25_t1timer_expiry(), ax... |
static void *m_start(struct seq_file *seq, loff_t *ppos, struct uid_gid_map *map)
{
struct uid_gid_extent *extent = NULL;
loff_t pos = *ppos;
if (pos < map->nr_extents)
extent = &map->extent[pos];
return extent;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | e3211c120a85b792978bcb4be7b2886df18d27f0 | 221,289,179,429,691,720,000,000,000,000,000,000,000 | 10 | userns: Check uid_map's opener's fsuid, not the current fsuid
Signed-off-by: Andy Lutomirski <luto@amacapital.net> |
static int get_iovec_page_array(const struct iovec __user *iov,
unsigned int nr_vecs, struct page **pages,
struct partial_page *partial, int aligned)
{
int buffers = 0, error = 0;
down_read(¤t->mm->mmap_sem);
while (nr_vecs) {
unsigned long off, npages;
struct iovec entry;
void __user *base;
... | 0 | [
"CWE-94"
] | linux-2.6 | 712a30e63c8066ed84385b12edbfb804f49cbc44 | 230,196,709,563,596,800,000,000,000,000,000,000,000 | 98 | splice: fix user pointer access in get_iovec_page_array()
Commit 8811930dc74a503415b35c4a79d14fb0b408a361 ("splice: missing user
pointer access verification") added the proper access_ok() calls to
copy_from_user_mmap_sem() which ensures we can copy the struct iovecs
from userspace to the kernel.
But we also must chec... |
int git_path_diriter_next(git_path_diriter *diriter)
{
struct dirent *de;
const char *filename;
size_t filename_len;
bool skip_dot = !(diriter->flags & GIT_PATH_DIR_INCLUDE_DOT_AND_DOTDOT);
int error = 0;
assert(diriter);
errno = 0;
do {
if ((de = readdir(diriter->dir)) == NULL) {
if (!errno)
return... | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 276,948,067,073,128,930,000,000,000,000,000,000,000 | 45 | Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS
A little-known feature of NTFS is that it offers to store metadata in
so-called "Alternate Data Streams" (inspired by Apple's "resource
forks") that are copied together with the file they are associated with.
These Alternate Data Streams can be accessed ... |
static void get_cqs(enum ib_qp_type qp_type,
struct ib_cq *ib_send_cq, struct ib_cq *ib_recv_cq,
struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq)
{
switch (qp_type) {
case IB_QPT_XRC_TGT:
*send_cq = NULL;
*recv_cq = NULL;
break;
case MLX5_IB_QPT_REG_UMR:
case IB_QPT_XRC_INI:
*send_cq = ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 49,851,823,593,721,160,000,000,000,000,000,000,000 | 34 | 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 <... |
cirrus_hook_read_gr(CirrusVGAState * s, unsigned reg_index, int *reg_value)
{
switch (reg_index) {
case 0x00: // Standard VGA, BGCOLOR 0x000000ff
*reg_value = s->cirrus_shadow_gr0;
return CIRRUS_HOOK_HANDLED;
case 0x01: // Standard VGA, FGCOLOR 0x000000ff
*reg_value = s->cirrus_shadow_gr1;... | 0 | [
"CWE-787"
] | qemu | b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | 55,829,404,908,877,280,000,000,000,000,000,000,000 | 32 | CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow
I have just noticed that patch for CVE-2007-1320 has never been applied
to the QEMU CVS. Please find it below.
| Multiple heap-based buffer overflows in the cirrus_invalidate_region
| function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and
| possib... |
setval_internal (int comind, const char *com, const char *val)
{
assert (0 <= comind && ((size_t) comind) < countof (commands));
if ((unsigned) comind >= countof (commands))
return NULL;
DEBUGP (("Setting %s (%s) to %s\n", com, commands[comind].name, val));
return commands[comind].action (com, val, comman... | 0 | [
"CWE-200"
] | wget | c125d24762962d91050d925fbbd9e6f30b2302f8 | 249,792,016,415,108,020,000,000,000,000,000,000,000 | 10 | Don't use extended attributes (--xattr) by default
* src/init.c (defaults): Set enable_xattr to false by default
* src/main.c (print_help): Reverse option logic of --xattr
* doc/wget.texi: Add description for --xattr
Users may not be aware that the origin URL and Referer are saved
including credentials, and possibly ... |
static int snd_pcm_oss_plugin_clear(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_pcm_plugin *plugin, *next;
plugin = runtime->oss.plugin_first;
while (plugin) {
next = plugin->next;
snd_pcm_plugin_free(plugin);
plugin = next;
}
runtime->oss.plugin... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 296,539,299,016,694,370,000,000,000,000,000,000,000 | 14 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
void vmx_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
vmx_segment_cache_clear(vmx);
if (vmx->rmode.vm86_active && seg != VCPU_SREG_LDTR) {
vmx->rmode.segs[seg] = *var;
if (seg ... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 213,254,785,873,035,640,000,000,000,000,000,000,000 | 39 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
void FillFirstShaper(cmsS1Fixed14Number* Table, cmsToneCurve* Curve)
{
int i;
cmsFloat32Number R, y;
for (i=0; i < 256; i++) {
R = (cmsFloat32Number) (i / 255.0);
y = cmsEvalToneCurveFloat(Curve, R);
if (y < 131072.0)
Table[i] = DOUBLE_TO_1FIXED14(y);
else
... | 0 | [
"CWE-125"
] | Little-CMS | d41071eb8cfea7aa10a9262c12bd95d5d9d81c8f | 216,732,684,590,397,700,000,000,000,000,000,000,000 | 16 | Contributed fixes from Oracle
Two minor glitches |
Tally(int s, int * d) : size(s), mask(s - 1), max(0), data(d) {
memset(data, 0, sizeof(int)*size);
} | 0 | [
"CWE-125"
] | aspell | de29341638833ba7717bd6b5e6850998454b044b | 166,596,811,695,265,370,000,000,000,000,000,000,000 | 3 | Don't allow null-terminated UCS-2/4 strings using the original API.
Detect if the encoding is UCS-2/4 and the length is -1 in affected API
functions and refuse to convert the string. If the string ends up
being converted somehow, abort with an error message in DecodeDirect
and ConvDirect. To convert a null terminate... |
int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx)
{
return ctx->explicit_policy;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 288,866,345,057,588,400,000,000,000,000,000,000,000 | 4 | Backport OCSP fixes. |
void ext4_xattr_destroy_cache(struct mb_cache *cache)
{
if (cache)
mb_cache_destroy(cache);
} | 1 | [
"CWE-241",
"CWE-19"
] | linux | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | 17,050,123,385,719,096,000,000,000,000,000,000,000 | 5 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@sus... |
PackNetBSDElf32x86::generateElfHdr(
OutputFile *fo,
void const *proto,
unsigned const brka
)
{
super::generateElfHdr(fo, proto, brka);
cprElfHdr2 *const h2 = (cprElfHdr2 *)(void *)&elfout;
sz_elf_hdrs = sizeof(*h2) - sizeof(linfo);
unsigned note_offset = sz_elf_hdrs;
// Find the NetBSD... | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 163,867,753,204,594,730,000,000,000,000,000,000,000 | 105 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
archive_read_format_7zip_bid(struct archive_read *a, int best_bid)
{
const char *p;
/* If someone has already bid more than 32, then avoid
trashing the look-ahead buffers with a seek. */
if (best_bid > 32)
return (-1);
if ((p = __archive_read_ahead(a, 6, NULL)) == NULL)
return (0);
/* If first six bytes... | 0 | [
"CWE-190",
"CWE-125"
] | libarchive | e79ef306afe332faf22e9b442a2c6b59cb175573 | 33,214,394,291,494,657,000,000,000,000,000,000,000 | 51 | Issue #718: Fix TALOS-CAN-152
If a 7-Zip archive declares a rediculously large number of substreams,
it can overflow an internal counter, leading a subsequent memory
allocation to be too small for the substream data.
Thanks to the Open Source and Threat Intelligence project at Cisco
for reporting this issue. |
static void mincore_unmapped_range(struct vm_area_struct *vma,
unsigned long addr, unsigned long end,
unsigned char *vec)
{
unsigned long nr = (end - addr) >> PAGE_SHIFT;
int i;
if (vma->vm_file) {
pgoff_t pgoff;
pgoff = linear_page_index(vma, addr);
for (i = 0; i < nr; i++, pgoff++)
vec[i] = minc... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 331,928,296,913,122,150,000,000,000,000,000,000,000 | 18 | 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(... |
parse_codes(struct archive_read *a)
{
int i, j, val, n, r;
unsigned char bitlengths[MAX_SYMBOLS], zerocount, ppmd_flags;
unsigned int maxorder;
struct huffman_code precode;
struct rar *rar = (struct rar *)(a->format->data);
struct rar_br *br = &(rar->br);
free_codes(a);
/* Skip to the next byte */
r... | 0 | [
"CWE-119",
"CWE-787"
] | libarchive | 05caadc7eedbef471ac9610809ba683f0c698700 | 237,142,782,342,797,000,000,000,000,000,000,000,000 | 271 | Issue 719: Fix for TALOS-CAN-154
A RAR file with an invalid zero dictionary size was not being
rejected, leading to a zero-sized allocation for the dictionary
storage which was then overwritten during the dictionary initialization.
Thanks to the Open Source and Threat Intelligence project at Cisco for
reporting this... |
struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq)
{
struct rb_node *left = rb_first_cached(&cfs_rq->tasks_timeline);
if (!left)
return NULL;
return rb_entry(left, struct sched_entity, run_node);
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 32,227,990,399,096,057,000,000,000,000,000,000,000 | 9 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
static void parse_rotation_parameter(Options& o, std::string const& parameter)
{
std::string angle_str;
std::string range;
size_t colon = parameter.find(':');
int relative = 0;
if (colon != std::string::npos)
{
if (colon > 0)
{
angle_str = parameter.substr(0, colon);
... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 220,176,154,838,387,330,000,000,000,000,000,000,000 | 55 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
CNF_GetCorrectionTimeRatio(void)
{
return correction_time_ratio;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 100,958,916,521,052,200,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
*/
void do_get_replace_regex(struct st_command *command)
{
char *expr= command->first_argument;
free_replace_regex();
/* Allow variable for the *entire* list of replacements */
if (*expr == '$')
{
VAR *val= var_get(expr, NULL, 0, 1);
expr= val ? val->str_val : NULL;
}
if (expr && *expr && !(glob_... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 156,668,641,822,257,210,000,000,000,000,000,000,000 | 14 | 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... |
Network::FilterStatus ConnectionManagerImpl::onData(Buffer::Instance& data, bool) {
if (!codec_) {
codec_ = config_.createCodec(read_callbacks_->connection(), data, *this);
if (codec_->protocol() == Protocol::Http2) {
stats_.named_.downstream_cx_http2_total_.inc();
stats_.named_.downstream_cx_http... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 327,777,551,464,959,700,000,000,000,000,000,000,000 | 62 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static int nf_tables_fill_chain_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event, u32 flags,
int family, const struct nft_table *table,
const struct nft_chain *chain)
{
struct nlmsghdr *nlh;
event = nfnl_msg_type(NFNL_SUBSYS_NFTABLES, event);
nlh = nfnl_msg_put(sk... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 82,766,023,052,214,970,000,000,000,000,000,000,000 | 59 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
camel_imapx_server_list_sync (CamelIMAPXServer *is,
const gchar *pattern,
CamelStoreGetFolderInfoFlags flags,
GCancellable *cancellable,
GError **error)
{
CamelIMAPXCommand *ic;
gboolean success;
g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE);
g_return_val_if_fail (pat... | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 31,244,973,880,186,784,000,000,000,000,000,000,000 | 38 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
int main(int argc, char **argv) {
int i;
int prog_index = -1; // index in argv where the program command starts
int lockfd = -1;
int option_cgroup = 0;
int option_force = 0;
int custom_profile = 0; // custom profile loaded
char *custom_profile_dir = NULL; // custom profile directory
int arg_noprofile = 0; /... | 0 | [
"CWE-703"
] | firejail | 6b8dba29d73257311564ee7f27b9b14758cc693e | 246,457,801,389,050,530,000,000,000,000,000,000,000 | 1,817 | security fix |
static inline bool arch_destroys_dst(const char *arch) {
return (STR_EQUAL(arch, "arm") || STR_EQUAL(arch, "riscv") || STR_EQUAL(arch, "ppc"));
} | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 144,623,793,140,270,570,000,000,000,000,000,000,000 | 3 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
init_ctx_reselect(OM_uint32 *minor_status, spnego_gss_ctx_id_t sc,
OM_uint32 acc_negState, gss_OID supportedMech,
gss_buffer_t *responseToken, gss_buffer_t *mechListMIC,
OM_uint32 *negState, send_token_flag *tokflag)
{
OM_uint32 tmpmin;
size_t i;
gss_delete_sec_context(&tmpmin, &sc->ctx_handle,
... | 0 | [
"CWE-18",
"CWE-763"
] | krb5 | b51b33f2bc5d1497ddf5bd107f791c101695000d | 108,998,901,134,059,680,000,000,000,000,000,000,000 | 39 | Fix SPNEGO context aliasing bugs [CVE-2015-2695]
The SPNEGO mechanism currently replaces its context handle with the
mechanism context handle upon establishment, under the assumption that
most GSS functions are only called after context establishment. This
assumption is incorrect, and can lead to aliasing violations ... |
int util_log_priority(const char *priority)
{
char *endptr;
int prio;
prio = strtol(priority, &endptr, 10);
if (endptr[0] == '\0')
return prio;
if (strncasecmp(priority, "err", 3) == 0)
return LOG_ERR;
if (strcasecmp(priority, "info") == 0)
return LOG_INFO;
if (strcasecmp(priority, "debug") == 0)
return... | 0 | [
"CWE-120"
] | udev | 662c3110803bd8c1aedacc36788e6fd028944314 | 273,694,481,383,066,360,000,000,000,000,000,000,000 | 16 | path_encode: fix max length calculation
Sebastian Krahmer wrote:
> it should reserve 4 times not 3 times len :) |
authtrust(
keyid_t id,
u_long trust
)
{
symkey ** bucket;
symkey * sk;
u_long lifetime;
/*
* Search bin for key; if it does not exist and is untrusted,
* forget it.
*/
bucket = &key_hash[KEYHASH(id)];
for (sk = *bucket; sk != NULL; sk = sk->hlink) {
if (id == sk->keyid)
break;
}
if (!trust && ... | 1 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 211,795,462,137,862,600,000,000,000,000,000,000,000 | 61 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_data, const char *id)
{
RsvgDrawingCtx *draw;
RsvgNodeSvg *root;
RsvgNode *node;
RsvgBbox bbox;
RsvgDimensionData dimension_data;
cairo_surface_t *target = NULL;
cairo_t *cr = NULL;
gboolean ... | 0 | [
"CWE-20"
] | librsvg | d83e426fff3f6d0fa6042d0930fb70357db24125 | 306,499,828,535,628,070,000,000,000,000,000,000,000 | 81 | io: Use XML_PARSE_NONET
We don't want to load resources off the net.
Bug #691708. |
cdf_read_summary_info(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
const cdf_dir_t *dir, cdf_stream_t *scn)
{
return cdf_read_user_stream(info, h, sat, ssat, sst, dir,
"\05SummaryInformation", scn);
} | 0 | [
"CWE-119",
"CWE-787"
] | file | f97486ef5dc3e8735440edc4fc8808c63e1a3ef0 | 111,747,615,241,290,530,000,000,000,000,000,000,000 | 7 | CVE-2014-0207: Prevent 0 element vectors and vectors longer than the number
of properties from accessing random memory. |
static const char *cmd_conn_read_state_limit(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
long int limit;
if (dcfg == NULL) return NULL;
limit = strtol(p1, NULL, 10);
if ((limit == LONG_MAX)||(limit == LONG_MIN)||(limit <= 0)) {
... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 290,393,746,058,367,640,000,000,000,000,000,000,000 | 17 | Added SecXmlExternalEntity |
get_attr_dbg(Dwarf_Debug *dbg_out,
Dwarf_CU_Context * cu_context_out,
Dwarf_Attribute attr,
Dwarf_Error *error)
{
Dwarf_CU_Context cup = 0;
Dwarf_Debug dbg = 0;
if (!attr) {
_dwarf_error(NULL, error, DW_DLE_ATTR_NULL);
return DW_DLV_ERROR;
}
cup = attr->ar_cu_context;
... | 0 | [
"CWE-703",
"CWE-125"
] | libdwarf-code | 7ef09e1fc9ba07653dd078edb2408631c7969162 | 310,997,450,900,000,050,000,000,000,000,000,000,000 | 35 | Fixes old bug(which could result in Denial of Service)
due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8.
DW202206-001
modified: src/lib/libdwarf/dwarf_form.c |
// Insert code instructions for processing vectors.
bool is_comp_vector(const unsigned int arg) const {
unsigned int siz = _cimg_mp_size(arg);
if (siz>8) return false;
const int *ptr = memtype.data(arg + 1);
bool is_tmp = true;
while (siz-->0) if (*(ptr++)) { is_tmp =... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 210,636,731,155,870,240,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline void net_dmaengine_get(void)
{
} | 1 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 337,715,702,426,758,060,000,000,000,000,000,000,000 | 3 | 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... |
uint64_t VideoTrack::VideoPayloadSize() const {
uint64_t size = EbmlElementSize(
libwebm::kMkvPixelWidth,
static_cast<uint64>((pixel_width_ > 0) ? pixel_width_ : width_));
size += EbmlElementSize(
libwebm::kMkvPixelHeight,
static_cast<uint64>((pixel_height_ > 0) ? pixel_height_ : height_));
... | 1 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 322,469,990,590,019,470,000,000,000,000,000,000,000 | 41 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
JSON::JSON_value::~JSON_value()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 11,356,590,222,391,810,000,000,000,000,000,000,000 | 3 | 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 ... |
void Analyze() {
while (!stack_.is_empty()) {
HControlInstruction* end = stack_.RemoveLast()->end();
for (HSuccessorIterator it(end); !it.Done(); it.Advance()) {
PushBlock(it.Current());
}
}
} | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 90,545,194,375,018,190,000,000,000,000,000,000,000 | 8 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
QByteArray CtcpParser::lowLevelDequote(const QByteArray &message) {
QByteArray dequotedMessage;
QByteArray messagepart;
QHash<QByteArray, QByteArray>::iterator ctcpquote;
// copy dequote Message
for(int i = 0; i < message.size(); i++) {
messagepart = message.mid(i,1);
if(i+1 < message.size()) {
... | 0 | [
"CWE-399"
] | quassel | da215fcb9cd3096a3e223c87577d5d4ab8f8518b | 135,217,666,650,246,990,000,000,000,000,000,000,000 | 21 | Fix core crash
Some CTCP requests triggered a bug in the parser; this fixes the issue. |
static SLJIT_INLINE void reset_ovector(compiler_common *common, int length)
{
DEFINE_COMPILER;
struct sljit_label *loop;
sljit_s32 i;
/* At this point we can freely use all temporary registers. */
SLJIT_ASSERT(length > 1);
/* TMP1 returns with begin - 1. */
OP2(SLJIT_SUB, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSE... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 310,434,243,501,876,370,000,000,000,000,000,000,000 | 38 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
httpdmgr_attach(isc_httpdmgr_t *source, isc_httpdmgr_t **targetp) {
REQUIRE(VALID_HTTPDMGR(source));
REQUIRE(targetp != NULL && *targetp == NULL);
isc_refcount_increment(&source->references);
*targetp = source;
} | 0 | [] | bind9 | d4c5d1c650ae0e97a083b0ce7a705c20fc001f07 | 299,962,001,900,230,000,000,000,000,000,000,000,000 | 8 | Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.
Improve the httpd.c:process_request() function with t... |
static void Ins_ROFF( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_Off;
CUR.func_round = (TRound_Function)Round_None;
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 156,658,135,786,033,710,000,000,000,000,000,000,000 | 6 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct bt_security sec;
int len, err = 0;
BT_DBG("sk %p", sk);
if (level == SOL_RFCOMM)
return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen);
if (l... | 0 | [
"CWE-476"
] | linux | 951b6a0717db97ce420547222647bcc40bf1eacd | 86,003,269,645,624,880,000,000,000,000,000,000,000 | 55 | Bluetooth: Fix potential NULL dereference in RFCOMM bind callback
addr can be NULL and it should not be dereferenced before NULL checking.
Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
void free_cache_bitmap_v2_order(rdpContext* context, CACHE_BITMAP_V2_ORDER* order)
{
if (order)
free(order->bitmapDataStream);
free(order);
} | 0 | [
"CWE-125"
] | FreeRDP | 0b6b92a25a77d533b8a92d6acc840a81e103684e | 221,767,611,266,004,260,000,000,000,000,000,000,000 | 7 | Fixed CVE-2020-11525: Out of bounds read in bitmap_cache_new
Thanks to Sunglin and HuanGMz from Knownsec 404 |
static av_cold int xpm_decode_close(AVCodecContext *avctx)
{
XPMDecContext *x = avctx->priv_data;
av_freep(&x->pixels);
av_freep(&x->buf);
x->buf_size = 0;
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | cb243972b121b1ae6b60a78ff55a0506c69f3879 | 138,610,609,240,826,760,000,000,000,000,000,000,000 | 10 | avcodec/xpmdec: Fix multiple pointer/memory issues
Most of these were found through code review in response to
fixing 1466/clusterfuzz-testcase-minimized-5961584419536896
There is thus no testcase for most of this.
The initial issue was Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/maste... |
md_decode_unicode(const CHAR* str, OFF off, SZ str_size, SZ* p_char_size)
{
return md_decode_utf8__(str+off, str_size-off, p_char_size);
} | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 279,242,059,576,044,200,000,000,000,000,000,000,000 | 4 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
static BOOL update_send_surface_bits(rdpContext* context,
const SURFACE_BITS_COMMAND* surfaceBitsCommand)
{
wStream* s;
rdpRdp* rdp = context->rdp;
BOOL ret = FALSE;
update_force_flush(context);
s = fastpath_update_pdu_init(rdp->fastpath);
if (!s)
return FALSE;
if (!updat... | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 262,077,567,665,186,050,000,000,000,000,000,000,000 | 25 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
{
if (sx == wp->sx && sy == wp->sy)
return;
wp->sx = sx;
wp->sy = sy;
screen_resize(&wp->base, sx, sy, wp->saved_grid == NULL);
if (wp->mode != NULL)
wp->mode->resize(wp, sx, sy);
wp->flags |= PANE_RESIZE;
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 164,571,111,658,283,200,000,000,000,000,000,000,000 | 13 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
get_session_filename (GdmSession *self)
{
return g_strdup_printf ("%s.desktop", get_session_name (self));
} | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 14,841,926,551,770,297,000,000,000,000,000,000,000 | 4 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
static int ttwu_remote(struct task_struct *p, int wake_flags)
{
struct rq *rq;
int ret = 0;
rq = __task_rq_lock(p);
if (task_on_rq_queued(p)) {
/* check_preempt_curr() may use rq clock */
update_rq_clock(rq);
ttwu_do_wakeup(rq, p, wake_flags);
ret = 1;
}
__task_rq_unlock(rq);
return ret;
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 116,462,664,780,433,580,000,000,000,000,000,000,000 | 16 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
int __init dm_linear_init(void)
{
int r = dm_register_target(&linear_target);
if (r < 0)
DMERR("register failed %d", r);
return r;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 37,727,696,165,844,342,000,000,000,000,000,000,000 | 9 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
unique_ptr<IOBuf> IOBuf::takeOwnership(
void* buf,
std::size_t capacity,
std::size_t offset,
std::size_t length,
FreeFunction freeFn,
void* userData,
bool freeOnError,
TakeOwnershipOption option) {
if (capacity > kMaxIOBufSize) {
throw_exception<std::bad_alloc>();
}
// do not ... | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 211,455,107,397,486,670,000,000,000,000,000,000,000 | 59 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
_rpc_terminate_tasks(slurm_msg_t *msg)
{
kill_tasks_msg_t *req = (kill_tasks_msg_t *) msg->data;
int rc = SLURM_SUCCESS;
int fd;
uid_t req_uid, uid;
uint16_t protocol_version;
debug3("Entering _rpc_terminate_tasks");
fd = stepd_connect(conf->spooldir, conf->node_name,
... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 35,752,066,931,694,180,000,000,000,000,000,000,000 | 44 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.