func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ha_rows get_curr_rownum() const
{
if (end_of_partition)
return cursor.get_rownum(); // Cursor does not pass over partition bound.
else
return cursor.get_rownum() - 1; // Cursor is placed on first non peer.
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 254,170,260,408,018,600,000,000,000,000,000,000,000 | 7 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
inline void send_kill_message()
{
mysql_mutex_lock(&LOCK_thd_kill);
int err= killed_errno();
if (err)
my_message(err, killed_err ? killed_err->msg : ER_THD(this, err),
MYF(0));
mysql_mutex_unlock(&LOCK_thd_kill);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 331,771,654,538,264,330,000,000,000,000,000,000,000 | 9 | 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... |
void sdiffstoreCommand(client *c) {
sunionDiffGenericCommand(c,c->argv+2,c->argc-2,c->argv[1],SET_OP_DIFF);
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 169,436,545,532,131,750,000,000,000,000,000,000,000 | 3 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
make_page_offset_hints(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, fz_buffer *buf)
{
int i, j;
int min_objs_per_page, max_objs_per_page;
int min_page_length, max_page_length;
int objs_per_page_bits;
int min_shared_object, max_shared_object;
int max_shared_object_refs = 0;
int min_shared_length, ma... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 104,043,977,158,323,720,000,000,000,000,000,000,000 | 268 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
static int smack_kernel_act_as(struct cred *new, u32 secid)
{
char *smack = smack_from_secid(secid);
if (smack == NULL)
return -EINVAL;
new->security = smack;
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 327,873,268,928,537,270,000,000,000,000,000,000,000 | 10 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
void WebContents::WebContentsDestroyed() {
// Clear the pointer stored in wrapper.
if (GetAllWebContents().Lookup(id_))
GetAllWebContents().Remove(id_);
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
v8::HandleScope scope(isolate);
v8::Local<v8::Object> wrapper;
if (!GetWrapper(isolate).ToL... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 133,613,201,083,740,670,000,000,000,000,000,000,000 | 18 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
user_lookup (pam_handle_t *pamh, const char *database, const char *cryptmode,
const char *user, const char *pass, int ctrl)
{
DBM *dbm;
datum key, data;
/* Open the DB file. */
dbm = dbm_open(database, O_RDONLY, 0644);
if (dbm == NULL) {
pam_syslog(pamh, LOG_ERR,
"user_lookup: could not... | 1 | [] | linux-pam | 57a1e2b274d0a6376d92ada9926e5c5741e7da20 | 112,434,099,628,297,300,000,000,000,000,000,000,000 | 169 | pam_userdb: fix password hash comparison
Starting with commit Linux-PAM-0-77-28-g0b3e583 that introduced hashed
passwords support in pam_userdb, hashes are compared case-insensitively.
This bug leads to accepting hashes for completely different passwords in
addition to those that should be accepted.
Additionally, com... |
void tcp_xmit_retransmit_queue(struct sock *sk)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct sk_buff *skb, *rtx_head, *hole = NULL;
struct tcp_sock *tp = tcp_sk(sk);
u32 max_segs;
int mib_idx;
if (!tp->packets_out)
return;
rtx_head = tcp_rtx_queue_head(sk);
skb = tp->retransmit_skb_hint ... | 0 | [
"CWE-416"
] | linux | 7f582b248d0a86bae5788c548d7bb5bca6f7691a | 67,879,416,982,098,960,000,000,000,000,000,000,000 | 69 | tcp: purge write queue in tcp_connect_init()
syzkaller found a reliable way to crash the host, hitting a BUG()
in __tcp_retransmit_skb()
Malicous MSG_FASTOPEN is the root cause. We need to purge write queue
in tcp_connect_init() at the point we init snd_una/write_seq.
This patch also replaces the BUG() by a less int... |
symbols_free (void)
{
hash_free (symbol_table);
hash_free (semantic_type_table);
free (symbols);
free (symbols_sorted);
free (semantic_types_sorted);
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 224,316,698,260,517,750,000,000,000,000,000,000,000 | 8 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
network_init ()
{
#ifdef HAVE_GNUTLS
char *ca_path, *ca_path2;
gnutls_global_init ();
gnutls_certificate_allocate_credentials (&gnutls_xcred);
ca_path = string_expand_home (CONFIG_STRING(config_network_gnutls_ca_file));
if (ca_path)
{
ca_path2 = string_replace (ca_path, "%h", weech... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 6,040,224,570,967,733,000,000,000,000,000,000,000 | 32 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
TEST_F(RenameCollectionTest,
RenameCollectionAcrossDatabaseKeepsGlobalWriteLockExclusiveIfCallerHasGlobalWriteLock) {
// This simulates the case when renameCollection is called using the applyOps command (different
// from secondary oplog application).
_createCollection(_opCtx.get(), _sourceNss);
... | 0 | [
"CWE-20"
] | mongo | 35c1b1f588f04926a958ad2fe4d9c59d79f81e8b | 192,227,792,714,722,620,000,000,000,000,000,000,000 | 10 | SERVER-35636 renameCollectionForApplyOps checks for complete namespace |
int RGWPutACLs_ObjStore_S3::get_params()
{
int ret = RGWPutACLs_ObjStore::get_params();
if (ret >= 0) {
const int ret_auth = do_aws4_auth_completion();
if (ret_auth < 0) {
return ret_auth;
}
} else {
/* a request body is not required an S3 PutACLs request--n.b.,
* s->length is non-null... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 37,669,963,773,639,506,000,000,000,000,000,000,000 | 20 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
{
struct page *page;
void *buf;
bool more;
spin_lock_bh(&q->lock);
do {
buf = mt76_dma_dequeue(dev, q, true, NULL, NULL, &more);
if (!buf)
break;
skb_free_frag(buf);
} while (1);
spin_unlock_bh(&q->lock);
if (!q->rx_page.va)
return;
... | 0 | [
"CWE-120",
"CWE-787"
] | linux | b102f0c522cf668c8382c56a4f771b37d011cda2 | 116,101,981,096,072,360,000,000,000,000,000,000,000 | 23 | mt76: fix array overflow on receiving too many fragments for a packet
If the hardware receives an oversized packet with too many rx fragments,
skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages.
This becomes especially visible if it corrupts the freelist pointer of
a slab page.
Cc: stable@vger.k... |
void CClient::Con_Rcon(IConsole::IResult *pResult, void *pUserData)
{
CClient *pSelf = (CClient *)pUserData;
pSelf->Rcon(pResult->GetString(0));
} | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 50,243,692,895,179,550,000,000,000,000,000,000,000 | 5 | added some checks to snap handling |
static ZIPARCHIVE_METHOD(setCommentIndex)
{
struct zip *intern;
zval *self = getThis();
zend_long index;
size_t comment_len;
char * comment;
struct zip_stat sb;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls",
&index, &comment, &comment_len) ... | 0 | [
"CWE-190"
] | php-src | 3b8d4de300854b3517c7acb239b84f7726c1353c | 219,665,969,284,074,540,000,000,000,000,000,000,000 | 23 | Fix bug #71923 - integer overflow in ZipArchive::getFrom* |
static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __be32 info)
{
/* xfrm6_tunnel native err handling */
switch (type) {
case ICMPV6_DEST_UNREACH:
switch (code) {
case ICMPV6_NOROUTE:
case ICMPV6_ADM_PROHIBITED:
case ICMPV6_NOT_NEIGHBOUR:
cas... | 0 | [
"CWE-399"
] | linux | d0772b70faaf8e9f2013b6c4273d94d5eac8047a | 313,864,223,561,055,200,000,000,000,000,000,000,000 | 40 | [IPV6]: Fix slab corruption running ip6sic
From: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int tda9855_treble(int val) { return (val/0x1c71+0x3)<<1; } | 0 | [
"CWE-399"
] | linux-2.6 | 01a1a3cc1e3fbe718bd06a2a5d4d1a2d0fb4d7d9 | 225,409,820,254,818,700,000,000,000,000,000,000,000 | 1 | V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble
This bug were supposed to be fixed by 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1,
where a call to NULL happens.
Not all tvaudio chips allow controlling bass/treble. So, the driver
has a table with a flag to indicate if the chip does support... |
void vrend_renderer_get_meminfo(struct vrend_context *ctx, uint32_t res_handle)
{
struct vrend_resource *res;
struct virgl_memory_info *info;
res = vrend_renderer_ctx_res_lookup(ctx, res_handle);
if (!res) {
vrend_report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_RESOURCE, res_handle);
return;
... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 285,348,911,815,493,870,000,000,000,000,000,000,000 | 32 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
static unsigned int pid_entry_count_dirs(const struct pid_entry *entries,
unsigned int n)
{
unsigned int i;
unsigned int count;
count = 0;
for (i = 0; i < n; ++i) {
if (S_ISDIR(entries[i].mode))
++count;
}
return count;
} | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 77,114,544,287,622,840,000,000,000,000,000,000,000 | 14 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
static double KernelBessel_Order1(double x)
{
double p, q;
if (x == 0.0)
return (0.0f);
p = x;
if (x < 0.0)
x=(-x);
if (x < 8.0)
return (p*KernelBessel_J1(x));
q = (double)sqrt(2.0f/(M_PI*x))*(double)(KernelBessel_P1(x)*(1.0f/sqrt(2.0f)*(sin(x)-cos(x)))-8.0f/x*KernelBessel_Q1(x)*
(-1.0f/sqrt(2.0f)*(sin(x... | 0 | [
"CWE-119"
] | php-src | 4bb422343f29f06b7081323844d9b52e1a71e4a5 | 149,816,560,757,285,830,000,000,000,000,000,000,000 | 17 | Fix bug #70976: fix boundary check on gdImageRotateInterpolated |
static int check_stack_write_fixed_off(struct bpf_verifier_env *env,
/* stack frame we're writing to */
struct bpf_func_state *state,
int off, int size, int value_regno,
int insn_idx)
{
struct bpf_func_state *cur; /* state of the current function */
int i, slot = -off - 1, ... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 314,868,014,185,333,750,000,000,000,000,000,000,000 | 104 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
{
if (sta->rate_ctrl)
rate_control_free_sta(sta);
sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
if (sta->sta.txq[0])
kfree(to_txq_info(sta->sta.txq[0]));
kfree(rcu_dereference_raw(sta->sta.rates));
#ifdef CONFIG_MAC80211_MESH... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 116,839,202,192,400,550,000,000,000,000,000,000,000 | 16 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
struct uwsgi_regexp_list *uwsgi_regexp_custom_new_list(struct uwsgi_regexp_list **list, char *value, char *custom) {
struct uwsgi_regexp_list *url = *list, *old_url;
if (!url) {
*list = uwsgi_malloc(sizeof(struct uwsgi_regexp_list));
url = *list;
}
else {
while (url) {
old_url = url;
url = url->next;
... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 234,604,720,219,577,300,000,000,000,000,000,000,000 | 28 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
void resume_subsequent_commits(wait_for_commit *suspended) {
DBUG_ASSERT(!wait_for_commit_ptr);
wait_for_commit_ptr= suspended;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 293,832,726,168,904,420,000,000,000,000,000,000,000 | 4 | 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... |
usm_create_initial_user(const char *name,
const oid * authProtocol, size_t authProtocolLen,
const oid * privProtocol, size_t privProtocolLen)
{
struct usmUser *newUser = usm_create_user();
if (newUser == NULL)
return NULL;
if ((newUser->name = strdup(... | 0 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 123,826,286,056,317,790,000,000,000,000,000,000,000 | 45 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. |
tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
{
tsize_t written=0;
tdir_t i=0;
char buffer[32];
int buflen=0;
int page=0;
written += t2pWriteFile(output,
(tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
page = t2p->pdf_pages+1;
for (i=0;i<t2p->tiff_pagecount;i++){
buflen=snprintf(buffer, sizeof(buffer)... | 0 | [
"CWE-787"
] | libtiff | 7be2e452ddcf6d7abca88f41d3761e6edab72b22 | 277,904,914,343,702,400,000,000,000,000,000,000,000 | 35 | tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
fixes #220 |
drill_parse_T_code(gerb_file_t *fd, drill_state_t *state,
gerbv_image_t *image, ssize_t file_line)
{
int tool_num;
gboolean done = FALSE;
int temp;
double size;
gerbv_drill_stats_t *stats = image->drill_stats;
gerbv_aperture_t *apert;
gchar *tmps;
gchar *string;
dprintf("---> ent... | 0 | [
"CWE-787"
] | gerbv | 672214abb47a802fc000125996e6e0a46c623a4e | 49,656,779,834,708,580,000,000,000,000,000,000,000 | 234 | Add test to demonstrate buffer overrun |
worker_on_cancel_pending_query (GdmDBusWorker *worker,
GdmSessionConversation *conversation)
{
cancel_pending_query (conversation);
} | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 134,324,009,589,003,200,000,000,000,000,000,000,000 | 5 | 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 |
_cupsSNMPOIDToString(const int *src, /* I - OID */
char *dst, /* I - String buffer */
size_t dstsize) /* I - Size of string buffer */
{
char *dstptr, /* Pointer into string buffer */
*dstend; /* End of string buffer */
DEBUG_printf(("4_cupsSNMPOIDToString(src... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 234,455,110,866,343,270,000,000,000,000,000,000,000 | 32 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
inline bool check_killed()
{
if (killed)
return TRUE;
if (apc_target.have_apc_requests())
apc_target.process_apc_requests();
return FALSE;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 298,467,365,031,343,930,000,000,000,000,000,000,000 | 8 | 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... |
Http2Options::Http2Options(Environment* env, nghttp2_session_type type) {
nghttp2_option_new(&options_);
// Make sure closed connections aren't kept around, taking up memory.
// Note that this breaks the priority tree, which we don't use.
nghttp2_option_set_no_closed_streams(options_, 1);
// We manually han... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 147,840,822,823,394,080,000,000,000,000,000,000,000 | 110 | 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 php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context, const unsigned char *key, const int key_len) {
memset(K, 0, ops->block_size);
if (key_len > ops->block_size) {
/* Reduce the key first */
ops->hash_init(context);
ops->hash_update(context, key, key_len);
ops->h... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 16,917,266,495,935,865,000,000,000,000,000,000,000 | 13 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
void ExpressionRegex::_doAddDependencies(DepsTracker* deps) const {
_input->addDependencies(deps);
_regex->addDependencies(deps);
if (_options) {
_options->addDependencies(deps);
}
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 305,163,595,926,750,870,000,000,000,000,000,000,000 | 7 | SERVER-49404 Enforce additional checks in $arrayToObject |
_gnutls_abort_handshake(gnutls_session_t session, int ret)
{
if (((ret == GNUTLS_E_WARNING_ALERT_RECEIVED) &&
(gnutls_alert_get(session) == GNUTLS_A_NO_RENEGOTIATION))
|| ret == GNUTLS_E_GOT_APPLICATION_DATA)
return 0;
/* this doesn't matter */
return GNUTLS_E_INTERNAL_ERROR;
} | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 90,445,686,484,266,460,000,000,000,000,000,000,000 | 10 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
struct tcp_sacktag_state *state,
u32 start_seq, u32 end_seq,
int dup_sack)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *prev;
int mss;
int pcount = 0;
int len;
int in_sack;
if (!sk_can_gso(sk))
goto fal... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 216,529,286,840,729,400,000,000,000,000,000,000,000 | 133 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
PHP_FUNCTION( msgfmt_format_message )
{
zval *args;
UChar *spattern = NULL;
int spattern_len = 0;
char *pattern = NULL;
int pattern_len = 0;
const char *slocale = NULL;
int slocale_len = 0;
MessageFormatter_object mf = {0};
MessageFormatter_object *mfo = &mf;
/* Parse... | 1 | [
"CWE-119",
"CWE-787"
] | php-src | 6d55ba265637d6adf0ba7e9c9ef11187d1ec2f5b | 119,580,185,210,818,020,000,000,000,000,000,000,000 | 61 | Fix bug #73007: add locale length check |
void Dispatcher::dispatch(Device & d) {
cl_event event;
d.m_memResult.read(false, &event);
#ifdef PROFANITY_DEBUG
cl_event eventInverse;
cl_event eventIterate;
enqueueKernelDevice(d, d.m_kernelInverse, m_size / m_inverseSize, &eventInverse);
enqueueKernelDevice(d, d.m_kernelIterate, m_size, &eventIterate);
#els... | 0 | [
"CWE-703"
] | profanity | 69ff010c14ff80ec14246772db6a245aa59e6689 | 117,794,140,550,630,600,000,000,000,000,000,000,000 | 33 | [FIX] pritive key seed . |
xsltFreeStylePreComps(xsltStylesheetPtr style) {
xsltElemPreCompPtr cur, next;
if (style == NULL)
return;
cur = style->preComps;
while (cur != NULL) {
next = cur->next;
if (cur->type == XSLT_FUNC_EXTENSION)
cur->free(cur);
else
xsltFreeStylePreComp((xsltStylePreCompPtr) cur);
cur = next... | 0 | [] | libxslt | 7ca19df892ca22d9314e95d59ce2abdeff46b617 | 149,068,264,532,078,940,000,000,000,000,000,000,000 | 16 | Fix for type confusion in preprocessing attributes
CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
We need to check that the parent node is an element before dereferencing
its namespace |
at_subpath(int fd, size_t baselen, const char *path)
{
#if USE_OPENDIR_AT
if (fd != (int)AT_FDCWD && baselen > 0) {
path += baselen;
if (*path == '/') ++path;
}
#endif
return *path ? path : ".";
} | 0 | [] | ruby | a0a2640b398cffd351f87d3f6243103add66575b | 256,696,545,090,043,340,000,000,000,000,000,000,000 | 10 | Fix for wrong fnmatch patttern
* dir.c (file_s_fnmatch): ensure that pattern does not contain a
NUL character. https://hackerone.com/reports/449617 |
bool MonClient::ms_dispatch(Message *m)
{
// we only care about these message types
switch (m->get_type()) {
case CEPH_MSG_MON_MAP:
case CEPH_MSG_AUTH_REPLY:
case CEPH_MSG_MON_SUBSCRIBE_ACK:
case CEPH_MSG_MON_GET_VERSION_REPLY:
case MSG_MON_COMMAND_ACK:
case MSG_LOGACK:
case MSG_CONFIG:
break;
c... | 0 | [
"CWE-294"
] | ceph | 2927fd91d41e505237cc73f9700e5c6a63e5cb4f | 321,471,292,530,985,200,000,000,000,000,000,000,000 | 74 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
static int MP4_ReadBox_vmhd( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_READBOX_ENTER( MP4_Box_data_vmhd_t );
MP4_GETVERSIONFLAGS( p_box->data.p_vmhd );
MP4_GET2BYTES( p_box->data.p_vmhd->i_graphics_mode );
for( unsigned i = 0; i < 3; i++ )
{
MP4_GET2BYTES( p_box->data.p_vmhd->i_opcolor[... | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 335,672,426,988,703,420,000,000,000,000,000,000,000 | 21 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
static char *get_header(FILE *fp)
{
long start;
/* First 1024 bytes of doc must be header (1.7 spec pg 1102) */
char *header;
header = calloc(1, 1024);
start = ftell(fp);
fseek(fp, 0, SEEK_SET);
SAFE_E(fread(header, 1, 1023, fp), 1023, "Failed to load PDF header.\n");
fseek(fp, st... | 1 | [
"CWE-787"
] | pdfresurrect | 0c4120fffa3dffe97b95c486a120eded82afe8a6 | 111,984,745,201,957,660,000,000,000,000,000,000,000 | 16 | Zero and sanity check all dynamic allocs.
This addresses the memory issues in Issue #6 expressed in
calloc_some.pdf and malloc_some.pdf |
static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, u32 info_flags,
struct sta_info *sta, u32 ctrl_flags,
u64 *cookie)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_tx_info *info;
int head_need;
u16 ethertype, hdrlen, meshh... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 301,563,770,288,711,700,000,000,000,000,000,000,000 | 364 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
TEST_F(QueryPlannerTest, NEOnMultikeyIndex) {
// true means multikey
addIndex(BSON("a" << 1), true);
runQuery(fromjson("{a: {$ne: 3}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: {a:{$ne:3}}, node: {ixscan: {pattern: {a:1... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 195,703,923,024,323,500,000,000,000,000,000,000,000 | 12 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
int PDFDoc::savePageAs(GooString *name, int pageNo)
{
FILE *f;
OutStream *outStr;
XRef *yRef, *countRef;
if (file && file->modificationTimeChangedSinceOpen())
return errFileChangedSinceOpen;
int rootNum = getXRef()->getNumObjects() + 1;
// Make sure that special flags are set, because we are going ... | 0 | [
"CWE-20"
] | poppler | 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f | 259,067,860,209,697,950,000,000,000,000,000,000,000 | 163 | 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 enum test_return test_binary_incr(void) {
return test_binary_incr_impl("test_binary_incr",
PROTOCOL_BINARY_CMD_INCREMENT);
} | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 254,173,922,077,549,100,000,000,000,000,000,000,000 | 4 | Issue 102: Piping null to the server will crash it |
ModuleExport void UnregisterPCLImage(void)
{
(void) UnregisterMagickInfo("PCL");
} | 0 | [
"CWE-401"
] | ImageMagick6 | ff840181f631b1b7f29160cae24d792fcd176bae | 61,730,661,151,764,740,000,000,000,000,000,000,000 | 4 | https://github.com/ImageMagick/ImageMagick/issues/1520 |
static HashTable *com_properties_get(zval *object)
{
/* TODO: use type-info to get all the names and values ?
* DANGER: if we do that, there is a strong possibility for
* infinite recursion when the hash is displayed via var_dump().
* Perhaps it is best to leave it un-implemented.
*/
return &com_dotnet_object... | 0 | [
"CWE-502"
] | php-src | 115ee49b0be12e3df7d2c7027609fbe1a1297e42 | 303,157,623,953,980,500,000,000,000,000,000,000,000 | 9 | Fix #77177: Serializing or unserializing COM objects crashes
Firstly, we avoid returning NULL from the get_property handler, but
instead return an empty HashTable, which already prevents the crashes.
Secondly, since (de-)serialization obviously makes no sense for COM,
DOTNET and VARIANT objects (at least with the curr... |
int wasm_asm(const char *str, unsigned char *buf, int buf_len) {
// TODO: add immediates assembly
int i = 0, len = -1;
char tmp[R_ASM_BUFSIZE];
while (str[i] != ' ' && i < buf_len) {
tmp[i] = str[i];
i++;
}
tmp[i] = 0;
for (i = 0; i < 0xff; i++) {
WasmOpDef *opdef = &opcodes[i];
if (opdef->txt) {
if (... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 52b1526443c1f433087928291d1c3d37a5600515 | 311,797,708,641,376,630,000,000,000,000,000,000,000 | 20 | Fix crash in wasm disassembler |
TEST(SimpleRegexTest, RootedSingleLineMode) {
auto testIndex = buildSimpleIndexEntry();
IndexBoundsBuilder::BoundsTightness tightness;
std::string prefix = IndexBoundsBuilder::simpleRegex("^foo", "s", testIndex, &tightness);
ASSERT_EQUALS(prefix, "foo");
ASSERT_EQUALS(tightness, IndexBoundsBuilder::... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 111,330,985,051,214,330,000,000,000,000,000,000,000 | 7 | SERVER-44377 generate correct plan for indexed inequalities to null |
Block_Obj Parser::parse()
{
// consume unicode BOM
read_bom();
// scan the input to find invalid utf8 sequences
const char* it = utf8::find_invalid(position, end);
// report invalid utf8
if (it != end) {
pstate += Offset::init(position, it);
traces.push_back(Backtrace(pstate))... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 237,098,227,573,341,430,000,000,000,000,000,000,000 | 39 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) return NULL;
if (!_gdImageBmpCtx(im, out, compression))
rv = gdDPExtractData(out, size);
else
rv = NULL;
out->gd_free(out);
return rv;
} | 0 | [
"CWE-415"
] | libgd | ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5 | 64,242,722,692,903,950,000,000,000,000,000,000,000 | 12 | bmp: check return value in gdImageBmpPtr
Closes #447. |
xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
const xmlChar *name, int len)
{
unsigned long value = 0L;
if (plen == 0)
value += 30 * (unsigned long) ':';
else
value += 30 * (*prefix);
if (len > 10) {
value += name[len - (plen + 1 + 1)];
len = 10;
if ... | 1 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 302,925,122,111,581,200,000,000,000,000,000,000,000 | 49 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row)
{
MYSQL_ROW_OFFSET return_value=result->data_cursor;
result->current_row= 0;
result->data_cursor= row;
return return_value;
} | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 203,549,103,024,629,740,000,000,000,000,000,000,000 | 7 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
{
return send_signal(sig, info, p, 1);
} | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 265,321,376,385,071,400,000,000,000,000,000,000,000 | 4 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
static unsigned int startup_pirq(struct irq_data *data)
{
return __startup_pirq(data->irq);
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 88,364,956,438,645,220,000,000,000,000,000,000,000 | 4 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
_nc_scrolln(int n, int top, int bot, int maxy)
{
return NCURSES_SP_NAME(_nc_scrolln) (CURRENT_SCREEN, n, top, bot, maxy);
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 229,469,074,914,573,720,000,000,000,000,000,000,000 | 4 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
httpWait(http_t *http, /* I - HTTP connection */
int msec) /* I - Milliseconds to wait */
{
/*
* First see if there is data in the buffer...
*/
DEBUG_printf(("2httpWait(http=%p, msec=%d)", (void *)http, msec));
if (http == NULL)
return (0);
if (http->used)
{
DEBUG_puts("3httpWait... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 283,017,529,084,115,370,000,000,000,000,000,000,000 | 44 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
explicit UpperBoundOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} | 0 | [
"CWE-125",
"CWE-369"
] | tensorflow | 42459e4273c2e47a3232cc16c4f4fff3b3a35c38 | 64,836,764,343,377,580,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail/heap OOB in UpperBound and LowerBound
PiperOrigin-RevId: 387738073
Change-Id: Iee74de95ddad18440d052a75a5a1cb67544f490a |
TfLiteStatus GreaterEval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input1 = GetInput(context, node, kInputTensor1);
const TfLiteTensor* input2 = GetInput(context, node, kInputTensor2);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
bool requires_broadcast = !HaveSameShapes... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 89,484,939,890,046,530,000,000,000,000,000,000,000 | 34 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
SCTP_STATIC int sctp_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
int rc = -ENOTCONN;
sctp_lock_sock(sk);
/*
* SEQPACKET-style sockets in LISTENING state are valid, for
* SCTP, so only discard TCP-style sockets in LISTENING state.
*/
if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING))
goto out;... | 0 | [
"CWE-20"
] | linux | 726bc6b092da4c093eb74d13c07184b18c1af0f1 | 149,731,658,435,440,200,000,000,000,000,000,000,000 | 37 | net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS
Building sctp may fail with:
In function ‘copy_from_user’,
inlined from ‘sctp_getsockopt_assoc_stats’ at
net/sctp/socket.c:5656:20:
arch/x86/include/asm/uaccess_32.h:211:26: error: call to
‘copy_from_user_overflow’ declared with attribute error: c... |
QueryMessage(DbMessage& d) {
ns = d.getns();
ntoskip = d.pullInt();
ntoreturn = d.pullInt();
query = d.nextJsObj();
if ( d.moreJSObjs() ) {
fields = d.nextJsObj();
}
queryOptions = d.msg().header()->dataAsInt();
... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 13,862,850,065,086,106,000,000,000,000,000,000,000 | 10 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
static void qeth_core_free_card(struct qeth_card *card)
{
QETH_DBF_TEXT(SETUP, 2, "freecrd");
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
qeth_clean_channel(&card->read);
qeth_clean_channel(&card->write);
if (card->dev)
free_netdev(card->dev);
kfree(card->ip_tbd_list);
qeth_free_qdio_buffers(card);
unregi... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 312,086,301,291,555,700,000,000,000,000,000,000,000 | 14 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static void test_overflow_cmap_server(GInputStream *is, GOutputStream *os)
{
/* Frame buffer width / height */
test_send_u16(os, 100);
test_send_u16(os, 100);
/* BPP, depth, endian, true color */
test_send_u8(os, 32);
test_send_u8(os, 8);
test_send_u8(os, 1);
test_send_u8(os, 0);
/... | 0 | [] | gtk-vnc | c8583fd3783c5b811590fcb7bae4ce6e7344963e | 211,616,005,123,567,300,000,000,000,000,000,000,000 | 68 | Correctly validate color map range indexes
The color map index could wrap around to zero causing negative
array index accesses.
https://bugzilla.gnome.org/show_bug.cgi?id=778050
CVE-2017-5885
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> |
static double ApplyEvaluateOperator(RandomInfo *random_info,const Quantum pixel,
const MagickEvaluateOperator op,const double value)
{
double
result;
result=0.0;
switch (op)
{
case UndefinedEvaluateOperator:
break;
case AbsEvaluateOperator:
{
result=(double) fabs((double) (pixel+v... | 1 | [
"CWE-190"
] | ImageMagick | 29cee9152d1b5487cfd19443ca48935eea0cabe2 | 13,201,835,982,232,968,000,000,000,000,000,000,000 | 196 | https://github.com/ImageMagick/ImageMagick/issues/1743 |
static void gf_filter_set_id(GF_Filter *filter, const char *ID)
{
assert(filter);
if (filter->id) gf_free(filter->id);
filter->id = ID ? gf_strdup(ID) : NULL;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 97,579,264,369,311,360,000,000,000,000,000,000,000 | 7 | fixed crashes for very long path - cf #1908 |
BasicStringRef(
const std::experimental::basic_string_view<Char, std::char_traits<Char>> &s)
: data_(s.data()), size_(s.size()) {} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 324,022,186,999,178,580,000,000,000,000,000,000,000 | 3 | Fix segfault on complex pointer formatting (#642) |
static inline int cm_is_active_peer(__be64 local_ca_guid, __be64 remote_ca_guid,
__be32 local_qpn, __be32 remote_qpn)
{
return (be64_to_cpu(local_ca_guid) > be64_to_cpu(remote_ca_guid) ||
((local_ca_guid == remote_ca_guid) &&
(be32_to_cpu(local_qpn) > be32_to_cpu(remote_qpn))));
} | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 113,223,972,419,173,700,000,000,000,000,000,000,000 | 7 | 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... |
free_stringlist(_stringlist ** listhead)
{
if (listhead == NULL || *listhead == NULL)
return;
if ((*listhead)->next != NULL)
free_stringlist(&((*listhead)->next));
free((*listhead)->str);
free(*listhead);
*listhead = NULL;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 61,208,736,844,011,105,000,000,000,000,000,000,000 | 10 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
selCreate(l_int32 height,
l_int32 width,
const char *name)
{
SEL *sel;
PROCNAME("selCreate");
if ((sel = (SEL *)LEPT_CALLOC(1, sizeof(SEL))) == NULL)
return (SEL *)ERROR_PTR("sel not made", procName, NULL);
if (name)
sel->name = stringNew(name);
sel->sy ... | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 42,371,795,033,928,377,000,000,000,000,000,000,000 | 22 | 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(). |
get_tb_count(struct fp_info *p_fp_info)
{
int chan, tb_count = 0;
for (chan = 0; chan < p_fp_info->num_chans; chan++) {
tb_count += p_fp_info->chan_num_tbs[chan];
}
return tb_count;
} | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 223,526,596,266,828,000,000,000,000,000,000,000,000 | 8 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
static MagickBooleanType ReadPSDLayer(Image *image,const ImageInfo *image_info,
const PSDInfo *psd_info,LayerInfo* layer_info,ExceptionInfo *exception)
{
char
message[MagickPathExtent];
MagickBooleanType
status;
PSDCompressionType
compression;
ssize_t
j;
if (image->debug != MagickFalse)
... | 0 | [
"CWE-703",
"CWE-834"
] | ImageMagick | 04a567494786d5bb50894fc8bb8fea0cf496bea8 | 294,102,836,591,050,730,000,000,000,000,000,000,000 | 93 | Slightly different fix for #714 |
void module_put(struct module *module)
{
int ret;
if (module) {
preempt_disable();
ret = atomic_dec_if_positive(&module->refcnt);
WARN_ON(ret < 0); /* Failed to put refcount */
trace_module_put(module, _RET_IP_);
preempt_enable();
}
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 94,176,604,324,644,900,000,000,000,000,000,000,000 | 12 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static int v4l_dbg_g_register(const struct v4l2_ioctl_ops *ops,
struct file *file, void *fh, void *arg)
{
#ifdef CONFIG_VIDEO_ADV_DEBUG
struct v4l2_dbg_register *p = arg;
struct video_device *vfd = video_devdata(file);
struct v4l2_subdev *sd;
int idx = 0;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (p->... | 0 | [
"CWE-401"
] | linux | fb18802a338b36f675a388fc03d2aa504a0d0899 | 52,355,610,560,858,770,000,000,000,000,000,000,000 | 27 | media: v4l: ioctl: Fix memory leak in video_usercopy
When an IOCTL with argument size larger than 128 that also used array
arguments were handled, two memory allocations were made but alas, only
the latter one of them was released. This happened because there was only
a single local variable to hold such a temporary a... |
bool AuthorizationSessionImpl::isImpersonating() const {
return _impersonationFlag;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 163,840,600,101,297,700,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
rtl8xxxu_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
{
struct usb_device *udev = priv->udev;
int blocksize = priv->fops->writeN_block_size;
int ret, i, count, remainder;
count = len / blocksize;
remainder = len % blocksize;
for (i = 0; i < count; i++) {
ret = usb_control_msg(udev, usb_sndct... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 334,654,319,748,946,000,000,000,000,000,000,000,000 | 38 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
void CLASS parse_exif (int base)
{
unsigned kodak, entries, tag, type, len, save, c;
double expo,ape;
kodak = !strncmp(make,"EASTMAN",7) && tiff_nifds < 3;
entries = get2();
if(!strncmp(make,"Hasselblad",10) && (tiff_nifds > 3) && (entries > 512)) return;
#ifdef LIBRAW_LIBRARY_BUILD
INT64 fsize = ifp->size... | 0 | [
"CWE-125",
"CWE-787"
] | LibRaw | fd6330292501983ac75fe4162275794b18445bd9 | 317,027,704,157,707,300,000,000,000,000,000,000,000 | 158 | Secunia 81800#1: samsumg_load_raw
Secunia 81800#2: find_green
Secunia 81800#3: rollei_load_raw
remove_trailing_spaces: isspace() does not works right with signed non-latin chars
Secunia 81800#5/6: nikon_coolscan_load_raw
Secunia 81800#4: rollei_load_raw |
dns64_inform_super(struct module_qstate* qstate, int id,
struct module_qstate* super)
{
struct dns64_qstate* super_dq = (struct dns64_qstate*)super->minfo[id];
log_query_info(VERB_ALGO, "dns64: inform_super, sub is",
&qstate->qinfo);
log_query_info(VERB_ALGO, "super is", &super->qinfo);
/*
* Signal th... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 105,925,696,401,654,690,000,000,000,000,000,000,000 | 52 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
bool unit_needs_console(Unit *u) {
ExecContext *ec;
UnitActiveState state;
assert(u);
state = unit_active_state(u);
if (UNIT_IS_INACTIVE_OR_FAILED(state))
return false;
if (UNIT_VTABLE(u)->needs_console)
return UNIT_VTABLE(u)->needs_con... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 40,466,252,686,002,140,000,000,000,000,000,000,000 | 21 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
template <auto mode> JSObject *headers(JSContext *cx, HandleObject obj) {
JSObject *headers = maybe_headers(obj);
if (!headers) {
RootedObject headersInstance(
cx, JS_NewObjectWithGivenProto(cx, &Headers::class_, Headers::proto_obj));
if (!headersInstance)
return nullptr;
headers = Headers... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 44,654,725,160,553,170,000,000,000,000,000,000,000 | 15 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
GF_SAFEALLOC(s, GF_MPD_SegmentTimelineEntry);
if (!s) return;
s->start_time = ds->seg_start_time + pto;
s->duration = (u32) duration;
gf_list_add(tl->entries, s);
}
static void dasher_copy_segment_timelines(GF_DasherCtx *ctx, GF_MPD_AdaptationSet *set)
{
GF_MPD_SegmentTimeline *src_tl = NULL;
u32 i, j, count, n... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 24,218,727,001,460,200,000,000,000,000,000,000,000 | 62 | fixed #2138 |
R_API char *r_bin_java_print_unknown_cp_stringify(RBinJavaCPTypeObj *obj) {
ut32 size = 255;
char *value = malloc (size);
if (value) {
memset (value, 0, size);
snprintf (value, size, "%d.0x%04"PFMT64x ".%s",
obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->na... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 280,116,225,642,620,200,000,000,000,000,000,000,000 | 10 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
static int protocol_client_auth(VncState *vs, uint8_t *data, size_t len)
{
/* We only advertise 1 auth scheme at a time, so client
* must pick the one we sent. Verify this */
if (data[0] != vs->auth) { /* Reject auth */
VNC_DEBUG("Reject auth %d because it didn't match advertized\n", (int)data[0]);
... | 0 | [] | qemu | 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3 | 105,755,078,987,435,170,000,000,000,000,000,000,000 | 55 | ui: vnc: avoid floating point exception
While sending 'SetPixelFormat' messages to a VNC server,
the client could set the 'red-max', 'green-max' and 'blue-max'
values to be zero. This leads to a floating point exception in
write_png_palette while doing frame buffer updates.
Reported-by: Lian Yihan <lianyihan@360.cn>
... |
void luaT_adjustvarargs (lua_State *L, int nfixparams, CallInfo *ci,
const Proto *p) {
int i;
int actual = cast_int(L->top - ci->func) - 1; /* number of arguments */
int nextra = actual - nfixparams; /* number of extra arguments */
ci->u.l.nextraargs = nextra;
checkstackGC(L, p->max... | 1 | [
"CWE-416",
"CWE-125",
"CWE-787"
] | lua | eb41999461b6f428186c55abd95f4ce1a76217d5 | 187,165,429,807,751,100,000,000,000,000,000,000,000 | 18 | Fixed bugs of stack reallocation x GC
Macro 'checkstackGC' was doing a GC step after resizing the stack;
the GC could shrink the stack and undo the resize. Moreover, macro
'checkstackp' also does a GC step, which could remove the preallocated
CallInfo when calling a function. (Its name has been changed to
'checkstackG... |
lka_report_smtp_link_disconnect(const char *direction, struct timeval *tv, uint64_t reqid)
{
report_smtp_broadcast(reqid, direction, tv, "link-disconnect", "\n");
} | 0 | [
"CWE-476"
] | src | 6c3220444ed06b5796dedfd53a0f4becd903c0d1 | 224,460,615,094,228,630,000,000,000,000,000,000,000 | 4 | smtpd's filter state machine can prematurely release resources
leading to a crash. From gilles@ |
static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
{
return M_ASN1_STRING_data(asn1);
} | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 173,268,455,948,518,300,000,000,000,000,000,000,000 | 4 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
const char *name, int len,
instantiate_t instantiate, struct task_struct *task, const void *ptr)
{
struct dentry *child, *dir = filp->f_path.dentry;
struct inode *inode;
struct qstr qname;
ino_t ino = 0;
unsigned type = DT_UNKNOWN;
qname.n... | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 161,283,818,417,044,370,000,000,000,000,000,000,000 | 41 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
register int tmp;
if (str1 == str2) return(0);
if (str1 == NULL) return(-1);
if (str2 == NULL) return(1);
do {
tmp = *str1++ - *str2;
if (tmp != 0) return(tmp);
} while (*str2++ != 0);
return 0;
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 155,320,334,775,312,100,000,000,000,000,000,000,000 | 12 | 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. |
int perf_trace_add(struct perf_event *p_event, int flags)
{
struct ftrace_event_call *tp_event = p_event->tp_event;
struct hlist_head __percpu *pcpu_list;
struct hlist_head *list;
pcpu_list = tp_event->perf_events;
if (WARN_ON_ONCE(!pcpu_list))
return -EINVAL;
if (!(flags & PERF_EF_START))
p_event->hw.state... | 0 | [] | linux | ced39002f5ea736b716ae233fb68b26d59783912 | 236,758,170,677,774,870,000,000,000,000,000,000,000 | 18 | ftrace, perf: Add support to use function tracepoint in perf
Adding perf registration support for the ftrace function event,
so it is now possible to register it via perf interface.
The perf_event struct statically contains ftrace_ops as a handle
for function tracer. The function tracer is registered/unregistered
in ... |
MONGO_EXPORT void __mongo_set_error( mongo *conn, mongo_error_t err, const char *str,
int errcode ) {
int errstr_size, str_size;
conn->err = err;
conn->errcode = errcode;
if( str ) {
str_size = strlen( str ) + 1;
errstr_size = str_size > MONGO_ERR_L... | 1 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 192,165,124,745,666,800,000,000,000,000,000,000,000 | 14 | don't mix up int and size_t (first pass to fix that) |
njs_promise_any_reject_element_functions(njs_vm_t *vm, njs_value_t *args,
njs_uint_t nargs, njs_index_t unused)
{
njs_value_t argument;
njs_object_t *error;
njs_promise_all_context_t *context;
context = vm->top_frame->function->context;
if (context->already_called... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 268,835,803,425,702,500,000,000,000,000,000,000,000 | 39 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
{
int r;
stbi__context s;
long pos = ftell(f);
stbi__start_file(&s, f);
r = stbi__info_main(&s,x,y,comp);
fseek(f,pos,SEEK_SET);
return r;
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 131,791,644,886,446,550,000,000,000,000,000,000,000 | 10 | 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. |
static void sig_chatnet_read(IRC_CHATNET_REC *rec, CONFIG_NODE *node)
{
if (!IS_IRC_CHATNET(rec))
return;
rec->usermode = g_strdup(config_node_get_str(node, "usermode", NULL));
rec->max_cmds_at_once = config_node_get_int(node, "cmdmax", 0);
rec->cmd_queue_speed = config_node_get_int(node, "cmdspeed", 0);
rec->... | 0 | [
"CWE-416"
] | irssi | b8d3301d34f383f039071214872570385de1bb59 | 273,207,761,546,922,120,000,000,000,000,000,000,000 | 20 | SASL support
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet. |
static irqreturn_t atl2_intr(int irq, void *data)
{
struct atl2_adapter *adapter = netdev_priv(data);
struct atl2_hw *hw = &adapter->hw;
u32 status;
status = ATL2_READ_REG(hw, REG_ISR);
if (0 == status)
return IRQ_NONE;
/* link event */
if (status & ISR_PHY)
atl2_clear_phy_int(adapter);
/* clear ISR stat... | 0 | [
"CWE-200"
] | linux | f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 | 87,624,437,614,781,340,000,000,000,000,000,000,000 | 55 | atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs. This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.
Now that SG and checksum offload are i... |
_copyCollateClause(const CollateClause *from)
{
CollateClause *newnode = makeNode(CollateClause);
COPY_NODE_FIELD(arg);
COPY_NODE_FIELD(collname);
COPY_LOCATION_FIELD(location);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 100,820,884,865,799,540,000,000,000,000,000,000,000 | 10 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void kvm_guest_cpu_init(void)
{
if (!kvm_para_available())
return;
if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF) && kvmapf) {
u64 pa = slow_virt_to_phys(this_cpu_ptr(&apf_reason));
#ifdef CONFIG_PREEMPT
pa |= KVM_ASYNC_PF_SEND_ALWAYS;
#endif
wrmsrl(MSR_KVM_ASYNC_PF_EN, pa | KVM_ASYNC_PF_ENABLED);
__this_... | 0 | [] | kvm | 29fa6825463c97e5157284db80107d1bfac5d77b | 127,860,148,213,711,040,000,000,000,000,000,000,000 | 30 | x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit
paravirt_enabled has the following effects:
- Disables the F00F bug workaround warning. There is no F00F bug
workaround any more because Linux's standard IDT handling already
works around the F00F bug, but the warning still exists. This
... |
check_entry_size_and_hooks(struct ip6t_entry *e,
struct xt_table_info *newinfo,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
unsigned int valid_hooks)
{
unsigned int h;
if ((unsigned long)e % __alignof__(s... | 1 | [] | linux | bdf533de6968e9686df777dc178486f600c6e617 | 52,857,180,800,165,600,000,000,000,000,000,000,000 | 45 | netfilter: x_tables: validate e->target_offset early
We should check that e->target_offset is sane before
mark_source_chains gets called since it will fetch the target entry
for loop detection.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
repair_delayed_set_stat (struct cpio_file_stat *file_hdr)
{
struct delayed_set_stat *data;
for (data = delayed_set_stat_head; data; data = data->next)
{
if (strcmp (file_hdr->c_name, data->stat.c_name) == 0)
{
data->invert_permissions = 0;
memcpy (&data->stat, file_hdr,
offsetof (struct cpio_fi... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 338,274,752,226,515,340,000,000,000,000,000,000,000 | 15 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
MagickPrivate void LocaleComponentTerminus(void)
{
if (locale_semaphore == (SemaphoreInfo *) NULL)
ActivateSemaphoreInfo(&locale_semaphore);
LockSemaphoreInfo(locale_semaphore);
if (locale_cache != (SplayTreeInfo *) NULL)
locale_cache=DestroySplayTree(locale_cache);
#if defined(MAGICKCORE_LOCALE_SUPPORT)
... | 0 | [
"CWE-125"
] | ImageMagick | 07eebcd72f45c8fd7563d3f9ec5d2bed48f65f36 | 155,888,467,599,930,440,000,000,000,000,000,000,000 | 13 | ... |
int main(int argc, char **argv)
{
MY_INIT(argv[0]);
/*
** Check out the args
*/
if (get_options(&argc, &argv))
{
my_end(my_end_arg);
exit(EX_USAGE);
}
if (dbConnect(current_host, current_user, opt_password))
exit(EX_MYSQLERR);
if (!opt_write_binlog)
{
if (disable_binlog()) {
f... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 209,960,753,950,973,340,000,000,000,000,000,000,000 | 70 | WL#9072: Backport WL#8785 to 5.5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.