func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
Pl_ASCIIHexDecoder::finish()
{
flush();
getNext()->finish();
} | 0 | [
"CWE-787"
] | qpdf | dc92574c10f3e2516ec6445b88c5d584f40df4e5 | 167,881,060,834,698,530,000,000,000,000,000,000,000 | 5 | Fix some pipelines to be safe if downstream write fails (fuzz issue 28262) |
virtual Item* propagate_equal_fields(THD*, const Context &, COND_EQUAL *)
{
return this;
}; | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 157,046,394,567,136,900,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int dump_sp(struct xfrm_policy *xp, int dir, int count, void *ptr)
{
struct pfkey_sock *pfk = ptr;
struct sk_buff *out_skb;
struct sadb_msg *out_hdr;
int err;
if (!pfkey_can_dump(&pfk->sk))
return -ENOBUFS;
out_skb = pfkey_xfrm_policy2msg_prep(xp);
if (IS_ERR(out_skb))
return PTR_ERR(out_skb);
err... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 266,371,397,293,669,500,000,000,000,000,000,000,000 | 33 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc,
xmlNodePtr elem,
xmlNsPtr ns,
xmlNsPtr *retNs,
xmlNsMapPtr *nsMap,
int depth,
int ancestorsOnly,
int prefixed)
{
xmlNsMapItemPtr mi;
if ((doc == NULL) || (ns == NULL) || (retNs == NULL) ||
(nsMap == NULL))
ret... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 107,865,005,087,930,220,000,000,000,000,000,000,000 | 119 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
ves_icall_System_Threading_Thread_VolatileWrite1 (void *ptr, gint8 value)
{
*((volatile gint8 *) ptr) = value;
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 311,332,435,755,609,560,000,000,000,000,000,000,000 | 4 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
select_union(THD *thd_arg):
select_result_interceptor(thd_arg), write_err(0), table(0), records(0)
{ tmp_table_param.init(); } | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 221,075,483,022,092,900,000,000,000,000,000,000,000 | 3 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
const MonCommand *Monitor::_get_moncommand(
const string &cmd_prefix,
const vector<MonCommand>& cmds)
{
for (auto& c : cmds) {
if (c.cmdstring.compare(0, cmd_prefix.size(), cmd_prefix) == 0) {
return &c;
}
}
return nullptr;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 55,259,505,638,957,580,000,000,000,000,000,000,000 | 11 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) {
RList *segments = bin->segments;
if (!segments) {
return NULL;
}
RList *entries = bin->entries;
if (!entries) {
return NULL;
}
RList *symbols = bin->symbols;
if (!symbols) {
return NULL;
}
ut16 *modref = malloc (bin->ne_header->ModRefs * sizeof (ut16));... | 1 | [
"CWE-20",
"CWE-129"
] | radare2 | 2d782cdaa2112c10b8dd5e7a93c134b2ada9c1a6 | 170,080,084,078,784,590,000,000,000,000,000,000,000 | 144 | Fix oobread segfaults in the NE bin parser ##crash
* Reported by @han0nly via huntr.dev
* Reproducers: seed1 seed2
* BountyID: ad3c9c4c-76e7-40c8-bd4a-c095acd8bb40 |
static u64 nested_svm_get_tdp_pdptr(struct kvm_vcpu *vcpu, int index)
{
struct vcpu_svm *svm = to_svm(vcpu);
u64 cr3 = svm->nested.nested_cr3;
u64 pdpte;
int ret;
ret = kvm_read_guest_page(vcpu->kvm, gpa_to_gfn(cr3), &pdpte,
offset_in_page(cr3) + index * 8, 8);
if (ret)
return 0;
return pdpte;
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 111,208,703,219,377,580,000,000,000,000,000,000,000 | 13 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
WandExport double DrawGetTextInterlineSpacing(DrawingWand *wand)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
return(CurrentContext->interline_spacing);
} | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 24,981,131,802,046,257,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/716 |
SwitchWindow(n)
int n;
{
struct win *p;
debug1("SwitchWindow %d\n", n);
if (n < 0 || n >= maxwin)
{
ShowWindows(-1);
return;
}
if ((p = wtab[n]) == 0)
{
ShowWindows(n);
return;
}
if (display == 0)
{
fore = p;
return;
}
if (p == D_fore)
{
... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 248,731,616,230,600,100,000,000,000,000,000,000,000 | 36 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
void GrpcStreamClientHandler::onCreateInitialMetadata(Http::HeaderMap& metadata) {
context->onGrpcCreateInitialMetadata(token, metadata);
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 27,373,266,921,728,353,000,000,000,000,000,000,000 | 3 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static inline bool is_ioat_suspended(unsigned long status)
{
return ((status & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_SUSPENDED);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 262,374,041,670,514,300,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
size_t MemIo::size() const
{
return p_->size_;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 115,455,439,793,571,070,000,000,000,000,000,000,000 | 4 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static pj_xml_node *xml_parse_node( pj_pool_t *pool, pj_scanner *scanner)
{
pj_xml_node *node;
pj_str_t end_name;
PJ_CHECK_STACK();
if (*scanner->curptr != '<')
on_syntax_error(scanner);
/* Handle Processing Instructino (PI) construct (i.e. "<?") */
if (*scanner->curptr == '<' && *(scanner->... | 0 | [
"CWE-703",
"CWE-835"
] | pjproject | 856f87c2e97a27b256482dbe0d748b1194355a21 | 84,231,960,465,056,340,000,000,000,000,000,000,000 | 123 | Merge pull request from GHSA-5x45-qp78-g4p4
* Prevent infinite loop in scanning xml content
* Simplify scanning method
* Optimization |
static void virtio_net_get_config(VirtIODevice *vdev, uint8_t *config)
{
VirtIONet *n = VIRTIO_NET(vdev);
struct virtio_net_config netcfg;
NetClientState *nc = qemu_get_queue(n->nic);
static const MACAddr zero = { .a = { 0, 0, 0, 0, 0, 0 } };
int ret = 0;
memset(&netcfg, 0 , sizeof(struct virti... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 290,755,255,857,498,470,000,000,000,000,000,000,000 | 46 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
v3d_reset_v3d(struct v3d_dev *v3d)
{
if (v3d->reset)
reset_control_reset(v3d->reset);
else
v3d_reset_by_bridge(v3d);
v3d_init_hw_state(v3d);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 29cd13cfd7624726d9e6becbae9aa419ef35af7f | 212,116,821,987,352,600,000,000,000,000,000,000,000 | 9 | drm/v3d: Fix memory leak in v3d_submit_cl_ioctl
In the impelementation of v3d_submit_cl_ioctl() there are two memory
leaks. One is when allocation for bin fails, and the other is when bin
initialization fails. If kcalloc fails to allocate memory for bin then
render->base should be put. Also, if v3d_job_init() fails to... |
static long wsgi_find_path_info(const char *uri, const char *path_info)
{
long lu = strlen(uri);
long lp = strlen(path_info);
while (lu-- && lp-- && uri[lu] == path_info[lp]) {
if (path_info[lp] == '/') {
while (lu && uri[lu-1] == '/') lu--;
}
}
if (lu == -1) {
... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 277,622,964,279,011,600,000,000,000,000,000,000,000 | 20 | When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state. |
static void pcpu_balance_workfn(struct work_struct *work)
{
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
struct pcpu_chunk *chunk, *next;
int slot, nr_to_pop, ret;
/*
* There's no reason to keep around multiple unused chunks and VM
* areas can be scarce. Destroy all free c... | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 126,981,551,814,913,000,000,000,000,000,000,000,000 | 128 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
WalSndGetStateString(WalSndState state)
{
switch (state)
{
case WALSNDSTATE_STARTUP:
return "startup";
case WALSNDSTATE_BACKUP:
return "backup";
case WALSNDSTATE_CATCHUP:
return "catchup";
case WALSNDSTATE_STREAMING:
return "streaming";
}
return "UNKNOWN";
} | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 260,910,535,254,973,630,000,000,000,000,000,000,000 | 15 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
static inline struct sock *l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int dif, u32 tunnel_id)
{
struct sock *sk = __l2tp_ip_bind_lookup(net, laddr, dif, tunnel_id);
if (sk)
sock_hold(sk);
return sk;
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 331,111,137,517,440,400,000,000,000,000,000,000,000 | 8 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEntry* direntry, float** value)
{
enum TIFFReadDirEntryErr err;
uint32 count;
void* origdata;
float* data;
switch (direntry->tdir_type)
{
case TIFF_BYTE:
case TIFF_SBYTE:
case TIFF_SHORT:
case TIFF_SSHORT:
case TIFF_LONG:
cas... | 1 | [
"CWE-20"
] | libtiff | 3144e57770c1e4d26520d8abee750f8ac8b75490 | 250,278,253,273,293,720,000,000,000,000,000,000,000 | 236 | * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings
of double to other data types to avoid undefined behaviour if the output range
isn't big enough to hold the input value.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643
http://bugzilla.maptools.org/show_bug.cgi?id=2642
http://bugzil... |
static void sysfs_slab_remove(struct kmem_cache *s)
{
if (slab_state < FULL)
/*
* Sysfs has not been setup yet so no need to remove the
* cache from sysfs.
*/
return;
kobject_get(&s->kobj);
schedule_work(&s->kobj_remove_work); | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 44,029,553,144,222,620,000,000,000,000,000,000,000 | 12 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
static void cxusb_d680_dmb_drain_message(struct dvb_usb_device *d)
{
int ep = d->props.generic_bulk_ctrl_endpoint;
const int timeout = 100;
const int junk_len = 32;
u8 *junk;
int rd_count;
/* Discard remaining data in video pipe */
junk = kmalloc(junk_len, GFP_KERNEL);
if (!junk)
return;
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 296,736,713,744,353,830,000,000,000,000,000,000,000 | 22 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
static TEE_Result op_attr_bignum_from_obj(void *attr, void *src_attr)
{
struct bignum **bn = attr;
struct bignum **src_bn = src_attr;
crypto_bignum_copy(*bn, *src_bn);
return TEE_SUCCESS;
} | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | a637243270fc1faae16de059091795c32d86e65e | 102,852,249,495,574,510,000,000,000,000,000,000,000 | 8 | svc: check for allocation overflow in crypto calls
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that it might
lead to a heap based overflow with attacker controlled data written
outside the boundaries of the buffer.
Fixes: OP-TEE-2018-... |
static double mp_ceil(_cimg_math_parser& mp) {
return std::ceil(_mp_arg(2)); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 319,541,193,388,445,800,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
mono_create_icall_signature (const char *sigstr)
{
gchar **parts;
int i, len;
gchar **tmp;
MonoMethodSignature *res;
mono_loader_lock ();
res = g_hash_table_lookup (mono_defaults.corlib->helper_signatures, sigstr);
if (res) {
mono_loader_unlock ();
return res;
}
parts = g_strsplit (sigstr, " ", 256);
t... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 111,239,887,302,343,880,000,000,000,000,000,000,000 | 47 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
void Compute(OpKernelContext* const context) override {
core::RefCountPtr<BoostedTreesEnsembleResource> resource;
// Get the resource.
OP_REQUIRES_OK(context, LookupResource(context, HandleFromInput(context, 0),
&resource));
// Get the inputs.
OpInputLis... | 0 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 269,328,260,687,071,300,000,000,000,000,000,000,000 | 85 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
{
callbacks++;
if (quiet)
return(NULL);
fprintf(SAXdebug, "SAX.getParameterEntity(%s)\n", name);
return(NULL);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 250,371,997,043,015,020,000,000,000,000,000,000,000 | 8 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
int fieldNameSize() const {
if (fieldNameSize_ == -1)
fieldNameSize_ = (int)strlen(fieldName()) + 1;
return fieldNameSize_;
} | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 247,905,438,381,896,000,000,000,000,000,000,000,000 | 5 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static void read_pipe_completion(struct urb *purb)
{
struct zr364xx_pipeinfo *pipe_info;
struct zr364xx_camera *cam;
int pipe;
pipe_info = purb->context;
_DBG("%s %p, status %d\n", __func__, purb, purb->status);
if (!pipe_info) {
printk(KERN_ERR KBUILD_MODNAME ": no context!\n");
return;
}
cam = pipe_info... | 0 | [
"CWE-476"
] | linux | 5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e | 294,509,882,428,518,050,000,000,000,000,000,000,000 | 63 | media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap
SyzKaller hit the null pointer deref while reading from uninitialized
udev->product in zr364xx_vidioc_querycap().
==================================================================
BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20
in... |
void hinf_del(GF_Box *s)
{
GF_HintInfoBox *hinf = (GF_HintInfoBox *)s;
gf_free(hinf);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 160,433,119,367,733,420,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
ofputil_bucket_check_duplicate_id(const struct ovs_list *buckets)
{
struct ofputil_bucket *i, *j;
LIST_FOR_EACH (i, list_node, buckets) {
LIST_FOR_EACH_REVERSE (j, list_node, buckets) {
if (i == j) {
break;
}
if (i->bucket_id == j->bucket_id) {
... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 155,561,272,389,767,170,000,000,000,000,000,000,000 | 17 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int samldb_check_user_account_control_acl(struct samldb_ctx *ac,
struct dom_sid *sid,
uint32_t user_account_control,
uint32_t user_account_control_old)
{
size_t i;
int ret = 0;
bool need_acl_check = false;
struct security_token *user_token;
struct security_descriptor *domain_sd;
const ... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 204,896,776,670,538,220,000,000,000,000,000,000,000 | 172 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
DEFUN (no_bgp_config_type,
no_bgp_config_type_cmd,
"no bgp config-type",
NO_STR
BGP_STR
"Display configuration type\n")
{
bgp_option_unset (BGP_OPT_CONFIG_CISCO);
return CMD_SUCCESS;
} | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 127,941,772,784,424,410,000,000,000,000,000,000,000 | 10 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static int alloc_scratch_buffers(H264Context *h, int linesize)
{
int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);
if (h->bipred_scratchpad)
return 0;
h->bipred_scratchpad = av_malloc(16 * 6 * alloc_size);
// edge emu needs blocksize + filter length - 1
// (= 21x21 for h264)
h->edge... | 0 | [
"CWE-703"
] | FFmpeg | 29ffeef5e73b8f41ff3a3f2242d356759c66f91f | 62,685,552,882,153,350,000,000,000,000,000,000,000 | 24 | avcodec/h264: do not trust last_pic_droppable when marking pictures as done
This simplifies the code and fixes a deadlock
Fixes Ticket2927
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void enable_irq_window(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
/*
* In case GIF=0 we can't rely on the CPU to tell us when GIF becomes
* 1, because that's a separate STGI/VMRUN intercept. The next time we
* get that intercept, this function will be called again though and
* we'l... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 118,775,785,978,941,800,000,000,000,000,000,000,000 | 24 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
bid_keyword(const char *p, ssize_t len)
{
static const char *keys_c[] = {
"content", "contents", "cksum", NULL
};
static const char *keys_df[] = {
"device", "flags", NULL
};
static const char *keys_g[] = {
"gid", "gname", NULL
};
static const char *keys_il[] = {
"ignore", "inode", "link", NULL
};
stat... | 0 | [
"CWE-476",
"CWE-119"
] | libarchive | a550daeecf6bc689ade371349892ea17b5b97c77 | 192,389,666,857,256,670,000,000,000,000,000,000,000 | 60 | Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds |
art_blend_luminosity_cmyk_16(int n_chan, uint16_t *gs_restrict dst, const uint16_t *gs_restrict backdrop,
const uint16_t *gs_restrict src)
{
int i;
/* Treat CMY the same as RGB. */
art_blend_luminosity_rgb_16(3, dst, backdrop, src);
for (i = 3; i < n_chan; i++)
dst[... | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 304,379,232,925,586,480,000,000,000,000,000,000,000 | 10 | Bug 701795: Segv due to image mask issue |
uint Field_varstring::is_equal(Create_field *new_field)
{
if (new_field->sql_type == real_type() &&
new_field->charset == field_charset)
{
if (new_field->length == max_display_length())
return IS_EQUAL_YES;
if (new_field->length > max_display_length() &&
((new_field->length <= 255 && max_displa... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 336,902,582,092,195,130,000,000,000,000,000,000,000 | 14 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
nameserver_write_waiting(struct nameserver *ns, char waiting) {
ASSERT_LOCKED(ns->base);
if (ns->write_waiting == waiting) return;
ns->write_waiting = waiting;
(void) event_del(&ns->event);
event_assign(&ns->event, ns->base->event_base,
ns->socket, EV_READ | (waiting ? EV_WRITE : 0) | EV_PERSIST,
namese... | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 56,420,637,714,845,020,000,000,000,000,000,000,000 | 18 | 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 + ... |
e_get_user_config_dir (void)
{
static gchar *dirname = NULL;
if (G_UNLIKELY (dirname == NULL)) {
const gchar *config_dir = g_get_user_config_dir ();
dirname = g_build_filename (config_dir, "evolution", NULL);
g_mkdir_with_parents (dirname, 0700);
}
return dirname;
} | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 73,035,275,028,858,480,000,000,000,000,000,000,000 | 12 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
void qmp_netdev_add(Netdev *netdev, Error **errp)
{
if (!id_wellformed(netdev->id)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "id", "an identifier");
return;
}
net_client_init1(netdev, true, errp);
} | 0 | [
"CWE-835"
] | qemu | 705df5466c98f3efdd2b68d3b31dad86858acad7 | 25,324,095,038,928,480,000,000,000,000,000,000,000 | 9 | net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().
Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as pee... |
LZWPostEncode(TIFF* tif)
{
register LZWCodecState *sp = EncoderState(tif);
uint8* op = tif->tif_rawcp;
long nextbits = sp->lzw_nextbits;
unsigned long nextdata = sp->lzw_nextdata;
long outcount = sp->enc_outcount;
int nbits = sp->lzw_nbits;
if (op > sp->enc_rawlimit) {
tif->tif_rawcc = (tmsize_t)(op - tif->ti... | 0 | [
"CWE-787"
] | libtiff | 58a898cb4459055bb488ca815c23b880c242a27d | 232,876,687,290,747,200,000,000,000,000,000,000,000 | 45 | LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905
The fix consists in using the similar code LZWDecode() to validate we
don't write outside of the output buffer. |
void cpu_breakpoint_remove_by_ref(CPUState *cpu, CPUBreakpoint *breakpoint)
{
QTAILQ_REMOVE(&cpu->breakpoints, breakpoint, entry);
breakpoint_invalidate(cpu, breakpoint->pc);
g_free(breakpoint);
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 255,901,050,049,876,920,000,000,000,000,000,000,000 | 8 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
const Status& SQLInternal::getStatus() const {
return status_;
} | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 169,946,088,252,449,270,000,000,000,000,000,000,000 | 3 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
static int ff_layout_encode_ioerr(struct xdr_stream *xdr,
const struct nfs4_layoutreturn_args *args,
const struct nfs4_flexfile_layoutreturn_args *ff_args)
{
__be32 *start;
start = xdr_reserve_space(xdr, 4);
if (unlikely(!start))
return -E2BIG;
*start = cpu_to_be32(ff_args->num_errors);
/* This ass... | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 106,957,426,044,153,250,000,000,000,000,000,000,000 | 14 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
struct snd_compr_params *params)
{
unsigned int buffer_size;
void *buffer;
if (params->buffer.fragment_size == 0 ||
params->buffer.fragments > SIZE_MAX / params->buffer.fragment_size)
return -EINVAL;
buffer_size = params->buffer.fragme... | 0 | [
"CWE-703"
] | linux | b35cc8225845112a616e3a2266d2fde5ab13d3ab | 276,094,375,072,396,300,000,000,000,000,000,000,000 | 27 | ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()
These are 32 bit values that come from the user, we need to check for
integer overflows or we could end up allocating a smaller buffer than
expected.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
RecordADeliveredEventOrError(CallbackListPtr *pcbl, void *nulldata,
void *calldata)
{
EventInfoRec *pei = (EventInfoRec *) calldata;
RecordContextPtr pContext;
RecordClientsAndProtocolPtr pRCAP;
int eci; /* enabled context index */
ClientPtr pClient = ... | 0 | [
"CWE-191"
] | xserver | 2902b78535ecc6821cc027351818b28a5c7fdbdc | 338,250,880,866,968,570,000,000,000,000,000,000,000 | 47 | Fix XRecordRegisterClients() Integer underflow
CVE-2020-14362 ZDI-CAN-11574
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
{
sdlPtr tmpsdl = ctx->sdl;
xmlDocPtr wsdl;
xmlNodePtr root, definitions, trav;
xmlAttrPtr targetNamespace;
if (zend_hash_str_exists(&ctx->docs, struri, strlen(struri))) {
return;
}
sdl_set_uri_credentials(ctx, struri);
wsdl = ... | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 73,053,288,657,101,390,000,000,000,000,000,000,000 | 127 | Fix bug #80672 - Null Dereference in SoapClient |
static inline void clear_soft_dirty(struct vm_area_struct *vma,
unsigned long addr, pte_t *pte)
{
/*
* The soft-dirty tracker uses #PF-s to catch writes
* to pages, so write-protect the pte as well. See the
* Documentation/vm/soft-dirty.txt for full description
* of how soft-dirty works.
*/
pte_t ptent = ... | 0 | [
"CWE-200"
] | linux | ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce | 188,278,352,737,438,740,000,000,000,000,000,000,000 | 20 | pagemap: do not leak physical addresses to non-privileged userspace
As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.
This disallows anybody without CAP_SYS_ADMIN to read the pagemap.
[1] http://googleprojectzero.bl... |
long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
{
return(0);
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 59,219,051,934,206,580,000,000,000,000,000,000,000 | 4 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static int check_tty(struct tty_struct *tty)
{
if (!tty) {
pr_warn("%s: I/O error, deactivating speakup\n",
spk_ttyio_synth->long_name);
/* No synth any more, so nobody will restart TTYs, and we thus
* need to do it ourselves. Now that there is no synth we can
* let application flood anyway
*/
spk_t... | 0 | [
"CWE-362",
"CWE-763"
] | linux | d4122754442799187d5d537a9c039a49a67e57f1 | 49,550,151,323,424,920,000,000,000,000,000,000,000 | 16 | speakup: Do not let the line discipline be used several times
Speakup has only one speakup_tty variable to store the tty it is managing. This
makes sense since its codebase currently assumes that there is only one user who
controls the screen reading.
That however means that we have to forbid using the line disciplin... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteSVDFParams*>(node->builtin_data);
OpData* op_data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
const T... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 128,585,311,044,429,060,000,000,000,000,000,000,000 | 100 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void __io_complete_rw(struct io_kiocb *req, long res, long res2,
struct io_comp_state *cs)
{
if (!io_rw_reissue(req, res))
io_complete_rw_common(&req->rw.kiocb, res, cs);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 33,414,166,336,792,203,000,000,000,000,000,000,000 | 6 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
{
u32 value_size = attr->value_size;
struct bpf_stack_map *smap;
u64 cost, n_buckets;
int err;
if (!bpf_capable())
return ERR_PTR(-EPERM);
if (attr->map_flags & ~STACK_CREATE_FLAG_MASK)
return ERR_PTR(-EINVAL);
/* check sanity of attributes */
... | 0 | [
"CWE-190",
"CWE-787"
] | linux | 30e29a9a2bc6a4888335a6ede968b75cd329657a | 294,306,790,237,808,740,000,000,000,000,000,000,000 | 58 | 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... |
lys_module_node_pos_r(struct lys_node *first_sibling, struct lys_node *target, uint32_t *pos)
{
const struct lys_node *next = NULL;
/* the schema nodes are actually from data, lys_getnext skips non-data schema nodes for us (we know the parent will not be uses) */
while ((next = lys_getnext(next, lys_parent... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 177,456,401,364,032,000,000,000,000,000,000,000,000 | 15 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static void make_secret(uint8_t *digest, const uint8_t *vector,
const char *secret, const uint8_t *value)
{
MD5_CTX context;
int i;
MD5Init(&context);
MD5Update(&context, vector, AUTH_VECTOR_LEN);
MD5Update(&context, secret, strlen(secret));
MD5Final(digest, &context);
for ( i = 0;... | 0 | [] | freeradius-server | 860cad9e02ba344edb0038419e415fe05a9a01f4 | 162,317,122,663,826,650,000,000,000,000,000,000,000 | 15 | Fix crash on Tunnel-Password attributes with zero length |
static void sco_sock_kill(struct sock *sk)
{
if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
return;
BT_DBG("sk %p state %d", sk, sk->sk_state);
/* Kill poor orphan */
bt_sock_unlink(&sco_sk_list, sk);
sock_set_flag(sk, SOCK_DEAD);
sock_put(sk);
} | 0 | [
"CWE-200"
] | net | 5233252fce714053f0151680933571a2da9cbfb4 | 48,120,203,635,207,290,000,000,000,000,000,000,000 | 12 | bluetooth: Validate socket address length in sco_sock_bind().
Signed-off-by: David S. Miller <davem@davemloft.net> |
int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
{
unsigned long flags;
int ret;
ret = check_kill_permission(sig, info, p);
if (!ret && sig) {
ret = -ESRCH;
if (lock_task_sighand(p, &flags)) {
ret = __group_send_sig_info(sig, info, p);
unlock_task_sighand(p, &flags);
}
}
... | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 257,087,087,198,842,400,000,000,000,000,000,000,000 | 17 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
static void deferred_put_nlk_sk(struct rcu_head *head)
{
struct netlink_sock *nlk = container_of(head, struct netlink_sock, rcu);
sock_put(&nlk->sk);
} | 0 | [
"CWE-362",
"CWE-415"
] | linux | 92964c79b357efd980812c4de5c1fd2ec8bb5520 | 33,641,651,989,482,294,000,000,000,000,000,000,000 | 6 | netlink: Fix dump skb leak/double free
When we free cb->skb after a dump, we do it after releasing the
lock. This means that a new dump could have started in the time
being and we'll end up freeing their skb instead of ours.
This patch saves the skb and module before we unlock so we free
the right memory.
Fixes: 16... |
decode_labeled_vpn_clnp_prefix(netdissect_options *ndo,
const u_char *pptr, char *buf, u_int buflen)
{
uint8_t addr[19];
u_int plen;
ND_TCHECK(pptr[0]);
plen = pptr[0]; /* get prefix length */
if ((24+64) > plen)
return -1;
plen-=(24+64); /* adjust prefixlen - l... | 0 | [
"CWE-674",
"CWE-787"
] | tcpdump | af2cf04a9394c1a56227c2289ae8da262828294a | 152,802,944,157,995,120,000,000,000,000,000,000,000 | 37 | (for 4.9.3) CVE-2018-16300/BGP: prevent stack exhaustion
Enforce a limit on how many times bgp_attr_print() can recurse.
This fixes a stack exhaustion discovered by Include Security working
under the Mozilla SOS program in 2018 by means of code audit. |
R_API int r_bin_is_stripped(RBin *bin) {
RBinObject *o = r_bin_cur_object (bin);
return o? (R_BIN_DBG_STRIPPED & o->info->dbg_info): 1;
} | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 151,660,627,434,511,950,000,000,000,000,000,000,000 | 4 | Fix #8748 - Fix oobread on string search |
incremental_gc_until(mrb_state *mrb, mrb_gc *gc, mrb_gc_state to_state)
{
do {
incremental_gc(mrb, gc, SIZE_MAX);
} while (gc->state != to_state);
} | 0 | [
"CWE-415"
] | mruby | 97319697c8f9f6ff27b32589947e1918e3015503 | 185,934,380,170,210,600,000,000,000,000,000,000,000 | 6 | Cancel 9cdf439
Should not free the pointer in `realloc` since it can cause
use-after-free problem. |
static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
unsigned long flags;
int result = 0;
if (!priv->comm_is_ok)
return -EIO;
/* clear halts before open */
usb_clear_halt(serial... | 0 | [
"CWE-703"
] | linux | c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 | 33,504,888,141,324,117,000,000,000,000,000,000,000 | 45 | USB: cypress_m8: add endpoint sanity check
An attack using missing endpoints exists.
CVE-2016-3137
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
inline uint32_t clzll(uint64_t x) {
unsigned long r = 0;
# ifdef _WIN64
_BitScanReverse64(&r, x);
# else
// Scan the high 32 bits.
if (_BitScanReverse(&r, static_cast<uint32_t>(x >> 32)))
return 63 - (r + 32);
// Scan the low 32 bits.
_BitScanReverse(&r, static_cast<uint32_t>(x));
# endif
assert(x !... | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 307,982,359,146,169,170,000,000,000,000,000,000,000 | 20 | Fix segfault on complex pointer formatting (#642) |
BSONObj expectedResult() {
return BSON("" << ((long long)(numeric_limits<int>::max()) + numeric_limits<int>::max()));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 54,470,095,769,269,380,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
struct sctp_sack_info params;
struct sctp_association *asoc = NULL;
struct sctp_sock *sp = sctp_sk(sk);
if (len >= sizeof(struct sctp_sack_info)) {
len = sizeof(struct sctp_sack... | 0 | [
"CWE-20"
] | linux | 726bc6b092da4c093eb74d13c07184b18c1af0f1 | 25,506,560,750,138,490,000,000,000,000,000,000,000 | 59 | net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS
Building sctp may fail with:
In function ‘copy_from_user’,
inlined from ‘sctp_getsockopt_assoc_stats’ at
net/sctp/socket.c:5656:20:
arch/x86/include/asm/uaccess_32.h:211:26: error: call to
‘copy_from_user_overflow’ declared with attribute error: c... |
static void perf_event_switch(struct task_struct *task,
struct task_struct *next_prev, bool sched_in)
{
struct perf_switch_event switch_event;
/* N.B. caller checks nr_switch_events != 0 */
switch_event = (struct perf_switch_event){
.task = task,
.next_prev = next_prev,
.event_id = {
.header = {... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 40,848,812,827,817,746,000,000,000,000,000,000,000 | 29 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
int __ext4_write_dirty_metadata(struct inode *inode, struct buffer_head *bh)
{
int err = 0;
mark_buffer_dirty(bh);
if (inode && inode_needs_sync(inode)) {
sync_dirty_buffer(bh);
if (buffer_req(bh) && !buffer_uptodate(bh)) {
ext4_error(inode->i_sb, __func__,
"IO error syncing inode, "
"inode=%lu... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 49,858,730,159,080,380,000,000,000,000,000,000,000 | 18 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
evdev_read_calibration_prop(struct evdev_device *device)
{
const char *prop;
float calibration[6];
prop = udev_device_get_property_value(device->udev_device,
"LIBINPUT_CALIBRATION_MATRIX");
if (prop == NULL)
return;
if (!device->abs.absinfo_x || !device->abs.absinfo_y)
return;
if (!parse_calibr... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 170,080,329,948,155,860,000,000,000,000,000,000,000 | 27 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static int is_loopback_dst(struct iw_cm_id *cm_id)
{
struct net_device *dev;
struct sockaddr_in *raddr = (struct sockaddr_in *)&cm_id->remote_addr;
dev = ip_dev_find(&init_net, raddr->sin_addr.s_addr);
if (!dev)
return 0;
dev_put(dev);
return 1;
} | 0 | [
"CWE-703"
] | linux | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | 98,855,835,142,453,980,000,000,000,000,000,000,000 | 11 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off... |
static int anr_search(struct ldb_module *module, struct ldb_request *req)
{
struct ldb_context *ldb;
struct ldb_parse_tree *anr_tree;
struct ldb_request *down_req;
struct anr_context *ac;
struct anr_present_ctx ctx;
const char *attr = "anr";
int ret;
ctx.found_anr = false;
ctx.attr = attr;
ldb_parse_tree_wa... | 0 | [
"CWE-703"
] | samba | 3a4eb50cf74671de3442d179bd2d44afd5bc52c1 | 46,148,529,040,210,890,000,000,000,000,000,000,000 | 66 | CVE-2021-3670 dsdb/anr: Do a copy of the potentially anr query before starting to modify it
RN: Do not modify the caller-supplied memory in the anr=* handling to
allow clear logging of the actual caller request after it has been processed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694
Signed-off-by: Andrew B... |
cifs_uncached_read_into_pages(struct TCP_Server_Info *server,
struct cifs_readdata *rdata, unsigned int len)
{
int total_read = 0, result = 0;
unsigned int i;
unsigned int nr_pages = rdata->nr_pages;
struct kvec iov;
rdata->tailsz = PAGE_SIZE;
for (i = 0; i < nr_pages; i++) {
struct page *page = rdata->page... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 218,636,745,546,121,380,000,000,000,000,000,000,000 | 46 | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... |
circle_mul_pt(PG_FUNCTION_ARGS)
{
CIRCLE *circle = PG_GETARG_CIRCLE_P(0);
Point *point = PG_GETARG_POINT_P(1);
CIRCLE *result;
Point *p;
result = circle_copy(circle);
p = DatumGetPointP(DirectFunctionCall2(point_mul,
PointPGetDatum(&circle->center),
PointPGetDatum(point)));... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 109,139,877,042,993,140,000,000,000,000,000,000,000 | 18 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
CModule::EModRet CModule::OnAddNetwork(CIRCNetwork& Network,
CString& sErrorRet) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 193,972,418,469,300,740,000,000,000,000,000,000,000 | 4 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
{
cJSON *bool_item = cJSON_CreateBool(boolean);
if (add_item_to_object(object, name, bool_item, &global_hooks, false))
{
return bool_item;
}
cJSON_Delete(bool_item);
retur... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 310,206,320,605,551,980,000,000,000,000,000,000,000 | 11 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
delete_async_thread (GTask *task,
gpointer object,
gpointer task_data,
GCancellable *cancellable)
{
GError *error = NULL;
if (g_file_delete (G_FILE (object), cancellable, &error))
g_task_return_boolean (task, TRUE);
else
g_ta... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 228,659,265,817,648,500,000,000,000,000,000,000,000 | 12 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
TfLiteRegistration* Register_FULLY_CONNECTED_REF() {
static TfLiteRegistration r = {
fully_connected::Init, fully_connected::Free,
fully_connected::Prepare<fully_connected::kReference>,
fully_connected::Eval<fully_connected::kReference>};
return &r;
} | 0 | [
"CWE-369"
] | tensorflow | 718721986aa137691ee23f03638867151f74935f | 4,332,625,700,354,105,000,000,000,000,000,000,000 | 7 | Prevent division by 0 in `fully_connected.cc`
PiperOrigin-RevId: 385137282
Change-Id: If201e69b6e0048f0be001330b4b977e2b46db2cb |
inline unsigned int& _openmp_mode(const unsigned int value, const bool is_set) {
static unsigned int mode = 2;
if (is_set) { cimg::mutex(0); mode = value<2?value:2; cimg::mutex(0,0); }
return mode;
} | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 192,722,152,949,219,860,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
int X509_TRUST_get_count(void)
{
if(!trtable) return X509_TRUST_COUNT;
return sk_X509_TRUST_num(trtable) + X509_TRUST_COUNT;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 193,796,711,662,338,200,000,000,000,000,000,000,000 | 5 | Backport OCSP fixes. |
void ha_maria::start_bulk_insert(ha_rows rows, uint flags)
{
DBUG_ENTER("ha_maria::start_bulk_insert");
THD *thd= table->in_use;
MARIA_SHARE *share= file->s;
bool index_disabled= 0;
DBUG_PRINT("info", ("start_bulk_insert: rows %lu", (ulong) rows));
/* don't enable row cache if too few rows */
if ((!rows ... | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 216,425,005,753,959,980,000,000,000,000,000,000,000 | 130 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
ex_disassemble(exarg_T *eap)
{
char_u *arg = eap->arg;
char_u *fname;
ufunc_T *ufunc;
dfunc_T *dfunc;
isn_T *instr;
int instr_count;
int is_global = FALSE;
compiletype_T compile_type = CT_NONE;
if (STRNCMP(arg, "profile", 7) == 0 && VIM_ISWHITE(arg[7]))
{
compile_type = CT_PR... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 145,023,184,851,439,120,000,000,000,000,000,000,000 | 84 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void sctp_wake_up_waiters(struct sock *sk,
struct sctp_association *asoc)
{
struct sctp_association *tmp = asoc;
/* We do accounting for the sndbuf space per association,
* so we only need to wake our own association.
*/
if (asoc->ep->sndbuf_policy)
return __sctp_write_space(asoc);
/* If associa... | 0 | [
"CWE-617",
"CWE-362"
] | linux | 2dcab598484185dea7ec22219c76dcdd59e3cb90 | 188,004,656,955,354,840,000,000,000,000,000,000,000 | 39 | sctp: avoid BUG_ON on sctp_wait_for_sndbuf
Alexander Popov reported that an application may trigger a BUG_ON in
sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is
waiting on it to queue more data and meanwhile another thread peels off
the association being used by the first thread.
This patch replaces ... |
libxlDomainDestroyInternal(libxlDriverPrivate *driver,
virDomainObj *vm)
{
g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver);
libxlDomainObjPrivate *priv = vm->privateData;
int ret = -1;
if (priv->deathW) {
libxl_evdisable_domain_death(cfg->ctx, priv->de... | 0 | [
"CWE-667"
] | libvirt | 23b51d7b8ec885e97a9277cf0a6c2833db4636e8 | 237,606,627,361,504,840,000,000,000,000,000,000,000 | 21 | libxl: Disable death events after receiving a shutdown event
The libxl driver will handle all domain destruction and cleanup
when receiving a domain shutdown event from libxl. Commit fa30ee04a2a
introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct
to ignore subsequent death events from libxl. But lib... |
static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
struct net_bridge_port *p;
struct net_bridge *br;
struct net_device **d = (struct net_device **)(skb->cb);
p = br_p... | 0 | [] | linux-2.6 | f8e9881c2aef1e982e5abc25c046820cd0b7cf64 | 317,102,344,793,911,100,000,000,000,000,000,000,000 | 34 | bridge: reset IPCB in br_parse_ip_options
Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP
stack), missed one IPCB init before calling ip_options_compile()
Thanks to Scot Doyle for his tests and bug reports.
Reported-by: Scot Doyle <lkml@scotdoyle.com>
Signed-off-by: Eric Dumazet <eric.dumazet@g... |
const struct timeval operator-(const struct timeval& lhs, const struct timeval& rhs)
{
struct timeval ret;
ret.tv_sec=lhs.tv_sec - rhs.tv_sec;
ret.tv_usec=lhs.tv_usec - rhs.tv_usec;
normalizeTV(ret);
return ret;
} | 0 | [
"CWE-399"
] | pdns | 881b5b03a590198d03008e4200dd00cc537712f3 | 87,394,477,713,065,260,000,000,000,000,000,000,000 | 8 | Reject qname's wirelength > 255, `chopOff()` handle dot inside labels |
RawTile OpenJPEGImage::getRegion( int ha, int va, unsigned int res, int layers, int x, int y, unsigned int w, unsigned int h ){
// Scale up our output bit depth to the nearest factor of 8
unsigned int obpc = bpc;
if( bpc <= 16 && bpc > 8 ) obpc = 16;
else if( bpc <= 8 ) obpc = 8;
#ifdef DEBUG
Timer timer;... | 1 | [
"CWE-190"
] | iipsrv | 882925b295a80ec992063deffc2a3b0d803c3195 | 230,093,453,121,681,440,000,000,000,000,000,000,000 | 30 | - Modified TileManager.cc to verify that malloc() has correctly allocated memory.
- Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve... |
virDomainDiskAddISCSIPoolSourceHost(virStorageSourcePtr src,
virStoragePoolDefPtr pooldef)
{
VIR_AUTOSTRINGLIST tokens = NULL;
size_t ntokens;
/* Only support one host */
if (pooldef->source.nhost != 1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 122,413,021,676,817,230,000,000,000,000,000,000,000 | 49 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
has_tablespace_privilege_name_id(PG_FUNCTION_ARGS)
{
Name username = PG_GETARG_NAME(0);
Oid tablespaceoid = PG_GETARG_OID(1);
text *priv_type_text = PG_GETARG_TEXT_P(2);
Oid roleid;
AclMode mode;
AclResult aclresult;
roleid = get_role_oid_or_public(NameStr(*username));
mode = convert_tablespace_priv_s... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 294,128,073,910,756,070,000,000,000,000,000,000,000 | 16 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
return _save_cimg(file,0,is_compressed);
}
const CImgList<T>& _save_cimg(std::FILE *const file, const char *const filename,
const unsigned int n0,
const unsigned int x0, const unsigned int y0,
const unsigne... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 225,597,573,526,714,000,000,000,000,000,000,000,000 | 114 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void AuthorizationManagerImpl::setInUserManagementCommand(OperationContext* opCtx, bool val) {
inUserManagementCommandsFlag(opCtx) = val;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 73,781,129,110,205,480,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
static void trace_module_remove_evals(struct module *mod)
{
union trace_eval_map_item *map;
union trace_eval_map_item **last = &trace_eval_maps;
if (!mod->num_trace_evals)
return;
mutex_lock(&trace_eval_mutex);
map = trace_eval_maps;
while (map) {
if (map->head.mod == mod)
break;
map = trace_eval_jmp... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 17,233,870,238,106,206,000,000,000,000,000,000,000 | 27 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static inline u32 nfsd4_sequence_rsize(struct svc_rqst *rqstp,
struct nfsd4_op *op)
{
return (op_encode_hdr_size
+ XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN) + 5) * sizeof(__be32);
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 200,551,216,128,172,660,000,000,000,000,000,000,000 | 6 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *dest, int dest_len, char **error TSRMLS_DC) /* {{{ */
{
php_stream_statbuf ssb;
int len;
php_stream *fp;
char *fullpath;
const char *slash;
mode_t mode;
cwd_state new_state;
char *filename;
size_t filename_len;
if (entry->is_moun... | 1 | [
"CWE-416"
] | php-src | eb7ba73079b73ca4ef91307ae1ef30b43468717b | 24,305,623,960,068,703,000,000,000,000,000,000,000 | 184 | virtual_file_ex uses emalloc in 5.6+ |
static struct thread_info *alloc_thread_info_node(struct task_struct *tsk,
int node)
{
return kmem_cache_alloc_node(thread_info_cache, THREADINFO_GFP, node);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | e66eded8309ebf679d3d3c1f5820d1f2ca332c71 | 85,283,618,180,245,160,000,000,000,000,000,000,000 | 5 | userns: Don't allow CLONE_NEWUSER | CLONE_FS
Don't allowing sharing the root directory with processes in a
different user namespace. There doesn't seem to be any point, and to
allow it would require the overhead of putting a user namespace
reference in fs_struct (for permission checks) and incrementing that
reference... |
cmsFloat64Number xpow10(int n)
{
return pow(10, (cmsFloat64Number) n);
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 150,793,145,605,947,670,000,000,000,000,000,000,000 | 4 | Fix some warnings from static analysis |
test_client_auth_failure (TestConnection *test,
gconstpointer data)
{
GIOStream *connection;
GError *error = NULL;
gboolean accepted_changed;
GSocketClient *client;
GTlsCertificate *cert;
GTlsCertificate *peer;
GTlsInteraction *interaction;
test->database = g_tls_file_databa... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 289,501,777,407,015,870,000,000,000,000,000,000,000 | 93 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
static int pppol2tp_recv_payload_hook(struct sk_buff *skb)
{
/* Skip PPP header, if present. In testing, Microsoft L2TP clients
* don't send the PPP header (PPP header compression enabled), but
* other clients can include the header. So we cope with both cases
* here. The PPP header is always FF03 when using L2... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 180,679,110,406,706,040,000,000,000,000,000,000,000 | 18 | 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... |
MagickExport BlobInfo *CloneBlobInfo(const BlobInfo *blob_info)
{
BlobInfo
*clone_info;
SemaphoreInfo
*semaphore;
clone_info=(BlobInfo *) AcquireMagickMemory(sizeof(*clone_info));
GetBlobInfo(clone_info);
if (blob_info == (BlobInfo *) NULL)
return(clone_info);
semaphore=clone_info->semaphore;
... | 0 | [
"CWE-416"
] | ImageMagick6 | 614a257295bdcdeda347086761062ac7658b6830 | 222,888,103,966,324,100,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick6/issues/43 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.