func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void abort(void)
{
BUG();
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 96,305,323,783,772,680,000,000,000,000,000,000,000 | 7 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
static int snd_pcm_hw_rule_mul(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{
struct snd_interval t;
snd_interval_mul(hw_param_interval_c(params, rule->deps[0]),
hw_param_interval_c(params, rule->deps[1]), &t);
return snd_interval_refine(hw_param_interval(params, rule->var), &t);
... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 172,562,302,012,258,000,000,000,000,000,000,000,000 | 8 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
int inode_change_ok(const struct inode *inode, struct iattr *attr)
{
unsigned int ia_valid = attr->ia_valid;
/*
* First check size constraints. These can't be overriden using
* ATTR_FORCE.
*/
if (ia_valid & ATTR_SIZE) {
int error = inode_newsize_ok(inode, attr->ia_size);
if (error)
return error;
}
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 45,455,037,669,885,760,000,000,000,000,000,000,000 | 51 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
static struct child_process *git_tcp_connect(int fd[2], char *host, int flags)
{
int sockfd = git_tcp_connect_sock(host, flags);
fd[0] = sockfd;
fd[1] = dup(sockfd);
return &no_fork;
} | 0 | [] | git | a02ea577174ab8ed18f847cf1693f213e0b9c473 | 226,615,579,757,961,120,000,000,000,000,000,000,000 | 9 | git_connect_git(): forbid newlines in host and path
When we connect to a git:// server, we send an initial request that
looks something like:
002dgit-upload-pack repo.git\0host=example.com
If the repo path contains a newline, then it's included literally, and
we get:
002egit-upload-pack repo
.git\0host=exampl... |
GF_Err ctts_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
u32 sampleCount;
GF_CompositionOffsetBox *ptr = (GF_CompositionOffsetBox *)s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->nb_entries > ptr->size / 8) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid number o... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 173,374,887,041,150,600,000,000,000,000,000,000,000 | 35 | fixed #1587 |
PHP_MINFO_FUNCTION(xmlrpc)
{
php_info_print_table_start();
php_info_print_table_row(2, "core library version", XMLRPC_GetVersionString());
php_info_print_table_row(2, "php extension version", PHP_XMLRPC_VERSION);
php_info_print_table_row(2, "author", "Dan Libby");
php_info_print_table_row(2, "homepage", "http://xm... | 0 | [] | php-src | f3c1863aa2721343245b63ac7bd68cfdc3dd41f3 | 4,619,556,654,505,992,500,000,000,000,000,000,000 | 10 | Fixed #70728
Conflicts:
ext/xmlrpc/xmlrpc-epi-php.c |
static Exit_status check_header(IO_CACHE* file,
PRINT_EVENT_INFO *print_event_info,
const char* logname)
{
DBUG_ENTER("check_header");
uchar header[BIN_LOG_HEADER_SIZE];
uchar buf[PROBE_HEADER_LEN];
my_off_t tmp_pos, pos;
MY_STAT my_file_stat;
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 22,359,544,269,455,440,000,000,000,000,000,000,000 | 160 | 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... |
void snd_seq_device_load_drivers(void)
{
queue_autoload_drivers();
flush_work(&autoload_work);
} | 0 | [
"CWE-416",
"CWE-401"
] | linux | fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57 | 56,360,941,092,001,800,000,000,000,000,000,000,000 | 5 | ALSA: seq: Cancel pending autoload work at unbinding device
ALSA sequencer core has a mechanism to load the enumerated devices
automatically, and it's performed in an off-load work. This seems
causing some race when a sequencer is removed while the pending
autoload work is running. As syzkaller spotted, it may lead ... |
void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N){
assert( p->nOp + N <= p->nOpAlloc );
} | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 249,197,346,315,687,800,000,000,000,000,000,000,000 | 3 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
get_session_command_for_name (GdmSession *self,
const char *name,
char **command)
{
gboolean res;
char *filename;
filename = g_strdup_printf ("%s.desktop", name);
res = get_session_command_for_file (self, filename, c... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 85,719,880,169,542,200,000,000,000,000,000,000,000 | 13 | 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 |
BSONObj BSONObj::filterFieldsUndotted( const BSONObj &filter, bool inFilter ) const {
BSONObjBuilder b;
BSONObjIterator i( *this );
while( i.moreWithEOO() ) {
BSONElement e = i.next();
if ( e.eoo() )
break;
BSONElement x = filter.getField( ... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 240,200,454,242,104,920,000,000,000,000,000,000,000 | 14 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
double Item_default_value::val_result()
{
calculate();
return Item_field::val_result();
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 80,065,761,319,430,490,000,000,000,000,000,000,000 | 5 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static int cm_drep_handler(struct cm_work *work)
{
struct cm_id_private *cm_id_priv;
struct cm_drep_msg *drep_msg;
int ret;
drep_msg = (struct cm_drep_msg *)work->mad_recv_wc->recv_buf.mad;
cm_id_priv = cm_acquire_id(drep_msg->remote_comm_id,
drep_msg->local_comm_id);
if (!cm_id_priv)
return -EINVAL;
... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 240,606,931,682,809,120,000,000,000,000,000,000,000 | 37 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
vrrp_garp_lower_prio_delay_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
unsigned delay;
if (!read_unsigned_strvec(strvec, 1, &delay, 0, UINT_MAX / TIMER_HZ, true)) {
report_config_error(CONFIG_GENERAL_ERROR, "(%s): garp_lower_prio_delay '%s' invalid - ignoring", vrrp->iname, FMT_STR... | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 68,251,768,706,417,320,000,000,000,000,000,000,000 | 12 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
inline int32_t Dims(int i) const {
TFLITE_DCHECK_GE(i, 0);
TFLITE_DCHECK_LT(i, size_);
return size_ > kMaxSmallSize ? dims_pointer_[i] : dims_[i];
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 261,762,772,535,595,930,000,000,000,000,000,000,000 | 5 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
Array_decodeJson_internal(void **dst, const UA_DataType *type,
CtxJson *ctx, ParseCtx *parseCtx, UA_Boolean moveToken) {
(void) moveToken;
status ret;
if(parseCtx->tokenArray[parseCtx->index].type != JSMN_ARRAY)
return UA_STATUSCODE_BADDECODINGERROR;
size_t length = (size_t)pa... | 0 | [
"CWE-703",
"CWE-787"
] | open62541 | c800e2987b10bb3af6ef644b515b5d6392f8861d | 131,271,798,762,729,260,000,000,000,000,000,000,000 | 40 | fix(json): Check max recursion depth in more places |
void blk_mq_enable_hotplug(void)
{
mutex_unlock(&all_q_mutex);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 209,017,170,494,490,660,000,000,000,000,000,000,000 | 4 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
void Dispatcher::newparamchar( const Parser::Param *act )
{
assert( act->char_present );
assert( (act->ch == ';') || ( (act->ch >= '0') && (act->ch <= '9') ) );
if ( params.length() < 100 ) {
/* enough for 16 five-char params plus 15 semicolons */
params.push_back( act->ch );
act->handled = true;
}
... | 0 | [
"CWE-399"
] | mosh | 9791768705528e911bfca6c4d8aa88139035060e | 73,696,567,353,642,665,000,000,000,000,000,000,000 | 11 | Cap escape sequence parameters to prevent long loops.
Fixes #271 github issue. |
PHP_FUNCTION(chdir)
{
char *str;
int ret, str_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &str, &str_len) == FAILURE) {
RETURN_FALSE;
}
if (php_check_open_basedir(str TSRMLS_CC)) {
RETURN_FALSE;
}
ret = VCWD_CHDIR(str);
if (ret != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%... | 1 | [
"CWE-19"
] | php-src | be9b2a95adb504abd5acdc092d770444ad6f6854 | 215,803,266,267,490,900,000,000,000,000,000,000,000 | 30 | Fixed bug #69418 - more s->p fixes for filenames |
static int ParseEXRHeader(HeaderInfo *info, bool *empty_header,
const EXRVersion *version, std::string *err,
const unsigned char *buf, size_t size) {
const char *marker = reinterpret_cast<const char *>(&buf[0]);
if (empty_header) {
(*empty_header) = false;
... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 4,114,788,920,812,478,500,000,000,000,000,000,000 | 306 | Make line_no with too large value(2**20) invalid. Fixes #124 |
static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count)
{
size_t i;
const pb_byte_t *source = (const pb_byte_t*)stream->state;
stream->state = (pb_byte_t*)stream->state + count;
if (buf != NULL)
{
for (i = 0; i < count; i++)
buf[i] = source[i];
... | 0 | [
"CWE-20",
"CWE-119"
] | nanopb | 4fe23595732b6f1254cfc11a9b8d6da900b55b0c | 114,756,554,477,416,320,000,000,000,000,000,000,000 | 14 | Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)
Nanopb would leak memory when all of the following conditions were true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definitions contains an oneof field,
the oneof contains a static submessage, and
the static submessage contains a pointer fiel... |
build_object (GoaProvider *provider,
GoaObjectSkeleton *object,
GKeyFile *key_file,
const gchar *group,
GDBusConnection *connection,
gboolean just_added,
GError **error)
{
GoaAc... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 223,538,503,652,261,040,000,000,000,000,000,000,000 | 208 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
//! Compute the arccosine of each pixel value \newinstance.
CImg<Tfloat> get_acos() const {
return CImg<Tfloat>(*this,false).acos(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 314,776,298,751,068,300,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
lt_dladvise advise)
{
const char * saved_error = 0;
char * archive_name = 0;
char * canonical = 0;
char * base_name = 0;
char * dir = 0;
char * name = 0;
char * attempt = 0;
int errors = 0;
lt_dlhandle newhandle;... | 0 | [] | libtool | e91f7b960032074a55fc91273c1917e3082b5338 | 231,937,319,562,821,930,000,000,000,000,000,000,000 | 354 | Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current d... |
lyd_lyb_data_length(const char *data)
{
const char *ptr;
uint16_t i, mod_count, str_len;
uint8_t tmp_buf[2];
LYB_META meta;
if (!data) {
return -1;
}
ptr = data;
/* magic number */
if ((ptr[0] != 'l') || (ptr[1] != 'y') || (ptr[2] != 'b')) {
return -1;
}
pt... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 182,150,359,994,137,640,000,000,000,000,000,000,000 | 57 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static void FVMenuClear(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
FVClear( (FontViewBase *) fv );
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 8,372,594,998,219,005,000,000,000,000,000,000,000 | 4 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
gs_window_real_hide (GtkWidget *widget)
{
GSWindow *window;
window = GS_WINDOW (widget);
gdk_window_remove_filter (NULL, (GdkFilterFunc)xevent_filter, window);
remove_watchdog_timer (window);
if (GTK_WIDGET_CLASS (gs_window_parent_class)->hide) {
GTK_WIDGET_CL... | 0 | [] | gnome-screensaver | a5f66339be6719c2b8fc478a1d5fc6545297d950 | 101,501,555,791,190,300,000,000,000,000,000,000,000 | 14 | Ensure keyboard grab and unlock dialog exist after monitor removal
gnome-screensaver currently doesn't deal with monitors getting
removed properly. If the unlock dialog is on the removed monitor
then the unlock dialog and its associated keyboard grab are not
moved to an existing monitor when the monitor removal is pr... |
XML_SetElementDeclHandler(XML_Parser parser,
XML_ElementDeclHandler eldecl)
{
elementDeclHandler = eldecl;
} | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 210,668,412,658,247,360,000,000,000,000,000,000,000 | 5 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ |
static struct ppp *ppp_create_interface(struct net *net, int unit,
struct file *file, int *retp)
{
struct ppp *ppp;
struct ppp_net *pn;
struct net_device *dev = NULL;
int ret = -ENOMEM;
int i;
dev = alloc_netdev(sizeof(struct ppp), "", NET_NAME_ENUM, ppp_setup);
if (!dev)
goto out1;
pn = ppp_pernet(net... | 0 | [
"CWE-416"
] | linux | 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 | 237,096,503,577,630,520,000,000,000,000,000,000,000 | 97 | ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.
======... |
static int ntop_get_ndpi_protocol_breed(lua_State* vm) {
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
nDPIStats stats;
int proto;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR);
proto = ... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 196,556,603,044,887,420,000,000,000,000,000,000,000 | 21 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
int TTF_SetDirection(int direction) /* hb_direction_t */
{
#if TTF_USE_HARFBUZZ
g_hb_direction = direction;
return 0;
#else
(void) direction;
return -1;
#endif
} | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 33,962,135,869,533,550,000,000,000,000,000,000,000 | 10 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
const CImg<T>& _display_graph(CImgDisplay &disp, const char *const title=0,
const unsigned int plot_type=1, const unsigned int vertex_type=1,
const char *const labelx=0, const double xmin=0, const double xmax=0,
c... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 293,053,983,454,589,920,000,000,000,000,000,000,000 | 123 | . |
static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
{
int i, ret = 0, runtime_enabled, runtime_was_enabled;
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
if (tg == &root_task_group)
return -EINVAL;
/*
* Ensure we have at some amount of bandwidth every period. This is
* to prev... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 123,583,851,642,524,210,000,000,000,000,000,000,000 | 72 | 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... |
PJ_DEF(int) pjsua_handle_events(unsigned msec_timeout)
{
#if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0
return pj_symbianos_poll(-1, msec_timeout);
#else
unsigned count = 0;
pj_time_val tv;
pj_status_t status;
tv.sec = 0;
tv.msec = msec_timeout;
pj_time_val_normalize(&tv);
status = pjsi... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | d27f79da11df7bc8bb56c2f291d71e54df8d2c47 | 325,200,508,498,385,950,000,000,000,000,000,000,000 | 25 | Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest
* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()
* Fix incorrect check.
* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()
* Modifi... |
static BOOL check_alt_order_supported(wLog* log, rdpSettings* settings, BYTE orderType,
const char* orderName)
{
BOOL condition = FALSE;
switch (orderType)
{
case ORDER_TYPE_CREATE_OFFSCREEN_BITMAP:
case ORDER_TYPE_SWITCH_SURFACE:
condition = settings->OffscreenSupportLe... | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 217,111,307,651,461,060,000,000,000,000,000,000,000 | 47 | Fixed #6013: Check new length is > 0 |
static bool tcp_check_sack_reneging(struct sock *sk, int flag)
{
if (flag & FLAG_SACK_RENEGING) {
struct tcp_sock *tp = tcp_sk(sk);
unsigned long delay = max(usecs_to_jiffies(tp->srtt_us >> 4),
msecs_to_jiffies(10));
inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
delay, TCP_RTO_MAX);
return tr... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 141,504,107,173,136,600,000,000,000,000,000,000,000 | 13 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
PHP_FUNCTION(bcscale)
{
long new_scale;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &new_scale) == FAILURE) {
return;
}
BCG(bc_precision) = ((int)new_scale < 0) ? 0 : new_scale;
RETURN_TRUE;
} | 1 | [
"CWE-20"
] | php-src | ed52bcb3dcb2e7dbc009ef8c6579fb1276ca73c1 | 19,851,923,768,377,131,000,000,000,000,000,000,000 | 12 | Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
Conflicts:
main/php_version.h |
void ssl_set_renegotiation_enforced( ssl_context *ssl, int max_records )
{
ssl->renego_max_records = max_records;
} | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 136,593,167,398,554,370,000,000,000,000,000,000,000 | 4 | Added max length checking of hostname |
bool PDFDoc::checkLinearization() {
if (linearization == nullptr)
return false;
if (linearizationState == 1)
return true;
if (linearizationState == 2)
return false;
if (!hints) {
hints = new Hints(str, linearization, getXRef(), secHdlr);
}
if (!hints->isOk()) {
linearizationState = 2;
... | 0 | [
"CWE-20"
] | poppler | 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f | 11,016,114,271,184,260,000,000,000,000,000,000,000 | 39 | PDFDoc::setup: Fix return value
At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()
Fixes #706 |
static UINT drive_free(DEVICE* device)
{
DRIVE_DEVICE* drive = (DRIVE_DEVICE*)device;
UINT error = CHANNEL_RC_OK;
if (!drive)
return ERROR_INVALID_PARAMETER;
if (MessageQueue_PostQuit(drive->IrpQueue, 0) &&
(WaitForSingleObject(drive->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
WLog_E... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 36,388,455,068,416,647,000,000,000,000,000,000,000 | 18 | Fixed oob read in irp_write and similar |
smtp_send_thread(thread_t * thread)
{
smtp_t *smtp = THREAD_ARG(thread);
if (thread->type == THREAD_WRITE_TIMEOUT) {
log_message(LOG_INFO, "Timeout sending data to remote SMTP server %s."
, FMT_SMTP_HOST());
SMTP_FSM_READ(QUIT, thread, 0);
return 0;
}
SMTP_FSM_SEND(smtp->stage, thread);
/* Handle ... | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 8,719,721,086,356,986,000,000,000,000,000,000,000 | 32 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
static int __init wakeup_sources_sysfs_init(void)
{
wakeup_class = class_create(THIS_MODULE, "wakeup");
return PTR_ERR_OR_ZERO(wakeup_class);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 118,640,007,965,201,340,000,000,000,000,000,000,000 | 6 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static int kvm_s390_handle_requests(struct kvm_vcpu *vcpu)
{
retry:
kvm_s390_vcpu_request_handled(vcpu);
if (!kvm_request_pending(vcpu))
return 0;
/*
* We use MMU_RELOAD just to re-arm the ipte notifier for the
* guest prefix page. gmap_mprotect_notify will wait on the ptl lock.
* This ensures that the ipte ... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 113,530,936,744,472,530,000,000,000,000,000,000,000 | 79 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int __init gate_vma_init(void)
{
gate_vma.vm_mm = NULL;
gate_vma.vm_start = FIXADDR_USER_START;
gate_vma.vm_end = FIXADDR_USER_END;
gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
gate_vma.vm_page_prot = __P101;
return 0;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | b4cbb197c7e7a68dbad0d491242e3ca67420c13e | 173,073,415,126,447,700,000,000,000,000,000,000,000 | 10 | vm: add vm_iomap_memory() helper function
Various drivers end up replicating the code to mmap() their memory
buffers into user space, and our core memory remapping function may be
very flexible but it is unnecessarily complicated for the common cases
to use.
Our internal VM uses pfn's ("page frame numbers") which sim... |
static void fp_ungetc(int c, struct tok_state *tok) {
ungetc(c, tok->fp);
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 155,094,745,070,367,190,000,000,000,000,000,000,000 | 3 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
decompileENUMERATE(int n, SWF_ACTION *actions, int maxn, int is_type2)
{
int i=0;
while (i < maxn && i < 5 && OpCode(actions, n+i, maxn))
i++;
INDENT
println("/* a for-var-in loop should follow below: */" );
return i-1; // preserve some code for decompileIF()...
} // ... and let decompileIF() do all t... | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 75,148,536,674,251,270,000,000,000,000,000,000,000 | 10 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
GF_Err url_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_DataEntryURLBox *ptr = (GF_DataEntryURLBox *)s;
if (ptr->size) {
u32 location_size = (u32) ptr->size;
if (location_size < 1) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid size %llu in svhd box\n", ptr->size));
return GF_ISOM_INVALID_FILE... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 207,219,707,406,923,700,000,000,000,000,000,000,000 | 20 | fixed #2255 |
R_API const char *r_flag_color(RFlag *f, RFlagItem *it, const char *color) {
if (!f || !it) return NULL;
if (!color) return it->color;
free (it->color);
it->color = *color ? strdup (color) : NULL;
return it->color;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 52b1526443c1f433087928291d1c3d37a5600515 | 170,103,096,149,638,720,000,000,000,000,000,000,000 | 7 | Fix crash in wasm disassembler |
void free_abrt_conf_data()
{
free(g_settings_sWatchCrashdumpArchiveDir);
g_settings_sWatchCrashdumpArchiveDir = NULL;
free(g_settings_dump_location);
g_settings_dump_location = NULL;
} | 0 | [
"CWE-200"
] | abrt | 8939398b82006ba1fec4ed491339fc075f43fc7c | 262,819,632,262,306,040,000,000,000,000,000,000,000 | 8 | make the dump directories owned by root by default
It was discovered that the abrt event scripts create a user-readable
copy of a sosreport file in abrt problem directories, and include
excerpts of /var/log/messages selected by the user-controlled process
name, leading to an information disclosure.
This issue was dis... |
SYSCALL_DEFINE3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask)
{
sigset_t blocked;
siginitset(&blocked, mask);
return sigsuspend(&blocked);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 38,306,401,845,800,533,000,000,000,000,000,000,000 | 6 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
CImg(const t *const values, const unsigned int size_x, const unsigned int size_y=1,
const unsigned int size_z=1, const unsigned int size_c=1, const bool is_shared=false):_is_shared(false) {
if (is_shared) {
_width = _height = _depth = _spectrum = 0; _data = 0;
throw CImgArgumentExcept... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 101,447,120,900,380,520,000,000,000,000,000,000,000 | 25 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
authentic_erase_binary(struct sc_card *card, unsigned int offs, size_t count, unsigned long flags)
{
struct sc_context *ctx = card->ctx;
int rv;
unsigned char *buf_zero = NULL;
LOG_FUNC_CALLED(ctx);
if (!count)
LOG_TEST_RET(ctx, SC_ERROR_NOT_SUPPORTED, "'ERASE BINARY' with ZERO count not supported");
if (card... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 245,587,138,321,446,270,000,000,000,000,000,000,000 | 24 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
START_TEST(virgl_test_copy_transfer_from_staging_without_iov_fails)
{
static const unsigned bufsize = 50;
static const unsigned synchronized = 1;
struct virgl_context ctx = {0};
struct virgl_resource src_res = {0};
struct virgl_resource dst_res = {0};
struct pipe_box box = {.width = bufsize, .height = 1, .d... | 0 | [
"CWE-909"
] | virglrenderer | b05bb61f454eeb8a85164c8a31510aeb9d79129c | 266,044,627,644,561,830,000,000,000,000,000,000,000 | 33 | vrend: clear memory when allocating a host-backed memory resource
Closes: #249
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
gs_main_finit(gs_main_instance * minst, int exit_status, int code)
{
i_ctx_t *i_ctx_p = minst->i_ctx_p;
gs_dual_memory_t dmem = {0};
int exit_code;
ref error_object;
char *tempnames;
/* NB: need to free gs_name_table
*/
/*
* Previous versions of this code closed the devices in th... | 1 | [] | ghostpdl | 241d91112771a6104de10b3948c3f350d6690c1d | 111,754,590,613,958,970,000,000,000,000,000,000,000 | 159 | Bug 699664: Ensure the correct is in place before cleanup
If the PS job replaces the device and leaves that graphics state in place, we
wouldn't cleanup the default device in the normal way, but rely on the garbage
collector.
This works (but isn't ideal), *except* when the job replaces the device with
the null device... |
pfm_stop(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
{
struct pt_regs *tregs;
struct task_struct *task = PFM_CTX_TASK(ctx);
int state, is_system;
state = ctx->ctx_state;
is_system = ctx->ctx_fl_system;
/*
* context must be attached to issue the stop command (includes LOADED,MASKED,ZOMB... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 139,250,890,971,695,180,000,000,000,000,000,000,000 | 86 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
void usb_ep_combine_input_packets(USBEndpoint *ep)
{
USBPacket *p, *u, *next, *prev = NULL, *first = NULL;
USBPort *port = ep->dev->port;
int totalsize;
assert(ep->pipeline);
assert(ep->pid == USB_TOKEN_IN);
QTAILQ_FOREACH_SAFE(p, &ep->queue, queue, next) {
/* Empty the queue on a halt... | 0 | [
"CWE-770"
] | qemu | 05a40b172e4d691371534828078be47e7fff524c | 212,121,965,605,421,000,000,000,000,000,000,000,000 | 69 | usb: limit combined packets to 1 MiB (CVE-2021-3527)
usb-host and usb-redirect try to batch bulk transfers by combining many
small usb packets into a single, large transfer request, to reduce the
overhead and improve performance.
This patch adds a size limit of 1 MiB for those combined packets to
restrict the host re... |
png_set_gAMA(png_const_structrp png_ptr, png_inforp info_ptr, double file_gamma)
{
png_set_gAMA_fixed(png_ptr, info_ptr, png_fixed(png_ptr, file_gamma,
"png_set_gAMA"));
} | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 315,197,403,134,495,650,000,000,000,000,000,000,000 | 5 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
static inline int get_file_caps(struct linux_binprm *bprm)
{
bprm_clear_caps(bprm);
return 0;
} | 1 | [] | linux-2.6 | 3318a386e4ca68c76e0294363d29bdc46fcad670 | 183,133,645,747,739,020,000,000,000,000,000,000,000 | 5 | file caps: always start with clear bprm->caps_*
While Linux doesn't honor setuid on scripts. However, it mistakenly
behaves differently for file capabilities.
This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm->caps_*. That way when a script is loaded,
its bprm->caps_* may be ... |
static PHP_GINIT_FUNCTION(bcmath)
{
bcmath_globals->bc_precision = 0;
bc_init_numbers(TSRMLS_C);
} | 0 | [
"CWE-20"
] | php-src | ed52bcb3dcb2e7dbc009ef8c6579fb1276ca73c1 | 333,718,619,124,626,020,000,000,000,000,000,000,000 | 5 | Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
Conflicts:
main/php_version.h |
int mygetch( ) {
struct termios oldt,
newt;
int ch;
tcgetattr( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
return ch;
} | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 42,807,154,637,359,880,000,000,000,000,000,000,000 | 12 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
fr_window_set_list_mode (FrWindow *window,
FrWindowListMode list_mode)
{
g_return_if_fail (window != NULL);
if (list_mode == window->priv->list_mode)
return;
window->priv->list_mode = window->priv->last_list_mode = list_mode;
if (window->priv->list_mode == FR_WINDOW_LIST_MODE_FLAT) {
fr_window_hi... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 96,488,467,668,509,270,000,000,000,000,000,000,000 | 21 | libarchive: sanitize filenames before extracting |
on_pl(PG_FUNCTION_ARGS)
{
Point *pt = PG_GETARG_POINT_P(0);
LINE *line = PG_GETARG_LINE_P(1);
PG_RETURN_BOOL(FPzero(line->A * pt->x + line->B * pt->y + line->C));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 328,542,499,266,202,100,000,000,000,000,000,000,000 | 7 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
SYSCALL_DEFINE5(execveat,
int, fd, const char __user *, filename,
const char __user *const __user *, argv,
const char __user *const __user *, envp,
int, flags)
{
int lookup_flags = (flags & AT_EMPTY_PATH) ? LOOKUP_EMPTY : 0;
return do_execveat(fd,
getname_flags(filename, lookup_flags, NULL),
argv... | 0 | [
"CWE-362"
] | linux | 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 | 200,875,434,797,700,140,000,000,000,000,000,000,000 | 12 | fs: take i_mutex during prepare_binprm for set[ug]id executables
This prevents a race between chown() and execve(), where chowning a
setuid-user binary to root would momentarily make the binary setuid
root.
This patch was mostly written by Linus Torvalds.
Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linu... |
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct page *page;
u64 hpa;
if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) {
/*
* Translate L1 physical address to host physical
* address for vmcs02. Keep th... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 311,643,440,552,758,730,000,000,000,000,000,000,000 | 95 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
{
const char *type_str;
char buf[1024];
int len;
Bool newline;
type_str = LogMessageTypeVerbString(type, verb);
if (!type_str)
return;
/* if type_str is not "", prepend it and ' ', to message */
... | 0 | [
"CWE-863"
] | xserver | da15c7413916f754708c62c2089265528cd661e2 | 220,707,624,441,965,200,000,000,000,000,000,000,000 | 26 | LogFilePrep: add a comment to the unsafe format string.
CVE-2018-14665 also made it possible to exploit this to access
memory. With -logfile forbidden when running with elevated privileges
this is no longer an issue.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry... |
string_strip (const char *string, int left, int right, const char *chars)
{
const char *ptr_start, *ptr_end;
if (!string)
return NULL;
if (!string[0])
return strdup (string);
ptr_start = string;
ptr_end = string + strlen (string) - 1;
if (left)
{
while (ptr_start[... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 121,688,566,604,697,720,000,000,000,000,000,000,000 | 35 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
JSStream::JSStream(Environment* env, Local<Object> obj)
: AsyncWrap(env, obj, AsyncWrap::PROVIDER_JSSTREAM),
StreamBase(env) {
MakeWeak();
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 201,940,101,737,821,200,000,000,000,000,000,000,000 | 5 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static inline void SetPixelIndexTraits(Image *image,const PixelTrait traits)
{
image->channel_map[IndexPixelChannel].traits=traits;
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 270,473,897,589,511,540,000,000,000,000,000,000,000 | 4 | |
pixWindowedStats(PIX *pixs,
l_int32 wc,
l_int32 hc,
l_int32 hasborder,
PIX **ppixm,
PIX **ppixms,
FPIX **pfpixv,
FPIX **pfpixrv)
{
PIX *pixb, *pixm, *pixms;
PROCNAME("pixWindowed... | 0 | [] | leptonica | 480f5e74c24fdc2003c42a4e15d1f24c9e6ea469 | 194,864,446,196,355,400,000,000,000,000,000,000,000 | 51 | Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray(). |
R_API void r_anal_var_clear_accesses(RAnalVar *var) {
r_return_if_fail (var);
RAnalFunction *fcn = var->fcn;
if (fcn->inst_vars) {
// remove all inverse references to the var's accesses
RAnalVarAccess *acc;
r_vector_foreach (&var->accesses, acc) {
RPVector *inst_accesses = ht_up_find (fcn->inst_vars, (ut64)... | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 264,254,301,046,859,200,000,000,000,000,000,000,000 | 17 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
static int ringbuf_map_update_elem(struct bpf_map *map, void *key, void *value,
u64 flags)
{
return -ENOTSUPP;
} | 0 | [
"CWE-787"
] | bpf | 4b81ccebaeee885ab1aa1438133f2991e3a2b6ea | 265,086,318,199,041,200,000,000,000,000,000,000,000 | 5 | bpf, ringbuf: Deny reserve of buffers larger than ringbuf
A BPF program might try to reserve a buffer larger than the ringbuf size.
If the consumer pointer is way ahead of the producer, that would be
successfully reserved, allowing the BPF program to read or write out of
the ringbuf allocated area.
Reported-by: Ryota... |
void ReturnRaggedTensor(OpKernelContext* context,
const RaggedTensorVariant& ragged_tensor) {
int ragged_rank = ragged_tensor.ragged_rank();
OpOutputList splits_out;
OP_REQUIRES_OK(context,
context->output_list("output_nested_splits", &splits_out));
for (in... | 0 | [
"CWE-703",
"CWE-681"
] | tensorflow | 4e2565483d0ffcadc719bd44893fb7f609bb5f12 | 90,108,146,849,207,550,000,000,000,000,000,000,000 | 11 | Fix bug that could cause map_fn to produce incorrect results (rather than an error)
when mapping over a ragged tensor with an inappropriate fn_output_signature. (Note: there are cases where the default value for fn_output_signature is not appropriate, so the user needs to explicitly specify the correct output signatur... |
var2fpos(
typval_T *varp,
int dollar_lnum, // TRUE when $ is last line
int *fnum, // set to fnum for '0, 'A, etc.
int charcol) // return character column
{
char_u *name;
static pos_T pos;
pos_T *pp;
// Argument can be [lnum, col, coladd].
if (varp->v_type == VAR_LIST)
{
l... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 107,676,063,694,300,480,000,000,000,000,000,000,000 | 135 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
SPL_METHOD(SplObjectStorage, rewind)
{
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
intern->index = 0;
} /* }}} */ | 0 | [
"CWE-416"
] | php-src | c2e197e4efc663ca55f393bf0e799848842286f3 | 207,361,601,867,277,550,000,000,000,000,000,000,000 | 11 | Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage |
*/
void napi_gro_flush(struct napi_struct *napi, bool flush_old)
{
unsigned long bitmask = napi->gro_bitmask;
unsigned int i, base = ~0U;
while ((i = ffs(bitmask)) != 0) {
bitmask >>= i;
base += i;
__napi_gro_flush_chain(napi, base, flush_old);
} | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 115,147,949,264,005,450,000,000,000,000,000,000,000 | 11 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
inline void LocalResponseNormalization(
const tflite::LocalResponseNormalizationParams& op_params,
const RuntimeShape& input_shape, const float* input_data,
const RuntimeShape& output_shape, float* output_data) {
ruy::profiler::ScopeLabel label("LocalResponseNormalization");
MatchingFlatSize(input_shape... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 293,585,008,637,242,000,000,000,000,000,000,000,000 | 44 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
conn_key_extract(struct conntrack *ct, struct dp_packet *pkt, ovs_be16 dl_type,
struct conn_lookup_ctx *ctx, uint16_t zone)
{
const struct eth_header *l2 = dp_packet_eth(pkt);
const struct ip_header *l3 = dp_packet_l3(pkt);
const char *l4 = dp_packet_l4(pkt);
bool ok;
memset(ctx, 0... | 0 | [
"CWE-400"
] | ovs | 35c280072c1c3ed58202745b7d27fbbd0736999b | 281,109,027,509,751,730,000,000,000,000,000,000,000 | 82 | 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... |
static void enable_no_etm(gnutls_priority_t c)
{
c->no_etm = 1;
} | 0 | [
"CWE-310"
] | gnutls | 21f89efad7014a5ee0debd4cd3d59e27774b29e6 | 263,547,447,688,602,900,000,000,000,000,000,000,000 | 4 | handshake: add FALLBACK_SCSV priority option
This allows clients to enable the TLS_FALLBACK_SCSV mechanism during
the handshake, as defined in RFC7507. |
static CURLcode parseurlandfillconn(struct Curl_easy *data,
struct connectdata *conn)
{
CURLcode result;
CURLU *uh;
CURLUcode uc;
char *hostname;
Curl_up_free(data); /* cleanup previous leftovers first */
/* parse the URL */
uh = data->state.uh = curl_url();
if(!uh)... | 0 | [
"CWE-416"
] | curl | 81d135d67155c5295b1033679c606165d4e28f3f | 313,712,119,772,349,350,000,000,000,000,000,000,000 | 175 | Curl_close: clear data->multi_easy on free to avoid use-after-free
Regression from b46cfbc068 (7.59.0)
CVE-2018-16840
Reported-by: Brian Carpenter (Geeknik Labs)
Bug: https://curl.haxx.se/docs/CVE-2018-16840.html |
void vmalloc_sync_all(void)
{
sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END, 0);
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 145,261,921,573,971,180,000,000,000,000,000,000,000 | 4 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
get_address(const char *value, /* I - Value string */
int defport) /* I - Default port */
{
char buffer[1024], /* Hostname + port number buffer */
defpname[255], /* Default port name */
*hostname, /* Hostname or IP */
*portname; /* Port number or name */
http_addrlist_t *addrlist; /* Addre... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 315,878,551,902,184,800,000,000,000,000,000,000,000 | 70 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
WORK_STATE tls_post_process_server_certificate(SSL *s, WORK_STATE wst)
{
X509 *x;
EVP_PKEY *pkey = NULL;
const SSL_CERT_LOOKUP *clu;
size_t certidx;
int i;
i = ssl_verify_cert_chain(s, s->session->peer_chain);
if (i == -1) {
s->rwstate = SSL_RETRY_VERIFY;
return WORK_MORE_A;... | 0 | [
"CWE-835"
] | openssl | 758754966791c537ea95241438454aa86f91f256 | 268,768,344,572,141,200,000,000,000,000,000,000,000 | 79 | Fix invalid handling of verify errors in libssl
In the event that X509_verify() returned an internal error result then
libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This
subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY.
That return code is supposed to only ever be returned i... |
static void i2c_w_mask(struct sd *sd,
u8 reg,
u8 value,
u8 mask)
{
int rc;
u8 oldval;
value &= mask; /* Enforce mask on value */
rc = i2c_r(sd, reg);
if (rc < 0)
return;
oldval = rc & ~mask; /* Clear the masked bits */
value |= oldval; /* Set the desired bits */
i2c_w(sd, reg, value);
} | 0 | [
"CWE-476"
] | linux | 998912346c0da53a6dbb71fab3a138586b596b30 | 201,035,238,427,018,400,000,000,000,000,000,000,000 | 16 | media: ov519: add missing endpoint sanity checks
Make sure to check that we have at least one endpoint before accessing
the endpoint array to avoid dereferencing a NULL-pointer on stream
start.
Note that these sanity checks are not redundant as the driver is mixing
looking up altsettings by index and by number, which... |
tr_find(unsigned int c, char table[256], VALUE del, VALUE nodel)
{
if (c < 256) {
return table[c] != 0;
}
else {
VALUE v = UINT2NUM(c);
if (del && !NIL_P(rb_hash_lookup(del, v))) {
if (!nodel || NIL_P(rb_hash_lookup(nodel, v))) {
return TRUE;
}
}
return FALSE;
}
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 318,913,905,709,135,600,000,000,000,000,000,000,000 | 16 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
R_API RBinJavaElementValuePair *r_bin_java_element_pair_new(ut8 *buffer, ut64 sz, ut64 buf_offset) {
if (!buffer || sz < 4) {
return NULL;
}
RBinJavaElementValuePair *evp = R_NEW0 (RBinJavaElementValuePair);
if (!evp) {
return NULL;
}
// TODO: What is the signifigance of evp element
evp->element_name_idx = R... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 256,394,024,147,906,200,000,000,000,000,000,000,000 | 32 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
longlong val_int(void) { return val_int_from_real(false); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 227,377,851,108,006,720,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 vmw_hw_surface_destroy(struct vmw_resource *res)
{
struct vmw_private *dev_priv = res->dev_priv;
struct vmw_surface *srf;
void *cmd;
if (res->func->destroy == vmw_gb_surface_destroy) {
(void) vmw_gb_surface_destroy(res);
return;
}
if (res->id != -1) {
cmd = vmw_fifo_reserve(dev_priv, vmw_sur... | 0 | [
"CWE-20"
] | linux | ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf | 303,616,059,614,719,620,000,000,000,000,000,000,000 | 37 | drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is
a user-controlled 'uint32_t' value which is used as a loop count limit.
This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'.
References:
https://bugzill... |
dnname_string(netdissect_options *ndo, u_short dnaddr)
{
#ifdef HAVE_DNET_HTOA
struct dn_naddr dna;
char *dnname;
dna.a_len = sizeof(short);
memcpy((char *)dna.a_addr, (char *)&dnaddr, sizeof(short));
dnname = dnet_htoa(&dna);
if(dnname != NULL)
return (strdup(dnname));
else
return(dnnum_string(ndo, dnaddr)... | 0 | [
"CWE-125"
] | tcpdump | c6e0531b5def26ecf912e8de6ade86cbdaed3751 | 308,213,804,771,812,850,000,000,000,000,000,000,000 | 17 | CVE-2017-12899/DECnet: Fix bounds checking.
If we're skipping over padding before the *real* flags, check whether
the real flags are in the captured data before fetching it. This fixes
a buffer over-read discovered by Kamil Frankowicz.
Note one place where we don't need to do bounds checking as it's already
been don... |
static int fake_panic_set(void *data, u64 val)
{
mce_reset();
fake_panic = val;
return 0;
} | 0 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 203,154,872,959,675,660,000,000,000,000,000,000,000 | 6 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
static inline void Process_v9_data(exporter_v9_domain_t *exporter, void *data_flowset, FlowSource_t *fs, input_translation_t *table ){
uint64_t start_time, end_time, sampling_rate;
uint32_t size_left;
uint8_t *in, *out;
int i;
char *string;
size_left = GET_FLOWSET_LENGTH(data_flowset) - 4; // -4 for dat... | 1 | [] | nfdump | ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8 | 141,032,412,999,564,350,000,000,000,000,000,000,000 | 489 | Fix security issues in netflow_v9.c and ipfix.c |
ptaGetArrays(PTA *pta,
NUMA **pnax,
NUMA **pnay)
{
l_int32 i, n;
NUMA *nax, *nay;
PROCNAME("ptaGetArrays");
if (!pnax && !pnay)
return ERROR_INT("no output requested", procName, 1);
if (pnax) *pnax = NULL;
if (pnay) *pnay = NULL;
if (!pta)
return ... | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 54,386,159,667,490,200,000,000,000,000,000,000,000 | 36 | Security fixes: expect final changes for release 1.75.3.
* Fixed a debian security issue with fscanf() reading a string with
possible buffer overflow.
* There were also a few similar situations with sscanf(). |
bgp_attr_unintern_sub (struct attr *attr)
{
/* aspath refcount shoud be decrement. */
if (attr->aspath)
aspath_unintern (&attr->aspath);
UNSET_FLAG(attr->flag, BGP_ATTR_AS_PATH);
if (attr->community)
community_unintern (&attr->community);
UNSET_FLAG(attr->flag, BGP_ATTR_COMMUNITIES);
if (attr-... | 0 | [] | quagga | 8794e8d229dc9fe29ea31424883433d4880ef408 | 199,091,067,759,877,500,000,000,000,000,000,000,000 | 25 | bgpd: Fix regression in args consolidation, total should be inited from args
* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args. |
ephy_string_commandline_args_to_uris (char **arguments,
GError **error)
{
gchar **args;
GFile *file;
guint i;
if (arguments == NULL)
return NULL;
args = g_malloc0 (sizeof (gchar *) * (g_strv_length (arguments) + 1));
for (i = 0; arguments[i] != NULL; ++i) {
... | 0 | [
"CWE-787"
] | epiphany | 486da133569ebfc436c959a7419565ab102e8525 | 97,849,480,803,823,360,000,000,000,000,000,000,000 | 29 | Fix memory corruption in ephy_string_shorten()
This fixes a regression that I introduced in 232c613472b38ff0d0d97338f366024ddb9cd228.
I got my browser stuck in a crash loop today while visiting a website
with a page title greater than ephy-embed.c's MAX_TITLE_LENGTH, the only
condition in which ephy_string_shorten() ... |
static int write_tree_extension(git_index *index, git_filebuf *file)
{
struct index_extension extension;
git_buf buf = GIT_BUF_INIT;
int error;
if (index->tree == NULL)
return 0;
if ((error = git_tree_cache_write(&buf, index->tree)) < 0)
return error;
memset(&extension, 0x0, sizeof(struct index_extension))... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 271,451,825,390,718,070,000,000,000,000,000,000,000 | 22 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
mwifiex_uap_bss_wep(u8 **tlv_buf, void *cmd_buf, u16 *param_size)
{
struct host_cmd_tlv_wep_key *wep_key;
u16 cmd_size = *param_size;
int i;
u8 *tlv = *tlv_buf;
struct mwifiex_uap_bss_param *bss_cfg = cmd_buf;
for (i = 0; i < NUM_WEP_KEYS; i++) {
if (bss_cfg->wep_cfg[i].length &&
(bss_cfg->wep_cfg[i].len... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 7caac62ed598a196d6ddf8d9c121e12e082cac3a | 66,997,266,128,007,870,000,000,000,000,000,000,000 | 33 | 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... |
relpTcpConnectTLSInit(relpTcp_t *pThis)
{
int r;
int sockflags;
ENTER_RELPFUNC;
RELPOBJ_assert(pThis, Tcp);
/* We expect a non blocking socket to establish a tls session */
if((sockflags = fcntl(pThis->sock, F_GETFL)) != -1) {
sockflags &= ~O_NONBLOCK;
sockflags = fcntl(pThis->sock, F_SETFL, sockflags);
}
... | 0 | [
"CWE-787"
] | librelp | 2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf | 207,668,871,005,323,050,000,000,000,000,000,000,000 | 111 | unify error message generation |
gstd_get_mech(gss_OID mech_oid)
{
#ifdef HAVE_GSS_OID_TO_STR
OM_uint32 maj;
OM_uint32 min;
#endif
gss_buffer_desc buf;
unsigned char *bufp;
unsigned char nibble;
char *ret;
size_t i, k;
if (mech_oid->length == sizeof(KNC_KRB5_MECH_OID) - 1 &&
memcmp(mech_oid->elements, KNC_KRB5_MECH_OID,
sizeof... | 0 | [
"CWE-400",
"CWE-703"
] | knc | f237f3e09ecbaf59c897f5046538a7b1a3fa40c1 | 125,308,245,722,582,750,000,000,000,000,000,000,000 | 36 | knc: fix a couple of memory leaks.
One of these can be remotely triggered during the authentication
phase which leads to a remote DoS possibility.
Pointed out by: Imre Rad <radimre83@gmail.com> |
zfont_info(gs_font *font, const gs_point *pscale, int members,
gs_font_info_t *info)
{
int code = gs_default_font_info(font, pscale, members &
~(FONT_INFO_COPYRIGHT | FONT_INFO_NOTICE |
FONT_INFO_FAMILY_NAME | FONT_INFO_FULL_NAME),
... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 307,574,980,181,806,440,000,000,000,000,000,000,000 | 38 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
int adapter_create_bonding(struct btd_adapter *adapter, const bdaddr_t *bdaddr,
uint8_t addr_type, uint8_t io_cap)
{
if (adapter->pair_device_id > 0) {
btd_error(adapter->dev_id,
"Unable pair since another pairing is in progress");
return -EBUSY;
}
suspend_discovery(adapter);
return adapter_bonding_at... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 218,327,169,477,293,860,000,000,000,000,000,000,000 | 13 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
print_import_ok (PKT_public_key *pk, unsigned int reason)
{
byte array[MAX_FINGERPRINT_LEN], *s;
char buf[MAX_FINGERPRINT_LEN*2+30], *p;
size_t i, n;
snprintf (buf, sizeof buf, "%u ", reason);
p = buf + strlen (buf);
fingerprint_from_pk (pk, array, &n);
s = array;
for (i=0; i < n ; i++, s++, p += 2)
... | 0 | [
"CWE-20"
] | gnupg | f0b33b6fb8e0586e9584a7a409dcc31263776a67 | 37,954,558,749,098,210,000,000,000,000,000,000,000 | 16 | gpg: Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--
A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring. This change skips all
packets which are not allowed in a ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.