func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
const DH_METHOD *DH_OpenSSL(void)
{
return &dh_ossl;
} | 0 | [
"CWE-320"
] | openssl | ea7abeeabf92b7aca160bdd0208636d4da69f4f4 | 36,645,785,846,586,343,000,000,000,000,000,000,000 | 4 | Reject excessively large primes in DH key generation.
CVE-2018-0732
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openss... |
static void tipc_sk_filter_rcv(struct sock *sk, struct sk_buff *skb,
struct sk_buff_head *xmitq)
{
bool sk_conn = !tipc_sk_type_connectionless(sk);
struct tipc_sock *tsk = tipc_sk(sk);
struct tipc_group *grp = tsk->group;
struct tipc_msg *hdr = buf_msg(skb);
struct net *net = sock_net(sk);
struct sk_buf... | 0 | [
"CWE-200",
"CWE-909"
] | linux | d6d86830705f173fca6087a3e67ceaf68db80523 | 297,504,735,703,481,130,000,000,000,000,000,000,000 | 57 | net ticp:fix a kernel-infoleak in __tipc_sendmsg()
struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently
copying it to user space,causing kernel-infoleak.
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in instrument_c... |
flatpak_dir_find_latest_rev (FlatpakDir *self,
FlatpakRemoteState *state,
const char *ref,
const char *checksum_or_latest,
char **out_rev... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 190,527,508,201,284,800,000,000,000,000,000,000 | 86 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
EXPORTED void error_response(long code, struct transaction_t *txn)
{
struct buf *html = &txn->resp_body.payload;
/* Neither Brief nor Prefer affect error response bodies */
txn->flags.vary &= ~(VARY_BRIEF | VARY_PREFER);
txn->resp_body.prefs = 0;
#ifdef WITH_DAV
if (code != HTTP_UNAUTHORIZED && tx... | 0 | [] | cyrus-imapd | 602f12ed2af0a49ac4a58affbfea57d0fc23dea5 | 91,486,460,152,977,040,000,000,000,000,000,000,000 | 101 | httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder |
flatpak_deploy_data_get_installed_size (GBytes *deploy_data)
{
VarDeployDataRef ref = var_deploy_data_from_bytes (deploy_data);
return var_deploy_data_get_installed_size (ref);
} | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 270,681,231,031,055,500,000,000,000,000,000,000,000 | 5 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
void g_dhcpv6_client_reset_request(GDHCPClient *dhcp_client)
{
if (!dhcp_client || dhcp_client->type != G_DHCP_IPV6)
return;
dhcp_client->last_request = time(NULL);
} | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 281,866,253,893,580,400,000,000,000,000,000,000,000 | 7 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
UdfClose (
IN EFI_FILE_PROTOCOL *This
)
{
EFI_TPL OldTpl;
EFI_STATUS Status;
PRIVATE_UDF_FILE_DATA *PrivFileData;
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
Status = EFI_SUCCESS;
if (This == NULL) {
Status = EFI_INVALID_PARAMETER;
goto Exit... | 0 | [] | edk2 | b9ae1705adfdd43668027a25a2b03c2e81960219 | 221,435,561,592,335,800,000,000,000,000,000,000,000 | 34 | MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828
The commit refines the boundary checks for file/path name string to
prevent possible buffer overrun.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: ... |
string t_go_generator::render_import_protection() {
return string("var GoUnusedProtection__ int;\n\n");
} | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 250,928,246,971,057,530,000,000,000,000,000,000,000 | 3 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
static double mp_arg0(_cimg_math_parser& mp) {
const int _ind = (int)_mp_arg(4);
const unsigned int
nb_args = (unsigned int)mp.opcode[2] - 4,
ind = _ind<0?_ind + nb_args:_ind + 1U,
siz = (unsigned int)mp.opcode[3];
if (siz>0) {
if (ind>=nb_args) std:... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 37,003,470,030,598,690,000,000,000,000,000,000,000 | 14 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
charclass_index (charclass const s)
{
size_t i;
for (i = 0; i < dfa->cindex; ++i)
if (equal(s, dfa->charclasses[i]))
return i;
REALLOC_IF_NECESSARY(dfa->charclasses, dfa->calloc, dfa->cindex + 1);
++dfa->cindex;
copyset(s, dfa->charclasses[i]);
return i;
} | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 62,168,812,648,943,920,000,000,000,000,000,000,000 | 12 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
tsize_t _tiffWriteProc(thandle_t hdata, tdata_t buf, tsize_t size) {
TIFFSTATE *state = (TIFFSTATE *)hdata;
tsize_t to_write;
TRACE(("_tiffWriteProc: %d \n", (int)size));
dump_state(state);
to_write = min(size, state->size - (tsize_t)state->loc);
if (state->flrealloc && size>to_write) {
tdata_t new;
tsize_t... | 0 | [
"CWE-119",
"CWE-787"
] | Pillow | 6dcbf5bd96b717c58d7b642949da8d323099928e | 253,602,528,738,817,400,000,000,000,000,000,000,000 | 35 | Fix for buffer overflow in TiffDecode.c CVE-2016-0740 |
void BackUpToPreviousSlash(int path_begin_in_output, CanonOutput* output) {
DCHECK(output->length() > 0);
int i = output->length() - 1;
DCHECK(output->at(i) == '/');
if (i == path_begin_in_output)
return; // We're at the first slash, nothing to do.
// Now back up (skipping the trailing slash) until we f... | 0 | [] | envoy | 3b5acb2f43548862dadb243de7cf3994986a8e04 | 19,070,692,666,269,401,000,000,000,000,000,000,000 | 16 | http, url: Bring back chromium_url and http_parser_parse_url (#198)
* Revert GURL as HTTP URL parser utility
This reverts:
1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d
2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32
3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62
Signed-off-by: Dhi Aurrahman <dio@tetrat... |
static MagickBooleanType CanWriteProfileToFile(const char *filename)
{
FILE
*profileFile;
profileFile=fopen(filename,"ab");
if (profileFile == (FILE *)NULL)
return(MagickFalse);
fclose(profileFile);
return(MagickTrue);
} | 0 | [
"CWE-476"
] | ImageMagick | cca91aa1861818342e3d072bb0fad7dc4ffac24a | 309,236,444,783,074,900,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/790 |
virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr iommuGroupNode,
virNodeDevCapPCIDevPtr pci_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *addrNodes = NULL;
char *numberStr = NULL;
int nAddrNodes, r... | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 327,022,520,779,552,200,000,000,000,000,000,000,000 | 52 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
static int open_without_symlink(const char *target, const char *prefix_skip)
{
int curlen = 0, dirfd, fulllen, i;
char *dup = NULL;
fulllen = strlen(target);
/* make sure prefix-skip makes sense */
if (prefix_skip && strlen(prefix_skip) > 0) {
curlen = strlen(prefix_skip);
if (!is_subdir(target, prefix_skip,... | 0 | [
"CWE-417"
] | lxc | c1cf54ebf251fdbad1e971679614e81649f1c032 | 204,839,928,264,349,770,000,000,000,000,000,000,000 | 68 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
{
struct sk_buff **pp = NULL;
struct sk_buff *p;
struct tcphdr *th;
struct tcphdr *th2;
unsigned int len;
unsigned int thlen;
unsigned int flags;
unsigned int mss = 1;
unsigned int hlen;
unsigned int off;
int flush = 1;
int i;
of... | 0 | [
"CWE-400",
"CWE-119",
"CWE-703"
] | linux | baff42ab1494528907bf4d5870359e31711746ae | 194,308,897,729,747,740,000,000,000,000,000,000,000 | 93 | net: Fix oops from tcp_collapse() when using splice()
tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
This can cause a panic in tcp_collapse() if it is called as a result
of the recv_actor dropping the socket lock.
A userspace program that splices data from a socket to either another
soc... |
static void tls_flush_pending_tx(struct tls_transport *tls)
{
pj_time_val now;
pj_gettickcount(&now);
pj_lock_acquire(tls->base.lock);
while (!pj_list_empty(&tls->delayed_list)) {
struct delayed_tdata *pending_tx;
pjsip_tx_data *tdata;
pj_ioqueue_op_key_t *op_key;
pj_ssize_t size;
pj_status_t stat... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 242,420,075,418,148,060,000,000,000,000,000,000,000 | 41 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
static void LoRaMacHandleIrqEvents( void )
{
LoRaMacRadioEvents_t events;
CRITICAL_SECTION_BEGIN( );
events = LoRaMacRadioEvents;
LoRaMacRadioEvents.Value = 0;
CRITICAL_SECTION_END( );
if( events.Value != 0 )
{
if( events.Events.TxDone == 1 )
{
Proc... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 76,861,176,834,027,510,000,000,000,000,000,000,000 | 33 | Added received buffer size checks. |
void operator()(const CPUDevice& d, typename Functor::tout_type out,
typename Functor::tin_type in0,
typename Functor::tin_type in1, bool* error) {
Assign(d, out, in0.binaryExpr(in1, typename Functor::func(error)));
} | 0 | [
"CWE-476",
"CWE-787"
] | tensorflow | 93f428fd1768df147171ed674fee1fc5ab8309ec | 118,210,543,618,791,440,000,000,000,000,000,000,000 | 5 | Fix nullptr deref and heap OOB access in binary cwise ops.
PiperOrigin-RevId: 387936777
Change-Id: I608b8074cec36a982cca622b7144cb2c43e6e19f |
char *ldb_dn_canonical_string(TALLOC_CTX *mem_ctx, struct ldb_dn *dn) {
return ldb_dn_canonical(mem_ctx, dn, 0);
} | 0 | [
"CWE-200"
] | samba | 7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72 | 299,212,806,379,881,200,000,000,000,000,000,000,000 | 4 | CVE-2015-5330: ldb_dn: simplify and fix ldb_dn_escape_internal()
Previously we relied on NUL terminated strings and jumped back and
forth between copying escaped bytes and memcpy()ing un-escaped chunks.
This simple version is easier to reason about and works with
unterminated strings. It may also be faster as it avoid... |
d_lite_cmp(VALUE self, VALUE other)
{
if (!k_date_p(other))
return cmp_gen(self, other);
{
get_d2(self, other);
if (!(simple_dat_p(adat) && simple_dat_p(bdat) &&
m_gregorian_p(adat) == m_gregorian_p(bdat)))
return cmp_dd(self, other);
{
VALUE a_nth, b_nth;
int a_jd, b_jd;
m_ca... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 293,024,957,675,840,160,000,000,000,000,000,000,000 | 42 | 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 DL_Dxf::writeLeaderVertex(DL_WriterA& dw,
const DL_LeaderVertexData& data) {
if (version>DL_VERSION_R12) {
dw.dxfReal(10, data.x);
dw.dxfReal(20, data.y);
}
} | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 165,018,217,386,550,770,000,000,000,000,000,000,000 | 7 | check vertexIndex which might be -1 for broken DXF |
rfbSendSetColourMapEntries(rfbClientPtr cl,
int firstColour,
int nColours)
{
char buf[sz_rfbSetColourMapEntriesMsg + 256 * 3 * 2];
char *wbuf = buf;
rfbSetColourMapEntriesMsg *scme;
uint16_t *rgb;
rfbColourMap* cm = &cl->screen->colourMap;
in... | 1 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 276,688,191,134,020,240,000,000,000,000,000,000,000 | 53 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
intrusive_ptr<ExpressionObject> ExpressionObject::parse(ExpressionContext* const expCtx,
BSONObj obj,
const VariablesParseState& vps) {
// Make sure we don't have any duplicate field names.
stdx::unor... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 125,881,482,029,795,630,000,000,000,000,000,000,000 | 30 | SERVER-49404 Enforce additional checks in $arrayToObject |
make_quoted_char (c)
int c;
{
char *temp;
temp = (char *)xmalloc (3);
if (c == 0)
{
temp[0] = CTLNUL;
temp[1] = '\0';
}
else
{
temp[0] = CTLESC;
temp[1] = c;
temp[2] = '\0';
}
return (temp);
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 5,356,358,387,997,360,000,000,000,000,000,000,000 | 19 | bash-4.4-rc2 release |
static int compute_score(struct sock *sk, struct net *net,
__be32 saddr, __be16 sport,
__be32 daddr, unsigned short hnum, int dif)
{
int score;
struct inet_sock *inet;
if (!net_eq(sock_net(sk), net) ||
udp_sk(sk)->udp_port_hash != hnum ||
ipv6_only_sock(sk))
return -1;
score = (sk->sk_family =... | 0 | [] | linux | a612769774a30e4fc143c4cb6395c12573415660 | 173,510,205,522,938,400,000,000,000,000,000,000,000 | 42 | udp: prevent bugcheck if filter truncates packet too much
If socket filter truncates an udp packet below the length of UDP header
in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a
BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if
kernel is configured that way) can be easily enfo... |
static int do_decrypt(EVP_CIPHER_CTX* cipher_ctx, const EVP_CIPHER* cipher,
const unsigned char* encrypt, uint32_t encrypt_length,
const unsigned char* encrypt_key, const unsigned char* iv, bool padding,
unsigned char* decrypt_content, int* length_ptr) {... | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 118,157,825,915,477,560,000,000,000,000,000,000,000 | 22 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static void nfnl_err_reset(struct list_head *err_list)
{
struct nfnl_err *nfnl_err, *next;
list_for_each_entry_safe(nfnl_err, next, err_list, head)
nfnl_err_del(nfnl_err);
} | 0 | [
"CWE-200",
"CWE-125"
] | linux | c58d6c93680f28ac58984af61d0a7ebf4319c241 | 154,291,845,661,364,780,000,000,000,000,000,000,000 | 7 | netfilter: nfnetlink: correctly validate length of batch messages
If nlh->nlmsg_len is zero then an infinite loop is triggered because
'skb_pull(skb, msglen);' pulls zero bytes.
The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len <
NLMSG_HDRLEN' which bypasses the length validation and will later
trigger an ... |
has_language_privilege_name_id(PG_FUNCTION_ARGS)
{
Name username = PG_GETARG_NAME(0);
Oid languageoid = PG_GETARG_OID(1);
text *priv_type_text = PG_GETARG_TEXT_P(2);
Oid roleid;
AclMode mode;
AclResult aclresult;
roleid = get_role_oid_or_public(NameStr(*username));
mode = convert_language_priv_string(... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 135,444,956,392,858,820,000,000,000,000,000,000,000 | 19 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
static struct object_entry *find_object(struct object_id *oid)
{
unsigned int h = oid->hash[0] << 8 | oid->hash[1];
struct object_entry *e;
for (e = object_table[h]; e; e = e->next)
if (!oidcmp(oid, &e->idx.oid))
return e;
return NULL;
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 310,579,924,832,409,000,000,000,000,000,000,000,000 | 9 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
TEST_F(QueryPlannerTest, MaxMinBadHintSelectsReverseIndex) {
// There are both ascending and descending indices on 'a'.
addIndex(BSON("a" << 1));
addIndex(BSON("a" << -1));
// A query hinting on {a: 1} is bad if min is {a: 8} and {a: 2} because this
// min/max pairing requires a descending index.
... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 28,157,185,506,823,630,000,000,000,000,000,000,000 | 16 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc, const mrb_value *argv, mrb_value blk)
{
mrb_value val;
int ai = mrb_gc_arena_save(mrb);
if (!mrb->jmp) {
struct mrb_jmpbuf c_jmp;
ptrdiff_t nth_ci = mrb->c->ci - mrb->c->cibase;
MRB_TRY(&c_jmp) {
mrb->jmp = &c_jm... | 0 | [
"CWE-703",
"CWE-125"
] | mruby | a4d97934d51cb88954cc49161dc1d151f64afb6b | 313,906,652,024,136,130,000,000,000,000,000,000,000 | 93 | vm.c: check if target_class is NULL (when prepended). |
nfs3svc_encode_wccstat(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_attrstat *resp)
{
p = encode_wcc_data(rqstp, p, &resp->fh);
return xdr_ressize_check(rqstp, p);
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 276,177,472,594,304,350,000,000,000,000,000,000,000 | 6 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
static int crypto_rfc4309_create(struct crypto_template *tmpl,
struct rtattr **tb)
{
struct crypto_attr_type *algt;
struct aead_instance *inst;
struct crypto_aead_spawn *spawn;
struct aead_alg *alg;
const char *ccm_name;
int err;
algt = crypto_get_attr_type(tb);
if (IS_ERR(algt))
return PTR_ERR(algt);
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3b30460c5b0ed762be75a004e924ec3f8711e032 | 231,150,253,946,730,730,000,000,000,000,000,000,000 | 87 | crypto: ccm - move cbcmac input off the stack
Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver")
refactored the CCM driver to allow separate implementations of the
underlying MAC to be provided by a platform. However, in doing so, it
moved some data from the linear region to the stack, which violat... |
static void put_prev_task(struct rq *rq, struct task_struct *prev)
{
if (prev->se.on_rq)
update_rq_clock(rq);
rq->skip_clock_update = 0;
prev->sched_class->put_prev_task(rq, prev);
} | 1 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 76,061,210,990,144,860,000,000,000,000,000,000,000 | 7 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
parse_sess(SERVICE *const svc)
{
char lin[MAXBUF], *cp, *parm;
parm = NULL;
while(conf_fgets(lin, MAXBUF)) {
if(strlen(lin) > 0 && lin[strlen(lin) - 1] == '\n')
lin[strlen(lin) - 1] = '\0';
if(!regexec(&Type, lin, 4, matches, 0)) {
if(svc->sess_type != SESS_NO... | 0 | [] | pound | a0c52c542ca9620a96750f9877b26bf4c84aef1b | 47,107,440,996,892,750,000,000,000,000,000,000,000 | 83 | SSL Compression Disable patch for 2.6f
This patch disables SSL/TLS compression entirely. There is no config option.
This prevents CRIME attacks against SSL. Note that HTTP compression is still
an option.
Test your server at https://www.ssllabs.com/ssldb/
Original patch by Hereward Cooper <coops@fawk.eu>
Openssl 0... |
static inline int ebt_make_matchname(const struct ebt_entry_match *m,
const char *base, char __user *ubase)
{
char __user *hlp = ubase + ((char *)m - base);
if (copy_to_user(hlp, m->u.match->name, EBT_FUNCTION_MAXNAMELEN))
return -EFAULT;
return 0;
} | 0 | [
"CWE-20"
] | linux | d846f71195d57b0bbb143382647c2c6638b04c5a | 265,214,069,548,948,460,000,000,000,000,000,000,000 | 8 | bridge: netfilter: fix information leak
Struct tmp is copied from userspace. It is not checked whether the "name"
field is NULL terminated. This may lead to buffer overflow and passing
contents of kernel stack as a module name to try_then_request_module() and,
consequently, to modprobe commandline. It would be seen... |
void __fastcall TCustomDialog::DoShow()
{
OKButton->TabOrder = FCount;
CancelButton->TabOrder = static_cast<short>(FCount + 1);
HelpButton->TabOrder = static_cast<short>(FCount + 2);
Changed();
TForm::DoShow();
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 66,382,328,580,905,390,000,000,000,000,000,000,000 | 8 | 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 |
LJ_NOINLINE GCstr *lj_err_str(lua_State *L, ErrMsg em)
{
return lj_str_newz(L, err2msg(em));
} | 0 | [
"CWE-125"
] | LuaJIT | 53f82e6e2e858a0a62fd1a2ff47e9866693382e6 | 156,921,739,772,526,940,000,000,000,000,000,000,000 | 4 | Fix frame traversal for __gc handler frames.
Reported by Changochen. |
static void free_bin(RzDyldBinImage *bin) {
if (!bin) {
return;
}
free(bin->file);
free(bin);
} | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 230,521,709,294,798,440,000,000,000,000,000,000,000 | 7 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
aspath_cmp_left (const struct aspath *aspath1, const struct aspath *aspath2)
{
const struct assegment *seg1;
const struct assegment *seg2;
if (!(aspath1 && aspath2))
return 0;
seg1 = aspath1->segments;
seg2 = aspath2->segments;
/* If both paths are originated in this AS then we do want to compare MED... | 0 | [
"CWE-20"
] | quagga | 7a42b78be9a4108d98833069a88e6fddb9285008 | 58,575,533,552,902,220,000,000,000,000,000,000,000 | 34 | bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up. The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message. This patch addresses... |
bson_bool_t gridfile_get_boolean( gridfile *gfile, const char *name ) {
bson_iterator it;
bson_find( &it, gfile->meta, name );
return bson_iterator_bool( &it );
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 41,693,860,261,983,680,000,000,000,000,000,000,000 | 6 | don't mix up int and size_t (first pass to fix that) |
QPDF::ObjUser::ObjUser(user_e type) :
ou_type(type),
pageno(0)
{
assert(type == ou_root);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 37,289,860,539,254,530,000,000,000,000,000,000,000 | 6 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
longlong Item_ref_null_helper::val_int()
{
DBUG_ASSERT(fixed == 1);
longlong tmp= (*ref)->val_int_result();
owner->was_null|= null_value= (*ref)->null_value;
return tmp;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 283,115,043,707,292,680,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
GF_Err vwid_box_dump(GF_Box *a, FILE * trace)
{
u32 i, j;
GF_ViewIdentifierBox *ptr = (GF_ViewIdentifierBox *) a;
gf_isom_box_dump_start(a, "ViewIdentifierBox", trace);
gf_fprintf(trace, " min_temporal_id=\"%d\" max_temporal_id=\"%d\">\n", ptr->min_temporal_id, ptr->max_temporal_id);
for (i=0; i<ptr->num_views; i+... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 276,702,184,076,011,160,000,000,000,000,000,000,000 | 24 | fixed #2138 |
static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
{
register struct mbuf *m = dtom(slirp, ip);
register struct ipasfrag *q;
int hlen = ip->ip_hl << 2;
int i, next;
DEBUG_CALL("ip_reass");
DEBUG_ARG("ip = %p", ip);
DEBUG_ARG("fp = %p", fp);
DEBUG_ARG("m = %p", m);
... | 1 | [
"CWE-416"
] | libslirp | c59279437eda91841b9d26079c70b8a540d41204 | 156,959,424,975,537,380,000,000,000,000,000,000,000 | 150 | ip_reass: Fix use after free
Using ip_deq after m_free might read pointers from an allocation reuse.
This would be difficult to exploit, but that is still related with
CVE-2019-14378 which generates fragmented IP packets that would trigger this
issue and at least produce a DoS.
Signed-off-by: Samuel Thibault <samuel... |
rsa_compute_root_tr(const struct rsa_public_key *pub,
const struct rsa_private_key *key,
void *random_ctx, nettle_random_func *random,
mpz_t x, const mpz_t m)
{
int res;
mpz_t t, mb, xb, ri;
/* mpz_powm_sec handles only odd moduli. If p, q or n is even, the
key is invalid and rejected by r... | 1 | [
"CWE-20"
] | nettle | 485b5e2820a057e873b1ba812fdb39cae4adf98c | 236,893,760,411,777,040,000,000,000,000,000,000,000 | 38 | Change _rsa_sec_compute_root_tr to take a fix input size.
Improves consistency with _rsa_sec_compute_root, and fixes zero-input bug. |
inline ulonglong char_prefix_to_ulonglong(uchar *src)
{
uint sz= sizeof(ulonglong);
for (uint i= 0; i < sz/2; i++)
{
uchar tmp= src[i];
src[i]= src[sz-1-i];
src[sz-1-i]= tmp;
}
return uint8korr(src);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 167,592,496,854,648,190,000,000,000,000,000,000,000 | 11 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
void SFS_GetBoolean(ScriptParser *parser)
{
if (parser->codec->LastError) return;
if (gf_bs_read_int(parser->bs, 1)) {
SFS_AddString(parser, "true");
} else {
SFS_AddString(parser, "false");
}
} | 0 | [
"CWE-476"
] | gpac | 4e7736d7ec7bf64026daa611da951993bb42fdaf | 305,712,360,984,140,900,000,000,000,000,000,000,000 | 9 | fixed #2238 |
PathBrowser::PathBrowser(const StringList & sl, const char * suf)
: dir_handle(0)
{
els = sl.elements();
suffix = suf;
} | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 11,602,810,558,310,263,000,000,000,000,000,000,000 | 6 | Fix various bugs found by OSS-Fuze. |
void buildClientHello(SSL& ssl, ClientHello& hello)
{
// store for pre master secret
ssl.useSecurity().use_connection().chVersion_ = hello.client_version_;
ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN);
if (ssl.getSecurity().get_resuming()) {
hello.id_len_ = ID_LEN;
memcpy(h... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 134,223,993,148,933,750,000,000,000,000,000,000,000 | 24 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
size_t parse_core(const char *s, size_t n, SemanticValues & /*sv*/,
Context &c, any &dt) const override {
auto save_error_pos = c.error_pos;
auto &chldsv = c.push();
c.push_capture_scope();
auto se = make_scope_exit([&]() {
c.pop();
c.pop_capture_scope();
});
au... | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 52,653,697,781,466,470,000,000,000,000,000,000,000 | 18 | Fix #122 |
WandExport void DrawSetFillRule(DrawingWand *wand,const FillRule fill_rule)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if ((wand->filter_off != MagickFalse) ||
... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 155,682,787,694,230,130,000,000,000,000,000,000,000 | 14 | https://github.com/ImageMagick/ImageMagick/issues/716 |
static void ip_cmsg_recv_opts(struct msghdr *msg, struct sk_buff *skb)
{
if (IPCB(skb)->opt.optlen == 0)
return;
put_cmsg(msg, SOL_IP, IP_RECVOPTS, IPCB(skb)->opt.optlen,
ip_hdr(skb) + 1);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 287,089,882,026,345,860,000,000,000,000,000,000,000 | 8 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
Item_ref(THD *thd, Item_ref *item)
:Item_ident(thd, item), result_field(item->result_field), ref(item->ref) {} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 17,444,010,070,667,551,000,000,000,000,000,000,000 | 2 | 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... |
njs_generate_await_end(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_index_t index;
njs_vmcode_await_t *code;
index = node->right->index;
if (njs_slow_path(index == NJS_INDEX_ERROR)) {
return NJS_ERROR;
}
njs_generate_code(generator, njs_vmcode_... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 77,037,481,062,341,400,000,000,000,000,000,000,000 | 19 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
static int enforce_user(const ExecContext *context, uid_t uid) {
assert(context);
if (!uid_is_valid(uid))
return 0;
/* Sets (but doesn't look up) the uid and make sure we keep the
* capabilities while doing so. */
if (context->capability_ambient_set != 0) {
... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 57,230,732,742,253,160,000,000,000,000,000,000,000 | 34 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
int __hci_req_hci_power_on(struct hci_dev *hdev)
{
/* Register the available SMP channels (BR/EDR and LE) only when
* successfully powering on the controller. This late
* registration is required so that LE SMP can clearly decide if
* the public address or static address is used.
*/
smp_register(hdev);
retu... | 0 | [
"CWE-362"
] | linux | e2cb6b891ad2b8caa9131e3be70f45243df82a80 | 314,488,935,286,111,040,000,000,000,000,000,000,000 | 12 | bluetooth: eliminate the potential race condition when removing the HCI controller
There is a possible race condition vulnerability between issuing a HCI
command and removing the cont. Specifically, functions hci_req_sync()
and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | th... |
bool SSL::GetQuietShutdown() const
{
return quietShutdown_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 78,641,675,778,475,880,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
int ret;
unsigned long __user *datap = (unsigned long __user *) data;
switch (request) {
case PTRACE_PEEKUSR:
ret = ptrace_read_user(child, addr, datap);
break;
case PTRACE_POKEUSR:
ret = ptrace_writ... | 1 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 275,265,514,603,041,460,000,000,000,000,000,000,000 | 115 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
dbcs_screen_tail_off(char_u *base, char_u *p)
{
// It can't be the first byte if a double-byte when not using DBCS, at the
// end of the string or the byte can't start a double-byte.
// For euc-jp an 0x8e byte always means we have a lead byte in the current
// cell.
if (*p == NUL || p[1] == NUL
... | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 203,621,991,662,769,030,000,000,000,000,000,000,000 | 14 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
TEST_F(ExprMatchTest, InWithoutLhsFieldPathMatchesCorrectly) {
createMatcher(fromjson("{$expr: {$in: [2, [1, 2, 3]]}}"));
ASSERT_TRUE(matches(BSON("x" << 2)));
createMatcher(fromjson("{$expr: {$in: [2, [5, 6, 7]]}}"));
ASSERT_FALSE(matches(BSON("x" << 2)));
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 193,725,659,465,551,300,000,000,000,000,000,000,000 | 7 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int dns_transaction_emit_tcp(DnsTransaction *t) {
_cleanup_close_ int fd = -1;
_cleanup_(dns_stream_unrefp) DnsStream *s = NULL;
union sockaddr_union sa;
int r;
assert(t);
dns_transaction_close_connection(t);
switch (t->scope->protocol) {
case D... | 1 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 212,839,235,709,088,080,000,000,000,000,000,000,000 | 111 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
xsltCopyOf(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltElemPreCompPtr castedComp) {
#ifdef XSLT_REFACTORED
xsltStyleItemCopyOfPtr comp = (xsltStyleItemCopyOfPtr) castedComp;
#else
xsltStylePreCompPtr comp = (xsltStylePreCompPtr) castedComp;
#endif
xmlXPathObjectPtr res = ... | 0 | [] | libxslt | e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 | 198,582,432,752,387,900,000,000,000,000,000,000,000 | 133 | Fix security framework bypass
xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
don't check for this condition and allow access. With a specially
crafted URL, xsltCheckRead could be tricked into returning an error
because of a supposedly invalid URL that would still be loaded
succesfully later on... |
static int sysctl_err(const char *path, struct ctl_table *table, char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
pr_err("sysctl table check failed: %s/%s %pV\n",
path, table->procname, &vaf);
va_end(args);
return -EINVAL;
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 98,771,172,965,708,960,000,000,000,000,000,000,000 | 15 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
get_page (r2007_page *pages_map, int64_t id)
{
r2007_page *page = pages_map;
while (page != NULL)
{
if (page->id == id)
break;
page = page->next;
}
return page;
} | 0 | [
"CWE-787"
] | libredwg | 45d2a290c65ed691be0901ba2b2ef51044e07a16 | 134,846,875,501,536,620,000,000,000,000,000,000,000 | 13 | decode_r2007: fix for invalid section size
See GH #350. With fuzzing section->data_size might not fit
section_page->uncomp_size. |
ssize_t add_to_pipe(struct pipe_inode_info *pipe, struct pipe_buffer *buf)
{
int ret;
if (unlikely(!pipe->readers)) {
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
} else if (pipe->nrbufs == pipe->buffers) {
ret = -EAGAIN;
} else {
int newbuf = (pipe->curbuf + pipe->nrbufs) & (pipe->buffers - 1);
pipe->bu... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 96,113,898,336,032,240,000,000,000,000,000,000,000 | 18 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
void unlinkClient(client *c) {
listNode *ln;
/* If this is marked as current client unset it. */
if (server.current_client == c) server.current_client = NULL;
/* Certain operations must be done only if the client has an active connection.
* If the client was already unlinked or if it's a "fake cl... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 150,014,658,918,615,170,000,000,000,000,000,000,000 | 65 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 322,393,105,379,858,120,000,000,000,000,000,000,000 | 45 | - 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 |
void vrend_renderer_resource_set_priv(uint32_t res_handle, void *priv)
{
struct vrend_resource *res = vrend_resource_lookup(res_handle, 0);
if (!res)
return;
res->priv = priv;
} | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 254,841,248,722,216,500,000,000,000,000,000,000,000 | 8 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static pj_ssl_cipher ssl_get_cipher(pj_ssl_sock_t *ssock)
{
ossl_sock_t *ossock = (ossl_sock_t *)ssock;
const SSL_CIPHER *cipher;
/* Current cipher */
cipher = SSL_get_current_cipher(ossock->ossl_ssl);
if (cipher) {
return (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF);
} else {
return PJ_TLS_UNKNO... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 295,176,883,178,095,850,000,000,000,000,000,000,000 | 13 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
GF_Err gf_isom_dump_hint_sample(GF_ISOFile *the_file, u32 trackNumber, u32 SampleNum, FILE * trace)
{
GF_ISOSample *tmp;
GF_HintSampleEntryBox *entry;
u32 descIndex, count, count2, i;
GF_Err e=GF_OK;
GF_BitStream *bs;
GF_HintSample *s;
GF_TrackBox *trak;
GF_RTPPacket *pck;
char *szName;
trak = gf_isom_get_tr... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 241,682,412,562,748,030,000,000,000,000,000,000,000 | 108 | fixed 2 possible heap overflows (inc. #1088) |
static TT_F26Dot6 Round_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 32) & (-64);
if ( val < 0 )
val = 0;
}
else
... | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 243,321,704,597,396,200,000,000,000,000,000,000,000 | 21 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static TT_F26Dot6 FUnits_To_Pixels( EXEC_OPS Int distance )
{
return MulDiv_Round( distance,
CUR.metrics.scale1,
CUR.metrics.scale2 );
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 151,493,828,051,653,850,000,000,000,000,000,000,000 | 6 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
PHPAPI void php_register_variable(char *var, char *strval, zval *track_vars_array)
{
php_register_variable_safe(var, strval, strlen(strval), track_vars_array);
} | 0 | [
"CWE-400",
"CWE-703"
] | php-src | a15bffd105ac28fd0dd9b596632dbf035238fda3 | 299,983,276,149,361,730,000,000,000,000,000,000,000 | 4 | Fix bug #73807 |
SV* dbd_db_quote(SV *dbh, SV *str, SV *type)
{
dTHX;
SV *result;
if (SvGMAGICAL(str))
mg_get(str);
if (!SvOK(str))
result= newSVpv("NULL", 4);
else
{
char *ptr, *sptr;
STRLEN len;
D_imp_dbh(dbh);
if (type && SvMAGICAL(type))
mg_get(type);
if (type && SvOK(type))
... | 0 | [
"CWE-416"
] | DBD-mysql | a56ae87a4c1c1fead7d09c3653905841ccccf1cc | 177,831,727,773,001,630,000,000,000,000,000,000,000 | 54 | fix use-after-free crash in RT #97625 |
static void pcpu_dump_alloc_info(const char *lvl,
const struct pcpu_alloc_info *ai)
{
int group_width = 1, cpu_width = 1, width;
char empty_str[] = "--------";
int alloc = 0, alloc_end = 0;
int group, v;
int upa, apl; /* units per alloc, allocs per line */
v = ai->nr_groups;
while (v /= 10)
group_width++... | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 229,876,792,201,644,450,000,000,000,000,000,000,000 | 49 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
static char *r_str_escape_utf(const char *buf, int buf_size, RStrEnc enc, bool show_asciidot, bool esc_bslash, bool keep_printable) {
char *new_buf, *q;
const char *p, *end;
RRune ch;
int i, len, ch_bytes;
if (!buf) {
return NULL;
}
switch (enc) {
case R_STRING_ENC_UTF16LE:
case R_STRING_ENC_UTF16BE:
case ... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 171,415,738,005,671,760,000,000,000,000,000,000,000 | 93 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
static MagickBooleanType ApplyPSDOpacityMask(Image *image,const Image *mask,
Quantum background,MagickBooleanType revert,ExceptionInfo *exception)
{
Image
*complete_mask;
MagickBooleanType
status;
PixelInfo
color;
ssize_t
y;
if (image->debug != MagickFalse)
(void) LogMagickEvent(Code... | 0 | [
"CWE-835"
] | ImageMagick | 73d59a74e0b0a864c1a9581b8a4bdbee427125e2 | 232,707,386,019,469,300,000,000,000,000,000,000,000 | 79 | Different fix for #869. |
ews_handle_root_folder_param_folders (ESoapParameter *subparam,
EwsAsyncData *async_data)
{
ESoapParameter *node, *subparam1;
gchar *last, *total;
gint total_items;
EEwsFolder *folder;
gboolean includes_last_item;
node = e_soap_parameter_get_first_child_by_name (subparam, "RootFolder");
total = e_soap... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 144,486,643,994,357,440,000,000,000,000,000,000,000 | 32 | 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 |
static void mpage_put_bnr_to_bhs(struct mpage_da_data *mpd, sector_t logical,
struct buffer_head *exbh)
{
struct inode *inode = mpd->inode;
struct address_space *mapping = inode->i_mapping;
int blocks = exbh->b_size >> inode->i_blkbits;
sector_t pblock = exbh->b_blocknr, cur_logical;
struct buffer_head *head,... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 182,716,179,633,854,960,000,000,000,000,000,000,000 | 78 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
static void cache_init_objs(struct kmem_cache *cachep,
struct page *page)
{
int i;
void *objp;
bool shuffled;
cache_init_objs_debug(cachep, page);
/* Try to randomize the freelist if enabled */
shuffled = shuffle_freelist(cachep, page);
if (!shuffled && OBJFREELIST_SLAB(cachep)) {
page->freelist = in... | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 175,367,926,729,897,540,000,000,000,000,000,000,000 | 32 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
static void Compute(OpKernelContext* context, const CPUDevice& device,
typename TTypes<T>::ConstTensor& diag,
typename TTypes<T, 3>::Tensor& output,
const Eigen::Index lower_diag_index,
const Eigen::Index upper_diag_index,
... | 0 | [
"CWE-476",
"CWE-125"
] | tensorflow | 482da92095c4d48f8784b1f00dda4f81c28d2988 | 259,960,607,025,261,400,000,000,000,000,000,000,000 | 52 | Ensure non-empty padding_value input to tf.raw_ops.MatrixDiagPartV2, if a padding_value is input
PiperOrigin-RevId: 388314614
Change-Id: If0b51ad58d5d8543a6be6ce8f42ae4755c80d55f |
xf86LoadModules(const char **list, void **optlist)
{
int errmaj, errmin;
void *opt;
int i;
char *name;
Bool failed = FALSE;
if (!list)
return TRUE;
for (i = 0; list[i] != NULL; i++) {
/* Normalise the module name */
name = xf86NormalizeName(list[i]);
/* Sk... | 0 | [] | xserver | 032b1d79b7d04d47814a5b3a9fdd162249fea74c | 125,472,735,376,677,660,000,000,000,000,000,000,000 | 40 | xfree86: use the xf86CheckPrivs() helper for modulepath/logfile
v2: Rebase against updated xf86CheckPrivs() helper.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> |
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,
const content::MediaPlayerId& id) {
Emit("media-started-playing");
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 239,143,420,876,370,240,000,000,000,000,000,000,000 | 4 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static int cmd_anal(void *data, const char *input) {
const char *r;
RCore *core = (RCore *)data;
ut32 tbs = core->blocksize;
switch (input[0]) {
case 'p': // "ap"
{
const ut8 *prelude = (const ut8*)"\xe9\x2d"; //:fffff000";
const int prelude_sz = 2;
const int bufsz = 4096;
ut8 *buf = calloc (1, bufs... | 0 | [
"CWE-416",
"CWE-908"
] | radare2 | 9d348bcc2c4bbd3805e7eec97b594be9febbdf9a | 228,622,588,098,984,400,000,000,000,000,000,000,000 | 231 | Fix #9943 - Invalid free on RAnal.avr |
rdn_validate( struct berval *rdn )
{
#if 1
/* Major cheat!
* input is a pretty or normalized DN
* hence, we can just search for ','
*/
if( rdn == NULL || rdn->bv_len == 0 ||
rdn->bv_len > SLAP_LDAPDN_MAXLEN )
{
return LDAP_INVALID_SYNTAX;
}
return ber_bvchr( rdn, ',' ) == NULL
? LDAP_SUCCESS : LDAP_INV... | 0 | [
"CWE-763"
] | openldap | 5a2017d4e61a6ddc4dcb4415028e0d08eb6bca26 | 125,590,521,211,043,890,000,000,000,000,000,000,000 | 56 | ITS#9412 fix AVA_Sort on invalid RDN |
void CLua::print_stack()
{
struct lua_Debug dbg;
int i = 0;
lua_State *L = state();
fprintf(stderr, "\n");
while (lua_getstack(L, i++, &dbg) == 1)
{
lua_getinfo(L, "lnuS", &dbg);
char* file = strrchr(dbg.short_src, '/');
if (file == nullptr)
... | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 122,262,958,426,680,340,000,000,000,000,000,000,000 | 23 | Disable lua load(), loadstring() bytcode loading |
static void bfq_put_cooperator(struct bfq_queue *bfqq)
{
struct bfq_queue *__bfqq, *next;
/*
* If this queue was scheduled to merge with another queue, be
* sure to drop the reference taken on that queue (and others in
* the merge chain). See bfq_setup_merge and bfq_merge_bfqqs.
*/
__bfqq = bfqq->new_bfqq;... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 329,138,637,149,612,200,000,000,000,000,000,000,000 | 18 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
void WebContents::DoGetZoomLevel(
electron::mojom::ElectronWebContentsUtility::DoGetZoomLevelCallback
callback) {
std::move(callback).Run(GetZoomLevel());
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 304,089,679,242,902,820,000,000,000,000,000,000,000 | 5 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid)
{
struct lxc_proc_context_info *info = calloc(1, sizeof(*info));
FILE *proc_file;
char proc_fn[MAXPATHLEN];
char *line = NULL;
size_t line_bufsz = 0;
int ret, found;
if (!info) {
SYSERROR("Could not allocate memory.");
return NULL;
}... | 0 | [
"CWE-17"
] | lxc | 5c3fcae78b63ac9dd56e36075903921bd9461f9e | 338,906,280,713,746,250,000,000,000,000,000,000,000 | 49 | CVE-2015-1334: Don't use the container's /proc during attach
A user could otherwise over-mount /proc and prevent the apparmor profile
or selinux label from being written which combined with a modified
/bin/sh or other commonly used binary would lead to unconfined code
execution.
Reported-by: Roman Fiedler
Signed-off-... |
static int resize_platform_label_table(struct net *net, size_t limit)
{
size_t size = sizeof(struct mpls_route *) * limit;
size_t old_limit;
size_t cp_size;
struct mpls_route __rcu **labels = NULL, **old;
struct mpls_route *rt0 = NULL, *rt2 = NULL;
unsigned index;
if (size) {
labels = kvzalloc(size, GFP_KERNE... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 113,142,908,637,187,860,000,000,000,000,000,000,000 | 96 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
CtPtr ProtocolV2::_wait_for_peer_banner() {
unsigned banner_len = strlen(CEPH_BANNER_V2_PREFIX) + sizeof(ceph_le16);
return READ(banner_len, _handle_peer_banner);
} | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 117,183,306,407,381,870,000,000,000,000,000,000,000 | 4 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static void update_exception_bitmap(struct kvm_vcpu *vcpu)
{
u32 eb;
eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR) |
(1u << DB_VECTOR) | (1u << AC_VECTOR);
/*
* Guest access to VMware backdoor ports could legitimately
* trigger #GP because of TSS I/O permission bitmap.
* We intercept th... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 239,076,072,100,932,700,000,000,000,000,000,000,000 | 33 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
if (wolfSSH_SFTP_CreateStatus(ssh, type, reqId, res, "English", NULL,
&outSz) != WS_SIZE_ONLY) {
return WS_FATAL_ERROR;
} | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 339,097,572,724,996,700,000,000,000,000,000,000,000 | 4 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
static pyc_object *get_list_object(RzBuffer *buffer) {
pyc_object *ret = NULL;
bool error = false;
ut32 n = 0;
n = get_ut32(buffer, &error);
if (n > ST32_MAX) {
RZ_LOG_ERROR("bad marshal data (list size out of range)\n");
return NULL;
}
if (error) {
return NULL;
}
ret = get_array_object_generic(buffer, ... | 0 | [
"CWE-190"
] | rizin | e645e5827327d945307ddfde4f617ae4c36561fd | 231,422,246,106,111,300,000,000,000,000,000,000,000 | 20 | Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625 |
htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
int terminate) {
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
"htmlParseChunk: context error\n", NULL, NULL);
return(XML_ERR_INTERNAL_ERROR);
}
if ((size > 0) && (chunk != ... | 1 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 182,494,196,562,605,580,000,000,000,000,000,000,000 | 60 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **pages,
int *locked)
{
return __get_user_pages_locked(current, current->mm, start, nr_pages,
pages, NULL, locked, true,
gup_flags | FOLL_TOUCH);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 250,274,946,627,502,940,000,000,000,000,000,000,000 | 8 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static void ttusbdecfe_release(struct dvb_frontend* fe)
{
struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv;
kfree(state);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | f2e323ec96077642d397bb1c355def536d489d16 | 150,312,211,560,968,960,000,000,000,000,000,000,000 | 5 | [media] ttusb-dec: buffer overflow in ioctl
We need to add a limit check here so we don't overflow the buffer.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
void clear_inode(struct inode *inode)
{
might_sleep();
/*
* We have to cycle tree_lock here because reclaim can be still in the
* process of removing the last page (in __delete_from_page_cache())
* and we must not free mapping under it.
*/
spin_lock_irq(&inode->i_data.tree_lock);
BUG_ON(inode->i_data.nrpage... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 43,862,711,864,845,155,000,000,000,000,000,000,000 | 18 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.