func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GF_Box *alis_box_new() { ISOM_DECL_BOX_ALLOC(GF_DataEntryAliasBox, GF_QT_BOX_TYPE_ALIS); return (GF_Box *)tmp; }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
202,939,168,640,326,600,000,000,000,000,000,000,000
5
fixed potential crash - cf #1263
add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg, uint64_t page_size) { uint64_t reg_size = reg->size; uint64_t host_user_addr = reg->host_user_addr; uint64_t guest_phys_addr = reg->guest_phys_addr; uint64_t host_phys_addr; uint64_t size; host_phys_addr = rte_mem_virt2iova((void *)(uin...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
326,346,801,272,621,300,000,000,000,000,000,000,000
41
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk, int cmd, int data) { struct request *rq; int err; rq = blk_get_request(q, WRITE, __GFP_WAIT); rq->cmd_type = REQ_TYPE_BLOCK_PC; rq->data = NULL; rq->data_len = 0; rq->extra_len = 0; rq->timeout = BLK_DEFAULT_SG_TIMEOUT; r...
0
[ "CWE-399" ]
linux-2.6
f2f1fa78a155524b849edf359e42a3001ea652c0
167,156,212,871,333,580,000,000,000,000,000,000,000
20
Enforce a minimum SG_IO timeout There's no point in having too short SG_IO timeouts, since if the command does end up timing out, we'll end up through the reset sequence that is several seconds long in order to abort the command that timed out. As a result, shorter timeouts than a few seconds simply do not make sense...
virtual void updateFont(GfxState *state) { }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
185,794,397,075,400,600,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static double mp_list_depth(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); return (double)mp.imglist[ind]._depth; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
330,787,561,465,616,100,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
TEST_F(RouterTest, ConnectPauseNoResume) { // Explicitly configure an HTTP upstream, to test factory creation. cm_.thread_local_cluster_.cluster_.info_->upstream_config_ = absl::make_optional<envoy::config::core::v3::TypedExtensionConfig>(); envoy::extensions::upstreams::http::http::v3::HttpConnectionPoolPr...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
73,160,237,050,713,120,000,000,000,000,000,000,000
39
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void setError(UErrorCode& ec, UErrorCode err) { if (U_SUCCESS(ec)) { ec = err; } }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
8,034,529,901,722,793,000,000,000,000,000,000,000
5
ICU-20246 Fixing another integer overflow in number parsing.
char* dd_load_text_ext(const struct dump_dir *dd, const char *name, unsigned flags) { // if (!dd->locked) // error_msg_and_die("dump_dir is not opened"); /* bug */ if (!str_is_correct_filename(name)) { error_msg("Cannot load text. '%s' is not a valid file name", name); if (!(flags & D...
1
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
58,806,084,395,265,575,000,000,000,000,000,000,000
22
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
static Bool adts_dmx_sync_frame_bs(GF_BitStream *bs, ADTSHeader *hdr) { u32 val; u64 pos; while (gf_bs_available(bs)>7) { val = gf_bs_read_u8(bs); if (val!=0xFF) continue; val = gf_bs_read_int(bs, 4); if (val != 0x0F) { gf_bs_read_int(bs, 4); continue; } hdr->is_mp2 = (Bool)gf_bs_read_int(bs, 1); ...
0
[ "CWE-476", "CWE-787" ]
gpac
22774aa9e62f586319c8f107f5bae950fed900bc
12,396,286,037,079,902,000,000,000,000,000,000,000
65
fixed potential crash in adts reframer with broken streams - cf #1723
static int break_ksm(struct vm_area_struct *vma, unsigned long addr) { struct page *page; int ret = 0; do { cond_resched(); page = follow_page(vma, addr, FOLL_GET); if (IS_ERR_OR_NULL(page)) break; if (PageKsm(page)) ret = handle_mm_fault(vma->vm_mm, vma, addr, FAULT_FLAG_WRITE); else ret ...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
1,631,897,480,858,169,000,000,000,000,000,000,000
47
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
htp_status_t htp_tx_req_set_uri(htp_tx_t *tx, const char *uri, size_t uri_len, enum htp_alloc_strategy_t alloc) { if ((tx == NULL) || (uri == NULL)) return HTP_ERROR; tx->request_uri = copy_or_wrap_mem(uri, uri_len, alloc); if (tx->request_uri == NULL) return HTP_ERROR; return HTP_OK; }
0
[]
libhtp
c7c03843cd6b1cbf44eb435d160ba53aec948828
56,147,721,297,511,540,000,000,000,000,000,000,000
8
Harden decompress code against memory stress Under severe memory pressure the decompress code can fail to setup properly. Add checks before dereferencing pointers.
int wakeup_source_sysfs_add(struct device *parent, struct wakeup_source *ws) { struct device *dev; dev = wakeup_source_device_create(parent, ws); if (IS_ERR(dev)) return PTR_ERR(dev); ws->dev = dev; return 0; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
22,760,754,580,729,610,000,000,000,000,000,000,000
11
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...
int ppp_register_channel(struct ppp_channel *chan) { return ppp_register_net_channel(current->nsproxy->net_ns, chan); }
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
41,109,785,916,717,706,000,000,000,000,000,000,000
4
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
bool FunctionContextImpl::check_allocations_empty() { if (_allocations.empty() && _external_bytes_tracked == 0) { return true; } // TODO: fix this //if (_debug) _context->set_error("Leaked allocations."); return false; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
2,128,458,912,902,215,200,000,000,000,000,000,000
9
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
String *Field_longstr::uncompress(String *val_buffer, String *val_ptr, const uchar *from, uint from_length) { if (from_length) { uchar method= (*from & 0xF0) >> 4; /* Uncompressed data */ if (!method) { val_ptr->set((const char*) from + 1, from_length - 1, fi...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
239,367,792,564,101,940,000,000,000,000,000,000,000
34
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
ecma_date_min_from_time (ecma_number_t time) /**< time value */ { JERRY_ASSERT (!ecma_number_is_nan (time)); int32_t time_in_day = ecma_date_time_in_day_from_time (time); return ((int32_t) (time_in_day / ECMA_DATE_MS_PER_MINUTE)) % ECMA_DATE_MINUTES_PER_HOUR; } /* ecma_date_min_from_time */
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
308,558,106,687,174,400,000,000,000,000,000,000,000
8
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static int xennet_fill_frags(struct netfront_queue *queue, struct sk_buff *skb, struct sk_buff_head *list) { RING_IDX cons = queue->rx.rsp_cons; struct sk_buff *nskb; while ((nskb = __skb_dequeue(list))) { struct xen_netif_rx_response rx; skb_frag_t *nfrag = &skb_shinfo(nskb)->frags[0]; RING_...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
133,519,759,218,387,460,000,000,000,000,000,000,000
38
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
static void function_rename(RzFlag *flags, RzAnalysisFunction *fcn) { const char *locname = "loc."; const size_t locsize = strlen(locname); char *fcnname = fcn->name; if (strncmp(fcn->name, locname, locsize) == 0) { const char *fcnpfx, *restofname; RzFlagItem *f; fcn->type = RZ_ANALYSIS_FCN_TYPE_FCN; fcnp...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
273,545,558,069,413,220,000,000,000,000,000,000,000
20
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static struct xt_counters *alloc_counters(const struct xt_table *table) { unsigned int countersize; struct xt_counters *counters; const struct xt_table_info *private = table->private; /* We need atomic snapshot of counters: rest doesn't change (other than comefrom, which userspace doesn't care about). */ ...
0
[ "CWE-200" ]
linux-2.6
78b79876761b86653df89c48a7010b5cbd41a84a
207,594,734,305,831,870,000,000,000,000,000,000,000
19
netfilter: ip_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive in...
FuzzStream(ConnectionManagerImpl& conn_manager, FuzzConfig& config, const HeaderMap& request_headers, test::common::http::HeaderStatus decode_header_status, bool end_stream) : conn_manager_(conn_manager), config_(config) { config_.newStream(); request_state_ = end_stream ? Stre...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
64,521,952,910,200,740,000,000,000,000,000,000,000
40
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void cgroup_pidlist_stop(struct seq_file *s, void *v) { struct kernfs_open_file *of = s->private; struct cgroup_file_ctx *ctx = of->priv; struct cgroup_pidlist *l = ctx->procs1.pidlist; if (l) mod_delayed_work(cgroup_pidlist_destroy_wq, &l->destroy_dwork, CGROUP_PIDLIST_DESTROY_DELAY); mutex_unlock(...
0
[ "CWE-287", "CWE-269" ]
linux
24f6008564183aa120d07c03d9289519c2fe02af
267,447,119,341,283,860,000,000,000,000,000,000,000
11
cgroup-v1: Require capabilities to set release_agent The cgroup release_agent is called with call_usermodehelper. The function call_usermodehelper starts the release_agent with a full set fo capabilities. Therefore require capabilities when setting the release_agaent. Reported-by: Tabitha Sable <tabitha.c.sable@gmai...
static int imap_ac_add(struct Account *a, struct Mailbox *m) { struct ImapAccountData *adata = a->adata; if (!adata) { struct ConnAccount cac = { { 0 } }; char mailbox[PATH_MAX]; if (imap_parse_path(mailbox_path(m), &cac, mailbox, sizeof(mailbox)) < 0) return -1; adata = imap_adata_new(a)...
0
[ "CWE-522", "CWE-287", "CWE-755" ]
neomutt
9c36717a3e2af1f2c1b7242035455ec8112b4b06
105,289,729,712,083,920,000,000,000,000,000,000,000
49
imap: close connection on all failures Thanks to Gabriel Salles-Loustau for spotting the problem. Co-authored-by: Kevin McCarthy <kevin@8t8.us>
static void pcpu_chunk_populated(struct pcpu_chunk *chunk, int page_start, int page_end) { int nr = page_end - page_start; lockdep_assert_held(&pcpu_lock); bitmap_set(chunk->populated, page_start, nr); chunk->nr_populated += nr; pcpu_nr_empty_pop_pages += nr; }
0
[]
linux
4f996e234dad488e5d9ba0858bc1bae12eff82c3
56,926,679,844,767,440,000,000,000,000,000,000,000
11
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...
std::string AsyncSSLSocket::getSSLClientSupportedVersions() const { if (!parseClientHello_) { return ""; } return folly::join(":", clientHelloInfo_->clientHelloSupportedVersions_); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
180,978,535,250,031,300,000,000,000,000,000,000,000
6
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0, const struct ipt_replace *repl) { struct xt_percpu_counter_alloc_state alloc_state = { 0 }; struct ipt_entry *iter; unsigned int *offsets; unsigned int i; int ret = 0; newinfo->size = repl->size; newinfo->number = repl->num_entries;...
0
[ "CWE-787" ]
linux
b29c457a6511435960115c0f548c4360d5f4801d
9,446,357,104,697,793,000,000,000,000,000,000,000
77
netfilter: x_tables: fix compat match/target pad out-of-bound write xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob. Remove this code and zero the entire blob beforehand. Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp...
int proc_dostring(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; }
0
[ "CWE-284", "CWE-264" ]
linux
bfdc0b497faa82a0ba2f9dddcf109231dd519fcc
98,773,626,931,543,110,000,000,000,000,000,000,000
5
sysctl: restrict write access to dmesg_restrict When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel ring buffer. But a root user without CAP_SYS_ADMIN is able to reset dmesg_restrict to 0. This is an issue when e.g. LXC (Linux Containers) are used and complete user space is running without CA...
irqreturn_t xen_debug_interrupt(int irq, void *dev_id) { struct shared_info *sh = HYPERVISOR_shared_info; int cpu = smp_processor_id(); xen_ulong_t *cpu_evtchn = per_cpu(cpu_evtchn_mask, cpu); int i; unsigned long flags; static DEFINE_SPINLOCK(debug_lock); struct vcpu_info *v; spin_lock_irqsave(&debug_lock, fl...
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
85,988,948,974,009,600,000,000,000,000,000,000,000
83
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
static void do_int(struct kernel_vm86_regs *regs, int i, unsigned char __user *ssp, unsigned short sp) { unsigned long __user *intr_ptr; unsigned long segoffs; if (regs->pt.cs == BIOSSEG) goto cannot_handle; if (is_revectored(i, &KVM86->int_revectored)) goto cannot_handle; if (i == 0x21 && is_revectored(A...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
52,642,091,771,813,720,000,000,000,000,000,000,000
31
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
evutil_format_sockaddr_port_(const struct sockaddr *sa, char *out, size_t outlen) { char b[128]; const char *res=NULL; int port; if (sa->sa_family == AF_INET) { const struct sockaddr_in *sin = (const struct sockaddr_in*)sa; res = evutil_inet_ntop(AF_INET, &sin->sin_addr,b,sizeof(b)); port = ntohs(sin->sin_por...
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
267,648,879,629,467,160,000,000,000,000,000,000,000
27
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
static void evtchn_2l_clear_pending(evtchn_port_t port) { struct shared_info *s = HYPERVISOR_shared_info; sync_clear_bit(port, BM(&s->evtchn_pending[0])); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
159,572,197,545,793,900,000,000,000,000,000,000,000
5
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
ves_icall_get_property_info (MonoReflectionProperty *property, MonoPropertyInfo *info, PInfo req_info) { MonoDomain *domain = mono_object_domain (property); MONO_ARCH_SAVE_REGS; if ((req_info & PInfo_ReflectedType) != 0) MONO_STRUCT_SETREF (info, parent, mono_type_get_object (domain, &property->klass->byval_arg...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
325,482,180,519,141,460,000,000,000,000,000,000,000
29
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
absl::string_view pathAndQueryParams() { return path_and_query_params_; }
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
250,749,299,539,440,500,000,000,000,000,000,000,000
1
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo) { #define COMPILE_INIT_SIZE 20 int r, init_size; Node* root; ScanEnv scan_env; #ifdef USE_CALL UnsetAddrList uslist; #endif root = 0; if (IS_NOT_NULL(einfo)) { einfo->enc = reg->enc; e...
0
[ "CWE-125" ]
oniguruma
4d461376bd85e7994835677b2ff453a43c49cd28
155,608,384,999,261,100,000,000,000,000,000,000,000
171
don't expand string case folds to alternatives if code length == 1 and byte length is same
load_public_key (MonoArray *pkey, MonoDynamicImage *assembly) { gsize len; guint32 token = 0; char blob_size [6]; char *b = blob_size; if (!pkey) return token; len = mono_array_length (pkey); mono_metadata_encode_value (len, b, &b); token = mono_image_add_stream_data (&assembly->blob, blob_size, b - blob_si...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
5,521,645,104,606,552,000,000,000,000,000,000,000
34
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
dissect_kafka_controlled_shutdown_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { /* error_code */ offset = dissect_kafka_error(tvb, pinfo, tree, offset); /* [partition_remaining] */ offset = dissect...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
295,598,662,920,714,950,000,000,000,000,000,000,000
16
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
const GF_FilterRegister *av1dmx_register(GF_FilterSession *session) { return NULL; }
0
[ "CWE-476", "CWE-787" ]
gpac
13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec
195,406,079,736,280,930,000,000,000,000,000,000,000
4
fixed #1719
size_t Magick::Image::rows(void) const { return(constImage()->rows); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
267,593,690,982,605,430,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
int r_jwe_set_payload(jwe_t * jwe, const unsigned char * payload, size_t payload_len) { int ret; if (jwe != NULL) { o_free(jwe->payload); if (payload != NULL && payload_len) { if ((jwe->payload = o_malloc(payload_len)) != NULL) { memcpy(jwe->payload, payload, payload_len); jwe->payloa...
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
125,953,680,710,333,100,000,000,000,000,000,000,000
24
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
static int ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t *logical, ext4_fsblk_t *phys, struct ext4_extent **ret_ex) { struct buffer_head *bh = NULL; struct ext4_extent_header *eh; struct ext4_extent_idx *ix; struct ext4_extent *ex; ext4_fsblk_t block; int depth;...
0
[ "CWE-17" ]
linux
0f2af21aae11972fa924374ddcf52e88347cf5a8
265,589,636,842,585,940,000,000,000,000,000,000,000
102
ext4: allocate entire range in zero range Currently there is a bug in zero range code which causes zero range calls to only allocate block aligned portion of the range, while ignoring the rest in some cases. In some cases, namely if the end of the range is past i_size, we do attempt to preallocate the last nonaligned...
static int do_arpt_set_ctl(struct sock *sk, int cmd, sockptr_t arg, unsigned int len) { int ret; if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; switch (cmd) { case ARPT_SO_SET_REPLACE: #ifdef CONFIG_COMPAT if (in_compat_syscall()) ret = compat_do_replace(sock_net(sk), arg, len); ...
0
[ "CWE-787" ]
linux
b29c457a6511435960115c0f548c4360d5f4801d
257,390,121,143,559,100,000,000,000,000,000,000,000
28
netfilter: x_tables: fix compat match/target pad out-of-bound write xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob. Remove this code and zero the entire blob beforehand. Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp...
static struct ldb_val map_objectclass_convert_remote(struct ldb_module *module, void *mem_ctx, const struct ldb_val *val) { const struct ldb_map_context *data = map_get_context(module); const char *name = (char *)val->data; const struct ldb_map_objectclass *map = map_objectclass_find_remote(data, name); struct ldb_...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
126,572,458,511,426,970,000,000,000,000,000,000,000
15
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...
mono_stack_walk (MonoStackWalk func, gpointer user_data) { stack_walk (func, TRUE, user_data); }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
44,674,135,228,392,560,000,000,000,000,000,000,000
4
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
qemuProcessInitPasswords(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob) { int ret = 0; g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); size_t i; for (i = 0; i < vm->def->ngraphics; ++i) { virDomainGraphicsDefPtr ...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
265,873,482,028,265,740,000,000,000,000,000,000,000
30
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode, int ref_change) { struct mb_cache *ea_inode_cache = EA_INODE_CACHE(ea_inode); struct ext4_iloc iloc; s64 ref_count; u32 hash; int ret; inode_lock(ea_inode); ret = ext4_reserve_inode_write(handle, ea_inode, &iloc); if (...
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
231,937,443,084,045,950,000,000,000,000,000,000,000
70
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
static int __net_init xt_net_init(struct net *net) { int i; for (i = 0; i < NFPROTO_NUMPROTO; i++) INIT_LIST_HEAD(&net->xt.tables[i]); return 0; }
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
305,813,814,546,177,820,000,000,000,000,000,000,000
8
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, ext4_lblk_t len) { int ret; if (IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode)) return fscrypt_zeroout_range(inode, lblk, pblk, len); ret = sb_issue_zeroout(inode->i_sb, pblk, len, GFP_NOFS); if (ret > 0) ret = 0; retur...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
268,172,567,851,335,600,000,000,000,000,000,000,000
14
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
uint32_t writeMessageEnd() { T_VIRTUAL_CALL(); return writeMessageEnd_virt(); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
99,823,541,187,222,630,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
static inline void GetMedianPixelList(PixelList *pixel_list,Quantum *pixel) { register SkipList *p; size_t color; ssize_t count; /* Find the median value for each of the color. */ p=(&pixel_list->skip_list); color=65536L; count=0; do { color=p->nodes[color].next[0]; count+...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
025e77fcb2f45b21689931ba3bf74eac153afa48
123,582,758,319,019,700,000,000,000,000,000,000,000
24
https://github.com/ImageMagick/ImageMagick/issues/1615
EXPORTED void mailbox_set_quotaroot(struct mailbox *mailbox, const char *quotaroot) { if (mailbox->h.quotaroot) { if (quotaroot && !strcmp(mailbox->h.quotaroot, quotaroot)) return; /* no change */ xzfree(mailbox->h.quotaroot); } else { if (!quotaroot) return; ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
48,301,563,191,643,100,000,000,000,000,000,000,000
18
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static void automount_dump(Unit *u, FILE *f, const char *prefix) { char time_string[FORMAT_TIMESPAN_MAX]; Automount *a = AUTOMOUNT(u); assert(a); fprintf(f, "%sAutomount State: %s\n" "%sResult: %s\n" "%sWhere: %s\n" "%sDir...
0
[ "CWE-362" ]
systemd
e7d54bf58789545a9eb0b3964233defa0b007318
277,530,872,908,242,760,000,000,000,000,000,000,000
18
automount: ack automount requests even when already mounted (#5916) If a process accesses an autofs filesystem while systemd is in the middle of starting the mount unit on top of it, it is possible for the autofs_ptype_missing_direct request from the kernel to be received after the mount unit has been fully started...
static void seg_desct_to_kvm_desct(struct desc_struct *seg_desc, u16 selector, struct kvm_segment *kvm_desct) { kvm_desct->base = seg_desc->base0; kvm_desct->base |= seg_desc->base1 << 16; kvm_desct->base |= seg_desc->base2 << 24; kvm_desct->limit = seg_desc->limit0; kvm_desct->limit |= seg_desc->limit << 1...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
337,166,164,548,148,240,000,000,000,000,000,000,000
27
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
int ci_hdrc_host_init(struct ci13xxx *ci) { struct ci_role_driver *rdrv; if (!hw_read(ci, CAP_DCCPARAMS, DCCPARAMS_HC)) return -ENXIO; rdrv = devm_kzalloc(ci->dev, sizeof(struct ci_role_driver), GFP_KERNEL); if (!rdrv) return -ENOMEM; rdrv->start = host_start; rdrv->stop = host_stop; rdrv->irq = host_irq;...
0
[ "CWE-119", "CWE-787" ]
linux
929473ea05db455ad88cdc081f2adc556b8dc48f
219,699,230,906,424,800,000,000,000,000,000,000,000
21
usb: chipidea: Allow disabling streaming not only in udc mode When running a scp transfer using a USB/Ethernet adapter the following crash happens: $ scp test.tar.gz fabio@192.168.1.100:/home/fabio fabio@192.168.1.100's password: test.tar.gz 0% 0 0.0KB/s --:-- ETA -------...
md_open(gx_device *pdev) { static const float md_margins[4] = { MD_SIDE_MARGIN, MD_BOTTOM_MARGIN, MD_SIDE_MARGIN, MD_TOP_MARGIN }; if (pdev->HWResolution[0] != 600) { emprintf(pdev->memory, "device must have an X resolution of 600dpi\n"); return_error(gs_error_rangec...
0
[]
ghostpdl
4fcbece468706e0e89ed2856729b2ccacbc112be
149,105,736,969,037,250,000,000,000,000,000,000,000
17
Avoid some devices dying due to inappropriate resolutions.
CmdRevokeRolesFromRole() : Command("revokeRolesFromRole") {}
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
161,141,724,156,539,330,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
TEST(IndexBoundsBuilderTest, TypeNumber) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$type: 'number'}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; IndexBou...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
262,891,055,735,899,100,000,000,000,000,000,000,000
22
SERVER-44377 generate correct plan for indexed inequalities to null
void simplestring_add(simplestring* target, const char* source) { if(target && source) { simplestring_addn(target, source, strlen(source)); } }
0
[ "CWE-119" ]
php-src
e6c48213c22ed50b2b987b479fcc1ac709394caa
7,575,796,191,563,260,000,000,000,000,000,000,000
5
Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
static ssize_t queue_max_segment_size_show(struct request_queue *q, char *page) { return queue_var_show(queue_max_segment_size(q), (page)); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
158,676,374,374,995,260,000,000,000,000,000,000,000
4
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...
nfsd4_getdeviceinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_getdeviceinfo *gdp) { const struct nfsd4_layout_ops *ops; struct nfsd4_deviceid_map *map; struct svc_export *exp; __be32 nfserr; dprintk("%s: layout_type %u dev_id [0x%llx:0x%x] maxcnt %u\n", __func__, ...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
269,094,498,396,035,200,000,000,000,000,000,000,000
44
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 void dm_blk_close(struct gendisk *disk, fmode_t mode) { struct mapped_device *md; spin_lock(&_minor_lock); md = disk->private_data; if (WARN_ON(!md)) goto out; if (atomic_dec_and_test(&md->open_count) && (test_bit(DMF_DEFERRED_REMOVE, &md->flags))) queue_work(deferred_remove_workqueue, &deferred...
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
100,138,494,816,131,960,000,000,000,000,000,000,000
18
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
void RegexMatchExpression::debugString(StringBuilder& debug, int indentationLevel) const { _debugAddSpace(debug, indentationLevel); debug << path() << " regex /" << _regex << "/" << _flags; MatchExpression::TagData* td = getTag(); if (nullptr != td) { debug << " "; td->debugString(&debu...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
248,984,075,856,616,400,000,000,000,000,000,000,000
11
SERVER-43699 $mod should not overflow for large negative values
static int replmd_replicated_request_werror(struct replmd_replicated_request *ar, WERROR status) { int ret = LDB_ERR_OTHER; /* TODO: do some error mapping */ /* Let the caller know the full WERROR */ ar->objs->error = status; return ret; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
291,565,121,317,447,000,000,000,000,000,000,000,000
10
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...
nfsd4_encode_aclname(struct xdr_stream *xdr, struct svc_rqst *rqstp, struct nfs4_ace *ace) { if (ace->whotype != NFS4_ACL_WHO_NAMED) return nfs4_acl_write_who(xdr, ace->whotype); else if (ace->flag & NFS4_ACE_IDENTIFIER_GROUP) return nfsd4_encode_group(xdr, rqstp, ace->who_gid); else return nfsd4_encode...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
315,725,910,555,421,300,000,000,000,000,000,000,000
10
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
int neigh_table_clear(struct neigh_table *tbl) { struct neigh_table **tp; /* It is not clean... Fix it to unload IPv6 module safely */ del_timer_sync(&tbl->gc_timer); del_timer_sync(&tbl->proxy_timer); pneigh_queue_purge(&tbl->proxy_queue); neigh_ifdown(tbl, NULL); if (atomic_read(&tbl->entries)) printk(KERN_...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
246,638,971,949,845,170,000,000,000,000,000,000,000
28
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static MagickBooleanType IsSGI(const unsigned char *magick,const size_t length) { if (length < 2) return(MagickFalse); if (memcmp(magick,"\001\332",2) == 0) return(MagickTrue); return(MagickFalse); }
0
[ "CWE-125" ]
ImageMagick
7afcf9f71043df15508e46f079387bd4689a738d
322,777,257,584,832,170,000,000,000,000,000,000,000
8
Prevent buffer overflow in BMP & SGI coders (bug report from pwchen&rayzhong of tencent)
QPDFObjectHandle::getUIntValue() { unsigned long long result = 0; long long v = getIntValue(); if (v < 0) { QTC::TC("qpdf", "QPDFObjectHandle uint returning 0"); warnIfPossible( "unsigned value request for negative number; returning 0", false); } else ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
1,882,059,005,993,447,500,000,000,000,000,000,000
17
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static HANDLE create_named_pipe(MYSQL *mysql, DWORD connect_timeout, const char **arg_host, const char **arg_unix_socket) { HANDLE hPipe=INVALID_HANDLE_VALUE; char pipe_name[1024]; DWORD dwMode; int i; my_bool testing_named_pipes=0; const char ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
229,070,978,735,705,100,000,000,000,000,000,000,000
67
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static const char *req_content_type_field(request_rec *r) { return r->content_type; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
37,843,662,434,147,535,000,000,000,000,000,000,000
4
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
DeepScanLineInputFile::version () const { return _data->version; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
130,289,970,960,664,850,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int nntp_mbox_sync(struct Context *ctx, int *index_hint) { struct NntpData *nntp_data = ctx->data; int rc; #ifdef USE_HCACHE header_cache_t *hc = NULL; #endif /* check for new articles */ nntp_data->nserv->check_time = 0; rc = check_mailbox(ctx); if (rc) return rc; #ifdef USE_HCACHE nntp_da...
0
[ "CWE-20" ]
neomutt
9e927affe3a021175f354af5fa01d22657c20585
249,717,983,468,259,980,000,000,000,000,000,000,000
56
Add alloc fail check in nntp_fetch_headers
paste_from_archive_remove_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { FrWindow *window = user_data; GError *error = NULL; if (! fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error)) { _paste_from_archive_operation_completed (window,...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
313,565,407,440,465,100,000,000,000,000,000,000,000
15
libarchive: sanitize filenames before extracting
static void skcipher_queue_write(struct skcipher_walk *walk, struct skcipher_walk_buffer *p) { p->dst = walk->out; list_add_tail(&p->entry, &walk->buffers); }
0
[ "CWE-476", "CWE-703" ]
linux
9933e113c2e87a9f46a40fde8dafbf801dca1ab9
217,083,818,904,420,800,000,000,000,000,000,000,000
6
crypto: skcipher - Add missing API setkey checks The API setkey checks for key sizes and alignment went AWOL during the skcipher conversion. This patch restores them. Cc: <stable@vger.kernel.org> Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...") Reported-by: Baozeng <sploving1@gmail.com> Signed-of...
static int v9fs_set_super(struct super_block *s, void *data) { s->s_fs_info = data; return set_anon_super(s, data); }
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
327,030,879,195,271,960,000,000,000,000,000,000,000
5
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
backend_valid_range (struct backend *b, struct connection *conn, uint64_t offset, uint32_t count) { struct b_conn_handle *h = &conn->handles[b->i]; assert (h->exportsize >= 0); /* Guaranteed by negotiation phase */ return count > 0 && offset <= h->exportsize && offset + count <= h->expor...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
299,712,858,476,160,850,000,000,000,000,000,000,000
9
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
const char *XMLRPC_SetValueID_Case(XMLRPC_VALUE value, const char* id, int len, XMLRPC_CASE id_case) { const char* pRetval = NULL; if(value) { if(id) { simplestring_clear(&value->id); (len > 0) ? simplestring_addn(&value->id, id, len) : simplestring_add(&value->id, id)...
0
[ "CWE-119" ]
php-src
88412772d295ebf7dd34409534507dc9bcac726e
164,070,573,908,305,530,000,000,000,000,000,000,000
31
Fix bug #68027 - fix date parsing in XMLRPC lib
static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev) { int err = -1; struct inet6_ifaddr *ifp; read_lock_bh(&idev->lock); for (ifp=idev->addr_list; ifp; ifp=ifp->if_next) { if (ifp->scope == IFA_LINK && !(ifp->flags&IFA_F_TENTATIVE)) { memcpy(eui, ifp->addr.s6_addr+8, 8); err = 0; break; } ...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
141,846,449,824,708,640,000,000,000,000,000,000,000
16
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static int __init fw_devlink_setup(char *arg) { if (!arg) return -EINVAL; if (strcmp(arg, "off") == 0) { fw_devlink_flags = 0; } else if (strcmp(arg, "permissive") == 0) { fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY; } else if (strcmp(arg, "on") == 0) { fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER; } else...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
252,242,992,380,584,500,000,000,000,000,000,000,000
17
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...
**/ CImg<T>& blur(const float sigma_x, const float sigma_y, const float sigma_z, const bool boundary_conditions=true, const bool is_gaussian=false) { if (is_empty()) return *this; if (is_gaussian) { if (_width>1) vanvliet(sigma_x,0,'x',boundary_conditions); if (_hei...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
336,960,466,727,034,700,000,000,000,000,000,000,000
14
Fix other issues in 'CImg<T>::load_bmp()'.
GF_Err gmin_box_size(GF_Box *s) { GF_VideoMediaHeaderBox *ptr = (GF_VideoMediaHeaderBox *)s; ptr->size += 12; return GF_OK; }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
242,865,494,608,724,660,000,000,000,000,000,000,000
6
fixed potential crash - cf #1263
u32 a_copy_from_user(void *to, const void *from, u32 n) { return(copy_from_user(to, from, n)); }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
54,371,005,763,322,350,000,000,000,000,000,000,000
4
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...
int bond_set_carrier(struct bonding *bond) { struct list_head *iter; struct slave *slave; if (!bond_has_slaves(bond)) goto down; if (BOND_MODE(bond) == BOND_MODE_8023AD) return bond_3ad_set_carrier(bond); bond_for_each_slave(bond, slave, iter) { if (slave->link == BOND_LINK_UP) { if (!netif_carrier_ok(...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
198,748,019,269,402,660,000,000,000,000,000,000,000
28
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
void posix_cpu_timers_exit_group(struct task_struct *tsk) { cleanup_timers(tsk->signal->cpu_timers, cputime_add(tsk->utime, tsk->signal->utime), cputime_add(tsk->stime, tsk->signal->stime), tsk->se.sum_exec_runtime + tsk->signal->sum_sched_runtime); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
232,162,920,393,694,930,000,000,000,000,000,000,000
7
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static inline void put_tpel_pixels_mc01_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ int i,j; for (i=0; i < height; i++) { for (j=0; j < width; j++) { dst[j] = (683*(2*src[j] + src[j+stride] + 1)) >> 11; } src += stride; dst += stride; } }
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
152,749,711,041,837,200,000,000,000,000,000,000,000
10
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
transformFKConstraints(CreateStmtContext *cxt, bool skipValidation, bool isAddConstraint) { ListCell *fkclist; if (cxt->fkconstraints == NIL) return; /* * If CREATE TABLE or adding a column with NULL default, we can safely * skip validation of FK constraints, and nonetheless mark them valid. * (T...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
140,803,110,518,631,070,000,000,000,000,000,000,000
57
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
writeDataError(instanceData *pData, cJSON **pReplyRoot, uchar *reqmsg) { char *rendered = NULL; cJSON *errRoot; cJSON *req; cJSON *replyRoot = *pReplyRoot; size_t toWrite; ssize_t wrRet; char errStr[1024]; DEFiRet; if(pData->errorFile == NULL) { DBGPRINTF("omelasticsearch: no local error logger defined - " ...
1
[ "CWE-399" ]
rsyslog
80f88242982c9c6ad6ce8628fc5b94ea74051cf4
48,498,255,380,292,090,000,000,000,000,000,000,000
54
bugfix: double-free in omelasticsearch closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461 Thanks to Marius Ionescu for providing a detailled bug report
static int ssl_compress_buf( ssl_context *ssl ) { int ret; unsigned char *msg_post = ssl->out_msg; size_t len_pre = ssl->out_msglen; unsigned char *msg_pre = ssl->compress_buf; SSL_DEBUG_MSG( 2, ( "=> compress buf" ) ); if( len_pre == 0 ) return( 0 ); memcpy( msg_pre, ssl->out_msg...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
87,463,391,862,460,660,000,000,000,000,000,000,000
45
Added max length checking of hostname
int ext4_ext_precache(struct inode *inode) { struct ext4_inode_info *ei = EXT4_I(inode); struct ext4_ext_path *path = NULL; struct buffer_head *bh; int i = 0, depth, ret = 0; if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) return 0; /* not an extent-mapped inode */ down_read(&ei->i_data_sem); depth = e...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
306,015,413,505,286,530,000,000,000,000,000,000,000
63
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) { int len; if ((out == NULL) || (out->error)) return(-1); if (str == NULL) return(-1); len = strlen(str); if (len > 0) return(xmlOutputBufferWrite(out, len, str)); return(len); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
6,749,544,547,466,285,000,000,000,000,000,000,000
12
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
AttVal *TY_(NewAttribute)( TidyDocImpl* doc ) { AttVal *av = (AttVal*) TidyDocAlloc( doc, sizeof(AttVal) ); TidyClearMemory( av, sizeof(AttVal) ); return av; }
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
236,824,816,698,799,840,000,000,000,000,000,000,000
6
Issue #217 - avoid len going negative, ever...
void sspi_SecureHandleInvalidate(SecHandle* handle) { if (!handle) return; sspi_SecureHandleInit(handle); }
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
30,702,951,111,887,990,000,000,000,000,000,000,000
7
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
PS_CLOSE_FUNC(files) { PS_FILES_DATA; ps_files_close(data); if (data->lastkey) { efree(data->lastkey); } efree(data->basedir); efree(data); *mod_data = NULL; return SUCCESS; }
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
127,684,390,368,372,780,000,000,000,000,000,000,000
16
Strict session
static u8 get_x86_family(unsigned long sig) { u8 x86; x86 = (sig >> 8) & 0xf; if (x86 == 0xf) x86 += (sig >> 20) & 0xff; return x86; }
0
[ "CWE-119", "CWE-787" ]
linux
f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4
220,218,828,293,730,700,000,000,000,000,000,000,000
11
x86/microcode/intel: Guard against stack overflow in the loader mc_saved_tmp is a static array allocated on the stack, we need to make sure mc_saved_count stays within its bounds, otherwise we're overflowing the stack in _save_mc(). A specially crafted microcode header could lead to a kernel crash or potentially kerne...
static int binlog_close_connection(handlerton *hton, THD *thd) { binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); DBUG_ASSERT(cache_mngr->trx_cache.empty() && cache_mngr->stmt_cache.empty()); thd_set_ha_data(thd, binlog_hton, NULL); cache_mngr->~binlog_cache_mngr(...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
61,894,537,887,382,180,000,000,000,000,000,000,000
10
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
ms_escher_opt_start (GString *buf) { gsize res = buf->len; guint8 tmp[8] = { 0x03, 0, 0xb, 0xf0, 0xde, 0xad, 0xbe, 0xef }; g_string_append_len (buf, tmp, sizeof tmp); return res; }
0
[ "CWE-119" ]
gnumeric
b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc
308,850,854,273,714,450,000,000,000,000,000,000,000
7
xls: fuzzed file crash.
hook_connect (struct t_weechat_plugin *plugin, const char *proxy, const char *address, int port, int ipv6, int retry, void *gnutls_sess, void *gnutls_cb, int gnutls_dhkey_size, const char *gnutls_priorities, const char *local_hostname, t_hook_callback_connect *cal...
0
[ "CWE-20" ]
weechat
efb795c74fe954b9544074aafcebb1be4452b03a
170,532,594,551,878,160,000,000,000,000,000,000,000
78
core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764)
void FilterManager::addDecodedData(ActiveStreamDecoderFilter& filter, Buffer::Instance& data, bool streaming) { if (state_.filter_call_state_ == 0 || (state_.filter_call_state_ & FilterCallState::DecodeHeaders) || (state_.filter_call_state_ & FilterCallState::DecodeData)...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
90,543,974,065,442,280,000,000,000,000,000,000,000
21
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void usb_ehci_pci_realize(PCIDevice *dev, Error **errp) { EHCIPCIState *i = PCI_EHCI(dev); EHCIState *s = &i->ehci; uint8_t *pci_conf = dev->config; pci_set_byte(&pci_conf[PCI_CLASS_PROG], 0x20); /* capabilities pointer */ pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00); /* pci_s...
0
[ "CWE-772", "CWE-401" ]
qemu
d710e1e7bd3d5bfc26b631f02ae87901ebe646b0
44,529,451,078,385,530,000,000,000,000,000,000,000
41
usb: ehci: fix memory leak in ehci In usb_ehci_init function, it initializes 's->ipacket', but there is no corresponding function to free this. As the ehci can be hotplug and unplug, this will leak host memory leak. In order to make the hierarchy clean, we should add a ehci pci finalize function, then call the clean f...
static ssize_t bt_att_chan_write(struct bt_att_chan *chan, uint8_t opcode, const void *pdu, uint16_t len) { struct bt_att *att = chan->att; ssize_t ret; struct iovec iov; iov.iov_base = (void *) pdu; iov.iov_len = len; util_debug(att->debug_callback, att->debug_data, "(chan %p) ATT op 0x%02x", ch...
0
[ "CWE-415" ]
bluez
1cd644db8c23a2f530ddb93cebed7dacc5f5721a
215,228,973,153,616,850,000,000,000,000,000,000,000
27
shared/att: Fix possible crash on disconnect If there are pending request while disconnecting they would be notified but clients may endup being freed in the proccess which will then be calling bt_att_cancel to cancal its requests causing the following trace: Invalid read of size 4 at 0x1D894C: enable_ccc_callback...
__realpath (const char *name, char *resolved) { #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR #warning "GCC might issue a bogus -Wreturn-local-addr warning here." #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." #endif struct scratch_buffer rname_buffer; return realpath_stk (name, resolved, &rna...
0
[ "CWE-125" ]
glibc
ee8d5e33adb284601c00c94687bc907e10aec9bb
27,450,906,756,472,940,000,000,000,000,000,000,000
9
realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770] realpath returns an allocated string when the result exceeds PATH_MAX, which is unexpected when its second argument is not NULL. This results in the second argument (resolved) being uninitialized and also results in a memory leak since th...
static inline bool nested_cpu_has_vpid(struct vmcs12 *vmcs12) { return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_VPID); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
189,029,878,846,671,500,000,000,000,000,000,000,000
4
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
MOBI_RET mobi_decompress_lz77(unsigned char *out, const unsigned char *in, size_t *len_out, const size_t len_in) { MOBI_RET ret = MOBI_SUCCESS; MOBIBuffer *buf_in = mobi_buffer_init_null((unsigned char *) in, len_in); if (buf_in == NULL) { debug_print("%s\n", "Memory allocation failed"); ret...
0
[ "CWE-119", "CWE-125" ]
libmobi
bec783e6212439a335ba6e8df7ab8ed610ca9a21
42,162,019,926,437,733,000,000,000,000,000,000,000
51
Fix potential out-of-buffer read while parsing corrupt file, closes #35, #36