func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
GF_Box *afra_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_AdobeFragRandomAccessBox, GF_ISOM_BOX_TYPE_AFRA);
tmp->local_access_entries = gf_list_new();
tmp->global_access_entries = gf_list_new();
return (GF_Box *)tmp;
} | 0 | [
"CWE-125"
] | gpac | 093283e727f396130651280609e687cd4778e0d1 | 190,550,743,020,903,800,000,000,000,000,000,000,000 | 7 | fixed #1564 |
RList* MACH0_(mach_fields)(RBinFile *arch) {
struct MACH0_(mach_header) *mh = MACH0_(get_hdr_from_bytes)(arch->buf);
if (!mh) {
return NULL;
}
RList *ret = r_list_new ();
if (!ret) {
return NULL;
}
ret->free = free;
ut64 addr = 0;
#define ROW(nam,siz,val,fmt) \
r_list_append (ret, r_bin_field_new (addr, a... | 0 | [
"CWE-416"
] | radare2 | d1e8ac62c6d978d4662f69116e30230d43033c92 | 275,135,355,887,533,750,000,000,000,000,000,000,000 | 24 | Fix null deref and uaf in mach0 parser |
static void finish(AvahiSAddressResolver *r, AvahiResolverEvent event) {
assert(r);
if (r->time_event) {
avahi_time_event_free(r->time_event);
r->time_event = NULL;
}
switch (event) {
case AVAHI_RESOLVER_FAILURE:
r->callback(r, r->interface, r->protocol, event, &r->... | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 253,345,798,625,495,500,000,000,000,000,000,000,000 | 19 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
struct proc_dir_entry *proc_mkdir(const char *name,
struct proc_dir_entry *parent)
{
return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent);
} | 0 | [] | linux-2.6 | 8b90db0df7187a01fb7177f1f812123138f562cf | 12,886,778,064,717,346,000,000,000,000,000,000,000 | 5 | Insanity avoidance in /proc
The old /proc interfaces were never updated to use loff_t, and are just
generally broken. Now, we should be using the seq_file interface for
all of the proc files, but converting the legacy functions is more work
than most people care for and has little upside..
But at least we can make t... |
void InstanceKlass::remove_dependent_nmethod(nmethod* nm) {
dependencies().remove_dependent_nmethod(nm);
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 156,105,652,109,957,670,000,000,000,000,000,000,000 | 3 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
_finish_connecting(struct qb_ipc_one_way *one_way)
{
struct sockaddr_un remote_address;
int res;
int error;
int retry = 0;
set_sock_addr(&remote_address, one_way->u.us.sock_name);
/* this retry loop is here to help connecting when trying to send
* an event right after connection setup.
*/
do {
errno = 0;... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 293,969,303,125,672,860,000,000,000,000,000,000,000 | 36 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
poppler_document_set_author (PopplerDocument *document, const gchar *author)
{
g_return_if_fail (POPPLER_IS_DOCUMENT (document));
GooString *goo_author;
if (!author) {
goo_author = nullptr;
} else {
goo_author = _poppler_goo_string_from_utf8(author);
if (!goo_author)
return;
}
document->d... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 126,658,653,528,265,840,000,000,000,000,000,000,000 | 14 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
/* Network device is going away, flush any packets still pending */
static void flush_backlog(struct work_struct *work)
{
struct sk_buff *skb, *tmp;
struct softnet_data *sd;
local_bh_disable();
sd = this_cpu_ptr(&softnet_data);
local_irq_disable();
rps_lock(sd);
skb_queue_walk_safe(&sd->input_pkt_queue, skb, t... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 17,266,194,690,221,795,000,000,000,000,000,000,000 | 29 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
static int tcp_v6_send_synack(const struct sock *sk, struct dst_entry *dst,
struct flowi *fl,
struct request_sock *req,
struct tcp_fastopen_cookie *foc,
bool attach_req)
{
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &f... | 1 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 187,139,805,132,179,800,000,000,000,000,000,000,000 | 34 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
MagickExport char *XGetResourceInstance(XrmDatabase database,
const char *client_name,const char *keyword,const char *resource_default)
{
char
*resource_type,
resource_name[MagickPathExtent];
Status
status;
XrmValue
resource_value;
if (database == (XrmDatabase) NULL)
return((char *) res... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 75,601,548,461,200,580,000,000,000,000,000,000,000 | 25 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static PyObject *changePassword(PyObject *self, PyObject *args)
{
const char *newpswd = NULL;
const char *oldpswd = NULL;
const char *user = NULL;
int result = 0;
if (!PyArg_ParseTuple(args, "sss", &user, &oldpswd, &newpswd))
return NULL;
result = change_user_krb5pwd(user, oldpswd, new... | 0 | [
"CWE-287"
] | pykerberos | 02d13860b25fab58e739f0e000bed0067b7c6f9c | 262,240,085,809,739,900,000,000,000,000,000,000,000 | 17 | adding KDC verification support (enabled by default) |
ConnectionImpl::Http2Callbacks::Http2Callbacks() {
nghttp2_session_callbacks_new(&callbacks_);
nghttp2_session_callbacks_set_send_callback(
callbacks_,
[](nghttp2_session*, const uint8_t* data, size_t length, int, void* user_data) -> ssize_t {
return static_cast<ConnectionImpl*>(user_data)->onSe... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 316,919,288,425,062,830,000,000,000,000,000,000,000 | 104 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
DEFINE_TEST(test_read_format_rar5_multiarchive_solid_extr_all)
{
const char* reffiles[] = {
"test_read_format_rar5_multiarchive_solid.part01.rar",
"test_read_format_rar5_multiarchive_solid.part02.rar",
"test_read_format_rar5_multiarchive_solid.part03.rar",
"test_read_format_rar5_multiarchive_solid.part04.rar",... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 75,287,379,242,713,535,000,000,000,000,000,000,000 | 50 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
bool mlx5e_tc_tun_device_to_offload(struct mlx5e_priv *priv,
struct net_device *netdev)
{
struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(netdev);
if (tunnel && tunnel->can_offload(priv))
return true;
else
return false;
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 7,788,292,592,433,734,000,000,000,000,000,000,000 | 10 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
PackLinuxElf32::elf_unsigned_dynamic(unsigned int key) const
{
Elf32_Dyn const *dynp= dynseg;
if (dynp)
for (; Elf32_Dyn::DT_NULL!=dynp->d_tag; ++dynp) if (get_te32(&dynp->d_tag)==key) {
return get_te32(&dynp->d_val);
}
return 0;
} | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 81,295,617,308,117,320,000,000,000,000,000,000,000 | 9 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
void DL_Dxf::writeCircle(DL_WriterA& dw,
const DL_CircleData& data,
const DL_Attributes& attrib) {
dw.entity("CIRCLE");
if (version==DL_VERSION_2000) {
dw.dxfString(100, "AcDbEntity");
}
dw.entityAttributes(attrib);
if (version==DL_VERSION_20... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 244,975,557,084,692,970,000,000,000,000,000,000,000 | 14 | check vertexIndex which might be -1 for broken DXF |
static u32 str2ulong_key (unsigned char *str)
{
u32 c = str2ulong(str);
c &= 0x80000000;
if (c == 0) return 0x10;
else return 0;
} | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 301,215,621,442,808,260,000,000,000,000,000,000,000 | 7 | fixed #2159 |
int kvm_arch_hardware_enable(void *garbage)
{
struct kvm *kvm;
struct kvm_vcpu *vcpu;
int i;
kvm_shared_msr_cpu_online();
list_for_each_entry(kvm, &vm_list, vm_list)
kvm_for_each_vcpu(i, vcpu, kvm)
if (vcpu->cpu == smp_processor_id())
kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
return kvm_x86_ops->har... | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 267,929,129,435,710,560,000,000,000,000,000,000,000 | 13 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
int jbd2_journal_force_commit(journal_t *journal)
{
handle_t *handle;
int ret;
handle = jbd2_journal_start(journal, 1);
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
} else {
handle->h_sync = 1;
ret = jbd2_journal_stop(handle);
}
return ret;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 15291164b22a357cb211b618adfef4fa82fc0de3 | 209,009,329,601,935,150,000,000,000,000,000,000,000 | 14 | jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer
journal_unmap_buffer()'s zap_buffer: code clears a lot of buffer head
state ala discard_buffer(), but does not touch _Delay or _Unwritten as
discard_buffer() does.
This can be problematic in some areas of the ext4 code which assume
that if they have found a ... |
TEST_F(QueryPlannerTest, OrOfAnd2) {
addIndex(BSON("a" << 1));
runQuery(fromjson("{$or: [{a:{$gt:2,$lt:10}}, {a:{$gt:0,$lt:15}}, {a:{$gt:20}}]}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: null, node: {or: {nodes: ["
... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 282,003,058,567,225,020,000,000,000,000,000,000,000 | 13 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static void io_flush_apoll_cache(struct io_ring_ctx *ctx)
{
struct async_poll *apoll;
while (!list_empty(&ctx->apoll_cache)) {
apoll = list_first_entry(&ctx->apoll_cache, struct async_poll,
poll.wait.entry);
list_del(&apoll->poll.wait.entry);
kfree(apoll);
} | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 118,932,531,015,660,500,000,000,000,000,000,000,000 | 11 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
void totl_box_del(GF_Box *s)
{
gf_free((GF_TRPYBox *)s);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 137,364,855,308,962,700,000,000,000,000,000,000,000 | 4 | fixed #1587 |
void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input,
typename TTypes<T, 3>::ConstTensor filter,
typename TTypes<T, 4>::ConstTensor out_backprop,
int stride_rows, int stride_cols, int rate_rows,
int rate_cols, int pad_top,... | 1 | [
"CWE-787"
] | tensorflow | 3f6fe4dfef6f57e768260b48166c27d148f3015f | 23,434,770,567,353,236,000,000,000,000,000,000,000 | 57 | Add missing validations in dillation ops.
PiperOrigin-RevId: 372037158
Change-Id: I4ee304c84a02550c030288a6534000b934fc1599 |
snd_seq_oss_delete_client(void)
{
if (system_client >= 0)
snd_seq_delete_kernel_client(system_client);
snd_seq_oss_midi_clear_all();
return 0;
} | 0 | [
"CWE-415"
] | linux-2.6 | 27f7ad53829f79e799a253285318bff79ece15bd | 172,729,720,887,711,870,000,000,000,000,000,000,000 | 9 | ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()
The error handling in snd_seq_oss_open() has several bad codes that
do dereferecing released pointers and double-free of kmalloc'ed data.
The object dp is release in free_devinfo() that is called via
private_free callback. The rest shouldn't touch th... |
int64 DenseTensorColumn<int64>::Feature(int64 batch, int64 n,
bool strong_hash) const {
if (DT_STRING == tensor_.dtype())
return Fingerprint64(tensor_.matrix<tstring>()(batch, n));
return tensor_.matrix<int64>()(batch, n);
} | 0 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 57,896,095,080,482,710,000,000,000,000,000,000,000 | 6 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
RBinSection *getsection(RBin *a, const char *sn) {
RListIter *iter;
RBinSection *section = NULL;
RBinFile *binfile = a ? a->cur: NULL;
RBinObject *o = binfile ? binfile->o : NULL;
if ( o && o->sections) {
r_list_foreach (o->sections, iter, section) {
if (strstr (section->name, sn)) {
return section;
}... | 0 | [
"CWE-119",
"CWE-125"
] | radare2 | d37d2b858ac47f2f108034be0bcecadaddfbc8b3 | 115,680,100,609,794,390,000,000,000,000,000,000,000 | 15 | Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478) |
MagickExport MagickBooleanType SetImageBackgroundColor(Image *image,
ExceptionInfo *exception)
{
CacheView
*image_view;
MagickBooleanType
status;
PixelInfo
background;
ssize_t
y;
assert(image != (Image *) NULL);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetM... | 0 | [
"CWE-665"
] | ImageMagick | ee3dae8624e69261760754442827aea4d0254a6f | 35,679,829,011,516,330,000,000,000,000,000,000,000 | 57 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name,
Bool foldCase, Bool *isempty, int *pdelim)
{
Lexer* lexer = doc->lexer;
int len = 0, start;
Bool seen_gt = no;
Bool munge = yes;
uint c, lastc, delim, quotewarning;
tmbstr value;
delim = (tmbchar) 0;
*pd... | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 139,330,410,810,213,370,000,000,000,000,000,000,000 | 290 | Issue #217 - avoid len going negative, ever... |
int PE_(r_bin_pe_is_stripped_local_syms)(struct PE_(r_bin_pe_obj_t)* bin) {
if (!bin || !bin->nt_headers) {
return false;
}
return HASCHR (PE_IMAGE_FILE_LOCAL_SYMS_STRIPPED);
} | 0 | [
"CWE-125"
] | radare2 | 4e1cf0d3e6f6fe2552a269def0af1cd2403e266c | 36,239,372,607,912,370,000,000,000,000,000,000,000 | 6 | Fix crash in pe |
static bool sas_ata_qc_fill_rtf(struct ata_queued_cmd *qc)
{
struct domain_device *dev = qc->ap->private_data;
ata_tf_from_fis(dev->sata_dev.fis, &qc->result_tf);
return true;
} | 0 | [
"CWE-284"
] | linux | 0558f33c06bb910e2879e355192227a8e8f0219d | 165,120,161,799,539,880,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
... |
static inline int extwriter_counter_read(struct btrfs_transaction *trans)
{
return atomic_read(&trans->num_extwriters);
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 82,810,849,478,464,340,000,000,000,000,000,000,000 | 4 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
void dtls1_free(SSL *s)
{
ssl3_free(s);
dtls1_clear_queues(s);
pqueue_free(s->d1->unprocessed_rcds.q);
pqueue_free(s->d1->processed_rcds.q);
pqueue_free(s->d1->buffered_messages);
pqueue_free(s->d1->sent_messages);
pqueue_free(s->d1->buffered_app_data.q);
OPENSSL_free(s->d1);
} | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 245,027,487,432,681,470,000,000,000,000,000,000,000 | 14 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
Pl_DCT::~Pl_DCT()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 5,346,408,749,918,910,000,000,000,000,000,000,000 | 3 | 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 ... |
static double mp_self_div(_cimg_math_parser& mp) {
return _mp_arg(1)/=_mp_arg(2);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 140,109,629,307,040,000,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int RGWPutMetadataAccount::verify_permission()
{
if (s->auth.identity->is_anonymous()) {
return -EACCES;
}
if (!verify_user_permission(s, RGW_PERM_WRITE)) {
return -EACCES;
}
/* Altering TempURL keys requires FULL_CONTROL. */
if (!temp_url_keys.empty() && s->perm_mask != RGW_PERM_FULL_CONTROL) {
... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 94,379,372,558,214,670,000,000,000,000,000,000,000 | 24 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static int llc_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
int rc = 0;
struct llc_sock *llc = llc_sk(sk);
if (likely(llc_backlog_type(skb) == LLC_PACKET)) {
if (likely(llc->state > 1)) /* not closed */
rc = llc_conn_rcv(sk, skb);
else
goto out_kfree_skb;
} else if (llc_backlog_type(skb) == LLC_EV... | 0 | [
"CWE-20",
"CWE-401"
] | linux | 8b74d439e1697110c5e5c600643e823eb1dd0762 | 9,158,042,069,219,808,000,000,000,000,000,000,000 | 26 | net/llc: avoid BUG_ON() in skb_orphan()
It seems nobody used LLC since linux-3.12.
Fortunately fuzzers like syzkaller still know how to run this code,
otherwise it would be no fun.
Setting skb->sk without skb->destructor leads to all kinds of
bugs, we now prefer to be very strict about it.
Ideally here we would use... |
copy_opt_map(OptMap* to, OptMap* from)
{
*to = *from;
} | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 59,687,434,911,780,340,000,000,000,000,000,000,000 | 4 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
xsmp_query_end_session (GsmClient *client,
guint flags,
GError **error)
{
gboolean allow_interact;
int save_type;
if (GSM_XSMP_CLIENT (client)->priv->conn == NULL) {
g_set_error (error,
GSM_... | 0 | [
"CWE-125",
"CWE-835"
] | gnome-session | b0dc999e0b45355314616321dbb6cb71e729fc9d | 235,750,594,758,028,300,000,000,000,000,000,000,000 | 27 | [gsm] Delay the creation of the GsmXSMPClient until it really exists
We used to create the GsmXSMPClient before the XSMP connection is really
accepted. This can lead to some issues, though. An example is:
https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting:
"What is happening is that a new client (probabl... |
static noinline void key_gc_unused_keys(struct list_head *keys)
{
while (!list_empty(keys)) {
struct key *key =
list_entry(keys->next, struct key, graveyard_link);
list_del(&key->graveyard_link);
kdebug("- %u", key->serial);
key_check(key);
/* Throw away the key data if the key is instantiated */
if (... | 1 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 44,955,383,578,345,060,000,000,000,000,000,000,000 | 38 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
{
if (!list_empty_careful(&vcpu->async_pf.done))
return true;
if (kvm_apic_has_events(vcpu))
return true;
if (vcpu->arch.pv.pv_unhalted)
return true;
if (vcpu->arch.exception.pending)
return true;
if (kvm_test_request(KVM_REQ_NMI, vcpu) ||
... | 0 | [
"CWE-476"
] | linux | fee060cd52d69c114b62d1a2948ea9648b5131f9 | 26,874,099,957,941,140,000,000,000,000,000,000,000 | 45 | KVM: x86: avoid calling x86 emulator without a decoded instruction
Whenever x86_decode_emulated_instruction() detects a breakpoint, it
returns the value that kvm_vcpu_check_breakpoint() writes into its
pass-by-reference second argument. Unfortunately this is completely
bogus because the expected outcome of x86_decode... |
unsigned long iov_pages(const struct iovec *iov, int offset,
unsigned long nr_segs)
{
unsigned long seg, base;
int pages = 0, len, size;
while (nr_segs && (offset >= iov->iov_len)) {
offset -= iov->iov_len;
++iov;
--nr_segs;
}
for (seg = 0; seg < nr_segs; seg++) {
base = (unsigned long)iov[seg].iov_ba... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 14,652,465,727,185,444,000,000,000,000,000,000,000 | 22 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static int isLimitTerm(WhereTerm *pTerm){
assert( pTerm->eOperator==WO_AUX || pTerm->eMatchOp==0 );
return pTerm->eMatchOp>=SQLITE_INDEX_CONSTRAINT_LIMIT
&& pTerm->eMatchOp<=SQLITE_INDEX_CONSTRAINT_OFFSET;
} | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 55,504,251,476,057,490,000,000,000,000,000,000,000 | 5 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
flatpak_dir_ensure_repo (FlatpakDir *self,
GCancellable *cancellable,
GError **error)
{
return _flatpak_dir_ensure_repo (self, FALSE, cancellable, error);
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 38,948,317,312,014,190,000,000,000,000,000,000,000 | 6 | 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 void node_proto_guess_walker(const void *node, ndpi_VISIT which, int depth, void *user_data) {
struct ndpi_flow_info *flow = *(struct ndpi_flow_info **) node;
u_int16_t thread_id = *((u_int16_t *) user_data), proto;
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node mult... | 0 | [
"CWE-125"
] | nDPI | b7e666e465f138ae48ab81976726e67deed12701 | 3,396,149,929,890,544,600,000,000,000,000,000,000 | 21 | Added fix to avoid potential heap buffer overflow in H.323 dissector
Modified HTTP report information to make it closer to the HTTP field names |
bool empty() const { return headers_.empty(); } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 71,655,660,737,309,040,000,000,000,000,000,000,000 | 1 | 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... |
int AVI_set_audio_position_index(avi_t *AVI, int indexpos)
{
if(AVI->mode==AVI_MODE_WRITE) {
AVI_errno = AVI_ERR_NOT_PERM;
return -1;
}
if(!AVI->track[AVI->aptr].audio_index) {
AVI_errno = AVI_ERR_NO_IDX;
return -1;
}
if(indexpos > AVI->track[AVI->aptr].audio_chunks) {
AVI_errno = AVI_ERR_NO_... | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 164,096,169,352,216,730,000,000,000,000,000,000,000 | 20 | fixed #2159 |
static int ocsp_resp_cb(SSL *s, void *arg)
{
const unsigned char *p;
int len;
OCSP_RESPONSE *rsp;
len = SSL_get_tlsext_status_ocsp_resp(s, &p);
BIO_puts(arg, "OCSP response: ");
if (!p)
{
BIO_puts(arg, "no response sent\n");
return 1;
}
rsp = d2i_OCSP_RESPONSE(NULL, &p, len);
if (!rsp)
{
BIO_puts(a... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 41,300,451,012,181,916,000,000,000,000,000,000,000 | 25 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
ldns_pkt_tsig_sign_next(ldns_pkt *pkt, const char *key_name, const char *key_data,
uint16_t fudge, const char *algorithm_name, const ldns_rdf *query_mac, int tsig_timers_only)
{
ldns_rr *tsig_rr;
ldns_rdf *key_name_rdf = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, key_name);
ldns_rdf *fudge_rdf = NULL;
ldns_rdf *ori... | 0 | [] | ldns | f9073d9fc313b19f51a5aa160584f2bdccda637a | 221,802,214,952,322,460,000,000,000,000,000,000,000 | 111 | * Detect fixed time memory compare for openssl 0.9.8. |
static ssize_t auto_remove_on_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct device_link *link = to_devlink(dev);
char *str;
if (link->flags & DL_FLAG_AUTOREMOVE_SUPPLIER)
str = "supplier unbind";
else if (link->flags & DL_FLAG_AUTOREMOVE_CONSUMER)
str = "consumer unbind";
... | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 261,998,014,535,033,470,000,000,000,000,000,000,000 | 15 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static int vsock_stream_setsockopt(struct socket *sock,
int level,
int optname,
sockptr_t optval,
unsigned int optlen)
{
int err;
struct sock *sk;
struct vsock_sock *vsk;
const struct vsock_transport *transport;
u64 val;
if (level != AF_VSOCK)
return -ENOPROTOOPT;
#define COPY_IN(_... | 0 | [
"CWE-667"
] | linux | c518adafa39f37858697ac9309c6cf1805581446 | 142,403,971,574,244,660,000,000,000,000,000,000,000 | 81 | vsock: fix the race conditions in multi-transport support
There are multiple similar bugs implicitly introduced by the
commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and
commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading").
The bug pattern:
[1] vsock_sock.transport pointer is copie... |
void TCDeleteDeviceObject (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension)
{
UNICODE_STRING Win32NameString;
NTSTATUS ntStatus;
Dump ("TCDeleteDeviceObject BEGIN\n");
if (Extension->bRootDevice)
{
RtlInitUnicodeString (&Win32NameString, (LPWSTR) DOS_ROOT_PREFIX);
ntStatus = IoDeleteSymbolicLink (&Win32Nam... | 0 | [
"CWE-119",
"CWE-787"
] | VeraCrypt | f30f9339c9a0b9bbcc6f5ad38804af39db1f479e | 93,215,562,012,958,180,000,000,000,000,000,000,000 | 60 | Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison. |
static DWORD WINAPI drive_thread_func(LPVOID arg)
{
IRP* irp;
wMessage message;
DRIVE_DEVICE* drive = (DRIVE_DEVICE*)arg;
UINT error = CHANNEL_RC_OK;
if (!drive)
{
error = ERROR_INVALID_PARAMETER;
goto fail;
}
while (1)
{
if (!MessageQueue_Wait(drive->IrpQueue))
{
WLog_ERR(TAG, "MessageQueue_Wait ... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 97,055,734,910,622,660,000,000,000,000,000,000,000 | 52 | Fixed oob read in irp_write and similar |
select_opt_map_info(OptMapInfo* now, OptMapInfo* alt)
{
static int z = 1<<15; /* 32768: something big value */
int v1, v2;
if (alt->value == 0) return ;
if (now->value == 0) {
copy_opt_map_info(now, alt);
return ;
}
v1 = z / now->value;
v2 = z / alt->value;
if (comp_distance_value(&now->mmd, ... | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 198,650,847,980,015,230,000,000,000,000,000,000,000 | 17 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
nautilus_get_pixmap_directory (void)
{
return g_strdup (DATADIR "/pixmaps/nautilus");
} | 0 | [] | nautilus | a0f7bb5f2e9af8ecb463b13da834fa8559b0a481 | 306,480,628,665,677,650,000,000,000,000,000,000,000 | 4 | Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop
2009-02-25 Alexander Larsson <alexl@redhat.com>
* src/nautilus-application.c:
Use $XDG_DATA_HOME/.converted-launchers as marker for
one-time desktop file trust operation.
* libnautilus-private/nautilus-file-utilities.[ch]:
Ad... |
static const ut8 *parse_dex_class_method(RBinFile *binfile, RBinDexObj *bin,
RBinDexClass *c, RBinClass *cls,
const ut8 *p, const ut8 *p_end,
int *sym_count, ut64 DM, int *methods,
bool is_direct) {
struct r_bin_t *rbin = binfile->rbin;
ut8 ff2[16] = {0};
ut8 ff3[8] = {0};
int i;
ut64 o... | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 12,202,601,728,137,343,000,000,000,000,000,000,000 | 287 | fix #6857 |
struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u16 *tim_offset, u16 *tim_length)
{
struct ieee80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info;
struct ieee80211_sub_if_data *sdata = NULL;
enum ieee80211_band b... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 243,019,057,938,924,680,000,000,000,000,000,000,000 | 143 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
_make_etype_info_entry(krb5_context context,
krb5_principal client_princ, krb5_key_data *client_key,
krb5_enctype etype, krb5_etype_info_entry **entry_out,
int etype_info2)
{
krb5_error_code retval;
krb5_int16 salttype;
krb5_data *salt = N... | 0 | [
"CWE-617"
] | krb5 | 94e5eda5bb94d1d44733a49c3d9b6d1e42c74def | 108,459,755,351,450,540,000,000,000,000,000,000,000 | 52 | Remove incorrect KDC assertion
The assertion in return_enc_padata() is reachable because
kdc_make_s4u2self_rep() may have previously added encrypted padata.
It is no longer necessary because the code uses add_pa_data_element()
instead of allocating a new list.
CVE-2018-20217:
In MIT krb5 1.8 or later, an authenticat... |
hb_buffer_add_glyph( HB_Buffer buffer,
HB_UInt glyph_index,
HB_UInt properties,
HB_UInt cluster )
{
HB_Error error;
HB_GlyphItem glyph;
error = hb_buffer_ensure( buffer, buffer->in_length + 1 );
if ( error )
return error;
glyph = &buffer->in_string[buffer->in_length];
g... | 1 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 75,903,311,502,410,780,000,000,000,000,000,000,000 | 24 | [HB] Remove all references to the old code! |
static __u64 count_kernel_ip(struct perf_callchain_entry *trace)
{
__u64 nr_kernel = 0;
while (nr_kernel < trace->nr) {
if (trace->ip[nr_kernel] == PERF_CONTEXT_USER)
break;
nr_kernel++;
}
return nr_kernel;
} | 0 | [
"CWE-190",
"CWE-787"
] | linux | 30e29a9a2bc6a4888335a6ede968b75cd329657a | 194,018,477,496,354,780,000,000,000,000,000,000,000 | 11 | bpf: Fix integer overflow in prealloc_elems_and_freelist()
In prealloc_elems_and_freelist(), the multiplication to calculate the
size passed to bpf_map_area_alloc() could lead to an integer overflow.
As a result, out-of-bounds write could occur in pcpu_freelist_populate()
as reported by KASAN:
[...]
[ 16.968613] BU... |
struct Sass_Options* ADDCALL sass_data_context_get_options(struct Sass_Data_Context* ctx) { return ctx; } | 0 | [
"CWE-125"
] | libsass | 8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae | 83,924,598,385,083,000,000,000,000,000,000,000,000 | 1 | Optimize line_begin/end search in `handle_error`
There is no need to advance by UTF-8 code points when searching for an
ASCII character, because UTF-8 is a prefix-free encoding. |
int idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
{
int max = end > 0 ? end - 1 : INT_MAX; /* inclusive upper limit */
struct idr_layer *pa[MAX_IDR_LEVEL + 1];
int id;
might_sleep_if(gfp_mask & __GFP_WAIT);
/* sanity checks */
if (WARN_ON_ONCE(start < 0))
return -EINVAL;
if (unlik... | 0 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 102,676,206,801,281,250,000,000,000,000,000,000,000 | 24 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
const unsigned long len, const unsigned long pgoff,
const unsigned long flags)
{
struct vm_area_struct *vma, *prev;
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
struct vm_unmapped_area_info info;
/* requested... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 180,097,319,634,398,260,000,000,000,000,000,000,000 | 49 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
uint32_t op_mask() override { return RGW_OP_TYPE_READ; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 278,139,000,452,546,950,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
format_errmsg(
char * nfmt,
size_t lennfmt,
const char * fmt,
int errval
)
{
char errmsg[256];
char c;
char *n;
const char *f;
size_t len;
n = nfmt;
f = fmt;
while ((c = *f++) != '\0' && n < (nfmt + lennfmt - 1)) {
if (c != '%') {
*n++ = c;
continue;
}
if ((c = *f++) != 'm') {
*n++ = '%'... | 0 | [
"CWE-835"
] | ntp | bb928ef08eec020ef6008f3a140702ccc0536b8e | 75,245,972,240,687,000,000,000,000,000,000,000,000 | 38 | [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same |
static void iput_final(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
const struct super_operations *op = inode->i_sb->s_op;
int drop;
WARN_ON(inode->i_state & I_NEW);
if (op->drop_inode)
drop = op->drop_inode(inode);
else
drop = generic_drop_inode(inode);
if (!drop && (sb->s_flags & SB_ACTI... | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 229,046,336,483,105,800,000,000,000,000,000,000,000 | 35 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
TEST_P(Http2CodecImplTest, ManyLargeRequestHeadersUnderPerHeaderLimit) {
max_request_headers_kb_ = 81;
initialize();
TestRequestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
std::string long_string = std::string(1024, 'q');
for (int i = 0; i < 80; i++) {
request_he... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 51,571,476,402,449,010,000,000,000,000,000,000,000 | 15 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
format_GOTO_TABLE(const struct ofpact_goto_table *a,
const struct ofpact_format_params *fp)
{
ds_put_format(fp->s, "%sgoto_table:%s", colors.param, colors.end);
ofputil_format_table(a->table_id, fp->table_map, fp->s);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 5,884,005,508,257,583,000,000,000,000,000,000,000 | 6 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
static void sc_asn1_print_octet_string(const u8 * buf, size_t buflen, size_t depth)
{
print_hex(buf, buflen, depth);
} | 0 | [
"CWE-119",
"CWE-787"
] | OpenSC | 412a6142c27a5973c61ba540e33cdc22d5608e68 | 119,746,279,389,697,330,000,000,000,000,000,000,000 | 4 | fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz |
static bool access_pmcr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
const struct sys_reg_desc *r)
{
u64 val;
if (!kvm_arm_pmu_v3_ready(vcpu))
return trap_raz_wi(vcpu, p, r);
if (pmu_access_el0_disabled(vcpu))
return false;
if (p->is_write) {
/* Only update writeable bits of PMCR */
val = vcpu_sys... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 9e3f7a29694049edd728e2400ab57ad7553e5aa9 | 185,046,504,641,697,670,000,000,000,000,000,000,000 | 27 | 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> |
const RPathCommand* Binary::rpath() const {
return command<RPathCommand>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 273,792,060,306,270,970,000,000,000,000,000,000,000 | 3 | Resolve #764 |
rb_str_set_len(VALUE str, long len)
{
STR_SET_LEN(str, len);
RSTRING_PTR(str)[len] = '\0';
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 304,101,420,755,704,730,000,000,000,000,000,000,000 | 5 | * 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 |
OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
char *host, char *path, char *port, int use_ssl,
STACK_OF(CONF_VALUE) *headers,
int req_timeout)
{
BIO *cbio = NULL;
SSL_CTX *ctx = NULL;
OCSP_RESPONSE *resp = NULL;
cbio = BIO_new_connect(host);
if (!cbio)
{
BIO_printf(err, "Error creatin... | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 46,782,309,958,378,920,000,000,000,000,000,000,000 | 47 | Backport OCSP fixes. |
void sctp_generate_proto_unreach_event(unsigned long data)
{
struct sctp_transport *transport = (struct sctp_transport *) data;
struct sctp_association *asoc = transport->asoc;
struct net *net = sock_net(asoc->base.sk);
bh_lock_sock(asoc->base.sk);
if (sock_owned_by_user(asoc->base.sk)) {
pr_debug("%s: sock is ... | 1 | [
"CWE-362"
] | linux | 635682a14427d241bab7bbdeebb48a7d7b91638e | 106,343,224,014,793,960,000,000,000,000,000,000,000 | 31 | sctp: Prevent soft lockup when sctp_accept() is called during a timeout event
A case can occur when sctp_accept() is called by the user during
a heartbeat timeout event after the 4-way handshake. Since
sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the
bh_sock_lock in sctp_generate_heartbeat_event() ... |
static void delete_unneeded_choice_fields(asn1_node p)
{
asn1_node p2;
while (p->right)
{
p2 = p->right;
asn1_delete_structure (&p2);
}
} | 0 | [] | libtasn1 | ff3b5c68cc32e30d19edbbc3a962b2266029f3cc | 35,810,242,877,564,203,000,000,000,000,000,000,000 | 10 | Corrected an off-by-one error.
The issue was discovered using the codenomicon TLS suite. |
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
struct reply_info* msgrep, int is_referral, time_t leeway, int pside,
struct regional* region, uint32_t flags)
{
struct reply_info* rep = NULL;
/* alloc, malloc properly (not in region, like msg is) */
rep = reply_info_copy(msgrep, env->all... | 1 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 277,662,063,010,673,930,000,000,000,000,000,000,000 | 56 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
Item *Item_int::neg(THD *thd)
{
/*
The following if should never be true with code generated by
our parser as LONGLONG_MIN values will be stored as decimal.
The code is here in case someone generates an int from inside
MariaDB
*/
if (unlikely(value == LONGLONG_MIN))
{
/* Precision for int no... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 115,611,728,084,984,020,000,000,000,000,000,000,000 | 22 | 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. |
static int strncmpcanon(const char *a, const char *b, int n)
{
Rune ra, rb;
int c;
while (n--) {
if (!*a) return -1;
if (!*b) return 1;
a += chartorune(&ra, a);
b += chartorune(&rb, b);
c = canon(ra) - canon(rb);
if (c)
return c;
}
return 0;
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 208,081,812,015,141,100,000,000,000,000,000,000,000 | 15 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
komeda_wb_connector_detect(struct drm_connector *connector, bool force)
{
return connector_status_connected;
} | 0 | [
"CWE-401"
] | linux | a0ecd6fdbf5d648123a7315c695fb6850d702835 | 96,557,815,321,870,550,000,000,000,000,000,000,000 | 4 | drm/komeda: prevent memory leak in komeda_wb_connector_add
In komeda_wb_connector_add if drm_writeback_connector_init fails the
allocated memory for kwb_conn should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Sig... |
void CMSEXPORT cmsDictFree(cmsHANDLE hDict)
{
_cmsDICT* dict = (_cmsDICT*) hDict;
cmsDICTentry *entry, *next;
_cmsAssert(dict != NULL);
// Walk the list freeing all nodes
entry = dict ->head;
while (entry != NULL) {
if (entry ->DisplayName != NULL) cmsMLUfree(entry ->DisplayName)... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 287,144,504,912,275,400,000,000,000,000,000,000,000 | 25 | Fixes from coverity check |
SYSCALL_DEFINE2(link, const char __user *, oldname, const char __user *, newname)
{
return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
} | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 169,839,351,032,574,000,000,000,000,000,000,000,000 | 4 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
static void edlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int pos = FVAnyCharSelected(fv), i, gid;
int not_pasteable = pos==-1 ||
(!CopyContainsSomething() &&
#ifndef _NO_LIBPNG
!GDrawSelectionHasType(fv->gw,sn_clipboard,"ima... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 311,893,097,153,531,500,000,000,000,000,000,000,000 | 83 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
PHP_METHOD(Phar, getStub)
{
size_t len;
char *buf;
php_stream *fp;
php_stream_filter *filter = NULL;
phar_entry_info *stub;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {
if (SUCCESS == zend_hash_fin... | 0 | [
"CWE-416"
] | php-src | b2cf3f064b8f5efef89bb084521b61318c71781b | 110,897,789,321,854,450,000,000,000,000,000,000,000 | 93 | Fixed bug #68901 (use after free) |
int strbuf_git_path_submodule(struct strbuf *buf, const char *path,
const char *fmt, ...)
{
int err;
va_list args;
va_start(args, fmt);
err = do_submodule_path(buf, path, fmt, args);
va_end(args);
return err;
} | 0 | [
"CWE-125"
] | git | 11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d | 226,559,796,702,814,140,000,000,000,000,000,000,000 | 11 | is_ntfs_dotgit: use a size_t for traversing string
We walk through the "name" string using an int, which can
wrap to a negative value and cause us to read random memory
before our array (e.g., by creating a tree with a name >2GB,
since "int" is still 32 bits even on most 64-bit platforms).
Worse, this is easy to trigg... |
dvi_document_file_exporter_end (EvFileExporter *exporter)
{
gchar *command_line;
gint exit_stat;
GError *err = NULL;
gboolean success;
DviDocument *dvi_document = DVI_DOCUMENT(exporter);
command_line = g_strdup_printf ("dvipdfm %s -o %s \"%s\"", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */
... | 1 | [
"CWE-78"
] | evince | 350404c76dc8601e2cdd2636490e2afc83d3090e | 50,052,591,889,648,540,000,000,000,000,000,000,000 | 31 | dvi: Mitigate command injection attacks by quoting filename
With commit 1fcca0b8041de0d6074d7e17fba174da36c65f99 came a DVI backend.
It exports to PDF via the dvipdfm tool.
It calls that tool with the filename of the currently loaded document.
If that filename is cleverly crafted, it can escape the currently
used manu... |
gst_matroska_demux_plugin_init (GstPlugin * plugin)
{
gst_riff_init ();
/* parser helper separate debug */
GST_DEBUG_CATEGORY_INIT (ebmlread_debug, "ebmlread",
0, "EBML stream helper class");
/* create an elementfactory for the matroska_demux element */
if (!gst_element_register (plugin, "matroskademu... | 0 | [] | gst-plugins-good | 9181191511f9c0be6a89c98b311f49d66bd46dc3 | 219,558,355,408,046,600,000,000,000,000,000,000,000 | 15 | matroskademux: Fix extraction of multichannel WavPack
The old code had a couple of issues that all lead to potential memory
safety bugs.
- Use a constant for the Wavpack4Header size instead of using sizeof.
It's written out into the data and not from the struct and who knows
what special alignment/padding r... |
static int gss_iakerbmechglue_init(void)
{
struct gss_mech_config mech_iakerb;
struct gss_config iakerb_mechanism = krb5_mechanism;
/* IAKERB mechanism mirrors krb5, but with different context SPIs */
iakerb_mechanism.gss_accept_sec_context = iakerb_gss_accept_sec_context;
iakerb_mechanism.gss_init... | 1 | [
"CWE-18"
] | krb5 | e04f0283516e80d2f93366e0d479d13c9b5c8c2a | 164,603,370,920,749,180,000,000,000,000,000,000,000 | 22 | Fix IAKERB context aliasing bugs [CVE-2015-2696]
The IAKERB mechanism currently replaces its context handle with the
krb5 mechanism handle upon establishment, under the assumption that
most GSS functions are only called after context establishment. This
assumption is incorrect, and can lead to aliasing violations for... |
static void scsi_disk_emulate_mode_select(SCSIDiskReq *r, uint8_t *inbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint8_t *p = inbuf;
int cmd = r->req.cmd.buf[0];
int len = r->req.cmd.xfer;
int hdr_len = (cmd == MODE_SELECT ? 4 : 8);
int bd_len;
int pass;
/* We ... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 302,510,213,520,632,250,000,000,000,000,000,000,000 | 62 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
bool check_unique_table(THD *thd, TABLE_LIST *table_list)
{
TABLE_LIST *duplicate;
DBUG_ENTER("check_unique_table");
if ((duplicate= unique_table(thd, table_list, table_list->next_global, 0)))
{
update_non_unique_table_error(table_list, "UPDATE", duplicate);
DBUG_RETURN(TRUE);
}
DBUG_RETURN(FALSE);
... | 0 | [
"CWE-617"
] | server | ecb6f9c894d3ebafeff1c6eb3b65cd248062296f | 152,888,654,642,428,530,000,000,000,000,000,000,000 | 11 | MDEV-28095 crash in multi-update and implicit grouping
disallow implicit grouping in multi-update.
explicit GROUP BY is not allowed by the grammar. |
static unsigned int ccp_empty_queue_buf(struct ccp_data *data)
{
return ccp_queue_buf(data, 1);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 128c66429247add5128c03dc1e144ca56f05a4e2 | 96,075,469,019,885,430,000,000,000,000,000,000,000 | 4 | crypto: ccp - Release all allocated memory if sha type is invalid
Release all allocated memory if sha type is invalid:
In ccp_run_sha_cmd, if the type of sha is invalid, the allocated
hmac_buf should be released.
v2: fix the goto.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Gary R Hook <gary... |
nm_utils_setpgid(gpointer unused G_GNUC_UNUSED)
{
pid_t pid;
pid = getpid();
setpgid(pid, pid);
} | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 226,037,518,078,830,860,000,000,000,000,000,000,000 | 7 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
{
struct security_mnt_opts opts;
int rc;
rc = selinux_get_mnt_opts(sb, &opts);
if (rc) {
/* before policy load we may get EINVAL, don't show anything */
if (rc == -EINVAL)
rc = 0;
return rc;
}
selinux_write_opts(m, &opts);
... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 164,048,076,051,745,920,000,000,000,000,000,000,000 | 19 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static inline funcid_t readFuncID(struct cli_bc *bc, unsigned char *p,
unsigned *off, unsigned len, char *ok)
{
funcid_t id = readNumber(p, off, len, ok)-1;
if (*ok && id >= bc->num_func) {
cli_errmsg("Called function out of range: %u >= %u\n", id, bc->num_func);
*ok = 0;
return ~0;
}
return id... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 226,433,691,141,749,400,000,000,000,000,000,000,000 | 11 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
{
X509 *issuer = NULL;
EVP_PKEY *ikey = NULL;
int ok = 0, chnum, cnum;
cnum = ctx->error_depth;
chnum = sk_X509_num(ctx->chain) - 1;
/* if we have an alternative CRL issuer cert use that */
if (ctx->current_issuer)
issuer = ctx... | 0 | [] | openssl | a3baa171053547488475709c7197592c66e427cf | 110,416,801,538,281,880,000,000,000,000,000,000,000 | 106 | Fix missing ok=0 with locally blacklisted CAs
Also in X509_verify_cert() avoid using "i" not only as a loop
counter, but also as a trust outcome and as an error ordinal.
Finally, make sure that all "goto end" jumps return an error, with
"end" renamed to "err" accordingly.
[ The 1.1.0 version of X509_verify_cert() is... |
static HashTable *php_var_serialize_collect_names(HashTable *src, uint32_t count, zend_bool incomplete) /* {{{ */ {
zval *val;
HashTable *ht;
zend_string *key, *name;
ALLOC_HASHTABLE(ht);
zend_hash_init(ht, count, NULL, NULL, 0);
ZEND_HASH_FOREACH_STR_KEY_VAL(src, key, val) {
if (incomplete && strcmp(ZSTR_VAL(... | 0 | [
"CWE-416"
] | php-src | b2af4e8868726a040234de113436c6e4f6372d17 | 202,942,955,850,984,080,000,000,000,000,000,000,000 | 28 | Complete the fix of bug #70172 for PHP 7 |
static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
{
char buf[STRING];
char errstr[STRING];
BUFFER err, token;
ciss_url_t url;
IMAP_LIST list;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
{
/* caller will handle response itself */
cmd_parse_list (idata, s);
return;
}
if (!op... | 0 | [
"CWE-20"
] | mutt | 9347b5c01dc52682cb6be11539d9b7ebceae4416 | 1,339,619,535,767,134,700,000,000,000,000,000,000 | 47 | Handle NO response without message properly |
static void setup_root(struct lo_data *lo, struct lo_inode *root)
{
int fd, res;
struct stat stat;
fd = open("/", O_PATH);
if (fd == -1) {
fuse_log(FUSE_LOG_ERR, "open(%s, O_PATH): %m\n", lo->source);
exit(1);
}
res = fstatat(fd, "", &stat, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW);... | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 163,576,755,186,183,110,000,000,000,000,000,000,000 | 24 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
static void AppLayerProtoDetectPMGetIpprotos(AppProto alproto,
uint8_t *ipprotos)
{
SCEnter();
const AppLayerProtoDetectPMSignature *s = NULL;
int i, j;
uint8_t ipproto;
for (i = 0; i < FLOW_PROTO_DEFAULT; i++) {
ipproto = FlowGetReverseProtoMap... | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 56,782,098,236,181,990,000,000,000,000,000,000,000 | 25 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
static CURLcode resolve_server(struct SessionHandle *data,
struct connectdata *conn,
bool *async)
{
CURLcode result=CURLE_OK;
long timeout_ms = Curl_timeleft(data, NULL, TRUE);
/*************************************************************
* Resolv... | 0 | [] | curl | 178bd7db34f77e020fb8562890c5625ccbd67093 | 141,863,929,728,949,320,000,000,000,000,000,000,000 | 98 | url-parsing: reject CRLFs within URLs
Bug: http://curl.haxx.se/docs/adv_20150108B.html
Reported-by: Andrey Labunets |
static void tower_interrupt_out_callback (struct urb *urb)
{
struct lego_usb_tower *dev = urb->context;
int status = urb->status;
lego_usb_tower_debug_data(&dev->udev->dev, __func__,
urb->actual_length, urb->transfer_buffer);
/* sync/async unlink faults aren't errors */
if (status && !(status == -ENOENT ||... | 0 | [
"CWE-476"
] | linux | 2fae9e5a7babada041e2e161699ade2447a01989 | 222,961,060,583,874,400,000,000,000,000,000,000,000 | 20 | usb: misc: legousbtower: Fix NULL pointer deference
This patch fixes a NULL pointer dereference caused by a race codition in
the probe function of the legousbtower driver. It re-structures the
probe function to only register the interface after successfully reading
the board's firmware ID.
The probe function does not... |
static u32 read_32(cdk_stream_t s)
{
byte buf[4];
size_t nread;
assert(s != NULL);
stream_read(s, buf, 4, &nread);
if (nread != 4)
return (u32) - 1;
return buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
} | 1 | [
"CWE-125"
] | gnutls | 49be4f7b82eba2363bb8d4090950dad976a77a3a | 168,902,580,077,895,420,000,000,000,000,000,000,000 | 12 | opencdk: added error checking in the stream reading functions
This addresses an out of memory error. Issue found using oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=337
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.