func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
errcode_t ext2fs_open(const char *name, int flags, int superblock,
unsigned int block_size, io_manager manager,
ext2_filsys *ret_fs)
{
return ext2fs_open2(name, 0, flags, superblock, block_size,
manager, ret_fs);
} | 0 | [] | e2fsprogs | f66e6ce4446738c2c7f43d41988a3eb73347e2f5 | 68,894,563,654,814,730,000,000,000,000,000,000,000 | 7 | libext2fs: avoid buffer overflow if s_first_meta_bg is too big
If s_first_meta_bg is greater than the of number block group
descriptor blocks, then reading or writing the block group descriptors
will end up overruning the memory buffer allocated for the
descriptors. Fix this by limiting first_meta_bg to no more than
... |
int do_encoding() const throw() { return 0; } | 0 | [
"CWE-200"
] | wesnoth | f8914468182e8d0a1551b430c0879ba236fe4d6d | 238,759,187,195,663,650,000,000,000,000,000,000,000 | 1 | Disallow inclusion of .pbl files from WML (bug #23504)
Note that this will also cause Lua wesnoth.have_file() to return false
on .pbl files. |
static int gfn_to_memslot_approx(struct kvm_memslots *slots, gfn_t gfn)
{
int start = 0, end = slots->used_slots;
int slot = atomic_read(&slots->lru_slot);
struct kvm_memory_slot *memslots = slots->memslots;
if (gfn >= memslots[slot].base_gfn &&
gfn < memslots[slot].base_gfn + memslots[slot].npages)
return ... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 159,643,048,193,941,970,000,000,000,000,000,000,000 | 26 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
GF_Err irot_box_dump(GF_Box *a, FILE * trace)
{
GF_ImageRotationBox *ptr = (GF_ImageRotationBox *)a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "ImageRotationBox", trace);
gf_fprintf(trace, "angle=\"%d\">\n", (ptr->angle*90));
gf_isom_box_dump_done("ImageRotationBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 17,335,984,949,508,496,000,000,000,000,000,000,000 | 9 | fixed #2138 |
cr_tknzr_parse_nmstart (CRTknzr * a_this,
guint32 * a_char,
CRParsingLocation *a_location)
{
CRInputPos init_pos;
enum CRStatus status = CR_OK;
guint32 cur_char = 0,
next_char = 0;
g_return_val_if_fail (a_this && PRIVATE (... | 0 | [
"CWE-119"
] | libcroco | 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 | 304,961,998,658,010,750,000,000,000,000,000,000,000 | 48 | tknzr: support only max long rgb values
This fixes a possible out of bound when reading rgbs which
are longer than the support MAXLONG |
SSLNetVConnection::do_io_close(int lerrno)
{
if (this->ssl != nullptr && sslHandShakeComplete) {
callHooks(TS_EVENT_VCONN_CLOSE);
int shutdown_mode = SSL_get_shutdown(ssl);
Debug("ssl-shutdown", "previous shutdown state 0x%x", shutdown_mode);
int new_shutdown_mode = shutdown_mode | SSL_RECEIVED_SHUTDO... | 0 | [
"CWE-284"
] | trafficserver | d3f36f79820ea10c26573c742b1bbc370c351716 | 149,198,919,735,310,130,000,000,000,000,000,000,000 | 41 | Bug fix in origin connection handling (#8731)
Co-authored-by: Takuya Kitano <tkitano@yahoo-corp.jp> |
_libssh2_channel_open(LIBSSH2_SESSION * session, const char *channel_type,
uint32_t channel_type_len,
uint32_t window_size,
uint32_t packet_size,
const unsigned char *message,
size_t message_len)
{
static c... | 1 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 337,829,378,415,939,100,000,000,000,000,000,000,000 | 204 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
OPJ_BOOL opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
... | 0 | [] | openjpeg | 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 | 236,902,638,220,517,870,000,000,000,000,000,000,000 | 110 | [trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492) |
CImg<T>& rand(const T& val_min, const T& val_max) {
const float delta = (float)val_max - (float)val_min + (cimg::type<T>::is_float()?0:1);
if (cimg::type<T>::is_float()) cimg_pragma_openmp(parallel cimg_openmp_if_size(size(),524288)) {
cimg_uint64 rng = (cimg::_rand(),cimg::rng());
#if cimg_u... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 207,594,209,238,706,330,000,000,000,000,000,000,000 | 23 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static struct gs_can *gs_make_candev(unsigned int channel,
struct usb_interface *intf,
struct gs_device_config *dconf)
{
struct gs_can *dev;
struct net_device *netdev;
int rc;
struct gs_device_bt_const *bt_const;
bt_const = kmalloc(sizeof(*bt_const), GFP_KERNEL);
if (!bt_const)
return ERR_PTR... | 0 | [
"CWE-400",
"CWE-401"
] | linux | fb5be6a7b4863ecc44963bb80ca614584b6c7817 | 186,593,156,117,694,030,000,000,000,000,000,000,000 | 107 | can: gs_usb: gs_can_open(): prevent memory leak
In gs_can_open() if usb_submit_urb() fails the allocated urb should be
released.
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off... |
static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
const void *val)
{
struct kvm_ioapic *ioapic = to_ioapic(this);
u32 data;
if (!ioapic_in_range(ioapic, addr))
return -EOPNOTSUPP;
ioapic_debug("ioapic_mmio_write addr=%p len=%d val=%p\n",
(void*)addr, len, val);
ASSERT(... | 0 | [
"CWE-20"
] | kvm | 5678de3f15010b9022ee45673f33bcfc71d47b60 | 140,201,751,216,828,950,000,000,000,000,000,000,000 | 50 | KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155)
QE reported that they got the BUG_ON in ioapic_service to trigger.
I cannot reproduce it, but there are two reasons why this could happen.
The less likely but also easiest one, is when kvm_irq_delivery_to_apic
does not deliver to any APIC a... |
gdm_session_set_timed_login_details (GdmSession *self,
const char *username,
int delay)
{
g_debug ("GdmSession: timed login details %s %d", username, delay);
self->priv->timed_login_username = g_strdup (username);
... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 88,026,565,423,100,440,000,000,000,000,000,000,000 | 8 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
static inline struct sock *skb_steal_sock(struct sk_buff *skb)
{
if (unlikely(skb->sk)) {
struct sock *sk = skb->sk;
skb->destructor = NULL;
skb->sk = NULL;
return sk;
}
return NULL;
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 330,495,818,199,150,340,000,000,000,000,000,000,000 | 11 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static u32 vmx_pin_based_exec_ctrl(struct vcpu_vmx *vmx)
{
u32 pin_based_exec_ctrl = vmcs_config.pin_based_exec_ctrl;
if (!kvm_vcpu_apicv_active(&vmx->vcpu))
pin_based_exec_ctrl &= ~PIN_BASED_POSTED_INTR;
/* Enable the preemption timer dynamically */
pin_based_exec_ctrl &= ~PIN_BASED_VMX_PREEMPTION_TIMER;
retur... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 285,501,563,349,831,540,000,000,000,000,000,000,000 | 10 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
static int io_try_cancel(struct io_kiocb *req, struct io_cancel_data *cd)
{
struct io_ring_ctx *ctx = req->ctx;
int ret;
WARN_ON_ONCE(!io_wq_current_is_worker() && req->task != current);
ret = io_async_cancel_one(req->task->io_uring, cd);
/*
* Fall-through even for -EALREADY, as we may have poll armed
* tha... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 134,296,035,078,001,440,000,000,000,000,000,000,000 | 25 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
void CLASS sinar_4shot_load_raw()
{
ushort *pixel;
unsigned shot, row, col, r, c;
if ((shot = shot_select) || half_size) {
if (shot) shot--;
if (shot > 3) shot = 3;
fseek (ifp, data_offset + shot*4, SEEK_SET);
fseek (ifp, get4(), SEEK_SET);
unpacked_load_raw();
return;
}
free (image);... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 73,002,311,229,681,010,000,000,000,000,000,000,000 | 34 | Avoid overflow in ljpeg_start(). |
static int ldb_kv_index_dn_not(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
const struct ldb_parse_tree *tree,
struct dn_list *list)
{
/* the only way to do an indexed not would be if we could
negate the not via another not or if we knew the total
number of database e... | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 244,492,894,132,217,880,000,000,000,000,000,000,000 | 15 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
static void reset_wvr(struct kvm_vcpu *vcpu,
const struct sys_reg_desc *rd)
{
vcpu->arch.vcpu_debug_state.dbg_wvr[rd->reg] = rd->val;
} | 0 | [
"CWE-20",
"CWE-617"
] | linux | 9e3f7a29694049edd728e2400ab57ad7553e5aa9 | 320,927,351,053,543,500,000,000,000,000,000,000,000 | 5 | arm64: KVM: pmu: Fix AArch32 cycle counter access
We're missing the handling code for the cycle counter accessed
from a 32bit guest, leading to unexpected results.
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> |
void infoCommand(redisClient *c) {
sds info = genRedisInfoString();
addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n",
(unsigned long)sdslen(info)));
addReplySds(c,info);
addReply(c,shared.crlf);
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 65,454,044,735,880,370,000,000,000,000,000,000,000 | 7 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
static inline gfp_t gfp_any(void)
{
return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 320,050,953,092,080,870,000,000,000,000,000,000,000 | 4 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static int jpc_dec_process_soc(jpc_dec_t *dec, jpc_ms_t *ms)
{
/* Eliminate warnings about unused variables. */
ms = 0;
/* We should expect to encounter a SIZ marker segment next. */
dec->state = JPC_MHSIZ;
return 0;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 230,362,851,922,206,000,000,000,000,000,000,000,000 | 10 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
dump_genid(Pool *pool, Strqueue *sq, Id id, int cnt)
{
struct oplist *op;
char cntbuf[20];
const char *s;
if (ISRELDEP(id))
{
Reldep *rd = GETRELDEP(pool, id);
for (op = oplist; op->flags; op++)
if (rd->flags == op->flags)
break;
cnt = dump_genid(pool, sq, rd->name, cnt);
cnt = ... | 0 | [
"CWE-120"
] | libsolv | 0077ef29eb46d2e1df2f230fc95a1d9748d49dec | 211,518,456,994,449,300,000,000,000,000,000,000,000 | 25 | testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.
(Jobs may point inside the whatproviedes array, so we must not invalid... |
int usbredirparser_has_data_to_write(struct usbredirparser *parser_pub)
{
struct usbredirparser_priv *parser =
(struct usbredirparser_priv *)parser_pub;
return parser->write_buf_count;
} | 0 | [] | usbredir | 03c519ff5831ba75120e00ebebbf1d5a1f7220ab | 221,122,938,654,994,900,000,000,000,000,000,000,000 | 6 | Avoid use-after-free in serialization
Serializing parsers with large amounts of buffered write data (e.g. in case of
a slow or blocked write destination) would cause "serialize_data" to reallocate
the state buffer whose default size is 64kB (USBREDIRPARSER_SERIALIZE_BUF_SIZE).
The pointer to the position for the write... |
static void vdagent_message_clipboard_from_le(VDAgentMessage *message_header,
uint8_t *data)
{
gsize min_size = vdagent_message_min_size[message_header->type];
uint32_t *data_type = (uint32_t *) data;
if (VD_AGENT_HAS_CAPABILITY(capabilities, capabilities_size,
VD_AG... | 0 | [
"CWE-770"
] | spice-vd_agent | 1a8b93ca6ac0b690339ab7f0afc6fc45d198d332 | 59,507,279,000,643,840,000,000,000,000,000,000,000 | 26 | Avoids unchecked file transfer IDs allocation and usage
Avoid agents allocating file transfers.
The "active_xfers" entries are now inserted when client start sending
files.
Also different agents cannot mess with other agent transfers as a
transfer is bound to a single agent.
This issue was reported by SUSE security t... |
bool lookup_user_key_possessed(const struct key *key,
const struct key_match_data *match_data)
{
return key == match_data->raw_data;
} | 0 | [
"CWE-703"
] | linux | 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 | 269,738,540,047,215,000,000,000,000,000,000,000,000 | 5 | KEYS: Fix keyring ref leak in join_session_keyring()
This fixes CVE-2016-0728.
If a thread is asked to join as a session keyring the keyring that's already
set as its session, we leak a keyring reference.
This can be tested with the following program:
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>... |
void populateCommandTable(void) {
int j;
int numcommands = sizeof(readonlyCommandTable)/sizeof(struct redisCommand);
for (j = 0; j < numcommands; j++) {
struct redisCommand *c = readonlyCommandTable+j;
int retval;
retval = dictAdd(server.commands, sdsnew(c->name), c);
asser... | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 158,500,121,426,083,400,000,000,000,000,000,000,000 | 12 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
xfs_attr3_leaf_lookup_int(
struct xfs_buf *bp,
struct xfs_da_args *args)
{
struct xfs_attr_leafblock *leaf;
struct xfs_attr3_icleaf_hdr ichdr;
struct xfs_attr_leaf_entry *entry;
struct xfs_attr_leaf_entry *entries;
struct xfs_attr_leaf_name_local *name_loc;
struct xfs_attr_leaf_name_remote *name_rmt;
xfs_daha... | 0 | [
"CWE-131"
] | linux | f4020438fab05364018c91f7e02ebdd192085933 | 37,648,184,627,694,840,000,000,000,000,000,000,000 | 97 | xfs: fix boundary test in xfs_attr_shortform_verify
The boundary test for the fixed-offset parts of xfs_attr_sf_entry in
xfs_attr_shortform_verify is off by one, because the variable array
at the end is defined as nameval[1] not nameval[].
Hence we need to subtract 1 from the calculation.
This can be shown by:
# tou... |
cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length)
{
DEBUG_CLIPBOARD(("cliprdr_send_native_format_announce\n"));
cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, formats_data,
formats_data_length);
if (formats_data != last_formats)
{
if (last_formats)
xf... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 155,402,237,619,422,910,000,000,000,000,000,000,000 | 17 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
Frame_unbounded_following(THD *thd,
SQL_I_List<ORDER> *partition_list,
SQL_I_List<ORDER> *order_list) :
cursor(thd, partition_list) {} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 266,406,228,624,365,580,000,000,000,000,000,000,000 | 4 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt, int is_vp7)
{
VP8Context *s = avctx->priv_data;
int ret, i, referenced, num_jobs;
enum AVDiscard skip_thresh;
VP8Frame *av_uninit(curframe), *prev_frame;
av_assert0(avctx->pix_fmt == AV_P... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 268,062,045,142,169,000,000,000,000,000,000,000,000 | 159 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
static void ensure_socket_initialization(void)
{
WSADATA wsa;
static int initialized = 0;
const char *libraries[] = { "ws2_32.dll", "wship6.dll", NULL };
const char **name;
if (initialized)
return;
if (WSAStartup(MAKEWORD(2,2), &wsa))
die("unable to initialize winsock subsystem, error %d",
WSAGetLastErro... | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 293,782,913,106,879,550,000,000,000,000,000,000,000 | 44 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
evdns_base_free(struct evdns_base *base, int fail_requests)
{
EVDNS_LOCK(base);
evdns_base_free_and_unlock(base, fail_requests);
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 127,268,244,664,155,340,000,000,000,000,000,000,000 | 5 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
node_new_backref(int back_num, int* backrefs, int by_name,
#ifdef USE_BACKREF_WITH_LEVEL
int exist_level, int nest_level,
#endif
ScanEnv* env)
{
int i;
Node* node = node_new();
CHECK_NULL_RETURN(node);
SET_NTYPE(node, NT_BREF);
NBREF(node)->state = 0;
NBREF(node)->back_num = back_num;
NBREF(nod... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 296,453,601,062,872,170,000,000,000,000,000,000,000 | 49 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
static gboolean grow_buffer (struct bmp_progressive_state *State,
GError **error)
{
guchar *tmp;
if (State->BufferSize == 0) {
g_set_error_literal (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_(... | 0 | [] | gdk-pixbuf | 779429ce34e439c01d257444fe9d6739e72a2024 | 118,631,199,739,344,620,000,000,000,000,000,000,000 | 28 | bmp: Detect integer overflow of the line width
Instead of risking crashes or OOM, return an error if
we detect integer overflow.
The commit also includes a test image that triggers
this overflow when used with pixbuf-read.
https://bugzilla.gnome.org/show_bug.cgi?id=768738 |
static void b43_destroy_dmaring(struct b43_dmaring *ring,
const char *ringname)
{
if (!ring)
return;
#ifdef CONFIG_B43_DEBUG
{
/* Print some statistics. */
u64 failed_packets = ring->nr_failed_tx_packets;
u64 succeed_packets = ring->nr_succeed_tx_packets;
u64 nr_packets = failed_packets + succeed_packe... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 284,508,638,089,911,160,000,000,000,000,000,000,000 | 45 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
bool TinyGLTF::LoadBinaryFromMemory(Model *model, std::string *err,
std::string *warn,
const unsigned char *bytes,
unsigned int size,
const std::string &base_dir,
... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 26,832,199,131,057,240,000,000,000,000,000,000,000 | 69 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
flatpak_dir_get_id (FlatpakDir *self)
{
if (self->user)
return "user";
if (self->extra_data != NULL)
return self->extra_data->id;
return NULL;
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 132,324,550,163,125,950,000,000,000,000,000,000,000 | 10 | 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 ... |
static ssize_t io_import_iovec(int rw, struct io_kiocb *req,
struct iovec **iovec, struct iov_iter *iter,
bool needs_lock)
{
void __user *buf = u64_to_user_ptr(req->rw.addr);
size_t sqe_len = req->rw.len;
ssize_t ret;
u8 opcode;
opcode = req->opcode;
if (opcode == IORING_OP_READ_FIXED || opco... | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 107,975,642,534,168,690,000,000,000,000,000,000,000 | 60 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
nfp_flower_repr_netdev_preclean(struct nfp_app *app, struct net_device *netdev)
{
struct nfp_repr *repr = netdev_priv(netdev);
struct nfp_flower_priv *priv = app->priv;
atomic_t *replies = &priv->reify_replies;
int err;
atomic_set(replies, 0);
err = nfp_flower_cmsg_portreify(repr, false);
if (err) {
nfp_warn(... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 8572cea1461a006bce1d06c0c4b0575869125fa4 | 175,853,565,441,538,270,000,000,000,000,000,000,000 | 16 | nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of
intermediate allocations or initializations fail memory is leaked.
requiered releases are added.
Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload")
Signed-of... |
yang_check_sub_module(struct lys_module *module, struct unres_schema *unres, struct lys_node *node)
{
uint i, erase_identities = 1, erase_nodes = 1, aug_size, dev_size = 0;
aug_size = module->augment_size;
module->augment_size = 0;
dev_size = module->deviation_size;
module->deviation_size = 0;
... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 331,501,652,647,444,900,000,000,000,000,000,000,000 | 94 | yang parser BUGFIX double free
Fixes #742 |
struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd)
{
struct bpf_map *inner_map, *inner_map_meta;
u32 inner_map_meta_size;
struct fd f;
f = fdget(inner_map_ufd);
inner_map = __bpf_map_get(f);
if (IS_ERR(inner_map))
return inner_map;
/* prog_array->owner_prog_type and owner_jited
* is a runtime binding. ... | 0 | [
"CWE-189"
] | linux | 9d5564ddcf2a0f5ba3fa1c3a1f8a1b59ad309553 | 141,373,417,456,057,720,000,000,000,000,000,000,000 | 56 | bpf: fix inner map masking to prevent oob under speculation
During review I noticed that inner meta map setup for map in
map is buggy in that it does not propagate all needed data
from the reference map which the verifier is later accessing.
In particular one such case is index masking to prevent out of
bounds access... |
static int madvise_need_mmap_write(int behavior)
{
switch (behavior) {
case MADV_REMOVE:
case MADV_WILLNEED:
case MADV_DONTNEED:
return 0;
default:
/* be safe, default to 1. list exceptions explicitly */
return 1;
}
} | 0 | [
"CWE-362"
] | linux-2.6 | 9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb | 121,708,618,485,865,760,000,000,000,000,000,000,000 | 12 | mm: Hold a file reference in madvise_remove
Otherwise the code races with munmap (causing a use-after-free
of the vma) or with close (causing a use-after-free of the struct
file).
The bug was introduced by commit 90ed52ebe481 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")
Cc: Hugh Dickins <hugh@veritas.com>
Cc... |
Status Command::explain(OperationContext* opCtx,
const string& dbname,
const BSONObj& cmdObj,
ExplainOptions::Verbosity verbosity,
BSONObjBuilder* out) const {
return {ErrorCodes::IllegalOperation, str::stream() << "Cann... | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 261,951,574,166,252,200,000,000,000,000,000,000,000 | 7 | SERVER-38275 ban explain with UUID |
string_printing2(const uschar *s, BOOL allow_tab)
{
int nonprintcount = 0;
int length = 0;
const uschar *t = s;
uschar *ss, *tt;
while (*t != 0)
{
int c = *t++;
if (!mac_isprint(c) || (!allow_tab && c == '\t')) nonprintcount++;
length++;
}
if (nonprintcount == 0) return s;
/* Get a new block of store guara... | 0 | [] | exim | 2600301ba6dbac5c9d640c87007a07ee6dcea1f4 | 93,010,967,120,678,460,000,000,000,000,000,000,000 | 48 | string.c: do not interpret '\\' before '\0' (CVE-2019-15846)
Add documents about CVE-2019-15846
Add testcase for CVE-2019-15846
Update Changelog
Add Announcements |
ZEND_API int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, ...)
{
va_list va;
int ret;
int quiet = flags & ZEND_PARSE_PARAMS_QUIET;
va_start(va, spec);
ret = zend_parse_arg(arg_num, arg, &va, &spec, quiet TSRMLS_CC);
va_end(va);
return ret;
} | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 198,774,116,600,291,870,000,000,000,000,000,000,000 | 12 | Fix bug #73147: Use After Free in PHP7 unserialize() |
agoo_con_res_pop(agooCon c) {
agooRes res;
pthread_mutex_lock(&c->res_lock);
if (NULL != (res = c->res_head)) {
c->res_head = res->next;
if (res == c->res_tail) {
c->res_tail = NULL;
}
}
pthread_mutex_unlock(&c->res_lock);
return res;
} | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 100,411,952,555,786,970,000,000,000,000,000,000,000 | 14 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
getOpcode(const FileInfo *file, const CharsString *token) {
static TranslationTableOpcode lastOpcode = 0;
TranslationTableOpcode opcode = lastOpcode;
do {
if (token->length == opcodeLengths[opcode])
if (eqasc2uni((unsigned char *)opcodeNames[opcode], &token->chars[0],
token->length)) {
lastOpcode = o... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 63,818,186,877,463,690,000,000,000,000,000,000,000 | 16 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
void CLASS quicktake_100_load_raw()
{
uchar pixel[484][644];
static const short gstep[16] =
{ -89,-60,-44,-32,-22,-15,-8,-2,2,8,15,22,32,44,60,89 };
static const short rstep[6][4] =
{ { -3,-1,1,3 }, { -5,-1,1,5 }, { -8,-2,2,8 },
{ -13,-3,3,13 }, { -19,-4,4,19 }, { -28,-6,6,28 } };
static const sho... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 293,691,937,686,299,400,000,000,000,000,000,000,000 | 66 | cumulated data checks patch |
TensorShapeProto InferenceContext::ShapeHandleToProto(ShapeHandle handle) {
TensorShapeProto out;
ShapeHandleToProto(handle, &out);
return out;
} | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 2,753,495,876,430,337,000,000,000,000,000,000,000 | 5 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
int MonConnection::_negotiate(MAuthReply *m,
const EntityName& entity_name,
uint32_t want_keys,
RotatingKeyRing* keyring)
{
if (auth && (int)m->protocol == auth->get_protocol()) {
// good, negotiation completed
auth->reset();
return 0;
}
int r = _init_auth(m->protocol, enti... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 213,398,033,935,796,540,000,000,000,000,000,000,000 | 21 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
ins_complete(int c, int enable_pum)
{
int n;
int save_w_wrow;
int save_w_leftcol;
int insert_match;
compl_direction = ins_compl_key2dir(c);
insert_match = ins_compl_use_match(c);
if (!compl_started)
{
if (ins_compl_start() == FAIL)
return FAIL;
}
else if (insert_match... | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 267,551,025,669,862,700,000,000,000,000,000,000,000 | 73 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
Item *get_copy(THD *thd)
{ return get_item_copy<Item_default_specification>(thd, this); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 246,442,048,870,706,280,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
grub_fshelp_read_file (grub_disk_t disk, grub_fshelp_node_t node,
void (*read_hook) (grub_disk_addr_t sector,
unsigned offset,
unsigned length,
void *closure),
void *closure, int flags,
grub_off_t pos, grub_size_t len, char *buf,
grub_disk_addr_t (*get_block) (gr... | 1 | [
"CWE-703",
"CWE-787"
] | radare2 | 796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191 | 754,593,127,844,916,400,000,000,000,000,000,000 | 75 | Fix ext2 buffer overflow in r2_sbu_grub_memmove |
int __init ndisc_init(void)
{
int err;
err = register_pernet_subsys(&ndisc_net_ops);
if (err)
return err;
/*
* Initialize the neighbour table
*/
neigh_table_init(NEIGH_ND_TABLE, &nd_tbl);
#ifdef CONFIG_SYSCTL
err = neigh_sysctl_register(NULL, &nd_tbl.parms,
ndisc_ifinfo_sysctl_change);
if (err)
... | 0 | [
"CWE-17"
] | linux | 6fd99094de2b83d1d4c8457f2c83483b2828e75a | 97,215,304,739,433,960,000,000,000,000,000,000,000 | 27 | ipv6: Don't reduce hop limit for an interface
A local route may have a lower hop_limit set than global routes do.
RFC 3756, Section 4.2.7, "Parameter Spoofing"
> 1. The attacker includes a Current Hop Limit of one or another small
> number which the attacker knows will cause legitimate packets to
> be... |
amstar_selfcheck(
application_argument_t *argument)
{
char *option;
if (argument->dle.disk) {
char *qdisk = quote_string(argument->dle.disk);
fprintf(stdout, "OK disk %s\n", qdisk);
amfree(qdisk);
}
fprintf(stdout, "OK amstar version %s\n", VERSION);
fprintf(stdout, "OK amstar\n");
if ... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 174,370,686,091,254,640,000,000,000,000,000,000,000 | 90 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
static void mptsas_request_cancelled(SCSIRequest *sreq)
{
MPTSASRequest *req = sreq->hba_private;
MPIMsgSCSIIOReply reply;
memset(&reply, 0, sizeof(reply));
reply.TargetID = req->scsi_io.TargetID;
reply.Bus = req->scsi_io.Bus;
reply.MsgLength = sizeof(reply) / 4;
... | 0 | [
"CWE-416"
] | qemu | 3791642c8d60029adf9b00bcb4e34d7d8a1aea4d | 96,422,265,864,268,500,000,000,000,000,000,000,000 | 21 | mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392)
While processing SCSI i/o requests in mptsas_process_scsi_io_request(),
the Megaraid emulator appends new MPTSASRequest object 'req' to
the 's->pending' queue. In case of an error, this same object gets
dequeued in mptsas_free_request() only if SCSIRequ... |
static void __exit dccp_v4_exit(void)
{
unregister_pernet_subsys(&dccp_v4_ops);
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
proto_unregister(&dccp_v4_prot);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 73,379,103,241,357,800,000,000,000,000,000,000,000 | 7 | 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... |
static inline void list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq)
{
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 78,861,390,479,122,490,000,000,000,000,000,000,000 | 3 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock)
{
char path[MAXPGPATH];
char tmppath[MAXPGPATH];
char *zbuffer;
XLogSegNo installed_segno;
int max_advance;
int fd;
int nbytes;
XLogFilePath(path, ThisTimeLineID, logsegno);
/*
* Try to use existent file (checkpoint maker may ha... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 224,810,966,765,437,200,000,000,000,000,000,000,000 | 143 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static void fuse_kill_sb_blk(struct super_block *sb)
{
fuse_sb_destroy(sb);
kill_block_super(sb);
} | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 121,061,893,566,285,010,000,000,000,000,000,000,000 | 5 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
gx_device_raster_chunky(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2_align_mod;
if (l2align < log2_align_bitmap_mod)
l2ali... | 0 | [] | ghostpdl | 79cccf641486a6595c43f1de1cd7ade696020a31 | 300,472,302,385,410,370,000,000,000,000,000,000,000 | 14 | Bug 699654(2): preserve LockSafetyParams in the nulldevice
The nulldevice does not necessarily use the normal setpagedevice machinery,
but can be set using the nulldevice operator. In which case, we don't preserve
the settings from the original device (in the way setpagedevice does).
Since nulldevice does nothing, th... |
bool VvcHrdUnit::general_timing_hrd_parameters()
{
num_units_in_tick = m_reader.getBits(32);
time_scale = m_reader.getBits(32);
general_nal_hrd_params_present_flag = m_reader.getBit();
general_vcl_hrd_params_present_flag = m_reader.getBit();
if (general_nal_hrd_params_present_flag || general_vcl_hrd... | 0 | [
"CWE-22"
] | tsMuxer | 3763dd34755a8944d903aa19578fa22cd3734165 | 38,661,666,359,983,950,000,000,000,000,000,000,000 | 22 | Fix Buffer Overflow
Fixes issue #509. |
NCURSES_PUBLIC_VAR(COLORS) (void)
{
return CURRENT_SCREEN ? CURRENT_SCREEN->_color_count : -1;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 43,727,108,632,841,070,000,000,000,000,000,000,000 | 4 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
QPDFPageObjectHelper::filterPageContents(
QPDFObjectHandle::TokenFilter* filter,
Pipeline* next)
{
this->oh.filterPageContents(filter, next);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 183,206,899,597,987,470,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 ... |
mrb_obj_dup(mrb_state *mrb, mrb_value obj)
{
struct RBasic *p;
mrb_value dup;
if (mrb_immediate_p(obj)) {
mrb_raisef(mrb, E_TYPE_ERROR, "can't dup %S", obj);
}
if (mrb_type(obj) == MRB_TT_SCLASS) {
mrb_raise(mrb, E_TYPE_ERROR, "can't dup singleton class");
}
p = mrb_obj_alloc(mrb, mrb_type(obj), ... | 0 | [
"CWE-824"
] | mruby | b64ce17852b180dfeea81cf458660be41a78974d | 280,666,612,912,562,300,000,000,000,000,000,000,000 | 17 | Should not call `initialize_copy` for `TT_ICLASS`; fix #4027
Since `TT_ICLASS` is a internal object that should never be revealed
to Ruby world. |
static void tcp_recv_timestamp(struct msghdr *msg, const struct sock *sk,
struct scm_timestamping_internal *tss)
{
int new_tstamp = sock_flag(sk, SOCK_TSTAMP_NEW);
bool has_timestamping = false;
if (tss->ts[0].tv_sec || tss->ts[0].tv_nsec) {
if (sock_flag(sk, SOCK_RCVTSTAMP)) {
if (sock_flag(sk, SOCK... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 305,867,447,641,387,000,000,000,000,000,000,000,000 | 60 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static void shmem_init_inode(void *foo)
{
struct shmem_inode_info *info = foo;
inode_init_once(&info->vfs_inode);
} | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 139,108,607,425,336,160,000,000,000,000,000,000,000 | 5 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
mail_config_ews_autodiscover_clicked (GtkButton *button)
{
EMailConfigEwsAutodiscover *autodiscover;
autodiscover = E_MAIL_CONFIG_EWS_AUTODISCOVER (button);
mail_config_ews_autodiscover_run (autodiscover);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 26,287,340,257,078,204,000,000,000,000,000,000,000 | 8 | 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 int sctp_setsockopt_del_key(struct sock *sk,
char __user *optval,
int optlen)
{
struct sctp_authkeyid val;
struct sctp_association *asoc;
if (!sctp_auth_enable)
return -EACCES;
if (optlen != sizeof(struct sctp_authkeyid))
return -EINVAL;
if (copy_from_user(&val, optval, optlen))
return -EF... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 219,960,190,664,862,600,000,000,000,000,000,000,000 | 23 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
virtual void fill(GfxState *state) { } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 94,687,824,201,469,670,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
flow_wc_map(const struct flow *flow, struct flowmap *map)
{
/* Update this function whenever struct flow changes. */
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
flowmap_init(map);
if (flow_tnl_dst_is_set(&flow->tunnel)) {
FLOWMAP_SET__(map, tunnel, offsetof(struct flow_tnl, metadata));
if (!... | 0 | [
"CWE-400"
] | ovs | ad0d22f6435b43ecfc30c0e877d490d36721f200 | 316,162,088,747,125,580,000,000,000,000,000,000,000 | 80 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
tuplesort_getdatum(Tuplesortstate *state, bool forward,
Datum *val, bool *isNull)
{
MemoryContext oldcontext = MemoryContextSwitchTo(state->sortcontext);
SortTuple stup;
bool should_free;
if (!tuplesort_gettuple_common(state, forward, &stup, &should_free))
{
MemoryContextSwitchTo(oldcontext);
return f... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 231,500,173,606,753,330,000,000,000,000,000,000,000 | 31 | 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... |
NO_INLINE JsVar *__jspeBinaryExpression(JsVar *a, unsigned int lastPrecedence) {
/* This one's a bit strange. Basically all the ops have their own precedence, it's not
* like & and | share the same precedence. We don't want to recurse for each one,
* so instead we do this.
*
* We deal with an expression i... | 0 | [
"CWE-125",
"CWE-674"
] | Espruino | 51380baf17241728b6d48cdb84140b931e3e3cc5 | 96,844,565,399,945,130,000,000,000,000,000,000,000 | 92 | Fix stack overflow if interpreting a file full of '{' (fix #1448) |
static void Ins_ROUND( INS_ARG )
{
args[0] = CUR_Func_round( args[0],
CUR.metrics.compensations[CUR.opcode - 0x68] );
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 296,679,823,145,042,900,000,000,000,000,000,000,000 | 5 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static void write_unicode(bytearray_t * bplist, uint16_t * val, uint64_t size)
{
uint64_t i = 0;
uint16_t *buff = (uint16_t*)malloc(size << 1);
for (i = 0; i < size; i++)
buff[i] = be16toh(val[i]);
write_raw_data(bplist, BPLIST_UNICODE, (uint8_t*)buff, size);
free(buff);
} | 0 | [
"CWE-125"
] | libplist | 4765d9a60ca4248a8f89289271ac69cbffcc29bc | 244,280,948,701,618,600,000,000,000,000,000,000,000 | 9 | bplist: Fix possible out-of-bounds read in parse_array_node() with proper bounds checking |
ext4_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
void *buffer, size_t buffer_size)
{
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_entry *entry;
struct ext4_inode *raw_inode;
struct ext4_iloc iloc;
size_t size;
void *end;
int error;
if (!ext4_test_inode_state(inode... | 0 | [] | linux | 54dd0e0a1b255f115f8647fc6fb93273251b01b9 | 29,987,626,934,885,824,000,000,000,000,000,000,000 | 53 | ext4: add extra checks to ext4_xattr_block_get()
Add explicit checks in ext4_xattr_block_get() just in case the
e_value_offs and e_value_size fields in the the xattr block are
corrupted in memory after the buffer_verified bit is set on the xattr
block.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.or... |
TEST(QueryProjectionTest, PositionalProjectionWithIdInclusionPreservesId) {
auto proj = createFindProjection("{a: 1}", "{_id: 1, 'a.$': 1}");
ASSERT_FALSE(proj.isFieldRetainedExactly("b"));
ASSERT_FALSE(proj.isFieldRetainedExactly("a"));
ASSERT_FALSE(proj.isFieldRetainedExactly("a.b"));
ASSERT_TRUE(... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 305,205,155,971,596,630,000,000,000,000,000,000,000 | 7 | SERVER-53929 Add stricter parser checks around positional projection |
void CL_MotdPacket( netadr_t from ) {
#ifdef UPDATE_SERVER_NAME
char *challenge;
char *info;
// if not from our server, ignore it
if ( !NET_CompareAdr( from, cls.updateServer ) ) {
return;
}
info = Cmd_Argv(1);
// check challenge
challenge = Info_ValueForKey( info, "challenge" );
if ( strcmp( challenge, c... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 283,464,553,368,064,770,000,000,000,000,000,000,000 | 24 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
}
void csgp_box_del(GF_Box *a)
{
GF_CompactSampleGroupBox *p = (GF_CompactSampleGroupBox *)a;
if (p->patterns) {
u32 i;
for (i=0; i<p->pattern_count; i++) {
gf_free(p->patterns[i].sample_group_description_indices);
}
gf_free(p->patterns);
}
gf_free(p); | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 184,569,360,256,502,400,000,000,000,000,000,000,000 | 12 | fixed #1757 |
*/
static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
{
int err = pskb_trim(skb, len);
BUG_ON(err); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 44,689,608,907,730,290,000,000,000,000,000,000,000 | 5 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
apr_status_t h2_beam_send(h2_bucket_beam *beam,
apr_bucket_brigade *sender_bb,
apr_read_type_e block)
{
apr_bucket *b;
apr_status_t rv = APR_SUCCESS;
apr_size_t space_left = 0;
h2_beam_lock bl;
/* Called from the sender thread to add buckets to ... | 0 | [
"CWE-400"
] | mod_h2 | 83a2e3866918ce6567a683eb4c660688d047ee81 | 307,657,270,162,987,260,000,000,000,000,000,000,000 | 42 | * fixes a race condition where aborting streams triggers an unnecessary timeout. |
QPDF_Stream::getOffset() const
{
return this->offset;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 338,087,109,933,442,700,000,000,000,000,000,000,000 | 4 | 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 ... |
int Exiv2::http(Exiv2::Dictionary& request, Exiv2::Dictionary& response, std::string& errors)
{
if (!request.count("verb"))
request["verb"] = "GET";
if (!request.count("header"))
request["header"] = "";
if (!request.count("version"))
request["version"] = "1.0";
if (!request.count... | 1 | [
"CWE-476"
] | exiv2 | ccde30afa8ca787a3fe17388a15977f107a53b72 | 223,751,826,977,576,370,000,000,000,000,000,000,000 | 220 | Avoid null pointer exception due to NULL return value from strchr.
This fixes #793.
(cherry picked from commit ae20c30805b330275b2aa0303a42e1f2bbd53661) |
ulonglong mysql_bin_log_file_pos(void)
{
return (ulonglong) mysql_bin_log.get_log_file()->pos_in_file;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 73,858,011,523,423,495,000,000,000,000,000,000,000 | 4 | 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 Sdb *get_sdb (RBinObject *o) {
if (!o || !o->bin_obj) {
return NULL;
}
struct r_bin_dex_obj_t *bin = (struct r_bin_dex_obj_t *) o->bin_obj;
if (bin->kv) {
return bin->kv;
}
return NULL;
} | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 13,799,815,294,977,186,000,000,000,000,000,000,000 | 10 | fix #6857 |
inline double grand() {
cimg::mutex(4);
const double res = cimg::grand(&cimg::rng());
cimg::mutex(4,0);
return res; | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 264,227,674,581,475,240,000,000,000,000,000,000,000 | 6 | . |
static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request,
int validx, int *value_ret)
{
struct snd_usb_audio *chip = cval->head.mixer->chip;
unsigned char buf[4 + 3 * sizeof(__u32)]; /* enough space for one range */
unsigned char *val;
int idx = 0, ret, size;
__u8 bRequest;
if (request ==... | 0 | [
"CWE-416",
"CWE-787"
] | linux | 124751d5e63c823092060074bd0abaae61aaa9c4 | 69,592,166,966,471,270,000,000,000,000,000,000,000 | 60 | ALSA: usb-audio: Kill stray URB at exiting
USB-audio driver may leave a stray URB for the mixer interrupt when it
exits by some error during probe. This leads to a use-after-free
error as spotted by syzkaller like:
==================================================================
BUG: KASAN: use-after-free in sn... |
* crypto support
*/
static inline bool f2fs_encrypted_file(struct inode *inode)
{ | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 136,496,884,155,566,840,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
gchar* tcp_follow_address_filter(address* src_addr, address* dst_addr, int src_port, int dst_port)
{
const gchar *ip_version = src_addr->type == AT_IPv6 ? "v6" : "";
gchar src_addr_str[WS_INET6_ADDRSTRLEN];
gchar dst_addr_str[WS_INET6_ADDRSTRLEN];
address_to_str_buf(src_addr, src_addr_... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 218,276,198,000,795,080,000,000,000,000,000,000,000 | 20 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
static void test_fetch_null()
{
MYSQL_STMT *stmt;
int rc;
int i, nData;
MYSQL_BIND my_bind[11];
ulong length[11];
my_bool is_null[11];
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_fetch_null");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_fetch_null");
myquery(rc);
... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 104,468,775,082,178,350,000,000,000,000,000,000,000 | 76 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optval,
int optlen)
{
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc = NULL;
struct sctp_setpeerprim prim;
struct sctp_chunk *chunk;
int err;
sp = sctp_sk(sk);
ep = sp->ep;
if (!sctp_addip_e... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 45,829,189,889,840,790,000,000,000,000,000,000,000 | 50 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
file_tree_checksum::file_tree_checksum(const config& cfg) :
nfiles (static_cast<size_t>(cfg["nfiles"].to_double())),
sum_size(static_cast<size_t>(cfg["size"].to_double())),
modified(static_cast<time_t>(cfg["modified"].to_double()))
{
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 160,985,991,942,081,910,000,000,000,000,000,000,000 | 6 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
process_add_smartcard_key(SocketEntry *e)
{
char *provider = NULL, *pin = NULL, canonical_provider[PATH_MAX];
char **comments = NULL;
int r, i, count = 0, success = 0, confirm = 0;
u_int seconds = 0;
time_t death = 0;
struct sshkey **keys = NULL, *k;
Identity *id;
debug2_f("entering");
if ((r = sshbuf_get_cst... | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 286,117,574,973,520,830,000,000,000,000,000,000,000 | 66 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
static void suffixedexp (LexState *ls, expdesc *v) {
/* suffixedexp ->
primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */
FuncState *fs = ls->fs;
int line = ls->linenumber;
primaryexp(ls, v);
for (;;) {
switch (ls->t.token) {
case '.': { /* fieldsel */
fieldsel(l... | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 63,710,294,844,477,950,000,000,000,000,000,000,000 | 36 | Bug: Lua can generate wrong code when _ENV is <const> |
static sector_t get_sdist(sector_t last_pos, struct request *rq)
{
if (last_pos)
return abs(blk_rq_pos(rq) - last_pos);
return 0; | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 278,643,930,233,931,080,000,000,000,000,000,000,000 | 7 | 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... |
static xml_encoding *xml_get_encoding(const XML_Char *name)
{
xml_encoding *enc = &xml_encodings[0];
while (enc && enc->name) {
if (strcasecmp((char *)name, (char *)enc->name) == 0) {
return enc;
}
enc++;
}
return NULL;
} | 0 | [
"CWE-190"
] | php-src | 57b997ebf99e0eb9a073e0dafd2ab100bd4a112d | 294,163,760,132,004,070,000,000,000,000,000,000,000 | 12 | Fix bug #71637: Multiple Heap Overflow due to integer overflows |
int main(int argc, char **argv)
{
MYSQL mysql;
option_string *eptr;
MY_INIT(argv[0]);
if (load_defaults("my",load_default_groups,&argc,&argv))
{
my_end(0);
exit(1);
}
defaults_argv=argv;
if (get_options(&argc,&argv))
{
free_defaults(defaults_argv);
my_end(0);
exit(1);
}
/* S... | 1 | [
"CWE-319"
] | mysql-server | 060b1eadf4913f7066484ea34ec62feead1bca44 | 119,829,951,422,918,900,000,000,000,000,000,000,000 | 133 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99) |
static long vnc_client_write_plain(VncState *vs)
{
long ret;
#ifdef CONFIG_VNC_SASL
VNC_DEBUG("Write Plain: Pending output %p size %zd offset %zd. Wait SSF %d\n",
vs->output.buffer, vs->output.capacity, vs->output.offset,
vs->sasl.waitWriteSSF);
if (vs->sasl.conn &&
vs-... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 105,326,608,314,069,090,000,000,000,000,000,000,000 | 29 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
static int avrcp_controller_probe(struct btd_service *service)
{
struct btd_device *dev = btd_service_get_device(service);
DBG("path %s", device_get_path(dev));
return control_init_remote(service);
} | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 262,278,253,880,786,330,000,000,000,000,000,000,000 | 8 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
void state_prefix_putc (char c, STATE *s)
{
if (s->flags & M_PENDINGPREFIX)
{
state_reset_prefix (s);
if (s->prefix)
state_puts (s->prefix, s);
}
state_putc (c, s);
if (c == '\n')
state_set_prefix (s);
} | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 298,596,163,994,984,550,000,000,000,000,000,000,000 | 14 | use a 64-bit random value in temporary filenames.
closes #3158 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.