func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
UINT32_Marshal(UINT32 *source, BYTE **buffer, INT32 *size)
{
if (buffer != NULL) {
if ((size == NULL) || ((UINT32)*size >= sizeof(UINT32))) {
(*buffer)[0] = (BYTE)((*source >> 24) & 0xff);
(*buffer)[1] = (BYTE)((*source >> 16) & 0xff);
(*buffer)[2] = (BYTE)((*source >> 8) & 0xff);
(*buffer)[3... | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 285,910,005,728,659,120,000,000,000,000,000,000,000 | 21 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
FLAC__bool write_bitbuffer_(FLAC__StreamEncoder *encoder, uint32_t samples, FLAC__bool is_last_block)
{
const FLAC__byte *buffer;
size_t bytes;
FLAC__ASSERT(FLAC__bitwriter_is_byte_aligned(encoder->private_->frame));
if(!FLAC__bitwriter_get_buffer(encoder->private_->frame, &buffer, &bytes)) {
encoder->protected... | 0 | [
"CWE-787"
] | flac | e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be | 56,325,365,369,468,100,000,000,000,000,000,000,000 | 48 | libFlac: Exit at EOS in verify mode
When verify mode is enabled, once decoder flags end of stream,
encode processing is considered complete.
CVE-2021-0561
Signed-off-by: Ralph Giles <giles@thaumas.net> |
static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm)
{
usb_free_coherent(udev, POWERMATE_PAYLOAD_SIZE_MAX,
pm->data, pm->data_dma);
kfree(pm->configcr);
} | 0 | [
"CWE-703"
] | linux | 9c6ba456711687b794dcf285856fc14e2c76074f | 143,805,899,120,175,700,000,000,000,000,000,000,000 | 6 | Input: powermate - fix oops with malicious USB descriptors
The powermate driver expects at least one valid USB endpoint in its
probe function. If given malicious descriptors that specify 0 for
the number of endpoints, it will crash. Validate the number of
endpoints on the interface before using them.
The full repor... |
TEST_F(ConnectionManagerUtilityTest, MtlsSetForwardClientCert) {
auto ssl = std::make_shared<NiceMock<Ssl::MockConnectionInfo>>();
ON_CALL(*ssl, peerCertificatePresented()).WillByDefault(Return(true));
const std::vector<std::string> local_uri_sans{"test://foo.com/be"};
EXPECT_CALL(*ssl, uriSanLocalCertificate()... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 213,759,417,632,754,660,000,000,000,000,000,000,000 | 38 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void TY_(AddStringLiteral)( Lexer* lexer, ctmbstr str )
{
byte c;
while(0 != (c = *str++) )
TY_(AddCharToLexer)( lexer, c );
} | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 9,222,284,398,788,250,000,000,000,000,000,000,000 | 6 | Issue #217 - avoid len going negative, ever... |
static void TDES_CTR(const BYTE *key, // IN
INT32 keySizeInBits, // IN
INT32 dSize, // IN
const BYTE *dIn, // IN
BYTE *iv, // IN
BYTE *dOut, ... | 0 | [
"CWE-330"
] | libtpms | 32c159ab53db703749a8f90430cdc7b20b00975e | 213,106,295,345,909,600,000,000,000,000,000,000,000 | 31 | tpm2: CryptSym: fix AES output IV
The TPM is supposed to provide the output IV in the ivInOut parameter in
CryptSymmetricEncrypt. In the case of using the openssl routines, the
output IV is missed, and the resulting output from the TPM is in the
input IV.
OpenSSL unfortunately does not export EVP_CIPHER_CTX_iv() unti... |
void smtp_server_connection_timeout_reset(struct smtp_server_connection *conn)
{
if (conn->to_idle != NULL)
timeout_reset(conn->to_idle);
} | 0 | [
"CWE-77"
] | core | 321c339756f9b2b98fb7326359d1333adebb5295 | 279,731,981,580,565,550,000,000,000,000,000,000,000 | 5 | lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability. |
xmlPopInputCallbacks(void)
{
if (!xmlInputCallbackInitialized)
return(-1);
if (xmlInputCallbackNr <= 0)
return(-1);
xmlInputCallbackNr--;
xmlInputCallbackTable[xmlInputCallbackNr].matchcallback = NULL;
xmlInputCallbackTable[xmlInputCallbackNr].opencallback = NULL;
xmlInputCallb... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 81,383,372,838,899,830,000,000,000,000,000,000,000 | 16 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
void nfs41_shutdown_client(struct nfs_client *clp)
{
if (nfs4_has_session(clp)) {
nfs4_cleanup_callback(clp);
nfs4_shutdown_ds_clients(clp);
nfs4_destroy_session(clp->cl_session);
nfs4_destroy_clientid(clp);
}
} | 0 | [
"CWE-703"
] | linux | dd99e9f98fbf423ff6d365b37a98e8879170f17c | 298,852,868,655,691,900,000,000,000,000,000,000,000 | 10 | NFSv4: Initialise connection to the server in nfs4_alloc_client()
Set up the connection to the NFSv4 server in nfs4_alloc_client(), before
we've added the struct nfs_client to the net-namespace's nfs_client_list
so that a downed server won't cause other mounts to hang in the trunking
detection code.
Reported-by: Mich... |
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessNone_validation_ok_disable_discovery_enable_access_none)
// *INDENT-ON*
{
PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME);
PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME);
std::string governance_... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 227,568,209,078,496,550,000,000,000,000,000,000,000 | 9 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
bool alwaysSetRequestIdInResponse() const override { return always_set_request_id_in_response_; } | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 230,279,222,708,545,580,000,000,000,000,000,000,000 | 1 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
absl::string_view ExtractorImpl::extractJWT(absl::string_view value_str,
absl::string_view::size_type after) const {
const auto starting = value_str.find_first_of(ConstantBase64UrlEncodingCharsPlusDot, after);
if (starting == value_str.npos) {
return value_str;
}
... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 45,194,522,056,722,450,000,000,000,000,000,000,000 | 13 | 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 void controloptions (lua_State *L, int opt, const char **fmt,
Header *h) {
switch (opt) {
case ' ': return; /* ignore white spaces */
case '>': h->endian = BIG; return;
case '<': h->endian = LITTLE; return;
case '!': {
int a = getnum(fmt, MAXALIGN);
if ... | 1 | [
"CWE-61",
"CWE-190",
"CWE-787"
] | redis | ef764dde1cca2f25d00686673d1bc89448819571 | 328,502,044,187,717,850,000,000,000,000,000,000,000 | 19 | [FIX] revisit CVE-2015-8080 vulnerability |
register_assoc (graphid i, graphid j)
{
if (!used_assoc)
init_assoc ();
used_assoc[i] = true;
used_assoc[j] = true;
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 322,774,504,722,624,540,000,000,000,000,000,000,000 | 7 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
struct vfsmount *lookup_mnt(struct path *path)
{
struct mount *child_mnt;
br_read_lock(&vfsmount_lock);
child_mnt = __lookup_mnt(path->mnt, path->dentry, 1);
if (child_mnt) {
mnt_add_count(child_mnt, 1);
br_read_unlock(&vfsmount_lock);
return &child_mnt->mnt;
} else {
br_read_unlock(&vfsmount_lock);
ret... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 3151527ee007b73a0ebd296010f1c0454a919c7d | 3,041,775,296,748,296,000,000,000,000,000,000,000 | 15 | userns: Don't allow creation if the user is chrooted
Guarantee that the policy of which files may be access that is
established by setting the root directory will not be violated
by user namespaces by verifying that the root directory points
to the root of the mount namespace at the time of user namespace
creation.
... |
ExecWithCheckOptions(ResultRelInfo *resultRelInfo,
TupleTableSlot *slot, EState *estate)
{
Relation rel = resultRelInfo->ri_RelationDesc;
TupleDesc tupdesc = RelationGetDescr(rel);
ExprContext *econtext;
ListCell *l1,
*l2;
/*
* We will use the EState's per-tuple context for evaluating constraint
... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 69,281,795,697,146,830,000,000,000,000,000,000,000 | 55 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
int evtchn_get(evtchn_port_t evtchn)
{
int irq;
struct irq_info *info;
int err = -ENOENT;
if (evtchn >= xen_evtchn_max_channels())
return -EINVAL;
mutex_lock(&irq_mapping_update_lock);
irq = get_evtchn_to_irq(evtchn);
if (irq == -1)
goto done;
info = info_for_irq(irq);
if (!info)
goto done;
err = ... | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 313,042,986,819,520,200,000,000,000,000,000,000,000 | 31 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
static int __ext4_check_blockref(const char *function, struct inode *inode,
__le32 *p, unsigned int max)
{
__le32 *bref = p;
unsigned int blk;
while (bref < p+max) {
blk = le32_to_cpu(*bref++);
if (blk &&
unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb),
blk, 1))) {
__ext4_error(inod... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 278,641,004,562,202,800,000,000,000,000,000,000,000 | 19 | 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... |
GF_Err gf_isom_enum_sample_aux_data(GF_ISOFile *the_file, u32 trackNumber, u32 sample_number, u32 *sai_idx, u32 *sai_type, u32 *sai_parameter, u8 **sai_data, u32 *sai_size)
{
GF_TrackBox *trak;
u32 i, count;
if (!sai_type || !sai_idx || !sai_data || !sai_size) return GF_BAD_PARAM;
if (sai_parameter) *sai_parameter... | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 204,210,131,977,082,750,000,000,000,000,000,000,000 | 98 | fixed #2120 |
void vrend_renderer_detach_res_ctx(int ctx_id, int res_handle)
{
struct vrend_context *ctx = vrend_lookup_renderer_ctx(ctx_id);
if (!ctx)
return;
vrend_renderer_detach_res_ctx_p(ctx, res_handle);
} | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 181,255,118,765,326,240,000,000,000,000,000,000,000 | 7 | 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 int handle_name_request(enum request_types request_type,
const char *name, const char *domain_name,
struct berval **berval)
{
int ret;
char *fq_name = NULL;
struct passwd pwd;
struct group grp;
char *sid_str = NULL;
enum sss_id... | 1 | [
"CWE-19"
] | freeipa | c15a407cbfaed163a933ab137eed16387efe25d2 | 104,569,710,063,349,910,000,000,000,000,000,000,000 | 106 | extdom: make nss buffer configurable
The get*_r_wrapper() calls expect a maximum buffer size to avoid memory
shortage if too many threads try to allocate buffers e.g. for large
groups. With this patch this size can be configured by setting
ipaExtdomMaxNssBufSize in the plugin config object
cn=ipa_extdom_extop,cn=plugi... |
void hci_sock_cleanup(void)
{
if (bt_sock_unregister(BTPROTO_HCI) < 0)
BT_ERR("HCI socket unregistration failed");
proto_unregister(&hci_sk_proto);
} | 0 | [
"CWE-200"
] | linux | 3f68ba07b1da811bf383b4b701b129bfcb2e4988 | 297,389,465,243,242,400,000,000,000,000,000,000,000 | 7 | Bluetooth: HCI - Fix info leak via getsockname()
The HCI code fails to initialize the hci_channel member of struct
sockaddr_hci and that for leaks two bytes kernel stack via the
getsockname() syscall. Initialize hci_channel with 0 to avoid the
info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marc... |
new_cached_dir(char *s, time_t published)
{
cached_dir_t *d = tor_malloc_zero(sizeof(cached_dir_t));
d->refcnt = 1;
d->dir = s;
d->dir_len = strlen(s);
d->published = published;
if (tor_gzip_compress(&(d->dir_z), &(d->dir_z_len), d->dir, d->dir_len,
ZLIB_METHOD)) {
log_warn(LD_BU... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 32,244,452,581,394,370,000,000,000,000,000,000,000 | 13 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
void set_block_number(uint64_t block_number) { block_number_ = block_number; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 157,808,430,453,024,060,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
void CairoOutputDev::updateLineWidth(GfxState *state) {
LOG(printf ("line width: %f\n", state->getLineWidth()));
if (state->getLineWidth() == 0.0) {
/* find out how big pixels (device unit) are in the x and y directions
* choose the smaller of the two as our line width */
double x = 1.0, y = 1.0;
c... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 201,179,922,522,010,830,000,000,000,000,000,000,000 | 14 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
term_job_running_check(term_T *term, int check_job_status)
{
/* Also consider the job finished when the channel is closed, to avoid a
* race condition when updating the title. */
if (term != NULL
&& term->tl_job != NULL
&& channel_is_open(term->tl_job->jv_channel))
{
if (check_job_status)
job_s... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 32,944,484,890,436,150,000,000,000,000,000,000,000 | 15 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
void SetAttrValue(const NameAttrList& value, AttrValue* out) {
*out->mutable_func() = value;
} | 0 | [
"CWE-369",
"CWE-674"
] | tensorflow | e07e1c3d26492c06f078c7e5bf2d138043e199c1 | 196,226,186,515,969,120,000,000,000,000,000,000,000 | 3 | Prevent memory overflow in ParseAttrValue from nested tensors.
PiperOrigin-RevId: 370108442
Change-Id: I84d64a5e8895a6aeffbf4749841b4c54d51b5889 |
void CServer::ProcessClientPacket(CNetChunk *pPacket)
{
int ClientID = pPacket->m_ClientID;
CUnpacker Unpacker;
Unpacker.Reset(pPacket->m_pData, pPacket->m_DataSize);
// unpack msgid and system flag
int Msg = Unpacker.GetInt();
int Sys = Msg&1;
Msg >>= 1;
if(Unpacker.Error())
return;
if(Sys)
{
// syste... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | teeworlds | c68402fa7e279d42886d5951d1ea8ac2facc1ea5 | 251,902,769,085,037,940,000,000,000,000,000,000,000 | 283 | changed a check |
static void __io_complete_rw(struct io_kiocb *req, long res, long res2,
unsigned int issue_flags)
{
int cflags = 0;
if (req->rw.kiocb.ki_flags & IOCB_WRITE)
kiocb_end_write(req);
if (res != req->result) {
if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
io_rw_should_reissue(req)) {
req->flags |= R... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 6,434,978,445,296,537,000,000,000,000,000,000,000 | 19 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
static int nfs4_check_lease(struct nfs_client *clp)
{
struct rpc_cred *cred;
int status = -NFS4ERR_EXPIRED;
/* Is the client already known to have an expired lease? */
if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
return 0;
cred = nfs4_get_renew_cred(clp);
if (cred == NULL) {
cred = nfs4_get_setclien... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 245,623,559,355,766,220,000,000,000,000,000,000,000 | 20 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int zmq::stream_engine_t::write_subscription_msg (msg_t *msg_)
{
msg_t subscription;
// Inject the subscription message, so that also
// ZMQ 2.x peers receive published messages.
int rc = subscription.init_size (1);
errno_assert (rc == 0);
*(unsigned char*) subscription.data () = 1;
rc = ... | 0 | [] | libzmq | 77f14aad95cdf0d2a244ae9b4a025e5ba0adf01a | 290,677,005,048,957,730,000,000,000,000,000,000,000 | 16 | Problem: stream_engine.cpp security can be downgraded
Solution: accept only the mechanism defined by the socket options.
I've not tested this yet, so it's a speculative fix. |
bgp_put_cap_add_path(struct bgp_proto *p, byte *buf)
{
*buf++ = 69; /* Capability 69: Support for ADD-PATH */
*buf++ = 4; /* Capability data length */
*buf++ = 0; /* Appropriate AF */
*buf++ = BGP_AF;
*buf++ = 1; /* SAFI 1 */
*buf++ = p->cf->add_path;
return buf;
} | 0 | [
"CWE-787"
] | bird | 1657c41c96b3c07d9265b07dd4912033ead4124b | 122,709,515,670,293,510,000,000,000,000,000,000,000 | 13 | BGP: Fix bugs in handling of shutdown messages
There is an improper check for valid message size, which may lead to
stack overflow and buffer leaks to log when a large message is received.
Thanks to Daniel McCarney for bugreport and analysis. |
xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg,
const xmlChar * info1, const xmlChar * info2,
const xmlChar * info3)
{
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
if (ctxt != NULL)
ctxt->errNo = error;
... | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 286,242,552,186,002,100,000,000,000,000,000,000,000 | 17 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
static void clamp_pollexp_and_set_MAXSTRAT(void)
{
if (G.poll_exp < MINPOLL)
G.poll_exp = MINPOLL;
if (G.poll_exp > BIGPOLL)
G.poll_exp = BIGPOLL;
G.polladj_count = 0;
G.stratum = MAXSTRAT;
} | 0 | [
"CWE-399"
] | busybox | 150dc7a2b483b8338a3e185c478b4b23ee884e71 | 281,588,508,830,511,000,000,000,000,000,000,000,000 | 9 | ntpd: respond only to client and symmetric active packets
The busybox NTP implementation doesn't check the NTP mode of packets
received on the server port and responds to any packet with the right
size. This includes responses from another NTP server. An attacker can
send a packet with a spoofed source address in orde... |
napi_status napi_get_prototype(napi_env env,
napi_value object,
napi_value* result) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, result);
v8::Local<v8::Context> context = env->context();
v8::Local<v8::Object> obj;
CHECK_TO_OBJECT(env, context, obj, objec... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 208,080,718,081,198,450,000,000,000,000,000,000,000 | 15 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
Render_Stroke( int num_indices,
int first_index )
{
int start_x, start_y, step_x, step_y, x, y;
int i;
FT_Size size;
FT_Stroker stroker = NULL;
error = FTDemo_Get_Size( handle, &size );
if ( error )
{
/* probably a non-existent bitmap font... | 0 | [
"CWE-120"
] | freetype2-demos | b995299b73ba4cd259f221f500d4e63095508bec | 170,237,171,338,737,800,000,000,000,000,000,000,000 | 90 | Fix Savannah bug #30054.
* src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c,
src/ftview.c: Use precision for `%s' where appropriate to avoid
buffer overflows. |
void TDStretch::overlapStereo(short *poutput, const short *input) const
{
int i;
short temp;
int cnt2;
for (i = 0; i < overlapLength ; i ++)
{
temp = (short)(overlapLength - i);
cnt2 = 2 * i;
poutput[cnt2] = (input[cnt2] * i + pMidBuffer[cnt2] * temp ) / overlapL... | 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 251,328,148,460,662,900,000,000,000,000,000,000,000 | 14 | Replaced illegal-number-of-channel assertions with run-time exception |
static int collect_expired_timers(struct timer_base *base,
struct hlist_head *heads)
{
unsigned long now = READ_ONCE(jiffies);
/*
* NOHZ optimization. After a long idle sleep we need to forward the
* base to current jiffies. Avoid a loop by searching the bitfield for
* the next expiring timer.
*/
if (... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 152,740,800,052,398,940,000,000,000,000,000,000,000 | 29 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
isoent_setup_file_location(struct iso9660 *iso9660, int location)
{
struct isoent *isoent;
struct isoent *np;
struct isofile *file;
size_t size;
int block;
int depth;
int joliet;
int symlocation;
int total_block;
iso9660->total_file_block = 0;
if ((isoent = iso9660->el_torito.catalog) != NULL) {
isoent->f... | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 190,032,120,284,037,700,000,000,000,000,000,000,000 | 85 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
Delete(asdl_seq * targets, int lineno, int col_offset, int end_lineno, int
end_col_offset, PyArena *arena)
{
stmt_ty p;
p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
if (!p)
return NULL;
p->kind = Delete_kind;
p->v.Delete.targets = targets;
p->lineno = lineno;
p->col_offset ... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 311,728,946,706,392,930,000,000,000,000,000,000,000 | 15 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
absl::optional<uint64_t> toInteger(const Http::RequestHeaderMap&) const override {
return absl::nullopt;
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 34,860,484,933,759,497,000,000,000,000,000,000,000 | 3 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static inline Quantum GetPixelCyan(const Image *restrict image,
const Quantum *restrict pixel)
{
return(pixel[image->channel_map[CyanPixelChannel].offset]);
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 70,546,412,762,520,530,000,000,000,000,000,000,000 | 5 | |
xmlSchemaCheckRCaseNSRecurseCheckCardinality(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaParticlePtr r,
xmlSchemaParticlePtr b)
{
xmlSchemaParticlePtr part;
/* TODO: Error codes (rcase-NSRecurseCheckCardinality). */
if ((r->children == NULL) || (r->children->children == NULL))
return (-1);
... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 133,698,552,973,933,650,000,000,000,000,000,000,000 | 34 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
int CLASS foveon_fixed (void *ptr, int size, const char *name)
{
void *dp;
unsigned dim[3];
if (!name) return 0;
dp = foveon_camf_matrix (dim, name);
if (!dp) return 0;
memcpy (ptr, dp, size*4);
free (dp);
return 1;
} | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 277,827,628,208,523,140,000,000,000,000,000,000,000 | 12 | cumulated data checks patch |
static MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
Image
*msl_image;
MagickBooleanType
status;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
assert(i... | 0 | [
"CWE-772"
] | ImageMagick | c9c4ef4e7ca83d8a00effd16723f37946e89fbad | 68,756,492,873,778,490,000,000,000,000,000,000,000 | 20 | Fixed leaking of the image when writing an MSL image (#1360). |
xmlDocGetRootElement(const xmlDoc *doc) {
xmlNodePtr ret;
if (doc == NULL) return(NULL);
ret = doc->children;
while (ret != NULL) {
if (ret->type == XML_ELEMENT_NODE)
return(ret);
ret = ret->next;
}
return(ret);
} | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 172,197,858,247,498,170,000,000,000,000,000,000,000 | 12 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
GF_Err stbl_AddDTS(GF_SampleTableBox *stbl, u64 DTS, u32 *sampleNumber, u32 LastAUDefDuration, u32 nb_pack)
{
u32 i, j, sampNum;
u64 *DTSs, curDTS;
Bool inserted;
GF_SttsEntry *ent;
GF_TimeToSampleBox *stts = stbl->TimeToSample;
//reset the reading cache when adding a sample
stts->r_FirstSampleInEntry = 0;
*... | 0 | [
"CWE-120",
"CWE-787"
] | gpac | 77ed81c069e10b3861d88f72e1c6be1277ee7eae | 12,676,770,305,267,652,000,000,000,000,000,000,000 | 176 | fixed #1774 (fuzz) |
static int smack_msg_queue_msgrcv(struct kern_ipc_perm *isp, struct msg_msg *msg,
struct task_struct *target, long type, int mode)
{
return smk_curacc_msq(isp, MAY_READWRITE);
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 101,320,284,735,909,360,000,000,000,000,000,000,000 | 5 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static void gf_sg_dom_event_bubble(GF_Node *node, GF_DOM_Event *event, GF_List *use_stack, u32 cur_par_idx)
{
GF_Node *parent;
if (!node || node->sgprivate->scenegraph->abort_bubbling) return;
/*get the node's parent*/
parent = gf_node_get_parent(node, 0);
if (!parent) {
/*top of the graph, use Document*/
... | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 183,530,452,590,577,800,000,000,000,000,000,000,000 | 42 | fixed #2109 |
void sas_porte_link_reset_err(struct work_struct *work)
{
struct asd_sas_event *ev = to_asd_sas_event(work);
struct asd_sas_phy *phy = ev->phy;
sas_deform_port(phy, 1);
} | 0 | [
"CWE-284"
] | linux | 0558f33c06bb910e2879e355192227a8e8f0219d | 176,852,295,991,652,500,000,000,000,000,000,000,000 | 7 | scsi: libsas: direct call probe and destruct
In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery
competing with ata error handling") introduced disco mutex to prevent
rediscovery competing with ata error handling and put the whole
revalidation in the mutex. But the rphy add/remove needs to wait for the
... |
void rose_stop_idletimer(struct sock *sk)
{
del_timer(&rose_sk(sk)->idletimer);
} | 1 | [
"CWE-416"
] | linux | 9cc02ede696272c5271a401e4f27c262359bc2f6 | 111,486,110,913,219,350,000,000,000,000,000,000,000 | 4 | net: rose: fix UAF bugs caused by timer handler
There are UAF bugs in rose_heartbeat_expiry(), rose_timer_expiry()
and rose_idletimer_expiry(). The root cause is that del_timer()
could not stop the timer handler that is running and the refcount
of sock is not managed properly.
One of the UAF bugs is shown below:
... |
void md_rdev_clear(struct md_rdev *rdev)
{
if (rdev->sb_page) {
put_page(rdev->sb_page);
rdev->sb_loaded = 0;
rdev->sb_page = NULL;
rdev->sb_start = 0;
rdev->sectors = 0;
}
if (rdev->bb_page) {
put_page(rdev->bb_page);
rdev->bb_page = NULL;
}
kfree(rdev->badblocks.page);
rdev->badblocks.page = NULL;... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 130,547,192,007,932,840,000,000,000,000,000,000,000 | 16 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
void textview_set_position(TextView *textview, gint pos)
{
GtkTextView *text = GTK_TEXT_VIEW(textview->text);
gtkut_text_view_set_position(text, pos);
} | 0 | [
"CWE-601"
] | claws | ac286a71ed78429e16c612161251b9ea90ccd431 | 251,486,796,625,401,850,000,000,000,000,000,000,000 | 6 | harden link checker before accepting click |
Client::handleRequestBodyProducerAborted()
{
if (requestSender != NULL)
debugs(9,3, HERE << "fyi: request body aborted while we were sending");
fwd->dontRetry(true); // the problem is not with the server
stopConsumingFrom(requestBodySource); // requestSender, if any, will notice
// kids extend... | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 286,897,834,303,967,730,000,000,000,000,000,000,000 | 10 | Handle more partial responses (#791) |
ZEND_API int ZEND_FASTCALL zend_binary_zval_strcmp(zval *s1, zval *s2) /* {{{ */
{
return zend_binary_strcmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
} | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 179,897,608,411,664,880,000,000,000,000,000,000,000 | 4 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
div_sf(VALUE s, VALUE *f)
{
VALUE n = sec_to_ns(s);
if (f)
*f = f_mod(n, INT2FIX(1));
return f_floor(n);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 216,589,023,179,287,950,000,000,000,000,000,000,000 | 8 | 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`... |
irc_nick_color_for_msg (struct t_irc_server *server, int server_message,
struct t_irc_nick *nick, const char *nickname)
{
static char color[16][64];
static int index_color = 0;
char *color_found;
if (server_message
&& !weechat_config_boolean (irc_config_look_color_nicks_... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 236,335,659,829,761,900,000,000,000,000,000,000 | 35 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
int SWFShape_getFlags(SWFShape shape)
{
if(shape->useVersion == SWF_SHAPE4)
return shape->flags;
else
return 0;
} | 0 | [
"CWE-20",
"CWE-476"
] | libming | 6e76e8c71cb51c8ba0aa9737a636b9ac3029887f | 333,504,991,753,184,800,000,000,000,000,000,000,000 | 7 | SWFShape_setLeftFillStyle: prevent fill overflow |
static int nci_open_device(struct nci_dev *ndev)
{
int rc = 0;
mutex_lock(&ndev->req_lock);
if (test_bit(NCI_UNREG, &ndev->flags)) {
rc = -ENODEV;
goto done;
}
if (test_bit(NCI_UP, &ndev->flags)) {
rc = -EALREADY;
goto done;
}
if (ndev->ops->open(ndev)) {
rc = -EIO;
goto done;
}
atomic_set(&nd... | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 54,831,679,667,944,130,000,000,000,000,000,000,000 | 79 | NFC: add NCI_UNREG flag to eliminate the race
There are two sites that calls queue_work() after the
destroy_workqueue() and lead to possible UAF.
The first site is nci_send_cmd(), which can happen after the
nci_close_device as below
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
f... |
bool Item_direct_view_ref::excl_dep_on_grouping_fields(st_select_lex *sel)
{
if (item_equal)
{
DBUG_ASSERT(real_item()->type() == Item::FIELD_ITEM);
return find_matching_grouping_field(this, sel) != NULL;
}
return (*ref)->excl_dep_on_grouping_fields(sel);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 21,907,464,686,110,724,000,000,000,000,000,000,000 | 9 | 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. |
dns_cache_lookup(struct module_env* env,
uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
uint16_t flags, struct regional* region, struct regional* scratch,
int no_partial, uint8_t* dpname, size_t dpnamelen)
{
struct lruhash_entry* e;
struct query_info k;
hashvalue_type h;
time_t now = *env->now... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 297,972,438,308,458,750,000,000,000,000,000,000,000 | 166 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
QUtil::tell(FILE* stream)
{
#if HAVE_FSEEKO
return static_cast<qpdf_offset_t>(ftello(stream));
#elif HAVE_FSEEKO64
return static_cast<qpdf_offset_t>(ftello64(stream));
#else
# if defined _MSC_VER || defined __BORLANDC__
return _ftelli64(stream);
# else
return static_cast<qpdf_offset_t>(ftell(stream));
#... | 0 | [
"CWE-125"
] | qpdf | 6d46346eb93d5032c08cf1e39023b5d57260a766 | 335,932,067,563,811,100,000,000,000,000,000,000,000 | 14 | Detect integer overflow/underflow |
static inline pmd_t pmd_mkdirty(pmd_t pmd)
{
return pmd_set_flags(pmd, _PAGE_DIRTY);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 027ef6c87853b0a9df53175063028edb4950d476 | 222,320,194,844,218,500,000,000,000,000,000,000,000 | 4 | mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP
In many places !pmd_present has been converted to pmd_none. For pmds
that's equivalent and pmd_none is quicker so using pmd_none is better.
However (unless we delete pmd_present) we should provide an accurate
pmd_present too. This will avoid the ri... |
static av_always_inline void dnxhd_encode_dc(DNXHDEncContext *ctx, int diff)
{
int nbits;
if (diff < 0) {
nbits = av_log2_16bit(-2*diff);
diff--;
} else {
nbits = av_log2_16bit(2*diff);
}
put_bits(&ctx->m.pb, ctx->cid_table->dc_bits[nbits] + nbits,
(ctx->cid_tabl... | 0 | [
"CWE-703"
] | FFmpeg | f1caaa1c61310beba705957e6366f0392a0b005b | 157,431,565,134,511,270,000,000,000,000,000,000,000 | 12 | dnxhdenc: fix mb_rc size
Fixes out of array access with RC_VARIANCE set to 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *yyscanner, RE_LEX_ENVIRONMENT *lex_env)
{
YYUSE (yyvaluep);
YYUSE (yyscanner);
YYUSE (lex_env);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
... | 1 | [
"CWE-674",
"CWE-787"
] | yara | 925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699 | 171,859,271,658,806,500,000,000,000,000,000,000,000 | 48 | Fix issue #674. Move regexp limits to limits.h. |
static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
{
struct tcmsg *tcm = NLMSG_DATA(n);
struct rtattr **tca = arg;
struct net_device *dev;
struct Qdisc *q = NULL;
struct Qdisc_class_ops *cops;
unsigned long cl = 0;
unsigned long new_cl;
u32 pid = tcm->tcm_parent;
u32 clid = tcm->tcm_h... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 170,481,033,093,087,150,000,000,000,000,000,000,000 | 111 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
enc_succ_char(char *p, long len, rb_encoding *enc)
{
long i;
int l;
while (1) {
for (i = len-1; 0 <= i && (unsigned char)p[i] == 0xff; i--)
p[i] = '\0';
if (i < 0)
return NEIGHBOR_WRAPPED;
++((unsigned char*)p)[i];
l = rb_enc_precise_mbclen(p, p+len, e... | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 208,945,030,465,569,170,000,000,000,000,000,000,000 | 32 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void nhmldump_send_header(GF_NHMLDumpCtx *ctx)
{
GF_FilterPacket *dst_pck;
char nhml[1024];
u32 size;
u8 *output;
const GF_PropertyValue *p;
ctx->szRootName = "NHNTStream";
if (ctx->dims) {
ctx->szRootName = "DIMSStream";
}
if (!ctx->filep) {
sprintf(nhml, "<?xml version=\"1.0\" encoding=\"UTF-8\"... | 1 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 171,851,966,591,827,380,000,000,000,000,000,000,000 | 154 | fixed #1565 |
static void dn_dev_set_timer(struct net_device *dev)
{
struct dn_dev *dn_db = rcu_dereference_raw(dev->dn_ptr);
if (dn_db->parms.t2 > dn_db->parms.t3)
dn_db->parms.t2 = dn_db->parms.t3;
dn_db->timer.data = (unsigned long)dev;
dn_db->timer.function = dn_dev_timer_func;
dn_db->timer.expires = jiffies + (dn_db->p... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 38,954,200,005,281,676,000,000,000,000,000,000,000 | 13 | 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 void lsr_read_gradient_units(GF_LASeRCodec *lsr, GF_Node *elt)
{
u32 flag;
GF_FieldInfo info;
GF_LSR_READ_INT(lsr, flag, 1, "hasGradientUnits");
if (flag) {
lsr->last_error = gf_node_get_attribute_by_tag(elt, TAG_SVG_ATT_gradientUnits, 1, 0, &info);
GF_LSR_READ_INT(lsr, *(SVG_GradientUnit*)info.far_ptr, ... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 83,288,946,498,841,630,000,000,000,000,000,000,000 | 10 | fixed #2213 |
void Gfx::doFunctionShFill(GfxFunctionShading *shading) {
double x0, y0, x1, y1;
GfxColor colors[4];
if (out->useShadedFills( shading->getType() ) &&
out->functionShadedFill(state, shading)) {
return;
}
shading->getDomain(&x0, &y0, &x1, &y1);
shading->getColor(x0, y0, &colors[0]);
shading->get... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 52,244,014,207,018,920,000,000,000,000,000,000,000 | 16 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct iphdr *iph = &tunnel->parms.iph;
struct net *net = dev_net(dev);
struct sit_net *sitn = net_generic(net, sit_net_id);
tunnel->dev = dev;
strcpy(tunnel->parms.name, dev->name);
iph->version ... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 32,724,894,684,568,400,000,000,000,000,000,000,000 | 18 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
Value ExpressionAbs::evaluateNumericArg(const Value& numericArg) const {
BSONType type = numericArg.getType();
if (type == NumberDouble) {
return Value(std::abs(numericArg.getDouble()));
} else if (type == NumberDecimal) {
return Value(numericArg.getDecimal().toAbs());
} else {
l... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 167,855,117,807,469,400,000,000,000,000,000,000,000 | 15 | SERVER-38070 fix infinite loop in agg expression |
R_API RSocket *r_socket_new_from_fd(int fd) {
RSocket *s = R_NEW0 (RSocket);
if (s) {
s->fd = fd;
}
return s;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 219,215,983,276,245,930,000,000,000,000,000,000,000 | 7 | 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... |
THD::binlog_start_trans_and_stmt()
{
binlog_cache_mngr *cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(this, binlog_hton);
DBUG_ENTER("binlog_start_trans_and_stmt");
DBUG_PRINT("enter", ("cache_mngr: %p cache_mngr->trx_cache.get_prev_position(): %lu",
cache_mngr,
(... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 161,741,210,890,686,000,000,000,000,000,000,000,000 | 29 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
static void free_huge_page(struct page *page)
{
/*
* Can't pass hstate in here because it is called from the
* compound page destructor.
*/
struct hstate *h = page_hstate(page);
int nid = page_to_nid(page);
struct hugepage_subpool *spool =
(struct hugepage_subpool *)page_private(page);
set_page_private(pa... | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 133,759,679,817,792,480,000,000,000,000,000,000,000 | 28 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
xps_moveto(gx_device_vector *vdev, double x0, double y0,
double x, double y, gx_path_type_t type)
{
gx_device_xps *xps = (gx_device_xps *)vdev;
char line[300];
if_debug2m('_', xps->memory, "xps_moveto %g %g\n", x, y);
/* skip non-drawing paths for now */
if (!drawing_path(type, xps->fil... | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 240,221,743,689,131,500,000,000,000,000,000,000,000 | 19 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
static double mp_cbrt(_cimg_math_parser& mp) {
return cimg::cbrt(_mp_arg(2)); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 204,933,964,827,555,630,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags)
{
struct ext4_ext_path *path = NULL;
struct ext4_extent newex, *ex, *ex2;
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
ext4_fsblk_t newblock = 0;
int free_on_err = 0, err = 0, depth, ret;
unsigned int all... | 0 | [
"CWE-125"
] | linux | bc890a60247171294acc0bd67d211fa4b88d40ba | 141,350,352,748,685,620,000,000,000,000,000,000,000 | 346 | ext4: verify the depth of extent tree in ext4_find_extent()
If there is a corupted file system where the claimed depth of the
extent tree is -1, this can cause a massive buffer overrun leading to
sadness.
This addresses CVE-2018-10877.
https://bugzilla.kernel.org/show_bug.cgi?id=199417
Signed-off-by: Theodore Ts'o ... |
save_dead_message_env (compose_env_t *env)
{
if (mailvar_is_true (mailvar_name_save))
{
mu_stream_t dead_letter, str;
int rc;
time_t t;
struct tm *tm;
const char *name = getenv ("DEAD");
char *sender;
/* FIXME: Use MU_STREAM_APPEND if appenddeadletter, instead of t... | 0 | [] | mailutils | 4befcfd015256c568121653038accbd84820198f | 85,445,495,618,501,900,000,000,000,000,000,000,000 | 49 | mail: disable compose escapes in non-interctive mode.
* NEWS: Document changes.
* doc/texinfo/programs/mail.texi: Document changes.
* mail/send.c (mail_compose_send): Recognize escapes only in
interactive mode. |
void Chapter::Clear() {
StrCpy(NULL, &id_);
while (displays_count_ > 0) {
Display& d = displays_[--displays_count_];
d.Clear();
}
delete[] displays_;
displays_ = NULL;
displays_size_ = 0;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 9,486,336,427,931,897,000,000,000,000,000,000,000 | 13 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
struct r_bin_mdmp_obj *r_bin_mdmp_new_buf(RBuffer *buf) {
bool fail = false;
struct r_bin_mdmp_obj *obj = R_NEW0 (struct r_bin_mdmp_obj);
if (!obj) {
return NULL;
}
obj->kv = sdb_new0 ();
obj->size = (ut32) r_buf_size (buf);
fail |= (!(obj->streams.ex_threads = r_list_new ()));
fail |= (!(obj->streams.memori... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 27fe8031782d3a06c3998eaa94354867864f9f1b | 193,537,887,345,113,460,000,000,000,000,000,000,000 | 36 | Fix DoS in the minidump parser ##crash
* Reported by lazymio via huntr.dev
* Reproducer: mdmp-dos |
static int __follow_pte(struct mm_struct *mm, unsigned long address,
pte_t **ptepp, spinlock_t **ptlp)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep;
pgd = pgd_offset(mm, address);
if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
goto out;
pud = pud_offset(pgd, address);
if (pud_none(*pud) || unlikely(p... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 308,076,509,738,393,900,000,000,000,000,000,000,000 | 37 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
int MP4_ReadBoxContainerChildren( stream_t *p_stream, MP4_Box_t *p_container,
uint32_t i_last_child )
{
return MP4_ReadBoxContainerChildrenIndexed( p_stream, p_container,
i_last_child, false );
} | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 17,228,442,671,218,225,000,000,000,000,000,000,000 | 6 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
e_ews_connection_create_items_finish (EEwsConnection *cnc,
GAsyncResult *result,
GSList **ids,
GError **error)
{
GSimpleAsyncResult *simple;
EwsAsyncData *async_data;
g_return_val_if_fail (cnc != NULL, ... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 310,579,394,826,716,320,000,000,000,000,000,000,000 | 39 | 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 |
PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2(
pj_pool_t *pool,
pjmedia_sdp_neg *neg,
unsigned flags,
const pjmedia_sdp_session *local)
{
pjmedia_sdp_session *new_offer;
pjmedia_sdp_session *old_offer;
char med... | 1 | [
"CWE-400",
"CWE-200",
"CWE-754"
] | pjproject | 97b3d7addbaa720b7ddb0af9bf6f3e443e664365 | 197,312,442,692,241,200,000,000,000,000,000,000,000 | 121 | Merge pull request from GHSA-hvq6-f89p-frvp |
Error HeifContext::get_id_of_non_virtual_child_image(heif_item_id id, heif_item_id& out) const
{
std::string image_type = m_heif_file->get_item_type(id);
if (image_type=="grid" ||
image_type=="iden" ||
image_type=="iovl") {
auto iref_box = m_heif_file->get_iref_box();
std::vector<heif_item_id> i... | 1 | [
"CWE-125"
] | libheif | f7399b62d7fbc596f1b2871578c1d2053bedf1dd | 339,461,888,669,115,020,000,000,000,000,000,000,000 | 25 | Handle case where referenced "iref" box doesn't exist (fixes #138). |
end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
bool end_of_records)
{
TABLE *table= join_tab->table;
int idx= -1;
DBUG_ENTER("end_write_group");
if (!join->first_record || end_of_records ||
(idx=test_if_group_changed(join->group_fields)) >= 0)
{
if (join->first_record |... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 8,039,926,638,485,735,000,000,000,000,000,000,000 | 79 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
cmd_http_sendhex(CMD_ARGS)
{
struct http *hp;
char buf[3], *q;
uint8_t *p;
int i, j, l;
(void)cmd;
(void)vl;
CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC);
AN(av[1]);
AZ(av[2]);
l = strlen(av[1]) / 2;
p = malloc(l);
AN(p);
q = av[1];
for (i = 0; i < l; i++) {
while (vct_issp(*q))
q++;
if (*q == '\0')
... | 0 | [
"CWE-269"
] | Varnish-Cache | 85e8468bec9416bd7e16b0d80cb820ecd2b330c3 | 256,516,207,942,745,900,000,000,000,000,000,000,000 | 35 | Do not consider a CR by itself as a valid line terminator
Varnish (prior to version 4.0) was not following the standard with
regard to line separator.
Spotted and analyzed by: Régis Leroy [regilero] regis.leroy@makina-corpus.com |
void swoole_serialize_init(int module_number TSRMLS_DC)
{
SWOOLE_INIT_CLASS_ENTRY(swoole_serialize_ce, "swoole_serialize", "Swoole\\Serialize", swoole_serialize_methods);
swoole_serialize_class_entry_ptr = zend_register_internal_class(&swoole_serialize_ce TSRMLS_CC);
SWOOLE_CLASS_ALIAS(swoole_serialize, "Sw... | 0 | [
"CWE-200",
"CWE-502"
] | swoole-src | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | 119,155,685,754,960,360,000,000,000,000,000,000,000 | 20 | add buffer end check |
char *convert_query_hexchar(char *txt)
{
int d1, d2;
if (strlen(txt) < 3) {
*txt = '\0';
return txt-1;
}
d1 = hextoint(*(txt+1));
d2 = hextoint(*(txt+2));
if (d1<0 || d2<0) {
strcpy(txt, txt+3);
return txt-1;
} else {
*txt = d1 * 16 + d2;
strcpy(txt+1, txt+3);
return txt;
}
} | 0 | [] | cgit | 02a545e63454530c1639014d3239c14ced2022c6 | 10,782,252,576,671,145,000,000,000,000,000,000,000 | 18 | Add support for cloning over http
This patch implements basic support for cloning over http, based on the
work on git-http-backend by Shawn O. Pearce.
Signed-off-by: Lars Hjemli <hjemli@gmail.com> |
bool Aggregator_distinct::unique_walk_function_for_count(void *element)
{
Item_sum_count *sum= (Item_sum_count *)item_sum;
sum->count++;
return 0;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 62,167,815,905,399,830,000,000,000,000,000,000,000 | 6 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
unsigned int *size)
{
const struct xt_target *target = t->u.kernel.target;
struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t;
int off = xt_compat_target_offset(target);
u_int16_t tsize = ct->u.user.target_size;
char ... | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 325,466,358,307,912,460,000,000,000,000,000,000,000 | 25 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol)
{
int rc;
struct nfc_target *target;
pr_debug("dev_name=%s target_idx=%u protocol=%u\n",
dev_name(&dev->dev), target_idx, protocol);
device_lock(&dev->dev);
if (!device_is_registered(&dev->dev)) {
rc = -ENODEV;
goto error;
}
if... | 1 | [
"CWE-416"
] | linux | da5c0f119203ad9728920456a0f52a6d850c01cd | 92,770,391,428,014,000,000,000,000,000,000,000,000 | 40 | nfc: replace improper check device_is_registered() in netlink related functions
The device_is_registered() in nfc core is used to check whether
nfc device is registered in netlink related functions such as
nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered()
is protected by device_lock, there is ... |
encode_SET_IP_TTL(const struct ofpact_ip_ttl *ttl,
enum ofp_version ofp_version, struct ofpbuf *out)
{
if (ofp_version >= OFP11_VERSION) {
put_OFPAT11_SET_NW_TTL(out, ttl->ttl);
} else {
struct mf_subfield dst = { .field = mf_from_id(MFF_IP_TTL),
... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 316,686,485,532,347,930,000,000,000,000,000,000,000 | 11 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int manager_setup_signals(Manager *m) {
struct sigaction sa = {
.sa_handler = SIG_DFL,
.sa_flags = SA_NOCLDSTOP|SA_RESTART,
};
sigset_t mask;
int r;
assert(m);
assert_se(sigaction(SIGCHLD, &sa, NULL) == 0);
/* We make libe... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 34,214,659,108,187,805,000,000,000,000,000,000,000 | 95 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer,
uint8_t peer_type, const char *group)
{
struct smp_ltk_info *ltk = NULL;
GError *gerr = NULL;
bool master;
char *key;
char *rand = NULL;
key = g_key_file_get_string(key_file, group, "Key", NULL);
if (!key || strlen(key) < 32)
goto ... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 122,422,596,497,648,280,000,000,000,000,000,000,000 | 76 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
getCharacters (FileInfo * nested, CharsString * characters)
{
/*Get ruleChars string */
CharsString token;
if (getToken (nested, &token, "characters"))
if (parseChars (nested, characters, &token))
return 1;
return 0;
} | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 233,518,646,446,890,950,000,000,000,000,000,000,000 | 9 | Merge branch 'table_resolver' |
static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optval,
unsigned int optlen)
{
struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_association *asoc = NULL;
struct sctp_setpeerprim prim;
struct sctp_chunk *chunk;
struct sctp_af *af;
int err;
sp = sctp_sk(s... | 0 | [
"CWE-20"
] | linux | 726bc6b092da4c093eb74d13c07184b18c1af0f1 | 242,212,455,796,043,400,000,000,000,000,000,000,000 | 57 | net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS
Building sctp may fail with:
In function ‘copy_from_user’,
inlined from ‘sctp_getsockopt_assoc_stats’ at
net/sctp/socket.c:5656:20:
arch/x86/include/asm/uaccess_32.h:211:26: error: call to
‘copy_from_user_overflow’ declared with attribute error: c... |
bool PrimaryChromaticity::Parse(IMkvReader* reader, long long read_pos,
long long value_size, bool is_x,
PrimaryChromaticity** chromaticity) {
if (!reader)
return false;
if (!*chromaticity)
*chromaticity = new PrimaryChromaticity();
if (!*c... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 54,373,388,115,559,910,000,000,000,000,000,000,000 | 29 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.