func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
on_notify_accepted_cas (GObject *obj, GParamSpec *spec, gpointer user_data) { gboolean *changed = user_data; g_assert_false (*changed); *changed = TRUE; }
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
154,375,768,633,633,400,000,000,000,000,000,000,000
8
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 unsigned int btrfs_inode_flags_to_fsflags(unsigned int flags) { unsigned int iflags = 0; if (flags & BTRFS_INODE_SYNC) iflags |= FS_SYNC_FL; if (flags & BTRFS_INODE_IMMUTABLE) iflags |= FS_IMMUTABLE_FL; if (flags & BTRFS_INODE_APPEND) iflags |= FS_APPEND_FL; if (flags & BTRFS_INODE_NODUMP) iflags |...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
239,502,447,656,560,300,000,000,000,000,000,000,000
26
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
xfs_dir_ialloc( struct xfs_trans **tpp, struct xfs_inode *dp, umode_t mode, xfs_nlink_t nlink, dev_t rdev, prid_t prid, struct xfs_inode **ipp) { struct xfs_buf *agibp; xfs_ino_t parent_ino = dp ? dp->i_ino : 0; xfs_ino_t ino; int error; ASSERT((*tpp)->t_flags & XFS_TRANS_PERM_LOG_RES); /* ...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
13,412,190,524,509,859,000,000,000,000,000,000,000
35
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
static void rx_complete (struct urb *urb) { struct sk_buff *skb = (struct sk_buff *) urb->context; struct skb_data *entry = (struct skb_data *) skb->cb; struct usbnet *dev = entry->dev; int urb_status = urb->status; enum skb_state state; skb_put (skb, urb->actual_length); state = rx_done; entry->urb = NU...
0
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
219,737,361,365,797,600,000,000,000,000,000,000,000
90
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
static BOOL rfx_process_message_frame_end(RFX_CONTEXT* context, RFX_MESSAGE* message, wStream* s, UINT16* pExpectedBlockType) { if (*pExpectedBlockType != WBT_FRAME_END) { WLog_ERR(TAG, "%s: message unexpected, wants WBT_FRAME_END", __FUNCTION__); return FALSE; } *pExp...
0
[ "CWE-125" ]
FreeRDP
3a06ce058f690b7fc1edad2f352c453376c2ebfe
254,736,220,470,366,770,000,000,000,000,000,000,000
13
Fixed oob read in rfx_process_message_tileset Check input data length Thanks to hac425 CVE-2020-11043
xmlCopyNode(xmlNodePtr node, int extended) { xmlNodePtr ret; ret = xmlStaticCopyNode(node, NULL, NULL, extended); return(ret); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
182,159,065,461,294,540,000,000,000,000,000,000,000
6
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...
COMPAT_SYSCALL_DEFINE3(sigaction, int, sig, const struct compat_old_sigaction __user *, act, struct compat_old_sigaction __user *, oact) { struct k_sigaction new_ka, old_ka; int ret; compat_old_sigset_t mask; compat_uptr_t handler, restorer; if (act) { if (!access_ok(act, sizeof(*act)) || __get...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
200,334,551,788,493,140,000,000,000,000,000,000,000
39
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
gs_pdf14_clist_device_push(gs_memory_t *mem, gs_gstate *pgs, gx_device **pcdev, gx_device *dev, const gs_pdf14trans_t *pdf14pct) { int code; pdf14_clist_device *p14dev; gx_device_clist_writer * const cdev = &((gx_device_clist *)dev)->writer; code = pdf14_create_clist_device(m...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
310,151,521,088,598,000,000,000,000,000,000,000,000
52
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
OSDMapRef get_osdmap() { return osdmap; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
233,951,231,085,968,350,000,000,000,000,000,000
3
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 ...
static int xdp_umem_map_pages(struct xdp_umem *umem) { unsigned int i; void *addr; for (i = 0; i < umem->npgs; i++) { if (PageHighMem(umem->pgs[i])) addr = vmap(&umem->pgs[i], 1, VM_MAP, PAGE_KERNEL); else addr = page_address(umem->pgs[i]); if (!addr) { xdp_umem_unmap_pages(umem); return -ENOMEM;...
0
[ "CWE-416", "CWE-787" ]
linux
99e3a236dd43d06c65af0a2ef9cb44306aef6e02
50,613,713,072,544,460,000,000,000,000,000,000,000
21
xsk: Add missing check on user supplied headroom size Add a check that the headroom cannot be larger than the available space in the chunk. In the current code, a malicious user can set the headroom to a value larger than the chunk size minus the fixed XDP headroom. That way packets with a length larger than the suppo...
static ssize_t queue_nomerges_store(struct request_queue *q, const char *page, size_t count) { unsigned long nm; ssize_t ret = queue_var_store(&nm, page, count); if (ret < 0) return ret; blk_queue_flag_clear(QUEUE_FLAG_NOMERGES, q); blk_queue_flag_clear(QUEUE_FLAG_NOXMERGES, q); if (nm == 2) blk_que...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
184,461,701,927,566,960,000,000,000,000,000,000,000
18
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
fuzzer_create_gl_context(UNUSED void *cookie, UNUSED int scanout_idx, struct virgl_renderer_gl_ctx_param *param) { struct virgl_gl_ctx_param vparams; vparams.shared = false; vparams.major_ver = param->major_ver; vparams.minor_ver = param->minor_ver; return virgl_egl_create_contex...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
331,813,868,722,905,040,000,000,000,000,000,000,000
9
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
m4_traceoff (struct obstack *obs, int argc, token_data **argv) { symbol *s; int i; if (argc == 1) hack_all_symbols (set_trace, NULL); else for (i = 1; i < argc; i++) { s = lookup_symbol (TOKEN_DATA_TEXT (argv[i]), SYMBOL_LOOKUP); if (s != NULL) set_trace (s, NULL); } }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
83,044,156,747,057,410,000,000,000,000,000,000,000
15
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
int kvm_arch_check_processor_compat(void *opaque) { struct cpuinfo_x86 *c = &cpu_data(smp_processor_id()); struct kvm_x86_init_ops *ops = opaque; WARN_ON(!irqs_disabled()); if (__cr4_reserved_bits(cpu_has, c) != __cr4_reserved_bits(cpu_has, &boot_cpu_data)) return -EIO; return ops->check_processor_compat...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
157,883,566,579,876,930,000,000,000,000,000,000,000
13
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
int SSL_get_sigalgs(SSL *s, int idx, int *psign, int *phash, int *psignhash, unsigned char *rsig, unsigned char *rhash) { uint16_t *psig = s->s3.tmp.peer_sigalgs; size_t numsigalgs = s->s3.tmp.peer_sigalgslen; if (psig == NULL || numsigalgs > INT_MAX) return 0...
0
[ "CWE-476" ]
openssl
5235ef44b93306a14d0b6c695b13c64b16e1fdec
50,856,499,702,460,260,000,000,000,000,000,000,000
28
Fix SSL_check_chain() The function SSL_check_chain() can be used by applications to check that a cert and chain is compatible with the negotiated parameters. This could be useful (for example) from the certificate callback. Unfortunately this function was applying TLSv1.2 sig algs rules and did not work correctly if T...
static struct page *get_huge_zero_page(void) { struct page *zero_page; retry: if (likely(atomic_inc_not_zero(&huge_zero_refcount))) return READ_ONCE(huge_zero_page); zero_page = alloc_pages((GFP_TRANSHUGE | __GFP_ZERO) & ~__GFP_MOVABLE, HPAGE_PMD_ORDER); if (!zero_page) { count_vm_event(THP_ZERO_PAGE_ALLOC_...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
49,005,561,000,870,740,000,000,000,000,000,000,000
26
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
RI_FKey_cascade_upd(PG_FUNCTION_ARGS) { TriggerData *trigdata = (TriggerData *) fcinfo->context; const RI_ConstraintInfo *riinfo; Relation fk_rel; Relation pk_rel; HeapTuple new_row; HeapTuple old_row; RI_QueryKey qkey; SPIPlanPtr qplan; int i; int j; /* * Check that this is a valid trigger call on th...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
270,288,756,108,578,780,000,000,000,000,000,000,000
172
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static int jpc_enc_encodemainbody(jpc_enc_t *enc) { int tileno; int tilex; int tiley; int i; jpc_sot_t *sot; jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_rlvl_t *lvl; int rlvlno; jpc_qcc_t *qcc; jpc_cod_t *cod; int adjust; int j; int absbandno...
1
[ "CWE-416" ]
jasper
03fe49ab96bf65fea784cdc256507ea88267fc7c
84,913,531,212,613,600,000,000,000,000,000,000,000
374
Fixed some potential double-free problems in the JPC codec.
free_config_tree( config_tree *ptree ) { #if defined(_MSC_VER) && defined (_DEBUG) _CrtCheckMemory(); #endif if (ptree->source.value.s != NULL) free(ptree->source.value.s); free_config_other_modes(ptree); free_config_auth(ptree); free_config_tos(ptree); free_config_monitor(ptree); free_config_access(ptree)...
0
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
149,556,735,713,542,240,000,000,000,000,000,000,000
41
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
parse_protocol_version (gchar * protocol, GstRTSPMsgType * type, GstRTSPVersion * version) { GstRTSPVersion rversion; GstRTSPResult res = GST_RTSP_OK; gchar *ver; if (G_LIKELY ((ver = strchr (protocol, '/')) != NULL)) { guint major; guint minor; gchar dummychar; *ver++ = '\0'; /* the ...
0
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
106,217,468,241,739,800,000,000,000,000,000,000,000
44
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
static int __net_init ctnetlink_net_init(struct net *net) { #ifdef CONFIG_NF_CONNTRACK_EVENTS int ret; ret = nf_conntrack_register_notifier(net, &ctnl_notifier); if (ret < 0) { pr_err("ctnetlink_init: cannot register notifier.\n"); goto err_out; } ret = nf_ct_expect_register_notifier(net, &ctnl_notifier_exp)...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
212,761,784,141,995,220,000,000,000,000,000,000,000
26
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
loop_get_status64(struct loop_device *lo, struct loop_info64 __user *arg) { struct loop_info64 info64; int err = 0; if (!arg) err = -EINVAL; if (!err) err = loop_get_status(lo, &info64); if (!err && copy_to_user(arg, &info64, sizeof(info64))) err = -EFAULT; return err; }
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
24,686,999,838,541,090,000,000,000,000,000,000,000
13
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
parse_table_features_next_table(struct ofpbuf *payload, unsigned long int *next_tables) { size_t i; memset(next_tables, 0, bitmap_n_bytes(255)); for (i = 0; i < payload->size; i++) { uint8_t id = ((const uint8_t *) payload->data)[i]; if (id >= 255) { ...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
189,661,743,819,577,960,000,000,000,000,000,000,000
15
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>
htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) { ctxt->errNo = XML_ERR_NO_MEMORY; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; } if (extra) ...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
206,821,441,679,386,300,000,000,000,000,000,000,000
20
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
inline void outputBits(int nBits, long long bits, long long &c, int &lc, char *&out) { c <<= nBits; lc += nBits; c |= bits; while (lc >= 8) *out++ = static_cast<char>((c >> (lc -= 8))); }
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
264,895,783,233,050,950,000,000,000,000,000,000,000
9
Make line_no with too large value(2**20) invalid. Fixes #124
pfm_buf_fmt_getsize(pfm_buffer_fmt_t *fmt, struct task_struct *task, unsigned int flags, int cpu, void *arg, unsigned long *size) { int ret = 0; if (fmt->fmt_getsize) ret = (*fmt->fmt_getsize)(task, flags, cpu, arg, size); return ret; }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
167,124,300,505,254,480,000,000,000,000,000,000,000
6
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static bool is_valid_cgroup(const char *name) { const char *p; for (p = name; *p; p++) { /* Use the ASCII printable characters range(32 - 127) * is reasonable, we kick out 32(SPACE) because it'll * break legacy lxc-ls */ if (*p <= 32 || *p >= 127 || *p == '/') return false; } return strcmp(name, "."...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
142,928,669,971,722,960,000,000,000,000,000,000,000
13
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) { struct ip_mc_list *im; ASSERT_RTNL(); for_each_pmc_rtnl(in_dev, im) { if (im->multiaddr == addr) { im->users++; ip_mc_add_src(in_dev, &addr, MCAST_EXCLUDE, 0, NULL, 0); goto out; } } im = kzalloc(sizeof(*im), GFP_KERNEL); if (!im) got...
0
[ "CWE-399", "CWE-703", "CWE-369" ]
linux
a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27
1,254,859,007,980,498,200,000,000,000,000,000,000
45
igmp: Avoid zero delay when receiving odd mixture of IGMP queries Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP behavior on v3 query during v2-compatibility mode') added yet another case for query parsing, which can result in max_delay = 0. Substitute a value of 1, as in the usual v3 case. Rep...
gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf = NULL; QtDemuxStream *stream; GstClockTime min_time; guint64 offset = 0; GstClockTime dts = GST_CLOCK_TIME_NONE; GstClockTime pts = GST_CLOCK_TIME_NONE; GstClockTime duration = 0; gboolean keyframe =...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
260,502,999,221,974,450,000,000,000,000,000,000,000
233
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
MagickExport MagickBooleanType GetOpenCLDeviceEnabled( const MagickCLDevice device) { if (device == (MagickCLDevice) NULL) return(MagickFalse); return(device->enabled); }
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
306,515,767,483,067,630,000,000,000,000,000,000,000
7
https://github.com/ImageMagick/ImageMagick/issues/790
static int __init create_tlb_single_page_flush_ceiling(void) { debugfs_create_file("tlb_single_page_flush_ceiling", S_IRUSR | S_IWUSR, arch_debugfs_dir, NULL, &fops_tlbflush); return 0; }
0
[ "CWE-362" ]
linux
71b3c126e61177eb693423f2e18a1914205b165e
138,977,181,908,638,940,000,000,000,000,000,000,000
6
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization When switch_mm() activates a new PGD, it also sets a bit that tells other CPUs that the PGD is in use so that TLB flush IPIs will be sent. In order for that to work correctly, the bit needs to be visible prior to loading the PGD and therefore star...
void addReplyNull(client *c) { if (c->resp == 2) { addReplyProto(c,"$-1\r\n",5); } else { addReplyProto(c,"_\r\n",3); } }
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
49,266,259,785,495,060,000,000,000,000,000,000,000
7
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
void pre_next_row() { dont_move= !peer_tracker.check_if_next_group(); }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
79,395,940,723,654,660,000,000,000,000,000,000,000
4
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static u64 fixed_mtrr_seg_unit_size(int seg) { return 8 << fixed_seg_table[seg].range_shift; }
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
120,265,590,796,537,800,000,000,000,000,000,000,000
4
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
void visit(User & /*ope*/) override { done_ = true; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
330,479,299,291,360,000,000,000,000,000,000,000,000
1
Fix #122
static i64 read_fdhist(rzip_control *control, void *buf, i64 len) { if (!TMP_OUTBUF) return read_1g(control, control->fd_hist, buf, len); if (unlikely(len + control->hist_ofs > control->out_maxlen)) { print_err("Trying to read beyond end of tmpoutbuf in read_fdhist\n"); return -1; } memcpy(buf, control->tmp_o...
0
[ "CWE-703" ]
lrzip
4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4
325,255,022,507,842,360,000,000,000,000,000,000,000
11
Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure.
static void write_end_of_flist(int f, int send_io_error) { if (xfer_flags_as_varint) { write_varint(f, 0); write_varint(f, send_io_error ? io_error : 0); } else if (send_io_error) { write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST); write_varint(f, io_error); } else write_byte(f, 0); }
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
44,519,538,790,180,100,000,000,000,000,000,000,000
11
Some extra file-list safety checks.
static struct mount *next_mnt(struct mount *p, struct mount *root) { struct list_head *next = p->mnt_mounts.next; if (next == &p->mnt_mounts) { while (1) { if (p == root) return NULL; next = p->mnt_child.next; if (next != &p->mnt_parent->mnt_mounts) break; p = p->mnt_parent; } } return list_...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
143,385,913,294,103,780,000,000,000,000,000,000,000
15
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
static void rng_egd_request_entropy(RngBackend *b, size_t size, EntropyReceiveFunc *receive_entropy, void *opaque) { RngEgd *s = RNG_EGD(b); RngRequest *req; req = g_malloc(sizeof(*req)); req->offset = 0; req->size = size; ...
1
[ "CWE-119" ]
qemu
60253ed1e6ec6d8e5ef2efe7bf755f475dce9956
124,512,490,561,643,330,000,000,000,000,000,000,000
30
rng: add request queue support to rng-random Requests are now created in the RngBackend parent class and the code path is shared by both rng-egd and rng-random. This commit fixes the rng-random implementation which processed only one request at a time and simply discarded all but the most recent one. In the guest thi...
_XimOpenCheck( Xim im, INT16 len, XPointer data, XPointer arg) { CARD8 major_opcode = *((CARD8 *)data); CARD8 minor_opcode = *((CARD8 *)data + 1); if ((major_opcode == XIM_OPEN_REPLY) && (minor_opcode == 0)) return True; if ((major_opcode == XIM_ERROR) && (minor_opcode...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
33,330,339,103,884,396,000,000,000,000,000,000,000
17
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
void visit_any_double(T value) { writer_.write_double(value, spec_); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
271,545,679,016,545,530,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
early_console_setup (char *cmdline) { int earlycons = 0; #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE { extern int sn_serial_console_early_setup(void); if (!sn_serial_console_early_setup()) earlycons++; } #endif #ifdef CONFIG_EFI_PCDP if (!efi_setup_pcdp_console(cmdline)) earlycons++; #endif if (!simcons_register...
0
[ "CWE-119", "CWE-787" ]
linux
4dcc29e1574d88f4465ba865ed82800032f76418
142,246,793,513,060,680,000,000,000,000,000,000,000
20
[IA64] Workaround for RSE issue Problem: An application violating the architectural rules regarding operation dependencies and having specific Register Stack Engine (RSE) state at the time of the violation, may result in an illegal operation fault and invalid RSE state. Such faults may initiate a cascade of repeated ...
local int complain(char *fmt, ...) { va_list ap; if (g.verbosity > 0) { fprintf(stderr, "%s: ", g.prog); va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); putc('\n', stderr); fflush(stderr); } return 0; }
0
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
108,559,890,358,638,550,000,000,000,000,000,000,000
14
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
static int ethtool_set_sg(struct net_device *dev, char __user *useraddr) { struct ethtool_value edata; if (!dev->ethtool_ops->set_sg) return -EOPNOTSUPP; if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; if (edata.data && !(dev->features & NETIF_F_ALL_CSUM)) return -EINVAL; return...
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
237,295,051,774,971,500,000,000,000,000,000,000,000
16
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
static ssize_t autosuspend_delay_ms_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { long delay; if (!dev->power.use_autosuspend) return -EIO; if (kstrtol(buf, 10, &delay) != 0 || delay != (int) delay) return -EINVAL; device_lock(dev); pm_runtime_set_autosuspend_delay(...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
49,098,221,859,033,730,000,000,000,000,000,000,000
16
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...
PHP_FUNCTION(curl_getinfo) { zval *zid; php_curl *ch; long option = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zid, &option) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl); if (ZEND_NUM_ARGS() < 2) { char *s_code; long l_code; d...
0
[]
php-src
5fdfab743d964bb13602effc9efcd6f747e2f58c
308,601,655,961,606,900,000,000,000,000,000,000,000
204
Fixed bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec)
static void ping_clear_saddr(struct sock *sk, int dif) { sk->sk_bound_dev_if = dif; if (sk->sk_family == AF_INET) { struct inet_sock *isk = inet_sk(sk); isk->inet_rcv_saddr = isk->inet_saddr = 0; #if IS_ENABLED(CONFIG_IPV6) } else if (sk->sk_family == AF_INET6) { struct ipv6_pinfo *np = inet6_sk(sk); memset(...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
289,385,479,329,327,500,000,000,000,000,000,000,000
14
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static void test_bug5126() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[2]; int32 c1, c2; const char *stmt_text; int rc; myheader("test_bug5126"); stmt_text= "DROP TABLE IF EXISTS t1"; rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text)); myquery(rc); stmt_text= "CREATE TABLE t1 (a mediumint, b in...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
13,100,706,172,673,182,000,000,000,000,000,000,000
46
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
int FileIo::seek(long offset, Position pos) { assert(p_->fp_ != 0); int fileSeek = 0; switch (pos) { case BasicIo::cur: fileSeek = SEEK_CUR; break; case BasicIo::beg: fileSeek = SEEK_SET; break; case BasicIo::end: fileSeek = SEEK_END; break; } if...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
261,414,731,403,839,460,000,000,000,000,000,000,000
16
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static void hns_nic_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *stats) { int idx = 0; u64 tx_bytes = 0; u64 rx_bytes = 0; u64 tx_pkts = 0; u64 rx_pkts = 0; struct hns_nic_priv *priv = netdev_priv(ndev); struct hnae_handle *h = priv->ae_handle; for (idx = 0; idx < h->q_num; idx++) { tx_...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
181,259,820,206,256,100,000,000,000,000,000,000,000
44
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
ipmi_set_alert_enable(struct ipmi_intf *intf, uint8_t channel, uint8_t enable) { struct channel_access_t channel_access; int ccode = 0; memset(&channel_access, 0, sizeof(channel_access)); channel_access.channel = channel; ccode = _ipmi_get_channel_access(intf, &channel_access, 0); if (eval_ccode(ccode) != 0) { ...
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
198,466,966,178,854,630,000,000,000,000,000,000,000
39
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
static struct vxlan_sock *vxlan_socket_create(struct net *net, bool ipv6, __be16 port, u32 flags, int ifindex) { struct vxlan_net *vn = net_generic(net, vxlan_net_id); struct vxlan_sock *vs; struct socket *sock; unsigned int h; struct udp_tunnel_sock_cfg tunnel_cfg; vs = kzalloc(sizeof(*vs)...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
3,640,699,813,389,773,000,000,000,000,000,000,000
49
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...
lys_inout_free(struct ly_ctx *ctx, struct lys_node_inout *io, void (*private_destructor)(const struct lys_node *node, void *priv)) { int i; /* handle only specific parts for LYS_INPUT and LYS_OUTPUT */ for (i = 0; i < io->tpdf_size; i++) { lys_tpdf_free(ctx, &io->tpdf[i], private_des...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
120,825,026,040,223,300,000,000,000,000,000,000,000
16
schema tree BUGFIX do not check features while still resolving schema Fixes #723
static int connect_helper(struct transport *transport, const char *name, const char *exec, int fd[2]) { struct helper_data *data = transport->data; /* Get_helper so connect is inited. */ get_helper(transport); if (!data->connect) die("Operation not supported by protocol."); if (!process_connect_service(tr...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
129,591,587,843,567,930,000,000,000,000,000,000,000
17
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
void tcp_v4_destroy_sock(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); tcp_clear_xmit_timers(sk); tcp_cleanup_congestion_control(sk); /* Cleanup up the write buffer. */ tcp_write_queue_purge(sk); /* Cleans up our, hopefully empty, out_of_order_queue. */ __skb_queue_purge(&tp->out_of_order_queue); #if...
1
[]
linux
7bced397510ab569d31de4c70b39e13355046387
287,950,657,506,746,130,000,000,000,000,000,000,000
43
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...
PHP_METHOD(imagickkernel, addkernel) { zval *objvar; KernelInfo *kernel_info_add_clone; KernelInfo *kernel_info; KernelInfo *kernel_info_target; php_imagickkernel_object *kernel; php_imagickkernel_object *internp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objvar, php_imagickkernel_sc_entry) =...
0
[ "CWE-787" ]
imagick
7187b37250b87edb75160c7beda980f2fa308f5d
272,153,809,034,665,370,000,000,000,000,000,000,000
34
Bounds check kernel origin position.
static int __init hid_init(void) { int retval = -ENOMEM; retval = usbhid_quirks_init(quirks_param); if (retval) goto usbhid_quirks_init_fail; retval = usb_register(&hid_driver); if (retval) goto usb_register_fail; pr_info(KBUILD_MODNAME ": " DRIVER_DESC "\n"); return 0; usb_register_fail: usbhid_quirks_ex...
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
141,627,771,810,330,160,000,000,000,000,000,000,000
18
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
static void b43_dma_tx_resume_ring(struct b43_dmaring *ring) { B43_WARN_ON(!ring->tx); ring->ops->tx_resume(ring); }
0
[ "CWE-119", "CWE-787" ]
linux
c85ce65ecac078ab1a1835c87c4a6319cf74660a
76,857,598,391,061,000,000,000,000,000,000,000,000
5
b43: allocate receive buffers big enough for max frame len + offset Otherwise, skb_put inside of dma_rx can fail... https://bugzilla.kernel.org/show_bug.cgi?id=32042 Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable@kernel.org
do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long sp) { stack_t oss; int error; oss.ss_sp = (void __user *) current->sas_ss_sp; oss.ss_size = current->sas_ss_size; oss.ss_flags = sas_ss_flags(sp); if (uss) { void __user *ss_sp; size_t ss_size; int ss_flags; error = -EFAULT;...
0
[]
linux-2.6
0083fc2c50e6c5127c2802ad323adf8143ab7856
99,708,834,529,023,220,000,000,000,000,000,000,000
63
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...
xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, xmlCharEncodingHandlerPtr handler, int len) { int nbchars; if (handler == NULL) return (-1); if (input == NULL) return (-1); if (input->buf != NULL) { if (input->buf->encoder != N...
0
[ "CWE-119" ]
libxml2
23f05e0c33987d6605387b300c4be5da2120a7ab
14,579,404,526,380,311,000,000,000,000,000,000,000
118
Detect excessive entities expansion upon replacement If entities expansion in the XML parser is asked for, it is possble to craft relatively small input document leading to excessive on-the-fly content generation. This patch accounts for those replacement and stop parsing after a given threshold. it can be bypassed as...
static int get_tx_bufs(struct vhost_net *net, struct vhost_net_virtqueue *nvq, struct msghdr *msg, unsigned int *out, unsigned int *in, size_t *len, bool *busyloop_intr) { struct vhost_virtqueue *vq = &nvq->vq; int ret; ret = vhost_net_tx_get_vq_desc(net, nvq, out, in, msg, busyl...
0
[ "CWE-787" ]
linux
42d84c8490f9f0931786f1623191fcab397c3d64
213,621,519,609,755,980,000,000,000,000,000,000,000
30
vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax2...
static int acquire_reference_state(struct bpf_verifier_env *env, int insn_idx) { struct bpf_func_state *state = cur_func(env); int new_ofs = state->acquired_refs; int id, err; err = resize_reference_state(state, state->acquired_refs + 1); if (err) return err; id = ++env->id_gen; state->refs[new_ofs].id = id; ...
0
[ "CWE-843" ]
bpf
5b029a32cfe4600f5e10e36b41778506b90fd4de
37,125,298,617,517,360,000,000,000,000,000,000,000
15
bpf: Fix ringbuf helper function compatibility Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") extended check_map_func_compatibility() by enforcing map -> helper function match, but not helper -> map type match. Due to this all of the bpf_ringbuf_*() helper functions could be used w...
int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 if_idx, u8 filter, u32 ie_mask) { struct sk_buff *skb; struct wmi_bss_filter_cmd *cmd; int ret; if (filter >= LAST_BSS_FILTER) return -EINVAL; skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); if (!skb) return -ENOMEM; cmd = (struct wmi_bss_filter_cmd *) skb->dat...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
10,560,620,119,431,530,000,000,000,000,000,000,000
21
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
SSLNetVConnection::map_tls_protocol_to_tag(const char *proto_string) const { std::string_view retval{"tls/?.?"sv}; // return this if the protocol lookup doesn't work. if (proto_string) { // openSSL guarantees the case of the protocol string. if (proto_string[0] == 'T' && proto_string[1] == 'L' && proto_str...
0
[ "CWE-284" ]
trafficserver
d3f36f79820ea10c26573c742b1bbc370c351716
284,749,707,100,146,250,000,000,000,000,000,000,000
29
Bug fix in origin connection handling (#8731) Co-authored-by: Takuya Kitano <tkitano@yahoo-corp.jp>
bool ElectronBrowserClient::BindAssociatedReceiverFromFrame( content::RenderFrameHost* render_frame_host, const std::string& interface_name, mojo::ScopedInterfaceEndpointHandle* handle) { if (interface_name == mojom::ElectronAutofillDriver::Name_) { AutofillDriverFactory::BindAutofillDriver( m...
1
[]
electron
6d9f3a494596d6b3e30938af9deb2c79f1c7f797
206,050,476,453,281,200,000,000,000,000,000,000,000
31
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191) fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367) * Make ElectronBrowser mojo interface frame associated. (#32815) Co-authored-by: Marek Haranczyk <marek@openfin.co> * fix: e...
static ssize_t ui_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos) { struct hfi1_devdata *dd = filp->private_data; void __iomem *base; unsigned long total, data, csr_off; int in_lcb; /* only write 8 byte quantities */ if ((count % 8) != 0) return -EINVAL; /* offset must be 8-by...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
298,294,691,489,872,440,000,000,000,000,000,000,000
49
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
static md_mod_conf_t *md_mod_conf_get(apr_pool_t *pool, int create) { if (mod_md_config) { return mod_md_config; /* reused for lifetime of the pool */ } if (create) { mod_md_config = apr_pcalloc(pool, sizeof(*mod_md_config)); memcpy(mod_md_config, &defmc, sizeof(*mod_md_config)); ...
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
273,460,346,576,799,150,000,000,000,000,000,000,000
17
v1.1.12, notifycmd improvements
void __init proc_caches_init(void) { sighand_cachep = kmem_cache_create("sighand_cache", sizeof(struct sighand_struct), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_TYPESAFE_BY_RCU| SLAB_NOTRACK|SLAB_ACCOUNT, sighand_ctor); signal_cachep = kmem_cache_create("signal_cache", sizeof(struct signal_struct), 0, SLA...
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
240,548,194,650,250,930,000,000,000,000,000,000,000
33
fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new erro...
virtual void SetLength(size_t l) { m_total = l; }
0
[ "CWE-426", "CWE-401" ]
winsparkle
bb454857348245a7397f9e4fbb3a902f4ac25913
7,441,868,111,634,783,000,000,000,000,000,000,000
1
Verify UpdateTempDir isn't maliciously modified Don't just delete the stored updates temporary directory on launch, but validate the registry key to ensure it is in an expected location and follows WinSparkle's naming convention. This is to prevent malicious users from modifying this registry key and forcing the host ...
list_ne_name_resources (WinLibrary *fi, WinResource *typeres, int *count) { int c, rescnt; WinResource *wr; Win16NETypeInfo *typeinfo = (Win16NETypeInfo *) typeres->this; Win16NENameInfo *nameinfo = (Win16NENameInfo *) typeres->children; /* count number of `type' resources */ RETURN_IF_BAD_POIN...
0
[]
icoutils
a8c8543731ed255e6f8bb81c662155f98710ac20
174,442,243,751,745,540,000,000,000,000,000,000,000
32
wrestool: read_library() moves memory around, check it doesn't overwrite header data
get_breakindent_win( win_T *wp, char_u *line) // start of the line { static int prev_indent = 0; // cached indent value static long prev_ts = 0L; // cached tabstop value static char_u *prev_line = NULL; // cached pointer to line static varnumber_T prev_tick = 0; // changedtick of...
0
[ "CWE-122", "CWE-787" ]
vim
652dee448618589de5528a9e9a36995803f5557a
80,872,932,432,595,400,000,000,000,000,000,000,000
106
patch 8.2.4245: ":retab 0" may cause illegal memory access Problem: ":retab 0" may cause illegal memory access. Solution: Limit the value of 'tabstop' to 10000.
static void shmem_free_inode(struct super_block *sb) { struct shmem_sb_info *sbinfo = SHMEM_SB(sb); if (sbinfo->max_inodes) { spin_lock(&sbinfo->stat_lock); sbinfo->free_inodes++; spin_unlock(&sbinfo->stat_lock); } }
0
[ "CWE-400" ]
linux-2.6
14fcc23fdc78e9d32372553ccf21758a9bd56fa1
74,396,833,046,704,640,000,000,000,000,000,000,000
9
tmpfs: fix kernel BUG in shmem_delete_inode SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814 on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages to a tmpfs directory, incrementing i_blocks ...
GF_Box *gnrv_box_new() { ISOM_DECL_BOX_ALLOC(GF_GenericVisualSampleEntryBox, GF_ISOM_BOX_TYPE_GNRV); gf_isom_video_sample_entry_init((GF_VisualSampleEntryBox*) tmp); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
256,026,520,272,749,100,000,000,000,000,000,000,000
6
fixed #1587
void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, X509_STORE_CTX_verify_cb verify_cb) { ctx->verify_cb = verify_cb; }
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
116,791,027,280,275,300,000,000,000,000,000,000,000
5
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
isdn_net_ciscohdlck_slarp_in(isdn_net_local *lp, struct sk_buff *skb) { unsigned char *p; int period; u32 code; u32 my_seq; u32 your_seq; __be32 local; __be32 *addr, *mask; if (skb->len < 14) return; p = skb->data; code = be32_to_cpup((__be32 *)p); p += 4; switch (code) { case CISCO_SLARP_REQUEST: l...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
101,860,026,389,936,650,000,000,000,000,000,000,000
58
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static void l2cap_sock_destruct(struct sock *sk) { BT_DBG("sk %p", sk); if (l2cap_pi(sk)->chan) { l2cap_pi(sk)->chan->data = NULL; l2cap_chan_put(l2cap_pi(sk)->chan); } if (l2cap_pi(sk)->rx_busy_skb) { kfree_skb(l2cap_pi(sk)->rx_busy_skb); l2cap_pi(sk)->rx_busy_skb = NULL; } skb_queue_purge(&sk->sk_rec...
0
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
67,116,153,381,334,500,000,000,000,000,000,000,000
17
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
inline CImg<_cimg_Tfloat> operator-(const char *const expression, const CImg<T>& img) { return CImg<_cimg_Tfloat>(img,false).fill(expression,true)-=img; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
239,109,915,423,293,200,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.
read_value_block(vector_t *strvec) { vector_t *ret_vec; alloc_value_block(read_value_block_line, vector_slot(strvec,0)); ret_vec = read_value_block_vec; read_value_block_vec = NULL; return ret_vec; }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
89,277,499,274,777,100,000,000,000,000,000,000,000
11
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
void Item_field::cleanup() { DBUG_ENTER("Item_field::cleanup"); Item_ident::cleanup(); depended_from= NULL; /* Even if this object was created by direct link to field in setup_wild() it will be linked correctly next time by name of field and table alias. I.e. we can drop 'field'. */ field= 0; ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
121,954,809,189,434,150,000,000,000,000,000,000,000
15
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.
CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done) { CURLcode result = CURLE_OK; if(conn && conn->handler->connecting) { *done = FALSE; result = conn->handler->connecting(conn, done); } else *done = TRUE; return result; }
0
[ "CWE-119" ]
curl
9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400
293,076,579,897,917,080,000,000,000,000,000,000,000
14
url: fix alignment of ssl_backend_data struct - Align the array of ssl_backend_data on a max 32 byte boundary. 8 is likely to be ok but I went with 32 for posterity should one of the ssl_backend_data structs change to contain a larger sized variable in the future. Prior to this change (since dev 70f1db3, release 7.5...
R_API ut16 r_bin_java_calculate_method_access_value(const char *access_flags_str) { return calculate_access_value (access_flags_str, METHOD_ACCESS_FLAGS); }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
4,186,082,613,822,493,000,000,000,000,000,000,000
3
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
kadm5_get_strings(void *server_handle, krb5_principal principal, krb5_string_attr **strings_out, int *count_out) { kadm5_server_handle_t handle = server_handle; kadm5_ret_t ret; krb5_db_entry *kdb = NULL; *strings_out = NULL; *count_out = 0; CHECK_HANDLE(server_handle); if...
0
[ "CWE-703" ]
krb5
c5be6209311d4a8f10fda37d0d3f876c1b33b77b
238,390,009,807,117,680,000,000,000,000,000,000,000
21
Null pointer deref in kadmind [CVE-2012-1013] The fix for #6626 could cause kadmind to dereference a null pointer if a create-principal request contains no password but does contain the KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix name"). Only clients authorized to create principals can trigger ...
NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx chtype newmode, NCURSES_SP_OUTC outc) { attr_t turn_on, turn_off; int pair; bool reverse = FALSE; bool can_color = (SP_PARM == 0 || SP_PARM->_coloron); #if NCURSES_EXT_FUNCS bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
129,918,053,462,927,400,000,000,000,000,000,000,000
234
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
BOOL update_write_switch_surface_order(wStream* s, const SWITCH_SURFACE_ORDER* switch_surface) { int inf = update_approximate_switch_surface_order(switch_surface); if (!Stream_EnsureRemainingCapacity(s, inf)) return FALSE; Stream_Write_UINT16(s, switch_surface->bitmapId); /* bitmapId (2 bytes) */ return TRUE; }
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
114,597,453,266,077,790,000,000,000,000,000,000,000
10
Fixed #6013: Check new length is > 0
R_API int r_core_cmd(RCore *core, const char *cstr, int log) { char *cmd, *ocmd, *ptr, *rcmd; int ret = false, i; r_th_lock_enter (core->lock); if (core->cmdfilter) { const char *invalid_chars = ";|>`@"; for (i = 0; invalid_chars[i]; i++) { if (strchr (cstr, invalid_chars[i])) { ret = true; goto bea...
0
[ "CWE-119", "CWE-787" ]
radare2
00e8f205475332d7842d0f0d1481eeab4e83017c
265,107,325,072,694,340,000,000,000,000,000,000,000
105
Fix #7727 - undefined pointers and out of band string access fixes
ModuleExport size_t RegisterICONImage(void) { MagickInfo *entry; entry=SetMagickInfo("CUR"); entry->decoder=(DecodeImageHandler *) ReadICONImage; entry->encoder=(EncodeImageHandler *) WriteICONImage; entry->adjoin=MagickFalse; entry->seekable_stream=MagickTrue; entry->description=ConstantString("Micr...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
327,337,472,165,871,400,000,000,000,000,000,000,000
31
Fix ultra rare but potential memory-leak
LEX::create_unit(SELECT_LEX *first_sel) { SELECT_LEX_UNIT *unit; DBUG_ENTER("LEX::create_unit"); unit = first_sel->master_unit(); if (!unit && !(unit= alloc_unit())) DBUG_RETURN(NULL); unit->register_select_chain(first_sel); if (first_sel->next_select()) { unit->reset_distinct(); DBUG_ASSER...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
188,390,830,553,218,180,000,000,000,000,000,000,000
20
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static bool check_access(int sock, const char **allow_list, const char **deny_list) { bool ret = false; bool only_ip = false; char addr[INET6_ADDRSTRLEN]; if ((!deny_list || *deny_list==0) && (!allow_list || *allow_list==0)) { return true; } /* Bypass name resolution calls if the lists * only contain IP...
0
[]
samba
91f4275873ebeda8f57684f09df67162ae80515a
262,949,729,389,686,800,000,000,000,000,000,000,000
43
swat: Use additional nonce on XSRF protection If the user had a weak password on the root account of a machine running SWAT, there still was a chance of being targetted by an XSRF on a malicious web site targetting the SWAT setup. Use a random nonce stored in secrets.tdb to close this possible attack window. Thanks t...
static int bpf_stats_release(struct inode *inode, struct file *file) { mutex_lock(&bpf_stats_enabled_mutex); static_key_slow_dec(&bpf_stats_enabled_key.key); mutex_unlock(&bpf_stats_enabled_mutex); return 0; }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
169,908,770,695,529,170,000,000,000,000,000,000,000
7
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int level = 0; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); end = ptr + n; } } while (HAS_CHAR(enc, pt...
0
[ "CWE-116" ]
libexpat
3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6
282,633,139,256,608,800,000,000,000,000,000,000,000
48
lib: Add missing validation of encoding (CVE-2022-25235)
static void nlmclnt_rpc_release(void *data) { nlmclnt_release_call(data); }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
262,789,173,933,045,800,000,000,000,000,000,000,000
4
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
write_pool(struct entropy_store *r, const char __user *buffer, size_t count) { size_t bytes; __u32 buf[16]; const char __user *p = buffer; while (count > 0) { bytes = min(count, sizeof(buf)); if (copy_from_user(&buf, p, bytes)) return -EFAULT; count -= bytes; p += bytes; mix_pool_bytes(r, buf, bytes...
0
[ "CWE-310" ]
linux-2.6
8a0a9bd4db63bc45e3017bedeafbd88d0eb84d02
66,028,292,825,934,730,000,000,000,000,000,000,000
20
random: make get_random_int() more random It's a really simple patch that basically just open-codes the current "secure_ip_id()" call, but when open-coding it we now use a _static_ hashing area, so that it gets updated every time. And to make sure somebody can't just start from the same original seed of all-zeroes, a...
UnicodeStringTest::_testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number) { if(s.hasMoreChar32Than(start, length, number)!=_refUnicodeStringHasMoreChar32Than(s, start, length, number)) { errln("hasMoreChar32Than(%d, %d, %d)=%hd is wrong\n", ...
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
46,634,632,811,787,890,000,000,000,000,000,000,000
6
ICU-20958 Prevent SEGV_MAPERR in append See #971
brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm) { struct brcmf_cfg80211_vif *vif = wdev_to_vif(wdev); s32 qdbm = 0; s32 err; brcmf_dbg(TRACE, "Enter\n"); if (!check_vif_up(vif)) return -EIO; err = brcmf_fil_iovar_int_get(vif->ifp, "qtxpower", &qdbm); if (err) { ...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
94,269,342,930,114,940,000,000,000,000,000,000,000
22
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
int tipc_nl_node_reset_link_stats(struct sk_buff *skb, struct genl_info *info) { int err; char *link_name; unsigned int bearer_id; struct tipc_link *link; struct tipc_node *node; struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1]; struct net *net = sock_net(skb->sk); struct tipc_net *tn = tipc_net(net); struct tipc_l...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
129,696,194,063,365,030,000,000,000,000,000,000,000
66
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
rsrc_cmp_node(const struct archive_rb_node *n1, const struct archive_rb_node *n2) { const struct zip_entry *e1 = (const struct zip_entry *)n1; const struct zip_entry *e2 = (const struct zip_entry *)n2; return (strcmp(e2->rsrcname.s, e1->rsrcname.s)); }
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
30,107,716,219,009,950,000,000,000,000,000,000,000
8
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
static void ieee80211_iface_work(struct work_struct *work) { struct ieee80211_sub_if_data *sdata = container_of(work, struct ieee80211_sub_if_data, work); struct ieee80211_local *local = sdata->local; struct sk_buff *skb; struct sta_info *sta; struct ieee80211_ra_tid *ra_tid; if (!ieee80211_sdata_running(sdata...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
153,967,535,519,466,460,000,000,000,000,000,000,000
129
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
GF_Err m4ds_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u8 *enc_ods; u32 enc_od_size; GF_MPEG4ExtensionDescriptorsBox *ptr = (GF_MPEG4ExtensionDescriptorsBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; enc_ods = NULL; enc_od_size = 0; e = gf_odf_desc_list_wr...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
225,733,311,863,435,900,000,000,000,000,000,000,000
19
fixed #1785 (fuzz)
static inline PixelTrait GetPixelBlackTraits(const Image *restrict image) { return(image->channel_map[BlackPixelChannel].traits); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
325,440,928,455,552,500,000,000,000,000,000,000,000
4
void PackLinuxElf::defineSymbols(Filter const *) { linker->defineSymbol("O_BINFO", o_binfo); }
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
217,780,670,876,768,130,000,000,000,000,000,000,000
4
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp