func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void __io_free_req(struct io_kiocb *req)
{
if (!io_dismantle_req(req)) {
__io_free_req_finish(req);
} else {
int ret;
init_task_work(&req->task_work, io_req_task_file_table_put);
ret = task_work_add(req->task, &req->task_work, TWA_RESUME);
if (unlikely(ret)) {
struct task_struct *tsk;
tsk = i... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 105,936,273,972,230,520,000,000,000,000,000,000,000 | 17 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static int wolfSSH_SFTP_buffer_create(WOLFSSH* ssh, WS_SFTP_BUFFER* buffer,
word32 sz)
{
if (ssh == NULL || buffer == NULL) {
return WS_BAD_ARGUMENT;
}
if (buffer->data == NULL ||
(buffer->data != NULL && buffer->sz != sz)) {
wolfSSH_SFTP_buffer_free(ssh, buffer);
... | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 117,340,504,415,978,050,000,000,000,000,000,000,000 | 18 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
bool FromkLinuxSockAddrIn6(const struct klinux_sockaddr_in6 *input,
struct sockaddr_in6 *output) {
if (!input || !output) {
return false;
}
output->sin6_family = AF_INET;
output->sin6_port = input->klinux_sin6_port;
output->sin6_scope_id = input->klinux_sin6_scope_id;
output->... | 0 | [
"CWE-787"
] | asylo | bda9772e7872b0d2b9bee32930cf7a4983837b39 | 156,404,414,178,750,380,000,000,000,000,000,000,000 | 13 | Check input length in FromLinuxSockAddr
PiperOrigin-RevId: 333785506
Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9 |
_gnutls_kx_is_ok (gnutls_kx_algorithm_t algorithm)
{
ssize_t ret = -1;
GNUTLS_KX_ALG_LOOP (ret = p->algorithm);
if (ret >= 0)
ret = 0;
else
ret = 1;
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 155,172,848,792,897,370,000,000,000,000,000,000,000 | 10 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
*val += amount;
*ret = *val;
return 1;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 27,794,902,728,755,490,000,000,000,000,000,000,000 | 7 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
uint8_t bf_is_table_present(const struct compressed_block_header* hdr) {
return (hdr->block_flags_u8 >> 7) & 1;
} | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 79,573,724,867,715,280,000,000,000,000,000,000,000 | 3 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
void CompactProtocolReader::readStructEnd() {
lastFieldId_ = lastField_.top();
lastField_.pop();
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 229,201,516,396,695,770,000,000,000,000,000,000,000 | 4 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
static void nested_svm_set_tdp_cr3(struct kvm_vcpu *vcpu,
unsigned long root)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.nested_cr3 = root;
mark_dirty(svm->vmcb, VMCB_NPT);
svm_flush_tlb(vcpu);
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 147,272,118,117,273,940,000,000,000,000,000,000,000 | 9 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
int ReadStrip(TIFF* tiff, UINT32 row, UINT32* buffer) {
uint16 photometric;
TIFFGetField(tiff, TIFFTAG_PHOTOMETRIC, &photometric);
// To avoid dealing with YCbCr subsampling, let libtiff handle it
if (photometric == PHOTOMETRIC_YCBCR) {
TIFFRGBAImage img;
char emsg[1024] = "";
U... | 0 | [
"CWE-190",
"CWE-787"
] | Pillow | 4e2def2539ec13e53a82e06c4b3daf00454100c4 | 281,025,827,131,583,460,000,000,000,000,000,000,000 | 50 | Overflow checks for realloc for tiff decoding |
static void pregexp(const char *prog, int flags)
{
pc('/');
while (*prog) {
if (*prog == '/')
pc('\\');
pc(*prog);
++prog;
}
pc('/');
if (flags & JS_REGEXP_G) pc('g');
if (flags & JS_REGEXP_I) pc('i');
if (flags & JS_REGEXP_M) pc('m');
} | 0 | [
"CWE-476"
] | mujs | f5b3c703e18725e380b83427004632e744f85a6f | 160,467,540,923,395,920,000,000,000,000,000,000,000 | 14 | Issue #161: Cope with empty programs in mujs-pp. |
int save_in_field(Field *to)
{
MYSQL_TIME ltime;
if (get_date(<ime, 0))
return to->reset();
return to->store_time_dec(<ime, decimals());
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 222,880,298,816,062,740,000,000,000,000,000,000,000 | 7 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
void Magick::Image::negate(const bool grayscale_)
{
modifyImage();
GetPPException;
NegateImage(image(),(MagickBooleanType) grayscale_,exceptionInfo);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 22,850,299,060,217,705,000,000,000,000,000,000,000 | 7 | Added missing return to avoid use after free. |
TEST(EqOp, MatchesReferencedObjectValue) {
BSONObj operand = BSON("a.b" << 5);
EqualityMatchExpression eq;
eq.init("a.b", operand["a.b"]).transitional_ignore();
ASSERT(eq.matchesBSON(BSON("a" << BSON("b" << 5)), NULL));
ASSERT(eq.matchesBSON(BSON("a" << BSON("b" << BSON_ARRAY(5))), NULL));
ASSER... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 51,292,946,648,908,220,000,000,000,000,000,000,000 | 8 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
static gboolean si_io_channel_cb(GIOChannel *source,
GIOCondition condition,
gpointer data)
{
active_session = session_info_get_active_session(session_info);
update_active_session_connection(NULL);
return G_SOURCE_CONTINUE;
} | 0 | [
"CWE-770"
] | spice-vd_agent | 1a8b93ca6ac0b690339ab7f0afc6fc45d198d332 | 321,732,523,163,178,050,000,000,000,000,000,000,000 | 8 | Avoids unchecked file transfer IDs allocation and usage
Avoid agents allocating file transfers.
The "active_xfers" entries are now inserted when client start sending
files.
Also different agents cannot mess with other agent transfers as a
transfer is bound to a single agent.
This issue was reported by SUSE security t... |
void endhostent(void)
{
__UCLIBC_MUTEX_LOCK(mylock);
endhostent_unlocked();
__UCLIBC_MUTEX_UNLOCK(mylock);
} | 0 | [
"CWE-79"
] | uclibc-ng | 0f822af0445e5348ce7b7bd8ce1204244f31d174 | 114,759,505,980,204,580,000,000,000,000,000,000,000 | 6 | libc/inet/resolv.c: add __hnbad to check DNS entries for validity…
… using the same rules glibc does
also call __hnbad in some places to check answers |
sudoers_cleanup(void)
{
struct sudo_nss *nss;
debug_decl(sudoers_cleanup, SUDOERS_DEBUG_PLUGIN);
if (snl != NULL) {
TAILQ_FOREACH(nss, snl, entries) {
nss->close(nss);
}
}
if (def_group_plugin)
group_plugin_unload();
sudo_freepwcache();
sudo_freegrcache();
debug_return;
} | 0 | [
"CWE-193"
] | sudo | 1f8638577d0c80a4ff864a2aad80a0d95488e9a8 | 257,457,371,967,733,430,000,000,000,000,000,000,000 | 17 | Fix potential buffer overflow when unescaping backslashes in user_args.
Also, do not try to unescaping backslashes unless in run mode *and*
we are running the command via a shell.
Found by Qualys, this fixes CVE-2021-3156. |
DEFUN (no_neighbor_route_map,
no_neighbor_route_map_cmd,
NO_NEIGHBOR_CMD2 "route-map WORD (in|out|import|export)",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Apply route map to neighbor\n"
"Name of route map\n"
"Apply map to incoming routes\n"
"Apply map to ou... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 135,874,489,450,646,050,000,000,000,000,000,000,000 | 16 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
struct mg_connection *mg_ws_connect(struct mg_mgr *mgr, const char *url,
mg_event_handler_t fn, void *fn_data,
const char *fmt, ...) {
struct mg_connection *c = mg_connect(mgr, url, fn, fn_data);
if (c != NULL) {
char nonce[16], key[30], me... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 10,411,507,999,182,793,000,000,000,000,000,000,000 | 37 | Protect against the directory traversal in mg_upload() |
static int ucma_event_handler(struct rdma_cm_id *cm_id,
struct rdma_cm_event *event)
{
struct ucma_event *uevent;
struct ucma_context *ctx = cm_id->context;
if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST)
return ucma_connect_event_handler(cm_id, event);
/*
* We ignore events for new connections un... | 0 | [
"CWE-416"
] | linux | f5449e74802c1112dea984aec8af7a33c4516af1 | 200,702,991,618,275,130,000,000,000,000,000,000,000 | 31 | RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy
ucma_destroy_id() assumes that all things accessing the ctx will do so via
the xarray. This assumption violated only in the case the FD is being
closed, then the ctx is reached via the ctx_list. Normally this is OK
since ucma_destroy_id() cannot run concu... |
execute_redir_str(char_u *value, int value_len)
{
int len;
if (value_len == -1)
len = (int)STRLEN(value); /* Append the entire string */
else
len = value_len; /* Append only "value_len" characters */
if (ga_grow(&redir_execute_ga, len) == OK)
{
mch_memmove((char *)redir_execute_ga.ga_data
... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 208,072,551,368,997,900,000,000,000,000,000,000,000 | 15 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
Sql_mode_save(THD *thd) : thd(thd), old_mode(thd->variables.sql_mode) {} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 298,973,915,653,275,050,000,000,000,000,000,000,000 | 1 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
MagickExport MagickBooleanType LevelizeImage(Image *image,
const double black_point,const double white_point,const double gamma,
ExceptionInfo *exception)
{
#define LevelizeImageTag "Levelize/Image"
#define LevelizeValue(x) ClampToQuantum(((MagickRealType) gamma_pow((double) \
(QuantumScale*(x)),gamma))*(white_p... | 0 | [
"CWE-835"
] | ImageMagick | a80ee0ee1a083b4991d12ed4c07b7c7c5890f329 | 299,054,373,877,601,300,000,000,000,000,000,000,000 | 111 | https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506 |
get_random (var)
SHELL_VAR *var;
{
int rv;
char *p;
rv = get_random_number ();
last_random_value = rv;
p = itos (rv);
FREE (value_cell (var));
VSETATTR (var, att_integer);
var_setvalue (var, p);
return (var);
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 93,248,856,158,970,940,000,000,000,000,000,000,000 | 16 | commit bash-20120224 snapshot |
static void carve_deps_at_address(RzDyldCache *cache, cache_img_t *img, HtPU *path_to_idx, ut64 address, int *deps, bool printing) {
ut64 pa = va2pa(address, cache->n_maps, cache->maps, cache->buf, 0, NULL, NULL);
if (pa == UT64_MAX) {
return;
}
struct MACH0_(mach_header) mh;
if (rz_buf_fread_at(cache->buf, pa, ... | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 307,545,923,129,422,650,000,000,000,000,000,000,000 | 48 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
sec_generate_keys(uint8 * client_random, uint8 * server_random, int rc4_key_size)
{
uint8 pre_master_secret[48];
uint8 master_secret[48];
uint8 key_block[48];
/* Construct pre-master secret */
memcpy(pre_master_secret, client_random, 24);
memcpy(pre_master_secret + 24, server_random, 24);
/* Generate master se... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 333,442,273,041,769,440,000,000,000,000,000,000,000 | 45 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static char* _known_product_ids(int id) {
switch (id) {
case 0: return "Unknown";
case 1: return "Import0";
case 2: return "Linker510";
case 3: return "Cvtomf510";
case 4: return "Linker600";
case 5: return "Cvtomf600";
case 6: return "Cvtres500";
case 7: return "Utc11_Basic";
case 8: return "Utc11_C... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 99,933,627,187,518,580,000,000,000,000,000,000,000 | 248 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
CImg<T>& draw_object3d(LibBoard::Board& board,
const float x0, const float y0, const float z0,
const CImg<tp>& vertices, const CImgList<tf>& primitives,
const CImgList<tc>& colors, const CImg<to>& opacities,
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 296,955,824,706,838,500,000,000,000,000,000,000,000 | 13 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_TIMING_C not defined.\n");
return( 0 );
} | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 326,018,597,752,023,100,000,000,000,000,000,000,000 | 8 | RSA blinding on CRT operations to counter timing attacks |
\param pos Index of the insertion.
\param is_shared Tells if inserted images are shared copies of \c img or not.
**/
template<typename t>
CImgList<T>& insert(const unsigned int n, const CImg<t>& img, const unsigned int pos=~0U,
const bool is_shared=false) {
if (!n... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 31,157,763,265,177,020,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
pk_transaction_get_categories (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
_cleanup_error_free_ GError *error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
g_debug ("GetCategories method called... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 144,193,529,262,689,900,000,000,000,000,000,000,000 | 27 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaPtr schema,
xmlSchemaBasicItemPtr ownerItem,
xmlAttrPtr attr,
const xmlChar *value,
const xmlChar **uri,
const xmlChar **local)
{
const xmlChar *pref;
xmlNsPtr ns;
int len,... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 51,631,829,332,513,310,000,000,000,000,000,000,000 | 62 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
void freeClientAsync(client *c) {
if (c->flags & CLIENT_CLOSE_ASAP || c->flags & CLIENT_LUA) return;
c->flags |= CLIENT_CLOSE_ASAP;
listAddNodeTail(server.clients_to_close,c);
} | 0 | [
"CWE-254"
] | redis | 874804da0c014a7d704b3d285aa500098a931f50 | 77,110,133,946,554,390,000,000,000,000,000,000,000 | 5 | Security: Cross Protocol Scripting protection.
This is an attempt at mitigating problems due to cross protocol
scripting, an attack targeting services using line oriented protocols
like Redis that can accept HTTP requests as valid protocol, by
discarding the invalid parts and accepting the payloads sent, for
example, ... |
static pyc_object *get_code_object(RBuffer *buffer) {
bool error = false;
pyc_object *ret = R_NEW0 (pyc_object);
pyc_code_object *cobj = R_NEW0 (pyc_code_object);
if (!ret || !cobj) {
free (ret);
free (cobj);
return NULL;
}
//ret->type = TYPE_CODE_v1;
// support start from v1.0
ret->data = cobj;
bool ... | 0 | [
"CWE-415"
] | radare2 | 049de62730f4954ef9a642f2eeebbca30a8eccdc | 9,885,760,520,605,490,000,000,000,000,000,000,000 | 130 | Fix #18679 - UAF when parsing corrupted pyc files ##bin |
lys_is_key(const struct lys_node_leaf *node, uint8_t *index)
{
struct lys_node *parent = (struct lys_node *)node;
struct lys_node_list *list;
uint8_t i;
if (!node || node->nodetype != LYS_LEAF) {
return NULL;
}
do {
parent = lys_parent(parent);
} while (parent && parent->no... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 301,751,073,187,030,500,000,000,000,000,000,000,000 | 29 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static void safe_exit(int error)
{
if (!first_error)
first_error= error;
if (ignore_errors)
return;
if (sock)
mysql_close(sock);
exit(error);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 20,709,466,803,818,163,000,000,000,000,000,000,000 | 10 | 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... |
static void FNAME_DECL(compress_row0_seg)(int i,
const PIXEL * const cur_row,
const int end,
const unsigned int waitmask,
const unsigned int bpc_mask)
{... | 0 | [] | spice-common | ef1b6ff7b82e15d759e5415b8e35b92bb1a4c206 | 249,496,535,956,027,070,000,000,000,000,000,000,000 | 40 | quic: Check RLE lengths
Avoid buffer overflows decoding images. On compression we compute
lengths till end of line so it won't cause regressions.
Proved by fuzzing the code.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com> |
asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
{
unsigned long ret;
long err;
err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA);
if (err)
return err;
return (long)ret;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 258,458,080,244,779,380,000,000,000,000,000,000,000 | 10 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static const char *ReadString(std::string *s, const char *ptr, size_t len) {
// Read untile NULL(\0).
const char *p = ptr;
const char *q = ptr;
while ((size_t(q - ptr) < len) && (*q) != 0) {
q++;
}
if (size_t(q - ptr) >= len) {
(*s) = std::string();
return NULL;
}
(*s) = std::string(p, q);... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 69,330,378,423,881,620,000,000,000,000,000,000,000 | 17 | Make line_no with too large value(2**20) invalid. Fixes #124 |
void pgd_clear_bad(pgd_t *pgd)
{
pgd_ERROR(*pgd);
pgd_clear(pgd);
} | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 313,037,044,480,901,230,000,000,000,000,000,000,000 | 5 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
static void __read_bytes_from_xdr_buf(const struct xdr_buf *subbuf,
void *obj, unsigned int len)
{
unsigned int this_len;
this_len = min_t(unsigned int, len, subbuf->head[0].iov_len);
memcpy(obj, subbuf->head[0].iov_base, this_len);
len -= this_len;
obj += this_len;
this_len = min_t(unsigned int, len, ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 273,869,851,632,407,930,000,000,000,000,000,000,000 | 16 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
pk_transaction_search_groups (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
guint i;
PkBitfield filter;
gchar **values;
_cleanup_error_free_ GError *error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 51,146,835,289,003,780,000,000,000,000,000,000,000 | 58 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
void net_enable_timestamp(void)
{
atomic_inc(&netstamp_needed);
} | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 286,023,749,745,720,640,000,000,000,000,000,000,000 | 4 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
cmsHPROFILE CMSEXPORT cmsOpenProfileFromStreamTHR(cmsContext ContextID, FILE* ICCProfile, const char *sAccess)
{
_cmsICCPROFILE* NewIcc;
cmsHPROFILE hEmpty = cmsCreateProfilePlaceholder(ContextID);
if (hEmpty == NULL) return NULL;
NewIcc = (_cmsICCPROFILE*) hEmpty;
NewIcc ->IOhandler = cmsOpenIO... | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 334,219,249,366,003,450,000,000,000,000,000,000,000 | 26 | >Changes from Richard Hughes |
static void hns_nic_reuse_page(struct sk_buff *skb, int i,
struct hnae_ring *ring, int pull_len,
struct hnae_desc_cb *desc_cb)
{
struct hnae_desc *desc;
int truesize, size;
int last_offset;
bool twobufs;
twobufs = ((PAGE_SIZE < 8192) &&
hnae_buf_size(ring) == HNS_BUFFER_SIZE_2048);
desc = ... | 0 | [
"CWE-416"
] | linux | 27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2 | 108,611,191,177,798,520,000,000,000,000,000,000,000 | 51 | net: hns: Fix a skb used after free bug
skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK,
which cause hns_nic_net_xmit to use a freed skb.
BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940...
[17659.112635] alloc_debug_processing+0x18c/0x1a0
[17659.117208] __slab_alloc+0x52c/0x... |
evutil_freeaddrinfo(struct evutil_addrinfo *ai)
{
#ifdef EVENT__HAVE_GETADDRINFO
if (!(ai->ai_flags & EVUTIL_AI_LIBEVENT_ALLOCATED)) {
freeaddrinfo(ai);
return;
}
#endif
while (ai) {
struct evutil_addrinfo *next = ai->ai_next;
if (ai->ai_canonname)
mm_free(ai->ai_canonname);
mm_free(ai);
ai = next;
}... | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 85,241,408,579,587,650,000,000,000,000,000,000,000 | 16 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
bool val_bool(void) { return false; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 223,035,130,057,147,660,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static void rcc_element(REgg *egg, char *str) {
if (!egg || !str) {
return;
}
REggEmit *e = egg->remit;
char *ptr, *p = str + strlen (str);
int inside = 0;
int num, num2;
int i;
if (CTX) {
if (egg->lang.slurp == '"') {
if (egg->lang.mode == NORMAL) {
if (!egg->lang.dstvar) {
egg->lang.dstvar = ... | 0 | [
"CWE-416"
] | radare2 | 93af319e0af787ede96537d46210369f5c24240c | 92,036,152,787,958,220,000,000,000,000,000,000,000 | 126 | Fix #14296 - Segfault in ragg2 (#14308) |
gnutls_session_get_master_secret(gnutls_session_t session, gnutls_datum_t *secret)
{
secret->data = session->security_parameters.master_secret;
secret->size = sizeof(session->security_parameters.master_secret);
} | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 270,285,270,777,266,870,000,000,000,000,000,000,000 | 5 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
R_API RBinJavaField *r_bin_java_read_next_field(RBinJavaObj *bin, const ut64 offset, const ut8 *buffer, const ut64 len) {
RBinJavaAttrInfo *attr;
ut32 i, idx;
ut8 buf[8];
RBinJavaCPTypeObj *item = NULL;
const ut8 *f_buf = buffer + offset;
ut64 adv = 0;
if (!bin || offset + 8 >= len) {
return NULL;
}
RBinJava... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 230,137,199,849,758,230,000,000,000,000,000,000,000 | 98 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
GF_Err gf_m2ts_process_data(GF_M2TS_Demuxer *ts, u8 *data, u32 data_size)
{
GF_Err e=GF_OK;
u32 pos, pck_size;
Bool is_align = 1;
if (ts->buffer_size) {
//we are sync, copy remaining bytes
if ( (ts->buffer[0]==0x47) && (ts->buffer_size<200)) {
u32 pck_size = ts->prefix_present ? 192 : 188;
if (ts->alloc... | 0 | [
"CWE-416",
"CWE-125"
] | gpac | 1ab4860609f2e7a35634930571e7d0531297e090 | 188,436,143,988,620,000,000,000,000,000,000,000,000 | 78 | fixed potential crash on PMT IOD parse - cf #1268 #1269 |
static int get_npt_level(void)
{
#ifdef CONFIG_X86_64
return PT64_ROOT_LEVEL;
#else
return PT32E_ROOT_LEVEL;
#endif
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 71,193,155,610,921,140,000,000,000,000,000,000,000 | 8 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
OPJ_BOOL opj_tcd_t2_decode (opj_tcd_t *p_tcd,
OPJ_BYTE * p_src_data,
OPJ_UINT32 * p_data_read,
OPJ_UINT32 p_max_src_size,
opj_codestream_index_t *p_cstr_index
)
{
opj_t2_t ... | 0 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 273,678,463,939,108,000,000,000,000,000,000,000,000 | 31 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
setup_outside_server (GdmSession *self)
{
GDBusAuthObserver *observer;
GDBusServer *server;
GError *error = NULL;
g_debug ("GdmSession: Creating D-Bus server for greeters and such");
observer = g_dbus_auth_observer_new ();
g_signal_connect_object (observer,
... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 146,213,556,385,480,200,000,000,000,000,000,000,000 | 36 | 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 |
ha_storage_media field_storage_type() const
{
return (ha_storage_media)
((flags >> FIELD_FLAGS_STORAGE_MEDIA) & 3);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 333,256,719,458,132,800,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
cmd_genkey (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
char *keyno;
int force;
const char *s;
time_t timestamp;
if ( IS_LOCKED (ctrl) )
return gpg_error (GPG_ERR_LOCKED);
force = has_option (line, "--force");
if ((s=has_option_name (line, "--timestamp"))... | 0 | [] | gnupg | b0b3803e8c2959dd67ca96debc54b5c6464f0d41 | 120,041,588,655,774,200,000,000,000,000,000,000,000 | 50 | scd: Avoid double-free on error condition in scd
* scd/command.c (cmd_readkey): avoid double-free of cert
--
When ksba_cert_new() fails, cert will be double-freed.
Debian-Bug-Id: 773471
Original patch changed by wk to do the free only at leave. |
SCTP_STATIC int sctp_setsockopt_connectx_old(struct sock* sk,
struct sockaddr __user *addrs,
int addrs_size)
{
return __sctp_setsockopt_connectx(sk, addrs, addrs_size, NULL);
} | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 326,222,611,503,177,500,000,000,000,000,000,000,000 | 6 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
CURLcode Curl_add_timecondition(struct Curl_easy *data,
#ifndef USE_HYPER
struct dynbuf *req
#else
void *req
#endif
)
{
const struct tm *tm;
struct tm keeptime;
CURLcode result;
char datestr[80];
const char *condp;
size_t len;
if(data->set... | 0 | [] | curl | 48d7064a49148f03942380967da739dcde1cdc24 | 91,597,587,725,157,860,000,000,000,000,000,000,000 | 76 | cookie: apply limits
- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50
Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048 |
static int fts3SegReaderStart(
Fts3Table *p, /* Virtual table handle */
Fts3MultiSegReader *pCsr, /* Cursor object */
const char *zTerm, /* Term searched for (or NULL) */
int nTerm /* Length of zTerm in bytes */
){
int i;
int nSeg = pCsr->nSegment;
... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 58,700,844,579,393,930,000,000,000,000,000,000,000 | 31 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
gs_currenticcdirectory(const gs_gstate * pgs, gs_param_string * pval)
{
static const char *const rfs = DEFAULT_DIR_ICC; /* as good as any other */
const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx;
if (lib_ctx->profiledir == NULL) {
pval->data = (const byte *)rfs;
pval->size = strlen(... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 196,544,253,089,675,930,000,000,000,000,000,000,000 | 15 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
int report(std::vector<JsonTestCase::TestCaseResult> results) {
int numTestCases = results.size();
int numSuccess = 0;
int numFailed = 0;
if (std::any_of(
results.begin(), results.end(), [](const JsonTestCase::TestCaseResult& result) {
return !res... | 1 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 55,177,259,326,906,840,000,000,000,000,000,000,000 | 29 | SERVER-50170 fix max staleness read preference parameter for server selection |
quoteRelationName(char *buffer, Relation rel)
{
quoteOneName(buffer, get_namespace_name(RelationGetNamespace(rel)));
buffer += strlen(buffer);
*buffer++ = '.';
quoteOneName(buffer, RelationGetRelationName(rel));
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 174,109,682,202,726,080,000,000,000,000,000,000,000 | 7 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
GF_Err stbl_AddShadow(GF_ShadowSyncBox *stsh, u32 sampleNumber, u32 shadowNumber)
{
GF_StshEntry *ent;
u32 i, count;
count = gf_list_count(stsh->entries);
for (i=0; i<count; i++) {
ent = (GF_StshEntry*)gf_list_get(stsh->entries, i);
if (ent->shadowedSampleNumber == shadowNumber) {
ent->syncSampleNumber = sam... | 0 | [
"CWE-120",
"CWE-787"
] | gpac | 77ed81c069e10b3861d88f72e1c6be1277ee7eae | 166,201,440,947,652,420,000,000,000,000,000,000,000 | 22 | fixed #1774 (fuzz) |
R_API ut64 r_bin_java_inner_classes_attr_calc_size(RBinJavaAttrInfo *attr) {
RBinJavaClassesAttribute *icattr = NULL;
RListIter *iter;
ut64 size = 6;
if (!attr) {
return 0;
}
r_list_foreach (attr->info.inner_classes_attr.classes, iter, icattr) {
size += r_bin_java_inner_class_attr_calc_size (icattr);
}
retu... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 154,436,781,347,065,580,000,000,000,000,000,000,000 | 12 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
bool SQLiteDBManager::isDisabled(const std::string& table_name) {
bool disabled_set = !Flag::isDefault("disable_tables");
bool enabled_set = !Flag::isDefault("enable_tables");
if (!disabled_set && !enabled_set) {
// We have zero enabled tables and zero disabled tables.
// As a result, no tables are disabl... | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 166,739,173,916,135,770,000,000,000,000,000,000,000 | 35 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n) /* {{{ */
{
int i = 0;
spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj);
spl_SplObjectStorageElement *element;
if (intern->storage.nNumOfElements * 2 > intern->gcdata_num) {
intern->gcdata_num = intern->storage.nNumOfElements * 2;
... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 61cdd1255d5b9c8453be71aacbbf682796ac77d4 | 29,561,099,075,520,610,000,000,000,000,000,000,000 | 21 | Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key |
int __sched __cond_resched_softirq(void)
{
BUG_ON(!in_softirq());
if (should_resched()) {
local_bh_enable();
__cond_resched();
local_bh_disable();
return 1;
}
return 0;
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 261,453,246,345,148,480,000,000,000,000,000,000,000 | 12 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
u32 bnx2x_dmae_opcode(struct bnx2x *bp, u8 src_type, u8 dst_type,
bool with_comp, u8 comp_type)
{
u32 opcode = 0;
opcode |= ((src_type << DMAE_COMMAND_SRC_SHIFT) |
(dst_type << DMAE_COMMAND_DST_SHIFT));
opcode |= (DMAE_CMD_SRC_RESET | DMAE_CMD_DST_RESET);
opcode |= (BP_PORT(bp) ? DMAE_CMD_PORT_1 : D... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 88,860,860,049,554,650,000,000,000,000,000,000,000 | 24 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
int ocfs2_remove_inode_range(struct inode *inode,
struct buffer_head *di_bh, u64 byte_start,
u64 byte_len)
{
int ret = 0, flags = 0, done = 0, i;
u32 trunc_start, trunc_len, trunc_end, trunc_cpos, phys_cpos;
u32 cluster_in_el;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_cached_dea... | 0 | [
"CWE-401"
] | linux | 28f5a8a7c033cbf3e32277f4cc9c6afd74f05300 | 173,376,157,226,961,970,000,000,000,000,000,000,000 | 160 | ocfs2: should wait dio before inode lock in ocfs2_setattr()
we should wait dio requests to finish before inode lock in
ocfs2_setattr(), otherwise the following deadlock will happen:
process 1 process 2 process 3
truncate file 'A' end_io of writing file 'A' receiving the ... |
**/
static CImg<T> vector(const T& a0, const T& a1) {
CImg<T> r(1,2); T *ptr = r._data;
*(ptr++) = a0; *(ptr++) = a1;
return r; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 158,275,524,977,330,020,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int brcmf_cfg80211_get_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_chan_def *chandef)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
struct brcmf_if *ifp;
struct brcmu_chan ch;
enum nl80211_band band = 0;
enum... | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 16,434,216,052,362,692,000,000,000,000,000,000,000 | 61 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
create_principal3_2_svc(cprinc3_arg *arg, struct svc_req *rqstp)
{
static generic_ret ret;
char *prime_arg;
gss_buffer_desc client_name, service_name;
OM_uint32 minor_stat;
kadm5_server_handle_t handle;
restriction_t ... | 1 | [
"CWE-119",
"CWE-772",
"CWE-401"
] | krb5 | 83ed75feba32e46f736fcce0d96a0445f29b96c2 | 255,148,187,101,470,400,000,000,000,000,000,000,000 | 60 | Fix leaks in kadmin server stubs [CVE-2015-8631]
In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler. Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails. Also make sure to free the prime_arg
variables in... |
void CoreUserInputHandler::handleWhois(const BufferInfo &bufferInfo, const QString &msg)
{
Q_UNUSED(bufferInfo)
emit putCmd("WHOIS", serverEncode(msg.split(' ')));
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 165,040,825,211,941,250,000,000,000,000,000,000,000 | 5 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
dp_packet_hwol_is_tso(const struct dp_packet *b)
{
return !!(*dp_packet_ol_flags_ptr(b) & DP_PACKET_OL_TX_TCP_SEG);
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 265,376,241,129,018,100,000,000,000,000,000,000,000 | 4 | 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... |
ipmi_get_channel_auth_cap(struct ipmi_intf *intf, uint8_t channel, uint8_t priv)
{
struct ipmi_rs *rsp;
struct ipmi_rq req;
struct get_channel_auth_cap_rsp auth_cap;
uint8_t msg_data[2];
/* Ask for IPMI v2 data as well */
msg_data[0] = channel | 0x80;
msg_data[1] = priv;
memset(&req, 0, sizeof(req));
req.msg... | 0 | [
"CWE-120"
] | ipmitool | 9452be87181a6e83cfcc768b3ed8321763db50e4 | 28,142,215,258,882,550,000,000,000,000,000,000,000 | 84 | channel: Fix buffer overflow
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `ipmi_get_channel_cipher_suites` function does not properly check
the final response’s `data_len`, which can lead to stack buffer overflow
on the final copy. |
numSamples (int s, int a, int b)
{
int a1 = divp (a, s);
int b1 = divp (b, s);
return b1 - a1 + ((a1 * s < a)? 0: 1);
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 141,898,648,018,648,900,000,000,000,000,000,000,000 | 6 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
ChardevBackendInfoList *qmp_query_chardev_backends(Error **errp)
{
ChardevBackendInfoList *backend_list = NULL;
CharDriver *c = NULL;
GSList *i = NULL;
for (i = backends; i; i = i->next) {
ChardevBackendInfoList *info = g_malloc0(sizeof(*info));
c = i->data;
info->value = g_mall... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 320,947,697,725,069,670,000,000,000,000,000,000,000 | 18 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
static void intel_pmu_nhm_workaround(void)
{
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
static const unsigned long nhm_magic[4] = {
0x4300B5,
0x4300D2,
0x4300B1,
0x4300B1
};
struct perf_event *event;
int i;
/*
* The Errata requires below steps:
* 1) Clear MSR_IA32_PEBS_ENABLE and MSR... | 0 | [
"CWE-20",
"CWE-401"
] | linux | f1923820c447e986a9da0fc6bf60c1dccdf0408e | 55,197,626,901,969,090,000,000,000,000,000,000,000 | 59 | perf/x86: Fix offcore_rsp valid mask for SNB/IVB
The valid mask for both offcore_response_0 and
offcore_response_1 was wrong for SNB/SNB-EP,
IVB/IVB-EP. It was possible to write to
reserved bit and cause a GP fault crashing
the kernel.
This patch fixes the problem by correctly marking the
reserved bits in the valid m... |
ofputil_decode_packet_in(const struct ofp_header *oh, bool loose,
const struct tun_table *tun_table,
const struct vl_mff_map *vl_mff_map,
struct ofputil_packet_in *pin,
size_t *total_lenp, uint32_t *buffer_idp,
... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 186,345,904,144,333,100,000,000,000,000,000,000,000 | 122 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void decoder_context::run_postprocessing_filters_parallel(image_unit* imgunit)
{
de265_image* img = imgunit->img;
int saoWaitsForProgress = CTB_PROGRESS_PREFILTER;
bool waitForCompletion = false;
if (!img->decctx->param_disable_deblocking) {
add_deblocking_tasks(imgunit);
saoWaitsForProgress = CTB_PRO... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 324,338,726,001,025,120,000,000,000,000,000,000,000 | 19 | fix streams where SPS image size changes without refreshing PPS (#299) |
void qpdf_force_pdf_version(qpdf_data qpdf, char const* version)
{
qpdf_force_pdf_version_and_extension(qpdf, version, 0);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 30,665,026,621,870,445,000,000,000,000,000,000,000 | 4 | 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 ... |
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
{
while (*fmt != AV_PIX_FMT_NONE && is_hwaccel_pix_fmt(*fmt))
++fmt;
return fmt[0];
} | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 116,493,190,646,580,310,000,000,000,000,000,000,000 | 6 | 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> |
static void cleanup_and_exit(int exit_code)
{
free_used_memory();
my_end(my_end_arg);
if (!silent) {
switch (exit_code) {
case 1:
printf("not ok\n");
break;
case 0:
printf("ok\n");
break;
case 62:
printf("skipped\n");
break;
default:
printf("unknown exi... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 151,037,849,422,530,880,000,000,000,000,000,000,000 | 24 | WL#9072: Backport WL#8785 to 5.5 |
shiftvisualpos(Buffer *buf, int shift)
{
Line *l = buf->currentLine;
buf->visualpos -= shift;
if (buf->visualpos - l->bwidth >= buf->COLS)
buf->visualpos = l->bwidth + buf->COLS - 1;
else if (buf->visualpos - l->bwidth < 0)
buf->visualpos = l->bwidth;
arrangeLine(buf);
if (buf->visualpos - l->... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 16,399,013,655,304,040,000,000,000,000,000,000,000 | 12 | Make temporary directory safely when ~/.w3m is unwritable |
static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
} | 0 | [
"CWE-189"
] | libvncserver | 045a044e8ae79db9244593fbce154cdf6e843273 | 146,946,748,184,282,470,000,000,000,000,000,000,000 | 2 | Fix integer overflow in MallocFrameBuffer()
Promote integers to uint64_t to avoid integer overflow issue during
frame buffer allocation for very large screen sizes |
static int read_pvalue(link_ctx *ctx, const char **pvalue)
{
if (skip_ws(ctx) && read_chr(ctx, '=')) {
if (read_qstring(ctx, pvalue) || read_ptoken(ctx, pvalue)) {
return 1;
}
}
return 0;
} | 0 | [
"CWE-444"
] | mod_h2 | b8a8c5061eada0ce3339b24ba1d587134552bc0c | 216,189,693,135,591,700,000,000,000,000,000,000,000 | 9 | * Removing support for abandoned draft of http-wg regarding cache-digests. |
string_iconv_to_internal (const char *charset, const char *string)
{
char *input, *output;
if (!string)
return NULL;
input = strdup (string);
if (!input)
return NULL;
/*
* optimized for UTF-8: if charset is NULL => we use term charset => if
* this charset is already UTF-... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 20,575,970,358,440,692,000,000,000,000,000,000,000 | 32 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
xmlBufferGrow(xmlBufferPtr buf, unsigned int len) {
unsigned int size;
xmlChar *newbuf;
if (buf == NULL) return(-1);
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use)
return(0);
if (len > UINT_MAX - buf->use)
return(-1);
if (buf->size... | 0 | [
"CWE-190"
] | libxml2 | 6c283d83eccd940bcde15634ac8c7f100e3caefd | 260,103,717,830,340,820,000,000,000,000,000,000,000 | 40 | [CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer
In several places, the code handling string buffers didn't check for
integer overflow or used wrong types for buffer sizes. This could
result in out-of-bounds writes or other memory errors when working on
large, multi-gigabyte buffers.
Thanks to Felix Wil... |
QPDFWriter::getFinalVersion()
{
doWriteSetup();
return this->m->final_pdf_version;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 43,047,275,769,180,490,000,000,000,000,000,000,000 | 5 | 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 ... |
configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
const char *zname)
{
const cfg_obj_t *updatepolicy = NULL;
const cfg_listelt_t *element, *element2;
dns_ssutable_t *table = NULL;
isc_mem_t *mctx = dns_zone_getmctx(zone);
bool autoddns = false;
isc_result_t result;
(void)cfg_map_get(zconfig... | 1 | [
"CWE-269"
] | bind9 | e4cccf9668c7adee4724a7649ec64685f82c8677 | 236,577,818,693,322,950,000,000,000,000,000,000,000 | 182 | Update-policy 'subdomain' was incorrectly treated as 'zonesub'
resulting in names outside the specified subdomain having the wrong
restrictions for the given key. |
vim_mem_profile_dump(void)
{
int i, j;
printf("\r\n");
j = 0;
for (i = 0; i < MEM_SIZES - 1; i++)
{
if (mem_allocs[i] || mem_frees[i])
{
if (mem_frees[i] > mem_allocs[i])
printf("\r\n%s", _("ERROR: "));
printf("[%4d / %4lu-%-4lu] ", i + 1, mem_allocs[i], mem_frees[i]);
j++;
... | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 239,931,885,943,601,400,000,000,000,000,000,000,000 | 36 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
String *Item_func_from_base64::val_str(String *str)
{
String *res= args[0]->val_str_ascii(str);
bool too_long= false;
int64 length;
const char *end_ptr;
if (!res ||
res->length() > (uint) base64_decode_max_arg_length() ||
(too_long=
((uint64) (length= base64_needed_decoded_length((uint64) ... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 268,773,542,173,377,450,000,000,000,000,000,000,000 | 31 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
static int stbi__bmp_test(stbi__context *s)
{
int r = stbi__bmp_test_raw(s);
stbi__rewind(s);
return r;
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 106,151,969,702,249,700,000,000,000,000,000,000,000 | 6 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
void drm_crtc_convert_umode(struct drm_display_mode *out,
struct drm_mode_modeinfo *in)
{
out->clock = in->clock;
out->hdisplay = in->hdisplay;
out->hsync_start = in->hsync_start;
out->hsync_end = in->hsync_end;
out->htotal = in->htotal;
out->hskew = in->hskew;
out->vdisplay = in->vdisplay;
out->vsync_st... | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 87,015,108,189,116,650,000,000,000,000,000,000,000 | 20 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
static void handle_ops_on_dev_replace(enum btrfs_map_op op,
struct btrfs_bio **bbio_ret,
struct btrfs_dev_replace *dev_replace,
int *num_stripes_ret, int *max_errors_ret)
{
struct btrfs_bio *bbio = *bbio_ret;
u64 srcdev_devid = dev_replace->srcdev->devid;
int tgtdev_indexes = 0;
int nu... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 38,003,025,194,661,513,000,000,000,000,000,000,000 | 93 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
void Val(Date_t& v) const {
v = Date();
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 45,689,732,608,370,980,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
{
unsigned long stride = le16_to_cpu(sbi->s_es->s_raid_stride);
unsigned long stripe_width =
le32_to_cpu(sbi->s_es->s_raid_stripe_width);
if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
return sbi->s_stripe;
if (stripe_width <... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 165,426,115,455,249,780,000,000,000,000,000,000,000 | 17 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
static void megasas_frame_set_scsi_status(MegasasState *s,
unsigned long frame, uint8_t v)
{
PCIDevice *pci = &s->parent_obj;
stb_pci_dma(pci, frame + offsetof(struct mfi_frame_header, scsi_status), v);
} | 0 | [
"CWE-401"
] | qemu | 765a707000e838c30b18d712fe6cb3dd8e0435f3 | 281,579,968,306,774,300,000,000,000,000,000,000,000 | 6 | megasas: fix guest-triggered memory leak
If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd
will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory.
Avoid this by returning only the status from map_dcmd, and loading
cmd->iov_size in the caller.
Reported-by: Li Qiang <liqiang6-s@360.c... |
static int wp_page_copy(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
struct mm_struct *mm = vma->vm_mm;
struct page *old_page = vmf->page;
struct page *new_page = NULL;
pte_t entry;
int page_copied = 0;
const unsigned long mmun_start = vmf->address & PAGE_MASK;
const unsigned long mmun_end = m... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 116,495,492,331,459,120,000,000,000,000,000,000,000 | 128 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static unsigned long *alloc_thread_stack_node(struct task_struct *tsk,
int node)
{
unsigned long *stack;
stack = kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);
stack = kasan_reset_tag(stack);
tsk->stack = stack;
return stack;
} | 0 | [
"CWE-665",
"CWE-362"
] | linux | b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948 | 50,396,052,735,451,180,000,000,000,000,000,000,000 | 9 | fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
current->group_leader->exit_signal may change during copy_process() if
current->real_parent exits.
Move the assignment inside tasklist_lock to avoid the race.
Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com>
Acked-by: Oleg Nesterov <oleg@redhat.... |
mrb_define_module(mrb_state *mrb, const char *name)
{
return define_module(mrb, mrb_intern_cstr(mrb, name), mrb->object_class);
} | 0 | [
"CWE-476",
"CWE-415"
] | mruby | faa4eaf6803bd11669bc324b4c34e7162286bfa3 | 26,895,142,067,629,485,000,000,000,000,000,000,000 | 4 | `mrb_class_real()` did not work for `BasicObject`; fix #4037 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.