func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
xfs_ilock_attr_map_shared(
struct xfs_inode *ip)
{
uint lock_mode = XFS_ILOCK_SHARED;
if (ip->i_afp &&
ip->i_afp->if_format == XFS_DINODE_FMT_BTREE &&
(ip->i_afp->if_flags & XFS_IFEXTENTS) == 0)
lock_mode = XFS_ILOCK_EXCL;
xfs_ilock(ip, lock_mode);
return lock_mode;
} | 0 | [] | linux | 01ea173e103edd5ec41acec65b9261b87e123fc2 | 106,523,469,506,465,060,000,000,000,000,000,000,000 | 12 | xfs: fix up non-directory creation in SGID directories
XFS always inherits the SGID bit if it is set on the parent inode, while
the generic inode_init_owner does not do this in a few cases where it can
create a possible security problem, see commit 0fa3ecd87848
("Fix up non-directory creation in SGID directories") for... |
int
__libc_mallopt (int param_number, int value)
{
mstate av = &main_arena;
int res = 1;
if (__malloc_initialized < 0)
ptmalloc_init ();
__libc_lock_lock (av->mutex);
LIBC_PROBE (memory_mallopt, 2, param_number, value);
/* We must consolidate main arena before changing max_fast
(see definition o... | 0 | [
"CWE-787"
] | glibc | d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f | 269,200,116,214,775,480,000,000,000,000,000,000,000 | 64 | malloc: Mitigate null-byte overflow attacks
* malloc/malloc.c (_int_free): Check for corrupt prev_size vs size.
(malloc_consolidate): Likewise. |
static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer)
{
struct rds_info_connection *cinfo = buffer;
struct rds_connection *conn = cp->cp_conn;
if (conn->c_isv6)
return 0;
cinfo->next_tx_seq = cp->cp_next_tx_seq;
cinfo->next_rx_seq = cp->cp_next_rx_seq;
cinfo->laddr = conn->c_laddr.s6_addr32... | 0 | [
"CWE-401"
] | linux | 5f9562ebe710c307adc5f666bf1a2162ee7977c0 | 61,449,343,161,371,690,000,000,000,000,000,000,000 | 28 | rds: memory leak in __rds_conn_create()
__rds_conn_create() did not release conn->c_path when loop_trans != 0 and
trans->t_prefer_loopback != 0 and is_outgoing == 0.
Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Sharath Srinivasan <sharath.srini... |
ext4_journalled_write_inline_data(struct inode *inode,
unsigned len,
struct page *page)
{
int ret, no_expand;
void *kaddr;
struct ext4_iloc iloc;
ret = ext4_get_inode_loc(inode, &iloc);
if (ret) {
ext4_std_error(inode->i_sb, ret);
return NULL;
}
ext4_write_lock_xattr(inode, &no_expand);
kaddr ... | 0 | [
"CWE-416"
] | linux | 117166efb1ee8f13c38f9e96b258f16d4923f888 | 298,031,638,454,843,740,000,000,000,000,000,000,000 | 22 | ext4: do not allow external inodes for inline data
The inline data feature was implemented before we added support for
external inodes for xattrs. It makes no sense to support that
combination, but the problem is that there are a number of extended
attribute checks that are skipped if e_value_inum is non-zero.
Unfor... |
parser_parse_script (void *source_p, /**< source code */
uint32_t parse_opts, /**< ecma_parse_opts_t option bits */
const jerry_parse_options_t *options_p) /**< additional configuration options */
{
#if JERRY_PARSER
ecma_compiled_code_t *bytecode_p = parser_parse_source (sour... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 273,712,587,265,824,760,000,000,000,000,000,000,000 | 49 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
TEST_F(ExprMatchTest, InWithLhsFieldPathAndArrayAsConstMatchesCorrectly) {
createMatcher(fromjson("{$expr: {$in: ['$x', {$const: [1, 2, 3]}]}}"));
ASSERT_TRUE(matches(BSON("x" << 1)));
ASSERT_TRUE(matches(BSON("x" << 3)));
ASSERT_FALSE(matches(BSON("x" << 5)));
ASSERT_FALSE(matches(BSON("y" << 2))... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 145,686,362,923,844,570,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
boost::optional<TimeZone> makeTimeZone(const TimeZoneDatabase* tzdb,
const Document& root,
const Expression* timeZone,
Variables* variables) {
invariant(tzdb);
if (!timeZone) {
return mo... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 55,594,180,848,523,150,000,000,000,000,000,000,000 | 23 | SERVER-49404 Enforce additional checks in $arrayToObject |
cssp_read_tsrequest(STREAM token, STREAM pubkey)
{
STREAM s;
int length;
int tagval;
s = tcp_recv(NULL, 4);
if (s == NULL)
return False;
// verify ASN.1 header
if (s->p[0] != (BER_TAG_SEQUENCE | BER_TAG_CONSTRUCTED))
{
error("Expected BER_TAG_SEQUENCE|BER_TAG_CONSTRUCTED, got %x", s->p[0]);
return Fals... | 1 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 187,804,206,189,936,650,000,000,000,000,000,000,000 | 90 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end,
uint param_data __attribute__((unused)))
{
return unpack_int64(to, from, from_end);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 55,799,002,048,288,140,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
cmsBool Type_ParametricCurve_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsToneCurve* Curve = (cmsToneCurve*) Ptr;
int i, nParams, typen;
static const int ParamsByType[] = { 0, 1, 3, 4, 5, 7 };
typen = Curve -> Segments[0].Type;
if (Curve ->... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 210,792,086,046,338,060,000,000,000,000,000,000,000 | 33 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
void xaddCommand(client *c) {
streamID id;
int id_given = 0; /* Was an ID different than "*" specified? */
long long maxlen = -1; /* If left to -1 no trimming is performed. */
int approx_maxlen = 0; /* If 1 only delete whole radix tree nodes, so
the maximum length is not... | 1 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 172,555,350,341,445,700,000,000,000,000,000,000,000 | 107 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
void save_in_comment_state()
{
m_echo_saved= m_echo;
in_comment_saved= in_comment;
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 110,739,814,737,899,050,000,000,000,000,000,000,000 | 5 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static uint8_t *read_vblock(AVIOContext *src, uint32_t *size,
uint32_t key, uint32_t *k2, int align)
{
uint8_t tmp[4];
uint8_t *buf;
unsigned n;
if (avio_read(src, tmp, 4) != 4)
return NULL;
decode_block(tmp, tmp, 4, key, k2, align);
n = get_v(tmp, 4);
... | 0 | [
"CWE-787"
] | FFmpeg | 27a99e2c7d450fef15594671eef4465c8a166bd7 | 75,162,066,353,964,890,000,000,000,000,000,000,000 | 34 | avformat/vividas: improve extradata packing checks in track_header()
Fixes: out of array accesses
Fixes: 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermaye... |
void serialize(DataRangeCursor* cursor) {
uassertStatusOK(cursor->writeAndAdvance<LittleEndian<int32_t>>(originalOpCode));
uassertStatusOK(cursor->writeAndAdvance<LittleEndian<int32_t>>(uncompressedSize));
uassertStatusOK(cursor->writeAndAdvance<LittleEndian<uint8_t>>(compressorId));
} | 0 | [] | mongo | 5ad69b851801edadbfde8fdf271f4ba7c21170b5 | 284,847,839,512,401,980,000,000,000,000,000,000,000 | 5 | SERVER-31273 Use Source/Sink version of snappy functions
(cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99) |
bool LEX::sp_exit_block(THD *thd, sp_label *lab)
{
/*
When jumping to a BEGIN-END block end, the target jump
points to the block hpop/cpop cleanup instructions,
so we should exclude the block context here.
When jumping to something else (i.e., SP_LAB_ITER),
there are no hpop/cpop at the jump desti... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 185,881,251,538,075,960,000,000,000,000,000,000,000 | 14 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void enriched_wrap (struct enriched_state *stte)
{
int x;
int extra;
if (stte->line_len)
{
if (stte->tag_level[RICH_CENTER] || stte->tag_level[RICH_FLUSHRIGHT])
{
/* Strip trailing white space */
size_t y = stte->line_used - 1;
while (y && iswspace (stte->line[y]))
{
st... | 0 | [
"CWE-120"
] | mutt | e5ed080c00e59701ca62ef9b2a6d2612ebf765a5 | 147,220,683,308,390,000,000,000,000,000,000,000,000 | 109 | Fix uudecode buffer overflow.
mutt_decode_uuencoded() used each line's initial "length character"
without any validation. It would happily read past the end of the
input line, and with a suitable value even past the length of the
input buffer.
As I noted in ticket 404, there are several other changes that could
be a... |
unsigned long ERR_peek_error()
{
return err_helper(true);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 137,500,078,429,088,720,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file)
{
if (!fs || !file)
return -EINVAL;
fprintf(file, "------ fs:\n");
fprintf(file, "source: %s\n", mnt_fs_get_source(fs));
fprintf(file, "target: %s\n", mnt_fs_get_target(fs));
fprintf(file, "fstype: %s\n", mnt_fs_get_fstype(fs));
if (mnt_fs_get_options(fs... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 184,415,041,039,452,360,000,000,000,000,000,000,000 | 54 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
inline ulonglong val_uint() { return (ulonglong) val_int(); } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 61,107,946,368,233,460,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx)
{
struct ldb_context *ldb;
int ret;
const char *modules_path = getenv("LDB_MODULES_PATH");
if (modules_path == NULL) {
modules_path = LDB_MODULESDIR;
}
ret = ldb_modules_load(modules_path, LDB_VERSION);
if (ret != LDB_SUCCESS) {... | 0 | [
"CWE-476"
] | samba | d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde | 337,971,201,417,570,300,000,000,000,000,000,000,000 | 56 | CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice
Prevent use after free issues if ldb_lock_backend_callback is called
twice, usually due to ldb_module_done being called twice. This can happen if a
module ignores the return value from function a function that calls
ldb_module_done as part of it'... |
void sctp_v4_err(struct sk_buff *skb, __u32 info)
{
struct iphdr *iph = (struct iphdr *)skb->data;
const int ihlen = iph->ihl * 4;
const int type = icmp_hdr(skb)->type;
const int code = icmp_hdr(skb)->code;
struct sock *sk;
struct sctp_association *asoc = NULL;
struct sctp_transport *transport;
struct inet_sock... | 0 | [
"CWE-362"
] | linux | ae53b5bd77719fed58086c5be60ce4f22bffe1c6 | 210,540,265,983,098,640,000,000,000,000,000,000,000 | 81 | sctp: Fix another socket race during accept/peeloff
There is a race between sctp_rcv() and sctp_accept() where we
have moved the association from the listening socket to the
accepted socket, but sctp_rcv() processing cached the old
socket and continues to use it.
The easy solution is to check for the socket mismatch ... |
static void test_bug28075()
{
int rc;
DBUG_ENTER("test_bug28075");
myheader("test_bug28075");
rc= mysql_dump_debug_info(mysql);
DIE_UNLESS(rc == 0);
rc= mysql_ping(mysql);
DIE_UNLESS(rc == 0);
DBUG_VOID_RETURN;
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 47,576,808,463,694,270,000,000,000,000,000,000,000 | 15 | 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... |
ext4_ext_more_to_rm(struct ext4_ext_path *path)
{
BUG_ON(path->p_idx == NULL);
if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
return 0;
/*
* if truncate on deeper level happened, it wasn't partial,
* so we have to consider current index for truncation
*/
if (le16_to_cpu(path->p_hdr->eh_entries) == path->... | 0 | [
"CWE-362"
] | linux-2.6 | dee1f973ca341c266229faa5a1a5bb268bed3531 | 333,482,574,762,302,370,000,000,000,000,000,000,000 | 15 | ext4: race-condition protection for ext4_convert_unwritten_extents_endio
We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map->m_len] because
it was already split during submission. But this may not be true due to
a race between writeback vs fa... |
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
zval *offset=NULL;
#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
zval **expr_ptr_ptr = NU... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 43,417,826,200,159,770,000,000,000,000,000,000,000 | 78 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
s64 nclusters, unsigned int flags)
{
s64 free_clusters, dirty_clusters, rsv, resv_clusters;
struct percpu_counter *fcc = &sbi->s_freeclusters_counter;
struct percpu_counter *dcc = &sbi->s_dirtyclusters_counter;
free_clusters = percpu_counter_read_p... | 0 | [] | linux | 7dac4a1726a9c64a517d595c40e95e2d0d135f6f | 150,799,520,821,525,900,000,000,000,000,000,000,000 | 47 | ext4: add validity checks for bitmap block numbers
An privileged attacker can cause a crash by mounting a crafted ext4
image which triggers a out-of-bounds read in the function
ext4_valid_block_bitmap() in fs/ext4/balloc.c.
This issue has been assigned CVE-2018-1093.
BugLink: https://bugzilla.kernel.org/show_bug.cgi... |
void kvm_notify_acked_gsi(struct kvm *kvm, int gsi)
{
struct kvm_irq_ack_notifier *kian;
hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
link)
if (kian->gsi == gsi)
kian->irq_acked(kian);
} | 0 | [
"CWE-20",
"CWE-617"
] | linux | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | 306,266,098,523,588,670,000,000,000,000,000,000,000 | 9 | KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
kvm_set_irq_routing(). Hence, there is no sense in accepting them
via KVM_IRQFD. Prevent them from entering the system in the first
place.
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Si... |
smb2_is_status_pending(char *buf, struct TCP_Server_Info *server)
{
struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
int scredits, in_flight;
if (shdr->Status != STATUS_PENDING)
return false;
if (shdr->CreditRequest) {
spin_lock(&server->req_lock);
server->credits += le16_to_cpu(shdr->CreditRequest);
scred... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 52,456,296,529,458,890,000,000,000,000,000,000,000 | 25 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
T3FontCache::T3FontCache(const Ref *fontIDA, double m11A, double m12A,
double m21A, double m22A,
int glyphXA, int glyphYA, int glyphWA, int glyphHA,
bool validBBoxA, bool aa) {
fontID = *fontIDA;
m11 = m11A;
m12 = m12A;
m21 = m21A;
m22 = m22A;
glyphX = glyphXA;
glyphY = glyphYA;
glyphW = gl... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 58,522,977,416,640,970,000,000,000,000,000,000,000 | 53 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
static void phar_postprocess_ru_web(char *fname, int fname_len, char **entry, int *entry_len, char **ru, int *ru_len) /* {{{ */
{
char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL;
int e_len = *entry_len - 1, u_len = 0;
phar_archive_data *pphar;
/* we already know we can retrieve the phar if we reach here... | 0 | [
"CWE-281"
] | php-src | e5c95234d87fcb8f6b7569a96a89d1e1544749a6 | 333,610,475,531,593,000,000,000,000,000,000,000,000 | 59 | Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions |
static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
stbi__result_info ri;
void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8);
if (result == NULL)
return NULL;
// it is the responsibility of the loaders to make sure we get ei... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 80,315,741,579,054,350,000,000,000,000,000,000,000 | 25 | 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. |
int __fastcall TNullConsole::Choice(
UnicodeString /*Options*/, int /*Cancel*/, int Break, int /*Continue*/, int Timeouted, bool Timeouting,
unsigned int Timer, UnicodeString /*Message*/)
{
int Result;
if (Timeouting)
{
Sleep(Timer);
Result = Timeouted;
}
else
{
Result = Break;
... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 240,196,228,455,991,470,000,000,000,000,000,000,000 | 16 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
u8 gf_filter_get_sep(GF_Filter *filter, GF_FilterSessionSepType sep_type)
{
switch (sep_type) {
case GF_FS_SEP_ARGS: return filter->session->sep_args;
case GF_FS_SEP_NAME: return filter->session->sep_name;
case GF_FS_SEP_FRAG: return filter->session->sep_frag;
case GF_FS_SEP_LIST: return filter->session->sep_list;... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 333,409,280,834,103,600,000,000,000,000,000,000,000 | 11 | fixed crashes for very long path - cf #1908 |
exif_mnote_data_canon_free (ExifMnoteData *n)
{
if (!n) return;
exif_mnote_data_canon_clear ((ExifMnoteDataCanon *) n);
} | 0 | [
"CWE-125"
] | libexif | 435e21f05001fb03f9f186fa7cbc69454afd00d1 | 13,021,832,616,528,490,000,000,000,000,000,000,000 | 6 | Fix MakerNote tag size overflow issues at read time.
Check for a size overflow while reading tags, which ensures that the
size is always consistent for the given components and type of the
entry, making checking further down superfluous.
This provides an alternate fix for
https://sourceforge.net/p/libexif/bugs/125/ C... |
xmlIOFTPClose (void * context) {
return ( xmlNanoFTPClose(context) );
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 31,172,700,467,776,940,000,000,000,000,000,000,000 | 3 | 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. |
static ssize_t disk_capability_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct gendisk *disk = dev_to_disk(dev);
return sprintf(buf, "%x\n", disk->flags);
} | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 216,999,468,768,981,600,000,000,000,000,000,000,000 | 7 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
void bson_fatal( int ok ) {
bson_fatal_msg( ok, "" );
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 35,794,743,147,074,260,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
Simple_Selector_Obj Parser::parse_pseudo_selector() {
if (lex< sequence<
pseudo_prefix,
// we keep the space within the name, strange enough
// ToDo: refactor output to schedule the space for it
// or do we really want to keep the real white-space?
sequence< ident... | 0 | [
"CWE-674"
] | libsass | f2db04883e5fff4e03777dcc1eb60d4373c45be1 | 174,620,808,846,431,000,000,000,000,000,000,000,000 | 55 | Make `parse_css_variable_value` non-recursive
Fixes #2658 stack overflow |
void gs_lib_ctx_fin(gs_memory_t *mem)
{
gs_lib_ctx_t *ctx;
gs_memory_t *ctx_mem;
if (!mem || !mem->gs_lib_ctx)
return;
ctx = mem->gs_lib_ctx;
ctx_mem = ctx->memory;
sjpxd_destroy(mem);
gscms_destroy(ctx_mem);
gs_free_object(ctx_mem, ctx->profiledir,
"gs_lib_ctx_fin... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 148,896,501,622,541,740,000,000,000,000,000,000,000 | 25 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
{
struct cmsghdr *cmsg;
int err;
for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg))
{
err = -EINVAL;
/* Verify that cmsg_len is at least sizeof(struct cmsghdr) */
/* The first check was omitted in <= 2.2.5. The r... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 92f28d973cce45ef5823209aab3138eb45d8b349 | 128,352,795,846,518,230,000,000,000,000,000,000,000 | 97 | scm: Require CAP_SYS_ADMIN over the current pidns to spoof pids.
Don't allow spoofing pids over unix domain sockets in the corner
cases where a user has created a user namespace but has not yet
created a pid namespace.
Cc: stable@vger.kernel.org
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: "Eric ... |
static void enc_getline(void)
{
char *p;
char c;
restart:
if (enc_eof())
normal_error("type 1","unexpected end of file");
p = enc_line;
do {
c = (char) enc_getchar();
append_char_to_buf(c, p, enc_line, ENC_BUF_SIZE);
}
while (c != 10 && !enc_eof());
append_eol(p... | 0 | [
"CWE-119"
] | texlive-source | 6ed0077520e2b0da1fd060c7f88db7b2e6068e4c | 240,780,173,683,444,300,000,000,000,000,000,000,000 | 17 | writet1 protection against buffer overflow
git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751 |
PHP_FUNCTION(ldap_mod_replace)
{
php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE);
} | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 145,684,037,606,379,370,000,000,000,000,000,000,000 | 4 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
inline unsigned int wait(const unsigned int milliseconds, cimg_ulong *const p_timer) {
if (!*p_timer) *p_timer = cimg::time();
const cimg_ulong current_time = cimg::time();
if (current_time>=*p_timer + milliseconds) { *p_timer = current_time; return 0; }
const unsigned int time_diff = (unsi... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 70,745,231,455,794,170,000,000,000,000,000,000,000 | 9 | . |
varyEvaluateMatch(StoreEntry * entry, HttpRequest * request)
{
SBuf vary(request->vary_headers);
const auto &reply = entry->mem().freshestReply();
auto has_vary = reply.header.has(Http::HdrType::VARY);
#if X_ACCELERATOR_VARY
has_vary |=
reply.header.has(Http::HdrType::HDR_X_ACCELERATOR_VARY);
#... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 285,415,817,725,128,400,000,000,000,000,000,000,000 | 62 | Handle more Range requests (#790)
Also removed some effectively unused code. |
ClientRequestContext::checkNoCacheDone(const allow_t &answer)
{
acl_checklist = NULL;
if (answer.denied()) {
http->request->flags.noCache = true; // do not read reply from cache
http->request->flags.cachable = false; // do not store reply into cache
}
http->doCallouts();
} | 0 | [
"CWE-116"
] | squid | e7cf864f938f24eea8af0692c04d16790983c823 | 234,491,878,298,687,500,000,000,000,000,000,000,000 | 9 | Handle more Range requests (#790)
Also removed some effectively unused code. |
*/
static int io_poll_check_events(struct io_kiocb *req, bool locked)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_poll_iocb *poll = io_poll_get_single(req);
int v;
/* req->task == current here, checking PF_EXITING is safe */
if (unlikely(req->task->flags & PF_EXITING))
io_poll_mark_cancelled(req);
do {
... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 18,738,530,181,522,608,000,000,000,000,000,000,000 | 53 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
float compute_error_of_weight_set_2planes(
const endpoints_and_weights& eai1,
const endpoints_and_weights& eai2,
const decimation_info& di,
const float* dec_weight_quant_uvalue_plane1,
const float* dec_weight_quant_uvalue_plane2
) {
vfloat4 error_summav = vfloat4::zero();
float error_summa = 0.0f;
unsigned int ... | 0 | [
"CWE-787"
] | astc-encoder | bdd385fe19bf2737bead4b5664acdfdeca7aab15 | 321,095,691,461,746,800,000,000,000,000,000,000,000 | 69 | Only load based on texel index if undecimated |
if (datasize > SumOfBytesHashed) {
hashbase = data + SumOfBytesHashed;
hashsize = datasize - SumOfBytesHashed;
check_size(data, datasize, hashbase, hashsize);
if (!(Sha256Update(sha256ctx, hashbase, hashsize)) ||
!(Sha1Update(sha1ctx, hashbase, hashsize))) {
perror(L"Unable to generate hash\n");
... | 0 | [
"CWE-787"
] | shim | 159151b6649008793d6204a34d7b9c41221fb4b0 | 27,755,158,032,618,604,000,000,000,000,000,000,000 | 15 | Also avoid CVE-2022-28737 in verify_image()
PR 446 ("Add verify_image") duplicates some of the code affected by
Chris Coulson's defense in depth patch against CVE-2022-28737 ("pe:
Perform image verification earlier when loading grub").
This patch makes the same change to the new function.
Signed-off-by: Peter Jones ... |
static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct inquiry_data data;
int num_rsp = *((__u8 *) skb->data);
BT_DBG("%s num_rsp %d", hdev->name, num_rsp);
if (!num_rsp)
return;
if (hci_dev_test_flag(hdev, HCI_PERIODIC_INQ))
return;
hci_dev_lock(hdev);
... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 279,763,188,441,669,230,000,000,000,000,000,000,000 | 63 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
StreamInfo::StreamInfo* Context::getRequestStreamInfo() const {
if (encoder_callbacks_) {
return &encoder_callbacks_->streamInfo();
} else if (decoder_callbacks_) {
return &decoder_callbacks_->streamInfo();
}
return nullptr;
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 260,137,558,313,713,500,000,000,000,000,000,000,000 | 8 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
echo_string_core(
typval_T *tv,
char_u **tofree,
char_u *numbuf,
int copyID,
int echo_style,
int restore_copyID,
int composite_val)
{
static int recurse = 0;
char_u *r = NULL;
if (recurse >= DICT_MAXNEST)
{
if (!did_echo_string_emsg)
{
// Only give this message on... | 0 | [
"CWE-823"
] | vim | 8b91e71441069b1dde9ac9ff9d9a829b1b4aecca | 185,056,559,104,342,150,000,000,000,000,000,000,000 | 226 | patch 8.2.4774: crash when using a number for lambda name
Problem: Crash when using a number for lambda name.
Solution: Check the type of the lambda reference. |
PyString_Repr(PyObject *obj, int smartquotes)
{
register PyStringObject* op = (PyStringObject*) obj;
size_t newsize;
PyObject *v;
if (Py_SIZE(op) > (PY_SSIZE_T_MAX - 2)/4) {
PyErr_SetString(PyExc_OverflowError,
"string is too large to make repr");
return NULL;
}
newsi... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 74,821,794,612,928,740,000,000,000,000,000,000,000 | 61 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
png_uint_32 transformations /* Because these may affect the byte layout */)
{
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Offset to next interlace block */
static PNG_CONST unsigned int png_pass_inc[7] = {... | 0 | [
"CWE-369"
] | libpng | 2dca15686fadb1b8951cb29b02bad4cae73448da | 285,167,324,483,751,830,000,000,000,000,000,000,000 | 244 | [libpng16] Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin). |
static void shm_open(struct vm_area_struct *vma)
{
struct file *file = vma->vm_file;
struct shm_file_data *sfd = shm_file_data(file);
struct shmid_kernel *shp;
shp = shm_lock(sfd->ns, sfd->id);
shp->shm_atim = get_seconds();
shp->shm_lprid = task_tgid_vnr(current);
shp->shm_nattch++;
shm_unlock(shp);
} | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 176,911,371,707,096,200,000,000,000,000,000,000,000 | 12 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
Command::Command(StringData name, StringData oldName)
: _name(name.toString()),
_commandsExecutedMetric("commands." + _name + ".total", &_commandsExecuted),
_commandsFailedMetric("commands." + _name + ".failed", &_commandsFailed) {
globalCommandRegistry()->registerCommand(this, name, oldName);
} | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 270,265,045,704,438,470,000,000,000,000,000,000,000 | 6 | SERVER-38275 ban find explain with UUID |
calc_section_size (MonoDynamicImage *assembly)
{
int nsections = 0;
/* alignment constraints */
mono_image_add_stream_zero (&assembly->code, 4 - (assembly->code.index % 4));
g_assert ((assembly->code.index % 4) == 0);
assembly->meta_size += 3;
assembly->meta_size &= ~3;
mono_image_add_stream_zero (&assembly->re... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 56,784,669,770,246,000,000,000,000,000,000,000,000 | 30 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC) /* {{{ */
{
size_t length;
char *cwd;
cwd = virtual_getcwd_ex(&length TSRMLS_CC);
if (buf == NULL) {
return cwd;
}
if (length > size-1) {
free(cwd);
errno = ERANGE; /* Is this OK? */
return NULL;
}
memcpy(buf, cwd, length+1);
free(cwd);
... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 112,288,556,559,221,110,000,000,000,000,000,000,000 | 19 | Fix for bug #72513 |
void RGWHandler_REST::put_op(RGWOp* op)
{
delete op;
} /* put_op */ | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 166,624,992,736,172,290,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
PJ_DEF(const char *) pjsip_event_str(pjsip_event_id_e e)
{
return event_str[e];
} | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 329,083,608,761,094,850,000,000,000,000,000,000,000 | 4 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
nautilus_get_all_group_names (void)
{
GList *list;
struct group *group;
list = NULL;
setgrent ();
while ((group = getgrent ()) != NULL)
list = g_list_prepend (list, g_strdup (group->gr_name));
endgrent ();
return eel_g_str_list_alphabetize (list);
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 54,423,550,505,902,640,000,000,000,000,000,000,000 | 16 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
auth_entry_new (const char *protocol,
const char *network_id)
{
IceAuthFileEntry *file_entry;
IceAuthDataEntry data_entry;
file_entry = malloc (sizeof (IceAuthFileEntry));
file_entry->protocol_name = strdup (protocol);
file_entry->protocol_data = NULL;
... | 0 | [
"CWE-125",
"CWE-835"
] | gnome-session | b0dc999e0b45355314616321dbb6cb71e729fc9d | 241,206,297,204,553,600,000,000,000,000,000,000,000 | 28 | [gsm] Delay the creation of the GsmXSMPClient until it really exists
We used to create the GsmXSMPClient before the XSMP connection is really
accepted. This can lead to some issues, though. An example is:
https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting:
"What is happening is that a new client (probabl... |
const ThreadCommand* Binary::thread_command() const {
return command<ThreadCommand>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 156,446,588,360,900,670,000,000,000,000,000,000,000 | 3 | Resolve #764 |
sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *asconf_ack = arg;
struct sctp_chunk *last_asconf = asoc->addip_last_asconf;
struc... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 | 331,668,999,198,811,030,000,000,000,000,000,000,000 | 114 | net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks
Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for
ASCONF chunk") added basic verification of ASCONF chunks, however,
it is still possible to remotely crash a server by sending a
special crafted ASCONF chunk, even up to pre 2.6.12 kernels:
... |
void ext4_fname_setup_ci_filename(struct inode *dir, const struct qstr *iname,
struct fscrypt_str *cf_name)
{
int len;
if (!IS_CASEFOLDED(dir) || !EXT4_SB(dir->i_sb)->s_encoding) {
cf_name->name = NULL;
return;
}
cf_name->name = kmalloc(EXT4_NAME_LEN, GFP_NOFS);
if (!cf_name->name)
return;
len = ut... | 0 | [
"CWE-125"
] | linux | 5872331b3d91820e14716632ebb56b1399b34fe1 | 142,719,158,780,132,450,000,000,000,000,000,000,000 | 25 | ext4: fix potential negative array index in do_split()
If for any reason a directory passed to do_split() does not have enough
active entries to exceed half the size of the block, we can end up
iterating over all "count" entries without finding a split point.
In this case, count == move, and split will be zero, and w... |
static int __init init_ipv6_mibs(void)
{
if (snmp_mib_init((void **)ipv6_statistics,
sizeof(struct ipstats_mib)) < 0)
goto err_ip_mib;
if (snmp_mib_init((void **)icmpv6_statistics,
sizeof(struct icmpv6_mib)) < 0)
goto err_icmp_mib;
if (snmp_mib_init((void **)icmpv6msg_statistics,
sizeof(struct icm... | 0 | [] | linux-2.6 | 2e761e0532a784816e7e822dbaaece8c5d4be14d | 17,901,464,016,909,746,000,000,000,000,000,000,000 | 30 | ipv6 netns: init net is used to set bindv6only for new sock
The bindv6only is tuned via sysctl. It is already on a struct net
and per-net sysctls allow for its modification (ipv6_sysctl_net_init).
Despite this the value configured in the init net is used for the
rest of them.
Signed-off-by: Pavel Emelyanov <xemul@op... |
SRC_ReadNumberOfSources(void)
{
return n_sources;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 112,035,238,419,141,670,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
FLAC_API FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *encoder, const char *specification)
{
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encoder->private_);
FLAC__ASSERT(0 != encoder->protected_);
FLAC__ASSERT(0 != specification);
if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINI... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 263,705,646,433,208,260,000,000,000,000,000,000,000 | 112 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
Http2Priority::Http2Priority(Environment* env,
Local<Value> parent,
Local<Value> weight,
Local<Value> exclusive) {
Local<Context> context = env->context();
int32_t parent_ = parent->Int32Value(context).ToChecked();
int32_t weig... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 322,739,931,304,277,930,000,000,000,000,000,000,000 | 12 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
struct sockaddr_nl *addr = msg->msg_name;
u32 dst_pid;
u32 dst_group;
struct sk_buff *sk... | 1 | [
"CWE-287",
"CWE-284"
] | linux | e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea | 149,780,959,227,096,180,000,000,000,000,000,000,000 | 77 | af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially NetworkManager accept spoofed Netlink messages because of a
kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data
to the receiver if the sender did not provide such data, instead of not
includ... |
Read the list of mailboxes */
PHP_FUNCTION(imap_list)
{
zval *streamind;
zend_string *ref, *pat;
pils *imap_le_struct;
STRINGLIST *cur=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
return;
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind)... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 138,065,107,746,811,230,000,000,000,000,000,000,000 | 33 | Disable rsh/ssh functionality in imap by default (bug #77153) |
SharedConnectionWrapper& shared_connection() { return shared_connection_; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 176,342,298,654,451,100,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
get_tmfromtime(struct tm *tm, time_t *t)
{
#if HAVE_LOCALTIME_R
tzset();
localtime_r(t, tm);
#elif HAVE__LOCALTIME64_S
_localtime64_s(tm, t);
#else
memcpy(tm, localtime(t), sizeof(*tm));
#endif
} | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 221,308,945,467,611,830,000,000,000,000,000,000,000 | 11 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
static int selinux_sb_statfs(struct dentry *dentry)
{
const struct cred *cred = current_cred();
struct common_audit_data ad;
ad.type = LSM_AUDIT_DATA_DENTRY;
ad.u.dentry = dentry->d_sb->s_root;
return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad);
} | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 145,621,799,786,595,350,000,000,000,000,000,000,000 | 9 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo)
{
ssize_t l;
uint8_t *ptr;
enum vfp_status vfps = VFP_ERROR;
ssize_t est;
struct vfp_ctx *vfc;
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
vfc = bo->vfc;
CHECK_OBJ_NOTNULL(vfc, VFP_CTX_MAGIC);
AN(vfc->vfp_nxt);
est = bo->htc->content_length;
if (est < 0)... | 0 | [
"CWE-119",
"CWE-787"
] | varnish-cache | 176f8a075a963ffbfa56f1c460c15f6a1a6af5a7 | 20,247,466,771,755,824,000,000,000,000,000,000,000 | 69 | Avoid buffer read overflow on vcl_error and -sfile
The file stevedore may return a buffer larger than asked for when
requesting storage. Due to lack of check for this condition, the code
to copy the synthetic error memory buffer from vcl_error would overrun
the buffer.
Patch by @shamger
Fixes: #2429 |
static int ms_pull_ctl_enable_lqfp48(struct rtsx_ucr *ucr)
{
rtsx_usb_init_cmd(ucr);
rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x55);
rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55);
rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95);
rtsx_usb_add_cmd(ucr, WRITE_REG... | 0 | [
"CWE-416"
] | linux | 42933c8aa14be1caa9eda41f65cde8a3a95d3e39 | 211,193,892,281,656,820,000,000,000,000,000,000,000 | 13 | memstick: rtsx_usb_ms: fix UAF
This patch fixes the following issues:
1. memstick_free_host() will free the host, so the use of ms_dev(host) after
it will be a problem. To fix this, move memstick_free_host() after when we
are done with ms_dev(host).
2. In rtsx_usb_ms_drv_remove(), pm need to be disabled before we remo... |
static NTSTATUS pdb_samba_dsdb_del_trusted_domain(struct pdb_methods *methods,
const char *domain)
{
struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
methods->private_data, struct pdb_samba_dsdb_state);
TALLOC_CTX *tmp_ctx = talloc_stackframe();
struct pdb_trusted_domain *td = NULL;
struct ldb_... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 4,695,212,413,250,115,000,000,000,000,000,000,000 | 77 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static int stbi__parse_zlib_header(stbi__zbuf *a)
{
int cmf = stbi__zget8(a);
int cm = cmf & 15;
/* int cinfo = cmf >> 4; */
int flg = stbi__zget8(a);
if (stbi__zeof(a)) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec
if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib heade... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 154,768,727,025,373,690,000,000,000,000,000,000,000 | 13 | 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. |
process_prime_response(struct module_qstate* qstate, struct val_qstate* vq,
int id, int rcode, struct dns_msg* msg, struct sock_list* origin)
{
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
struct ub_packed_rrset_key* dnskey_rrset = NULL;
struct trust_anchor* ta = anchor_find(qstate->env->anchors,... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 80,304,553,090,856,820,000,000,000,000,000,000,000 | 60 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
check_const_name_sym(mrb_state *mrb, mrb_sym id)
{
check_const_name_str(mrb, mrb_sym2str(mrb, id));
} | 0 | [
"CWE-476",
"CWE-415"
] | mruby | faa4eaf6803bd11669bc324b4c34e7162286bfa3 | 313,359,468,354,590,300,000,000,000,000,000,000,000 | 4 | `mrb_class_real()` did not work for `BasicObject`; fix #4037 |
zcvx(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
ref *aop;
uint opidx;
check_op(1);
/*
* If the object is an internal operator, we can't allow it to
* exist in executable form anywhere outside the e-stack.
*/
if (r_has_type(op, t_operator) &&
((opidx = op_index(op)) == 0 ||
... | 0 | [] | ghostpdl | 0edd3d6c634a577db261615a9dc2719bca7f6e01 | 143,393,386,647,770,590,000,000,000,000,000,000,000 | 20 | Bug 699659: Don't just assume an object is a t_(a)struct |
static bool ieee80211_get_dtim(const struct cfg80211_bss_ies *ies,
u8 *dtim_count, u8 *dtim_period)
{
const u8 *tim_ie = cfg80211_find_ie(WLAN_EID_TIM, ies->data, ies->len);
const u8 *idx_ie = cfg80211_find_ie(WLAN_EID_MULTI_BSSID_IDX, ies->data,
ies->len);
const struct ieee80211_tim_ie *tim = NULL;
... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 295,498,386,131,883,850,000,000,000,000,000,000,000 | 33 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb,
int event)
{
struct nlmsghdr *nlh = nlmsg_hdr(skb);
struct sk_buff *skb2;
int err;
if (!nlmsg_report(nlh) &&
!nfnetlink_has_listeners(net, NFNLGRP_NFTABLES))
return;
skb2 = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
if (skb2 == NULL)... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 62,306,352,050,234,410,000,000,000,000,000,000,000 | 29 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
void Field_decimal::overflow(bool negative)
{
uint len=field_length;
uchar *to=ptr, filler= '9';
set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1);
if (negative)
{
if (!unsigned_flag)
{
/* Put - sign as a first digit so we'll have -999..999 or 999..999 */
*to++ = '-';
len--;
}
else
... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 113,168,965,771,945,480,000,000,000,000,000,000,000 | 37 | 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... |
ecryptfs_filldir(struct dir_context *ctx, const char *lower_name,
int lower_namelen, loff_t offset, u64 ino, unsigned int d_type)
{
struct ecryptfs_getdents_callback *buf =
container_of(ctx, struct ecryptfs_getdents_callback, ctx);
size_t name_size;
char *name;
int rc;
buf->filldir_called++;
rc = ecryptfs_d... | 0 | [
"CWE-119",
"CWE-787"
] | linux | f0fe970df3838c202ef6c07a4c2b36838ef0a88b | 127,539,072,687,998,530,000,000,000,000,000,000,000 | 27 | ecryptfs: don't allow mmap when the lower fs doesn't support it
There are legitimate reasons to disallow mmap on certain files, notably
in sysfs or procfs. We shouldn't emulate mmap support on file systems
that don't offer support natively.
CVE-2016-1583
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: stable@vger.... |
static apr_byte_t oidc_oauth_validate_access_token(request_rec *r, oidc_cfg *c,
const char *token, const char **response) {
/* assemble parameters to call the token endpoint for validation */
apr_table_t *params = apr_table_make(r->pool, 4);
/* add any configured extra static parameters to the introspection endp... | 0 | [
"CWE-287"
] | mod_auth_openidc | 21e3728a825c41ab41efa75e664108051bb9665e | 124,360,548,452,134,250,000,000,000,000,000,000,000 | 38 | release 2.1.6 : security fix: scrub headers for "AuthType oauth20"
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
static int tcp_should_expand_sndbuf(const struct sock *sk)
{
const struct tcp_sock *tp = tcp_sk(sk);
/* If the user specified a specific send buffer setting, do
* not modify it.
*/
if (sk->sk_userlocks & SOCK_SNDBUF_LOCK)
return 0;
/* If we are under global TCP memory pressure, do not expand. */
if (tcp_m... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 328,883,797,433,948,860,000,000,000,000,000,000,000 | 24 | 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... |
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
Idx num = REG_MISSING;
unsigned char c;
while (1)
{
fetch_token (token, input, syntax);
c = token->opr.c;
if (BE (token->type == END_OF_RE, 0))
return REG_ERROR;
if (token->type == OP_CLOSE_DUP_NUM || c == ','... | 0 | [
"CWE-19"
] | gnulib | 5513b40999149090987a0341c018d05d3eea1272 | 320,138,445,640,765,800,000,000,000,000,000,000,000 | 21 | Diagnose ERE '()|\1'
Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative. This... |
xsltFormatNumberConversion(xsltDecimalFormatPtr self,
xmlChar *format,
double number,
xmlChar **result)
{
xmlXPathError status = XPATH_EXPRESSION_OK;
xmlBufferPtr buffer;
xmlChar *the_format, *prefix = NULL, *suffix = NULL;
xmlChar *nprefix, *nsuffix = NULL;
xmlChar pchar;
int ... | 0 | [
"CWE-119"
] | libxslt | eb1030de31165b68487f288308f9d1810fed6880 | 30,629,326,073,960,680,000,000,000,000,000,000,000 | 409 | Fix heap overread in xsltFormatNumberConversion
An empty decimal-separator could cause a heap overread. This can be
exploited to leak a couple of bytes after the buffer that holds the
pattern string.
Found with afl-fuzz and ASan. |
static inline dma_addr_t desc_to_dma(struct netdev_desc *desc)
{
return le64_to_cpu(desc->fraginfo) & DMA_BIT_MASK(48);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1bb57e940e1958e40d51f2078f50c3a96a9b2d75 | 165,273,734,956,198,600,000,000,000,000,000,000,000 | 4 | dl2k: Clean up rio_ioctl
The dl2k driver's rio_ioctl call has a few issues:
- No permissions checking
- Implements SIOCGMIIREG and SIOCGMIIREG using the SIOCDEVPRIVATE numbers
- Has a few ioctls that may have been used for debugging at one point
but have no place in the kernel proper.
This patch removes all but the... |
_cimg_math_parser():
code(_code),p_code_end(0),p_break((CImg<ulongT>*)0 - 2),
imgin(CImg<T>::const_empty()),listin(CImgList<T>::const_empty()),
imgout(CImg<T>::empty()),listout(CImgList<T>::empty()),
img_stats(_img_stats),list_stats(_list_stats),list_median(_list_median),debug_ind... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 239,281,172,868,751,900,000,000,000,000,000,000,000 | 10 | Fix other issues in 'CImg<T>::load_bmp()'. |
tty_resize(struct tty *tty)
{
struct client *c = tty->client;
struct winsize ws;
u_int sx, sy;
if (ioctl(tty->fd, TIOCGWINSZ, &ws) != -1) {
sx = ws.ws_col;
if (sx == 0)
sx = 80;
sy = ws.ws_row;
if (sy == 0)
sy = 24;
} else {
sx = 80;
sy = 24;
}
log_debug("%s: %s now %ux%u", __func__, c->nam... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 141,481,273,631,814,000,000,000,000,000,000,000,000 | 21 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
MagickExport MagickStatusType ParseGeometry(const char *geometry,
GeometryInfo *geometry_info)
{
char
*p,
pedantic_geometry[MagickPathExtent],
*q;
double
value;
GeometryInfo
coordinate;
int
c;
MagickStatusType
flags;
/*
Remove whitespaces meta characters from geometry ... | 0 | [
"CWE-369"
] | ImageMagick | f35eca82b0c294ff9d0ccad104a881c3ae2ba913 | 26,401,056,184,215,123,000,000,000,000,000,000,000 | 341 | https://github.com/ImageMagick/ImageMagick/issues/1725 |
inline Http2Stream* Http2Session::SubmitRequest(
nghttp2_priority_spec* prispec,
nghttp2_nv* nva,
size_t len,
int32_t* ret,
int options) {
DEBUG_HTTP2SESSION(this, "submitting request");
Http2Scope h2scope(this);
Http2Stream* stream = nullptr;
Http2Stream::Provider::Stream prov(options);
*... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 46,168,999,626,339,740,000,000,000,000,000,000,000 | 16 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
WriteToRFBServer(rfbClient* client, char *buf, int n)
{
fd_set fds;
int i = 0;
int j;
const char *obuf = buf;
#ifdef LIBVNCSERVER_HAVE_SASL
const char *output;
unsigned int outputlen;
int err;
#endif /* LIBVNCSERVER_HAVE_SASL */
if (client->serverPort==-1)
return TRUE; /* vncrec playing */
if (c... | 0 | [
"CWE-120",
"CWE-787"
] | libvncserver | 3fd03977c9b35800d73a865f167338cb4d05b0c1 | 107,179,681,424,719,220,000,000,000,000,000,000,000 | 70 | libvncclient: bail out if unix socket name would overflow
Closes #291 |
parameter_brace_expand_error (name, value)
char *name, *value;
{
WORD_LIST *l;
char *temp;
last_command_exit_value = EXECUTION_FAILURE; /* ensure it's non-zero */
if (value && *value)
{
l = expand_string (value, 0);
temp = string_list (l);
report_error ("%s: %s", name, temp ? temp :... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 186,425,431,205,114,280,000,000,000,000,000,000,000 | 23 | bash-4.4-rc2 release |
_gd2CreateFromFile (gdIOCtxPtr in, int *sx, int *sy,
int *cs, int *vers, int *fmt,
int *ncx, int *ncy, t_chunk_info ** cidx)
{
gdImagePtr im;
if (_gd2GetHeader (in, sx, sy, cs, vers, fmt, ncx, ncy, cidx) != 1) {
GD2_DBG (printf ("Bad GD2 header\n"));
goto fail1;
}
if (gd... | 0 | [
"CWE-703",
"CWE-189",
"CWE-681"
] | libgd | 2bb97f407c1145c850416a3bfbcc8cf124e68a19 | 93,732,125,771,830,400,000,000,000,000,000,000,000 | 36 | gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corrupted chunks.
Thanks to Hans Jerry Illikainen <hji@dyntopia.com> for indepth report
and reproducer information. Made for easy test case writing :). |
static int netlbl_cipsov4_list(struct sk_buff *skb, struct genl_info *info)
{
int ret_val;
struct sk_buff *ans_skb = NULL;
u32 nlsze_mult = 1;
void *data;
u32 doi;
struct nlattr *nla_a;
struct nlattr *nla_b;
struct cipso_v4_doi *doi_def;
u32 iter;
if (!info->attrs[NLBL_CIPSOV4_A_DOI]) {
ret_val = -EINVAL;
... | 1 | [
"CWE-416"
] | linux | ad5d07f4a9cd671233ae20983848874731102c08 | 111,594,179,274,178,100,000,000,000,000,000,000,000 | 149 | cipso,calipso: resolve a number of problems with the DOI refcounts
The current CIPSO and CALIPSO refcounting scheme for the DOI
definitions is a bit flawed in that we:
1. Don't correctly match gets/puts in netlbl_cipsov4_list().
2. Decrement the refcount on each attempt to remove the DOI from the
DOI list, only re... |
void make_field(THD *thd, Send_field *)
{
illegal_method_call((const char*)"make_field");
}; | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 205,939,033,868,220,760,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
UnicodeString __fastcall TSCPFileSystem::AbsolutePath(UnicodeString Path, bool /*Local*/)
{
return ::AbsolutePath(CurrentDirectory, Path);
}
| 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 127,566,316,214,225,560,000,000,000,000,000,000,000 | 4 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
get_default_language_name (GdmSession *self)
{
const char *default_language;
if (self->priv->saved_language != NULL) {
return self->priv->saved_language;
}
default_language = g_hash_table_lookup (self->priv->environment,
"LANG");
if (default... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 24,449,074,988,604,074,000,000,000,000,000,000,000 | 17 | 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 |
xsltRegisterAllElement(xsltTransformContextPtr ctxt)
{
xsltRegisterExtElement(ctxt, (const xmlChar *) "apply-templates",
XSLT_NAMESPACE,
(xsltTransformFunction) xsltApplyTemplates);
xsltRegisterExtElement(ctxt, (const xmlChar *) "apply-imports",
XSLT_N... | 0 | [] | libxslt | 937ba2a3eb42d288f53c8adc211bd1122869f0bf | 149,527,321,150,792,350,000,000,000,000,000,000,000 | 80 | Fix default template processing on namespace nodes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.