func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(ConnectionHandlerTest, TransportProtocolCustom) {
TestListener* test_listener = addListener(1, true, false, "test_listener");
Network::MockListener* listener = new Network::MockListener();
Network::ListenerCallbacks* listener_callbacks;
EXPECT_CALL(dispatcher_, createListener_(_, _, _))
.WillOnce(
... | 1 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 72,714,612,971,944,590,000,000,000,000,000,000,000 | 33 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
static void start_signal_handler(void)
{
int error;
pthread_attr_t thr_attr;
DBUG_ENTER("start_signal_handler");
(void) pthread_attr_init(&thr_attr);
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
(void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
(void) my_setstacksize(&thr_a... | 0 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 194,948,807,218,017,640,000,000,000,000,000,000,000 | 25 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
ssize_t enc_untrusted_fgetxattr(int fd, const char *name, void *value,
size_t size) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_fgetxattr,
fd, name, value, size);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 53,920,035,913,891,830,000,000,000,000,000,000,000 | 5 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
extern int get_u16(unsigned short *val, const char *arg, int base)
{
unsigned long res;
char *ptr;
if (!arg || !*arg)
return -1;
errno = 0;
res = strtoul(arg, &ptr, base);
if (!ptr || ptr == arg || *ptr || res > 0xFFFF || errno != 0)
return -1;
*val = res;
return 0;
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 85,850,162,566,691,380,000,000,000,000,000,000,000 | 17 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static inline int xrstor_state_booting(struct xsave_struct *fx, u64 mask)
{
u32 lmask = mask;
u32 hmask = mask >> 32;
int err = 0;
WARN_ON(system_state != SYSTEM_BOOTING);
if (boot_cpu_has(X86_FEATURE_XSAVES))
asm volatile("1:"XRSTORS"\n\t"
"2:\n\t"
: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
: ... | 1 | [
"CWE-20"
] | linux | 06c8173eb92bbfc03a0fe8bb64315857d0badd06 | 303,318,205,821,941,850,000,000,000,000,000,000,000 | 25 | x86/fpu/xsaves: Fix improper uses of __ex_table
Commit:
f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area")
introduced alternative instructions for XSAVES/XRSTORS and commit:
adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time")
added support for the XSAVES/XRS... |
value_resp(agooReq req, gqlValue result, int status, int indent) {
agooRes res = req->res;
char buf[256];
struct _agooErr err = AGOO_ERR_INIT;
int cnt;
agooText text = agoo_text_allocate(4094);
gqlValue msg = gql_object_create(&err);
if (NULL == msg) {
AGOO_ERR_MEM(&err, "response");... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 143,653,445,679,667,800,000,000,000,000,000,000,000 | 86 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
GC_INNER ptr_t GC_alloc_large(size_t lb, int k, unsigned flags)
{
struct hblk * h;
word n_blocks;
ptr_t result;
GC_bool retry = FALSE;
GC_ASSERT(I_HOLD_LOCK());
lb = ROUNDUP_GRANULE_SIZE(lb);
n_blocks = OBJ_SZ_TO_BLOCKS(lb);
if (!EXPECT(GC_is_initialized, TRUE)) {
DCL_LOCK_STATE;
... | 1 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 83,245,633,650,442,300,000,000,000,000,000,000,000 | 44 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
mm_user_key_allowed(struct passwd *pw, Key *key, int pubkey_auth_attempt)
{
return (mm_key_allowed(MM_USERKEY, NULL, NULL, key,
pubkey_auth_attempt));
} | 0 | [
"CWE-20",
"CWE-200"
] | openssh-portable | d4697fe9a28dab7255c60433e4dd23cf7fce8a8b | 233,102,365,070,836,500,000,000,000,000,000,000,000 | 5 | Don't resend username to PAM; it already has it.
Pointed out by Moritz Jodeit; ok dtucker@ |
static void encode_quant_matrix(VC2EncContext *s)
{
int level, custom_quant_matrix = 0;
if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF)
custom_quant_matrix = 1;
put_bits(&s->pb, 1, custom_quant_matrix);
if (custom_quant_matrix) {
init_custom_qm(s);
put_vc2_ue_uint(&s->... | 0 | [
"CWE-125"
] | FFmpeg | 94e538aebbc9f9c529e8b1f2eda860cfb8c473b1 | 284,864,317,555,572,730,000,000,000,000,000,000,000 | 23 | vc2enc_dwt: pad the temporary buffer by the slice size
Since non-Haar wavelets need to look into pixels outside the frame, we
need to pad the buffer. The old factor of two seemed to be a workaround
that fact and only padded to the left and bottom. This correctly pads
by the slice size and as such reduces memory usage ... |
MONGO_EXPORT int mongo_env_sock_init( void ) {
#if defined(_WIN32)
WSADATA wsaData;
WORD wVers;
#elif defined(SIGPIPE)
struct sigaction act;
#endif
static int called_once;
static int retval;
if (called_once) return retval;
called_once = 1;
#if defined(_WIN32)
wVers = MAKEWORD(1, 1);
... | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 169,556,675,285,151,440,000,000,000,000,000,000,000 | 32 | don't mix up int and size_t (first pass to fix that) |
static int s_show(struct seq_file *m, void *p)
{
unsigned long nr_partials = 0;
unsigned long nr_slabs = 0;
unsigned long nr_inuse = 0;
unsigned long nr_objs = 0;
unsigned long nr_free = 0;
struct kmem_cache *s;
int node;
s = list_entry(p, struct kmem_cache, list);
for_each_online_node(node) {
struct kmem... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 338,318,795,463,139,960,000,000,000,000,000,000,000 | 35 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static void get_ctx(struct perf_event_context *ctx)
{
refcount_inc(&ctx->refcount);
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 230,978,705,856,034,800,000,000,000,000,000,000,000 | 4 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
CImg<_cimg_Ttfloat> get_solve_tridiagonal(const CImg<t>& A) const {
return CImg<_cimg_Ttfloat>(*this,false).solve_tridiagonal(A);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 160,664,944,102,811,510,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
User::UserId V2UserDocumentParser::extractUserIDFromUserDocument(const BSONObj& doc) const {
auto userId = doc[AuthorizationManager::USERID_FIELD_NAME];
if (userId.isBinData(BinDataType::newUUID)) {
auto id = userId.uuid();
User::UserId ret;
std::copy(id.begin(), id.end(), std::back_inse... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 269,786,846,012,169,580,000,000,000,000,000,000,000 | 11 | SERVER-38984 Validate unique User ID on UserCache hit |
int bio_to_mem(unsigned char **out, int maxlen, BIO *in)
{
BIO *mem;
int len, ret;
unsigned char tbuf[1024];
mem = BIO_new(BIO_s_mem());
if (!mem)
return -1;
for(;;)
{
if ((maxlen != -1) && maxlen < 1024)
len = maxlen;
else
len = 1024;
len = BIO_read(in, tbuf, len);
if (len <= 0)
break;
if... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 162,590,574,748,393,370,000,000,000,000,000,000,000 | 32 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size,
png_uint_32p chunk_bytes, png_bytep next_out, png_alloc_size_t *out_size,
int finish)
{
if (png_ptr->zowner == png_ptr->chunk_name)
{
int ret;
/* next_in and avail_in must have been initialized by the caller. */
... | 0 | [
"CWE-190",
"CWE-369"
] | libpng | 8a05766cb74af05c04c53e6c9d60c13fc4d59bf2 | 248,710,293,440,846,900,000,000,000,000,000,000,000 | 60 | [libpng16] Fix the calculation of row_factor in png_check_chunk_length
(Bug report by Thuan Pham, SourceForge issue #278) |
Status V2UserDocumentParser::initializeUserIndirectRolesFromUserDocument(const BSONObj& privDoc,
User* user) const {
BSONElement indirectRolesElement = privDoc[INHERITED_ROLES_FIELD_NAME];
if (indirectRolesElement.type() != Array) {
... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 249,458,180,544,453,230,000,000,000,000,000,000,000 | 28 | SERVER-38984 Validate unique User ID on UserCache hit |
static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa)
{
struct device_node *dn;
const char *name;
dn = kzalloc(sizeof(*dn), GFP_KERNEL);
if (!dn)
return NULL;
name = (const char *)ccwa + be32_to_cpu(ccwa->name_offset);
dn->full_name = kstrdup(name, GFP_KERNEL);
if (!dn->full_name) {
kfre... | 0 | [
"CWE-476"
] | linux | efa9ace68e487ddd29c2b4d6dd23242158f1f607 | 91,013,167,209,133,640,000,000,000,000,000,000,000 | 21 | powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup().
kstrdup() may return NULL, so it should be checked and handle error.
And prop should be freed if 'prop->name' is NULL.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signe... |
Returns an array of all of the results. */
static PHP_METHOD(PDOStatement, fetchAll)
{
long how = PDO_FETCH_USE_DEFAULT;
zval *data, *return_all;
zval *arg2;
zend_class_entry *old_ce;
zval *old_ctor_args, *ctor_args = NULL;
int error = 0, flags, old_arg_count;
PHP_STMT_GET_OBJ;
if (FAILURE == zend_parse_par... | 0 | [
"CWE-476"
] | php-src | 6045de69c7dedcba3eadf7c4bba424b19c81d00d | 58,023,056,458,204,690,000,000,000,000,000,000,000 | 159 | Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
Proper soltion would be to call serialize/unserialize and deal with the result,
but this requires more work that should be done by wddx maintainer (not me). |
DEFUN (neighbor_allowas_in,
neighbor_allowas_in_cmd,
NEIGHBOR_CMD2 "allowas-in",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Accept as-path with my AS present in it\n")
{
int ret;
struct peer *peer;
unsigned int allow_num;
peer = peer_and_group_lookup_vty (vty, argv[0]);
if (! peer)
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 79,179,986,332,141,620,000,000,000,000,000,000,000 | 25 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
on_reauthentication_started_cb (GdmDBusWorker *worker,
GAsyncResult *res,
gpointer user_data)
{
GdmSessionConversation *conversation = user_data;
GdmSession *self;
GError *error = NULL;
gboolean worked;
char ... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 110,779,572,996,833,330,000,000,000,000,000,000,000 | 30 | 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 |
e_ews_connection_get_oal_list (EEwsConnection *cnc,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GSimpleAsyncResult *simple;
SoupMessage *soup_message;
struct _oal_req_data *data;
GError *e... | 1 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 34,827,031,346,484,313,000,000,000,000,000,000,000 | 41 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
destroy_restrict_fifo(
restrict_fifo * fifo
)
{
restrict_node * rn;
if (fifo != NULL) {
do {
UNLINK_FIFO(rn, *fifo, link);
if (rn != NULL)
destroy_restrict_node(rn);
} while (rn != NULL);
free(fifo);
}
} | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 157,593,099,708,250,800,000,000,000,000,000,000,000 | 15 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
static struct cm_work * cm_dequeue_work(struct cm_id_private *cm_id_priv)
{
struct cm_work *work;
if (list_empty(&cm_id_priv->work_list))
return NULL;
work = list_entry(cm_id_priv->work_list.next, struct cm_work, list);
list_del(&work->list);
return work;
} | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 10,370,161,968,089,451,000,000,000,000,000,000,000 | 11 | 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... |
bool Image::isLongLongType(uint16_t type) {
return type == Exiv2::unsignedLongLong
|| type == Exiv2::signedLongLong
;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 244,813,748,869,319,450,000,000,000,000,000,000,000 | 5 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static int __tipc_nl_compat_link_set(struct sk_buff *skb,
struct tipc_nl_compat_msg *msg)
{
struct nlattr *prop;
struct nlattr *link;
struct tipc_link_config *lc;
lc = (struct tipc_link_config *)TLV_DATA(msg->req);
link = nla_nest_start(skb, TIPC_NLA_LINK);
if (!link)
return -EMSGSIZE;
if (nla_put_... | 0 | [
"CWE-200"
] | net | 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 | 337,948,227,166,181,100,000,000,000,000,000,000,000 | 26 | tipc: fix an infoleak in tipc_nl_compat_link_dump
link_info.str is a char array of size 60. Memory after the NULL
byte is not initialized. Sending the whole object out can cause
a leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
{
/* unprotected vars, we dont care of overwrites */
static u32 challenge_timestamp;
static unsigned int challenge_count;
struct tcp_sock *tp = tcp_sk(sk);
u32 now;
/* First check our per-socket dupack rate limit. */
if (tcp_oow_rate... | 1 | [
"CWE-200"
] | net | 75ff39ccc1bd5d3c455b6822ab09e533c551f758 | 200,470,757,555,195,170,000,000,000,000,000,000,000 | 25 | tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
s... |
ofputil_decode_nxst_flow_request(struct ofputil_flow_stats_request *fsr,
struct ofpbuf *b, bool aggregate,
const struct tun_table *tun_table,
const struct vl_mff_map *vl_mff_map)
{
const struct nx_flow_stats_request *... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 72,493,981,136,730,780,000,000,000,000,000,000,000 | 26 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
GF_Err gnrv_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_GenericVisualSampleEntryBox *ptr = (GF_GenericVisualSampleEntryBox *)s;
//careful we are not writing the box type but the entry type so switch for write
ptr->type = ptr->EntryType;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
ptr->type =... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 299,144,625,418,304,230,000,000,000,000,000,000,000 | 15 | fixed #1757 |
HeaderUtility::HeaderData::HeaderData(const envoy::config::route::v3::HeaderMatcher& config)
: name_(config.name()), invert_match_(config.invert_match()) {
switch (config.header_match_specifier_case()) {
case envoy::config::route::v3::HeaderMatcher::HeaderMatchSpecifierCase::kExactMatch:
header_match_type_ ... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 290,652,992,087,351,650,000,000,000,000,000,000,000 | 45 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static int __net_init crypto_netlink_init(struct net *net)
{
struct netlink_kernel_cfg cfg = {
.input = crypto_netlink_rcv,
};
net->crypto_nlsk = netlink_kernel_create(net, NETLINK_CRYPTO, &cfg);
return net->crypto_nlsk == NULL ? -ENOMEM : 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | ffdde5932042600c6807d46c1550b28b0db6a3bc | 238,124,378,079,915,220,000,000,000,000,000,000,000 | 9 | crypto: user - fix memory leak in crypto_report
In crypto_report, a new skb is created via nlmsg_new(). This skb should
be released if crypto_report_alg() fails.
Fixes: a38f7907b926 ("crypto: Add userspace configuration API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Sign... |
GF_Err chnl_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_ChannelLayoutBox *ptr = (GF_ChannelLayoutBox *) s;
ISOM_DECREASE_SIZE(s, 1)
ptr->layout.stream_structure = gf_bs_read_u8(bs);
if (ptr->layout.stream_structure & 1) {
ISOM_DECREASE_SIZE(s, 1)
ptr->layout.definedLayout = gf_bs_read_u8(bs);
if (ptr->layout.... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 31,008,091,494,829,676,000,000,000,000,000,000,000 | 35 | fixed #1587 |
tor_errno_to_tls_error(int e)
{
#if defined(MS_WINDOWS)
switch (e) {
case WSAECONNRESET: // most common
return TOR_TLS_ERROR_CONNRESET;
case WSAETIMEDOUT:
return TOR_TLS_ERROR_TIMEOUT;
case WSAENETUNREACH:
case WSAEHOSTUNREACH:
return TOR_TLS_ERROR_NO_ROUTE;
case WSAECONNREFUSED:... | 0 | [
"CWE-264"
] | tor | 638fdedcf16cf7d6f7c586d36f7ef335c1c9714f | 292,958,935,998,704,400,000,000,000,000,000,000,000 | 32 | Don't send a certificate chain on outgoing TLS connections from non-relays |
unsigned avcodec_version(void)
{
// av_assert0(AV_CODEC_ID_V410==164);
av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563);
av_assert0(AV_CODEC_ID_ADPCM_G722==69660);
// av_assert0(AV_CODEC_ID_BMV_AUDIO==86071);
av_assert0(AV_CODEC_ID_SRT==94216);
av_assert0(LIBAVCODEC_VERSION_MICRO >= 100);
av_ass... | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 20,494,146,891,839,386,000,000,000,000,000,000,000 | 16 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
openzlog (const char *progname, zlog_proto_t protocol,
int syslog_flags, int syslog_facility)
{
struct zlog *zl;
u_int i;
zl = XCALLOC(MTYPE_ZLOG, sizeof (struct zlog));
zl->ident = progname;
zl->protocol = protocol;
zl->facility = syslog_facility;
zl->syslog_options = syslog_flags;
/* Set default... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 59,563,633,532,788,350,000,000,000,000,000,000,000 | 23 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
R_API void r_egg_if(REgg *egg, const char *reg, char cmp, int v) {
// egg->depth++;
} | 0 | [
"CWE-125"
] | radare2 | e710401ebb4a892a87b0c709d709af8b5dcbbb01 | 229,785,801,883,425,100,000,000,000,000,000,000,000 | 3 | patch #14211 heap buffer overflow in large ragg2
inputs. this should be refactored to use an RBuffer to enable dynamic
resizing, but for now just patching it to bail out if we are about to
overwrite the allocated statically sized buffer |
add_job(cupsd_client_t *con, /* I - Client connection */
cupsd_printer_t *printer, /* I - Destination printer */
mime_type_t *filetype) /* I - First print file type, if any */
{
http_status_t status; /* Policy status */
ipp_attribute_t *attr, /* Current attribute */
*auth_info; /* auth-info attribute ... | 1 | [
"CWE-20"
] | cups | 49fa4983f25b64ec29d548ffa3b9782426007df3 | 323,284,512,244,294,480,000,000,000,000,000,000,000 | 731 | DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8. |
static int show_pid_smap(struct seq_file *m, void *v)
{
return show_smap(m, v, 1);
} | 0 | [
"CWE-200"
] | linux | ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce | 197,320,575,529,422,980,000,000,000,000,000,000,000 | 4 | pagemap: do not leak physical addresses to non-privileged userspace
As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.
This disallows anybody without CAP_SYS_ADMIN to read the pagemap.
[1] http://googleprojectzero.bl... |
static int replmd_verify_link_target(struct replmd_replicated_request *ar,
TALLOC_CTX *mem_ctx,
struct la_entry *la_entry,
struct ldb_dn *src_dn,
const struct dsdb_attribute *attr)
{
int ret = LDB_SUCCESS;
struct ldb_module *module = ar->module;
struct dsdb_dn *tgt_dsdb_dn = NULL;... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 29,604,335,678,837,616,000,000,000,000,000,000,000 | 50 | 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... |
bool OSDService::_get_map_bl(epoch_t e, bufferlist& bl)
{
bool found = map_bl_cache.lookup(e, &bl);
if (found) {
if (logger)
logger->inc(l_osd_map_bl_cache_hit);
return true;
}
if (logger)
logger->inc(l_osd_map_bl_cache_miss);
found = store->read(coll_t::meta(),
OSD::get_osdmap_pobje... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 202,568,566,226,126,130,000,000,000,000,000,000,000 | 18 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static int bpf_map_do_batch(const union bpf_attr *attr,
union bpf_attr __user *uattr,
int cmd)
{
bool has_read = cmd == BPF_MAP_LOOKUP_BATCH ||
cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH;
bool has_write = cmd != BPF_MAP_LOOKUP_BATCH;
struct bpf_map *map;
int err, ufd;
struct fd f;
if (CHECK_ATTR(B... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 25,808,532,224,860,143,000,000,000,000,000,000,000 | 44 | 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... |
bool kvm_is_mmio_pfn(pfn_t pfn)
{
if (pfn_valid(pfn))
return PageReserved(pfn_to_page(pfn));
return true;
} | 0 | [
"CWE-20"
] | linux | 338c7dbadd2671189cec7faf64c84d01071b3f96 | 22,641,129,668,718,623,000,000,000,000,000,000,000 | 7 | KVM: Improve create VCPU parameter (CVE-2013-4587)
In multiple functions the vcpu_id is used as an offset into a bitfield. Ag
malicious user could specify a vcpu_id greater than 255 in order to set or
clear bits in kernel memory. This could be used to elevate priveges in the
kernel. This patch verifies that the vcp... |
void LibRaw::parse_exif_interop(int base)
{
unsigned entries, tag, type, len, save;
char value[4] = { 0,0,0,0 };
entries = get2();
INT64 fsize = ifp->size();
while (entries--)
{
tiff_get(base, &tag, &type, &len, &save);
INT64 savepos = ftell(ifp);
if (len > 8 && savepos + len > fsize * 2)
{
fseek(ifp,... | 0 | [
"CWE-787"
] | LibRaw | 55f0a0c08974b8b79ebfa7762b555a1704b25fb2 | 216,011,136,766,876,200,000,000,000,000,000,000,000 | 34 | possible buffer underrun in exif parser |
**/
bool is_sameXYZ(const unsigned int size_x, const unsigned int size_y, const unsigned int size_z) const {
return is_sameXY(size_x,size_y) && _depth==size_z; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 299,998,586,933,553,400,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
int groups_max(void)
{
#if defined(SYSCONF_SC_NGROUPS_MAX)
int ret = sysconf(_SC_NGROUPS_MAX);
return (ret == -1) ? NGROUPS_MAX : ret;
#else
return NGROUPS_MAX;
#endif
} | 0 | [
"CWE-20"
] | samba | d77a74237e660dd2ce9f1e14b02635f8a2569653 | 317,046,408,224,379,700,000,000,000,000,000,000,000 | 9 | s3: nmbd: Fix bug 10633 - nmbd denial of service
The Linux kernel has a bug in that it can give spurious
wakeups on a non-blocking UDP socket for a non-deliverable packet.
When nmbd was changed to use non-blocking sockets it
became vulnerable to a spurious wakeup from poll/epoll.
Fix sys_recvfile() to return on EWOU... |
static bool add_free_nid(struct f2fs_sb_info *sbi, nid_t nid, bool build)
{
struct f2fs_nm_info *nm_i = NM_I(sbi);
struct free_nid *i, *e;
struct nat_entry *ne;
int err = -EINVAL;
bool ret = false;
/* 0 nid should not be used */
if (unlikely(nid == 0))
return false;
i = f2fs_kmem_cache_alloc(free_nid_slab, ... | 0 | [
"CWE-200",
"CWE-362"
] | linux | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | 10,653,911,035,269,837,000,000,000,000,000,000,000 | 65 | f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocated again.
Thread A Thread B
- f2fs_create
- f2fs_new_inode
- alloc_nid
- __insert_nid_to_list(ALLOC_NID_LIST)
- f2fs_balance_fs_bg
- build_free... |
static inline u32 rtm_get_table(struct nlattr *attrs[], u8 table)
{
if (attrs[RTA_TABLE])
table = nla_get_u32(attrs[RTA_TABLE]);
return table;
} | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 111,002,872,584,646,580,000,000,000,000,000,000,000 | 7 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
gpointer user_data)
{
GDHCPServer *dhcp_server = user_data;
struct dhcp_packet packet;
struct dhcp_lease *lease;
uint32_t requested_nip = 0;
uint8_t type, *server_id_option, *request_ip_option;
uint16_t packet_len;
int re;
if (c... | 0 | [] | connman | 58d397ba74873384aee449690a9070bacd5676fa | 141,642,869,802,137,970,000,000,000,000,000,000,000 | 105 | gdhcp: Avoid reading invalid data in dhcp_get_option |
bool extend_table_list(THD *thd, TABLE_LIST *tables,
Prelocking_strategy *prelocking_strategy,
bool has_prelocking_list)
{
bool error= false;
LEX *lex= thd->lex;
bool maybe_need_prelocking=
(tables->updating && tables->lock_type >= TL_WRITE_ALLOW_WRITE)
|| thd... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 130,267,247,555,411,810,000,000,000,000,000,000,000 | 32 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item)
{
return (char*)print(item, false, &global_hooks);
} | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 18,763,407,376,660,494,000,000,000,000,000,000,000 | 4 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
UnicodeStringTest::TestMoveSwap() {
static const UChar abc[3] = { 0x61, 0x62, 0x63 }; // "abc"
UnicodeString s1(FALSE, abc, UPRV_LENGTHOF(abc)); // read-only alias
UnicodeString s2(100, 0x7a, 100); // 100 * 'z' should be on the heap
UnicodeString s3("defg", 4, US_INV); // in stack buffer
const U... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 167,975,243,722,866,000,000,000,000,000,000,000,000 | 56 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
static int fts3MsrBufferData(
Fts3MultiSegReader *pMsr, /* Multi-segment-reader handle */
char *pList,
int nList
){
if( nList>pMsr->nBuffer ){
char *pNew;
pMsr->nBuffer = nList*2;
pNew = (char *)sqlite3_realloc(pMsr->aBuffer, pMsr->nBuffer);
if( !pNew ) return SQLITE_NOMEM;
pMsr->aBuff... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 90,977,926,703,414,030,000,000,000,000,000,000,000 | 17 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
int udp_v6_get_port(struct sock *sk, unsigned short snum)
{
unsigned int hash2_nulladdr =
udp6_portaddr_hash(sock_net(sk), &in6addr_any, snum);
unsigned int hash2_partial =
udp6_portaddr_hash(sock_net(sk), &inet6_sk(sk)->rcv_saddr, 0);
/* precompute partial secondary hash */
udp_sk(sk)->udp_portaddr_hash = ha... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 45,617,820,279,034,930,000,000,000,000,000,000,000 | 11 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
void* DlfcnModule::findSymbol(const Firebird::string& symName)
{
void* result = dlsym(module, symName.c_str());
if (!result)
{
Firebird::string newSym = '_' + symName;
result = dlsym(module, newSym.c_str());
}
return result;
} | 1 | [
"CWE-89"
] | firebird | 56e9a73c16803c3544076edb2d6c4ca25815e541 | 11,498,839,681,331,190,000,000,000,000,000,000,000 | 11 | Backported fix for CORE-5474: 'Restrict UDF' is not effective, because fbudf.so is dynamically linked against libc |
msicap_cfgwrite(struct pci_vdev *dev, int capoff, int offset,
int bytes, uint32_t val)
{
uint16_t msgctrl, rwmask, msgdata, mme;
uint32_t addrlo;
/*
* If guest is writing to the message control register make sure
* we do not overwrite read-only fields.
*/
if ((offset - capoff) == 2 && bytes == 2) {
rwmas... | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 6199e653418eda58cd698d8769820904453e2535 | 214,723,188,877,485,900,000,000,000,000,000,000,000 | 37 | dm: validate the input in 'pci_emul_mem_handler()'
checking the inputs explicitly instead of using Assert.
Tracked-On: #4003
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com> |
const char* AsyncSSLSocket::getNegotiatedCipherName() const {
return (ssl_ != nullptr) ? SSL_get_cipher_name(ssl_.get()) : nullptr;
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 226,002,086,835,358,700,000,000,000,000,000,000,000 | 3 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static void __exit llc2_exit(void)
{
llc_station_exit();
llc_remove_pack(LLC_DEST_SAP);
llc_remove_pack(LLC_DEST_CONN);
sock_unregister(PF_LLC);
llc_proc_exit();
llc_sysctl_exit();
proto_unregister(&llc_proto);
} | 0 | [
"CWE-200"
] | linux-2.6 | 28e9fc592cb8c7a43e4d3147b38be6032a0e81bc | 263,807,367,451,350,100,000,000,000,000,000,000,000 | 10 | NET: llc, zero sockaddr_llc struct
sllc_arphrd member of sockaddr_llc might not be changed. Zero sllc
before copying to the above layer's structure.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
virtual bool enumerate_field_refs_processor(void *arg) { return 0; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 143,784,245,916,578,470,000,000,000,000,000,000,000 | 1 | 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.... |
OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd,
OPJ_BYTE *dest,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 len,
... | 0 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 252,248,822,886,437,100,000,000,000,000,000,000,000 | 191 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
_AFmoduleinst _af_ms_adpcm_init_decompress (_Track *track, AFvirtualfile *fh,
bool seekok, bool headerless, AFframecount *chunkframes)
{
_AFmoduleinst ret = _AFnewmodinst(&ms_adpcm_decompress);
ms_adpcm_data *d;
AUpvlist pv;
long l;
void *v;
assert(af_ftell(fh) == track->fpos_first_frame);
d = (ms_adpcm_dat... | 1 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 139,382,574,856,551,510,000,000,000,000,000,000,000 | 45 | Fix decoding of multi-channel ADPCM audio files. |
static int uvesafb_release(struct fb_info *info, int user)
{
struct uvesafb_ktask *task = NULL;
struct uvesafb_par *par = info->par;
int cnt = atomic_read(&par->ref_count);
if (!cnt)
return -EINVAL;
if (cnt != 1)
goto out;
task = uvesafb_prep();
if (!task)
goto out;
/* First, try to set the standard 8... | 0 | [
"CWE-190"
] | linux | 9f645bcc566a1e9f921bdae7528a01ced5bc3713 | 52,487,187,782,222,680,000,000,000,000,000,000,000 | 30 | video: uvesafb: Fix integer overflow in allocation
cmap->len can get close to INT_MAX/2, allowing for an integer overflow in
allocation. This uses kmalloc_array() instead to catch the condition.
Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com>
Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core")
Cc: s... |
static int sctp_inet_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
{
return sctp_v4_available(addr, opt);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | 302,623,109,427,478,770,000,000,000,000,000,000,000 | 4 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... |
static bool signed_sub32_overflows(s32 a, s32 b)
{
/* Do the sub in u64, where overflow is well-defined */
s32 res = (s32)((u32)a - (u32)b);
if (b < 0)
return res < a;
return res > a;
} | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 53,110,068,604,982,590,000,000,000,000,000,000,000 | 9 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
parse_char_property(Node** np, OnigToken* tok, UChar** src, UChar* end,
ScanEnv* env)
{
int r, ctype;
CClassNode* cc;
ctype = fetch_char_property_to_ctype(src, end, env);
if (ctype < 0) return ctype;
*np = node_new_cclass();
CHECK_NULL_RETURN_MEMERR(*np);
cc = NCCLASS(*np);
r = add_ctype_to_cc(c... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 37,419,490,620,958,950,000,000,000,000,000,000,000 | 22 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
static int sctp_setsockopt_associnfo(struct sock *sk, char __user *optval, unsigned int optlen)
{
struct sctp_assocparams assocparams;
struct sctp_association *asoc;
if (optlen != sizeof(struct sctp_assocparams))
return -EINVAL;
if (copy_from_user(&assocparams, optval, optlen))
return -EFAULT;
asoc = sctp_i... | 0 | [
"CWE-617",
"CWE-362"
] | linux | 2dcab598484185dea7ec22219c76dcdd59e3cb90 | 20,431,865,455,734,870,000,000,000,000,000,000,000 | 56 | sctp: avoid BUG_ON on sctp_wait_for_sndbuf
Alexander Popov reported that an application may trigger a BUG_ON in
sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is
waiting on it to queue more data and meanwhile another thread peels off
the association being used by the first thread.
This patch replaces ... |
static size_t findDiff(const void* buf1, const void* buf2, size_t max)
{
const BYTE* b1 = (const BYTE*)buf1;
const BYTE* b2 = (const BYTE*)buf2;
size_t u;
for (u=0; u<max; u++) {
if (b1[u] != b2[u]) break;
}
return u;
} | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 15,504,063,060,985,085,000,000,000,000,000,000,000 | 10 | fixed T36302429 |
rsvg_start_xinclude (RsvgHandle * ctx, RsvgPropertyBag * atts)
{
RsvgSaxHandlerXinclude *handler;
GByteArray *data;
const char *href;
gboolean success = FALSE;
href = rsvg_property_bag_lookup (atts, "href");
if (href) {
data = _rsvg_acquire_xlink_href_resource (href, rsvg_handle_get_bas... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 25,798,783,531,529,175,000,000,000,000,000,000,000 | 68 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
onig_statistics_init(void)
{
int i;
for (i = 0; i < 256; i++) {
OpCounter[i] = OpPrevCounter[i] = 0; OpTime[i] = 0;
}
MaxStackDepth = 0;
} | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 10,418,570,122,240,704,000,000,000,000,000,000,000 | 8 | fix #57 : DATA_ENSURE() check must be before data access |
bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
unsigned long *vcpu_bitmap)
{
struct kvm_vcpu *vcpu;
struct cpumask *cpus;
int i, me;
bool called;
me = get_cpu();
cpus = this_cpu_cpumask_var_ptr(cpu_kick_mask);
cpumask_clear(cpus);
for_each_set_bit(i, vcpu_bitmap, KVM_MAX_VCPUS) {
... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 162,872,001,991,912,700,000,000,000,000,000,000,000 | 25 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
Http::FilterHeadersStatus Filter::decodeHeaders(Http::RequestHeaderMap& headers, bool end_stream) {
downstream_headers_ = &headers;
// Extract debug configuration from filter state. This is used further along to determine whether
// we should append cluster and host headers to the response, and whether to forwar... | 0 | [
"CWE-703"
] | envoy | 5bf9b0f1e7f247a4eee7180849cb0823926f7fff | 253,587,308,787,618,330,000,000,000,000,000,000,000 | 329 | [1.21] CVE-2022-21655
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static int play_event(unsigned char *q)
{
/*
* NOTE! This routine returns
* 0 = normal event played.
* 1 = Timer armed. Suspend playback until timer callback.
* 2 = MIDI output buffer full. Restore queue and suspend until timer
*/
unsigned int *delay;
switch (q[0])
{
case SEQ_NOTEOFF:
if (synt... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b769f49463711205d57286e64cf535ed4daf59e9 | 318,052,422,624,381,600,000,000,000,000,000,000,000 | 135 | sound/oss: remove offset from load_patch callbacks
Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of
uninitialized value, and signedness issue
The offset passed to midi_synth_load_patch() can be essentially
arbitrary. If it's greater than the header length, this will result in
a copy_from_user(dst, src, n... |
queue_item (GQueue *queue,
guint type,
EmpathyMessage *msg,
const char *str)
{
QueuedItem *item = g_slice_new0 (QueuedItem);
item->type = type;
if (msg != NULL)
item->msg = g_object_ref (msg);
item->str = g_strdup (str);
g_queue_push_tail (queue, item);
return item;
} | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 223,990,460,613,550,400,000,000,000,000,000,000,000 | 16 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
prune_services_on_reload(smartlist_t *old_service_list,
smartlist_t *new_service_list)
{
origin_circuit_t *ocirc = NULL;
smartlist_t *surviving_services = NULL;
tor_assert(old_service_list);
tor_assert(new_service_list);
/* This contains all _existing_ services that survives the rel... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 83,218,542,505,306,940,000,000,000,000,000,000,000 | 84 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
static INLINE void ntlm_av_pair_set_len(NTLM_AV_PAIR* pAvPair, UINT16 len)
{
Data_Write_UINT16(&pAvPair->AvLen, len);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 58a3122250d54de3a944c487776bcd4d1da4721e | 233,984,479,958,486,060,000,000,000,000,000,000,000 | 4 | Fixed OOB read in ntlm_av_pair_get
CVE-2020-11097 thanks to @antonio-morales for finding this. |
xmlXPtrNewRange(xmlNodePtr start, int startindex,
xmlNodePtr end, int endindex) {
xmlXPathObjectPtr ret;
if (start == NULL)
return(NULL);
if (end == NULL)
return(NULL);
if (startindex < 0)
return(NULL);
if (endindex < 0)
return(NULL);
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xml... | 1 | [
"CWE-119"
] | libxml2 | c1d1f7121194036608bf555f08d3062a36fd344b | 248,127,673,796,567,100,000,000,000,000,000,000,000 | 27 | Disallow namespace nodes in XPointer ranges
Namespace nodes must be copied to avoid use-after-free errors.
But they don't necessarily have a physical representation in a
document, so simply disallow them in XPointer ranges.
Found with afl-fuzz.
Fixes CVE-2016-4658. |
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
{
switch (ps_parsing) {
case XML_SUSPENDED:
errorCode = XML_ERROR_SUSPENDED;
return XML_STATUS_ERROR;
case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
case XML_INITIALIZED:
if (parentParser == NULL &... | 0 | [
"CWE-190"
] | libexpat | d4f735b88d9932bd5039df2335eefdd0723dbe20 | 269,326,688,100,654,400,000,000,000,000,000,000,000 | 124 | Detect integer overflow (CVE-2016-9063)
Needs XML_CONTEXT_BYTES to be _undefined_ to trigger,
default is defined and set to 1024.
Previously patched downstream, e.g.
https://sources.debian.net/src/expat/2.2.0-2/debian/patches/CVE-2016-9063.patch/
https://bug1274777.bmoattachments.org/attachment.cgi?id=8755538
This v... |
static void __exit arp_tables_fini(void)
{
nf_unregister_sockopt(&arpt_sockopts);
xt_unregister_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg));
unregister_pernet_subsys(&arp_tables_net_ops);
} | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 105,212,665,061,262,890,000,000,000,000,000,000,000 | 6 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
_dbus_auth_set_mechanisms (DBusAuth *auth,
const char **mechanisms)
{
char **copy;
if (mechanisms != NULL)
{
copy = _dbus_dup_string_array (mechanisms);
if (copy == NULL)
return FALSE;
}
else
copy = NULL;
dbus_free_string_array (auth->allowed_mec... | 0 | [
"CWE-59"
] | dbus | 47b1a4c41004bf494b87370987b222c934b19016 | 304,960,093,153,361,800,000,000,000,000,000,000,000 | 20 | auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner
The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership
of a shared home directory by having the server write a secret "cookie"
into a .dbus-keyrings subdirectory of the desired identity's home
directory with 0700 permissions, and having... |
void pwc_next_image(struct pwc_device *pdev)
{
pdev->image_used[pdev->fill_image] = 0;
pdev->fill_image = (pdev->fill_image + 1) % pwc_mbufs;
} | 0 | [
"CWE-399"
] | linux-2.6 | 85237f202d46d55c1bffe0c5b1aa3ddc0f1dce4d | 158,025,949,914,184,380,000,000,000,000,000,000,000 | 5 | USB: fix DoS in pwc USB video driver
the pwc driver has a disconnect method that waits for user space to
close the device. This opens up an opportunity for a DoS attack,
blocking the USB subsystem and making khubd's task busy wait in
kernel space. This patch shifts freeing resources to close if an opened
device is dis... |
static inline void aio_rw_done(struct kiocb *req, ssize_t ret)
{
switch (ret) {
case -EIOCBQUEUED:
break;
case -ERESTARTSYS:
case -ERESTARTNOINTR:
case -ERESTARTNOHAND:
case -ERESTART_RESTARTBLOCK:
/*
* There's no easy way to restart the syscall since other AIO's
* may be already running. Just fail this... | 0 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 149,119,970,107,997,990,000,000,000,000,000,000,000 | 19 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
smtp_ref_istream (CamelSmtpTransport *transport)
{
CamelStreamBuffer *stream;
g_return_val_if_fail (CAMEL_IS_SMTP_TRANSPORT (transport), NULL);
g_mutex_lock (&transport->stream_lock);
if (transport->istream)
stream = g_object_ref (transport->istream);
else
stream = NULL;
g_mutex_unlock (&transport->stream... | 0 | [
"CWE-74"
] | evolution-data-server | ba82be72cfd427b5d72ff21f929b3a6d8529c4df | 237,274,113,577,549,660,000,000,000,000,000,000,000 | 17 | I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226 |
static MagickBooleanType WriteRAWImage(const ImageInfo *image_info,Image *image)
{
MagickOffsetType
scene;
QuantumInfo
*quantum_info;
QuantumType
quantum_type;
MagickBooleanType
status;
register const PixelPacket
*p;
size_t
imageListLength,
length;
ssize_t
count,
... | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 271,387,025,764,436,300,000,000,000,000,000,000,000 | 156 | Fix ultra rare but potential memory-leak |
static void AppLayerProtoDetectProbingParserFree(AppLayerProtoDetectProbingParser *p)
{
SCEnter();
AppLayerProtoDetectProbingParserPort *pt = p->port;
while (pt != NULL) {
AppLayerProtoDetectProbingParserPort *pt_next = pt->next;
AppLayerProtoDetectProbingParserPortFree(pt);
pt = pt... | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 301,733,021,422,824,200,000,000,000,000,000,000,000 | 15 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
read_macro_assignment(uschar *s)
{
uschar name[64];
int namelen = 0;
BOOL redef = FALSE;
macro_item *m;
macro_item *mlast = NULL;
while (isalnum(*s) || *s == '_')
{
if (namelen >= sizeof(name) - 1)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"macro name too long (maximum is %d characters)", sizeof(name) - ... | 0 | [
"CWE-264"
] | exim | e2f5dc151e2e79058e93924e6d35510557f0535d | 218,012,394,588,892,270,000,000,000,000,000,000,000 | 95 | Check configure file permissions even for non-default files if still privileged
(Bug 1044, CVE-2010-4345) |
int btrfs_block_can_be_shared(struct btrfs_root *root,
struct extent_buffer *buf)
{
/*
* Tree blocks not in shareable trees and tree roots are never shared.
* If a block was allocated after the last snapshot and the block was
* not allocated by tree relocation, we know the block is not shared.
*/
if ... | 0 | [
"CWE-362"
] | linux | dbcc7d57bffc0c8cac9dac11bec548597d59a6a5 | 330,492,873,716,546,530,000,000,000,000,000,000,000 | 17 | btrfs: fix race when cloning extent buffer during rewind of an old root
While resolving backreferences, as part of a logical ino ioctl call or
fiemap, we can end up hitting a BUG_ON() when replaying tree mod log
operations of a root, triggering a stack trace like the following:
------------[ cut here ]------------
... |
static RefChar *SFDGetRef(FILE *sfd, int was_enc) {
RefChar *rf;
int temp=0, ch;
rf = RefCharCreate();
getint(sfd,&rf->orig_pos);
rf->encoded = was_enc;
if ( getint(sfd,&temp))
rf->unicode_enc = temp;
while ( isspace(ch=nlgetc(sfd)));
if ( ch=='S' ) rf->selected = true;
getreal(sfd... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 328,139,813,361,097,550,000,000,000,000,000,000,000 | 36 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
void bpf_int_jit_compile(struct bpf_prog *prog)
{
struct bpf_binary_header *header = NULL;
int proglen, oldproglen = 0;
struct jit_context ctx = {};
u8 *image = NULL;
int *addrs;
int pass;
int i;
if (!bpf_jit_enable)
return;
if (!prog || !prog->len)
return;
addrs = kmalloc(prog->len * sizeof(*addrs), G... | 1 | [
"CWE-17"
] | net | 3f7352bf21f8fd7ba3e2fcef9488756f188e12be | 164,661,126,718,931,910,000,000,000,000,000,000,000 | 66 | x86: bpf_jit: fix compilation of large bpf programs
x86 has variable length encoding. x86 JIT compiler is trying
to pick the shortest encoding for given bpf instruction.
While doing so the jump targets are changing, so JIT is doing
multiple passes over the program. Typical program needs 3 passes.
Some very short progr... |
yang_check_container(struct lys_module *module, struct lys_node_container *cont, struct lys_node **child,
int options, struct unres_schema *unres)
{
if (yang_check_typedef(module, (struct lys_node *)cont, unres)) {
goto error;
}
if (yang_check_iffeatures(module, NULL, cont, CON... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 141,543,663,890,523,770,000,000,000,000,000,000,000 | 42 | yang parser BUGFIX double free
Fixes #742 |
static OPJ_BOOL opj_j2k_write_sod(opj_j2k_t *p_j2k,
opj_tcd_t * p_tile_coder,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 p_total_data_size,
... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | c535531f03369623b9b833ef41952c62257b507e | 215,846,875,743,697,600,000,000,000,000,000,000,000 | 86 | opj_t2_encode_packet(): fix potential write heap buffer overflow (#992) |
wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
const void* msg, size_t msg_len,
const wsrep_gtid_t* current_gtid,
const char* state, size_t state_len,
... | 1 | [
"CWE-77"
] | mysql-wsrep | 4ea4b0c6a318209ac09b15aaa906c7b4a13b988c | 340,163,712,951,592,200,000,000,000,000,000,000,000 | 44 | codership/mysql-wsrep-bugs#758 Donor uses invalid SST methods |
explicit CombinedNonMaxSuppressionOp(OpKernelConstruction* context)
: OpKernel(context) {
OP_REQUIRES_OK(context, context->GetAttr("pad_per_class", &pad_per_class_));
OP_REQUIRES_OK(context, context->GetAttr("clip_boxes", &clip_boxes_));
} | 0 | [
"CWE-369",
"CWE-681"
] | tensorflow | b5cdbf12ffcaaffecf98f22a6be5a64bb96e4f58 | 76,024,959,414,655,740,000,000,000,000,000,000,000 | 5 | Prevent overflow due to integer conversion to unsigned.
PiperOrigin-RevId: 387738045
Change-Id: Id7e95bc07e02df1c66b72bd09f389608c87bdebe |
INST_HANDLER (cp) { // CP Rd, Rr
int r = (buf[0] & 0x0f) | ((buf[1] << 3) & 0x10);
int d = ((buf[0] >> 4) & 0x0f) | ((buf[1] << 4) & 0x10);
ESIL_A ("r%d,r%d,-,", r, d); // do Rd - Rr
__generic_sub_update_flags_rr (op, d, r, 0); // FLAGS (no carry)
} | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 171,394,566,857,527,820,000,000,000,000,000,000,000 | 6 | Fix crash in anal.avr |
d_lite_inspect_raw(VALUE self)
{
get_d1(self);
return mk_inspect_raw(dat, rb_obj_class(self));
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 79,567,068,934,892,550,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
void meta_box_del(GF_Box *s)
{
meta_reset(s);
gf_free(s);
} | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 23,927,911,526,668,620,000,000,000,000,000,000,000 | 5 | fixed #1786 (fuzz) |
static void fib6_free_table(struct fib6_table *table)
{
inetpeer_invalidate_tree(&table->tb6_peers);
kfree(table);
} | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 81,988,112,198,122,450,000,000,000,000,000,000,000 | 5 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
RTC_Linux_Initialise(void)
{
rtc_sec = MallocArray(time_t, MAX_SAMPLES);
rtc_trim = MallocArray(double, MAX_SAMPLES);
system_times = MallocArray(struct timespec, MAX_SAMPLES);
/* Setup details depending on configuration options */
setup_config();
/* In case it didn't get done by pre-init */
coefs_file_n... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 218,666,352,832,628,730,000,000,000,000,000,000,000 | 44 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static int LocaleInfoCompare(const void *x,const void *y)
{
const LocaleInfo
**p,
**q;
p=(const LocaleInfo **) x,
q=(const LocaleInfo **) y;
if (LocaleCompare((*p)->path,(*q)->path) == 0)
return(LocaleCompare((*p)->tag,(*q)->tag));
return(LocaleCompare((*p)->path,(*q)->path));
} | 0 | [
"CWE-125"
] | ImageMagick | 07eebcd72f45c8fd7563d3f9ec5d2bed48f65f36 | 339,035,570,113,259,780,000,000,000,000,000,000,000 | 12 | ... |
line_interpt(PG_FUNCTION_ARGS)
{
LINE *l1 = PG_GETARG_LINE_P(0);
LINE *l2 = PG_GETARG_LINE_P(1);
Point *result;
result = line_interpt_internal(l1, l2);
if (result == NULL)
PG_RETURN_NULL();
PG_RETURN_POINT_P(result);
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 251,551,905,197,984,960,000,000,000,000,000,000,000 | 12 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
f_cindent(typval_T *argvars UNUSED, typval_T *rettv)
{
#ifdef FEAT_CINDENT
pos_T pos;
linenr_T lnum;
pos = curwin->w_cursor;
lnum = tv_get_lnum(argvars);
if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
{
curwin->w_cursor.lnum = lnum;
rettv->vval.v_number = get_c_indent();
curwin->w_curs... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 9,881,079,803,978,506,000,000,000,000,000,000,000 | 18 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
ZEND_API zval *zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag)
{
zval *retval;
begin_read(ht);
retval = zend_hash_minmax(TS_HASH(ht), compar, flag);
end_read(ht);
return retval;
} | 0 | [] | php-src | 2bcf69d073190e4f032d883f3416dea1b027a39e | 95,563,773,035,943,500,000,000,000,000,000,000,000 | 10 | Fixed bug #68676 (Explicit Double Free) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.