func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void FindWin32CACert(struct Configurable *config, const char *bundle_file) { /* only check for cert file if "we" support SSL */ if(curlinfo->features & CURL_VERSION_SSL) { DWORD buflen; char *ptr = NULL; char *retval = (char *) malloc(sizeof (TCHAR) * (MAX_PATH + 1)); ...
0
[ "CWE-125" ]
curl
70b1900dd13d16f2e83f571407a614541d5ac9ba
265,661,679,398,749,700,000,000,000,000,000,000,000
18
'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194) pointed out that the warnf() function in the curl tool didn't properly deal with the cases when excessively long words were used in the string to chop up.
//! Normalize multi-valued pixels of the image instance, with respect to their L2-norm \newinstance. CImg<Tfloat> get_normalize() const { return CImg<Tfloat>(*this,false).normalize();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
327,818,454,710,910,160,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static void put_mspel8_mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { wmv2_mspel8_h_lowpass(dst, src, stride, stride, 8); }
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
3,506,871,119,389,489,000,000,000,000,000,000,000
4
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
#ifndef GPAC_DISABLE_MPD static u32 convert_mpd() { GF_Err e; Bool remote = GF_FALSE; GF_MPD *mpd; char *mpd_base_url = NULL; if (!strnicmp(inName, "http://", 7) || !strnicmp(inName, "https://", 8)) { #if !defined(GPAC_DISABLE_CORE_TOOLS) e = gf_dm_wget(inName, "tmp_main.m3u8", 0, 0, &mpd_base_url); if (e != G...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
280,987,094,006,756,370,000,000,000,000,000,000,000
90
fixed #2216
drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, int beepFlag) { SCREEN *sp; int res = ERR; AssertTCB(); SetSP(); /* FIXME: should make sure that we are not in altchar mode */ if (beepFlag) { if (bell) { res = NCURSES_PUTP2("bell", bell); NCURSES_SP_NAME(_nc_flush) (sp); } else if (fl...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
298,319,209,664,926,960,000,000,000,000,000,000,000
28
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...
static bool vmxnet3_verify_intx(VMXNET3State *s, int intx) { return s->msix_used || s->msi_used || (intx == (pci_get_byte(s->parent_obj.config + PCI_INTERRUPT_PIN) - 1)); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
82,125,923,188,314,130,000,000,000,000,000,000,000
5
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static void tty_device_create_release(struct device *dev) { dev_dbg(dev, "releasing...\n"); kfree(dev); }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
64,700,141,142,627,460,000,000,000,000,000,000,000
5
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
bool getPairs(Context* context, const Pairs& result, uint64_t ptr_ptr, uint64_t size_ptr) { if (result.empty()) { return context->wasm()->copyToPointerSize("", ptr_ptr, size_ptr); } uint64_t size = pairsSize(result); uint64_t ptr; char* buffer = static_cast<char*>(context->wasm()->allocMemory(size, &ptr))...
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
196,008,684,351,681,700,000,000,000,000,000,000,000
16
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
pthread_handler_t handle_connections_shared_memory(void *arg) { /* file-mapping object, use for create shared memory */ HANDLE handle_connect_file_map= 0; char *handle_connect_map= 0; // pointer on shared memory HANDLE event_connect_answer= 0; ulong smem_buffer_length= shared_memory_buffer_le...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
268,147,097,350,644,400,000,000,000,000,000,000,000
228
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...
f_log10(typval_T *argvars, typval_T *rettv) { float_T f = 0.0; rettv->v_type = VAR_FLOAT; if (get_float_arg(argvars, &f) == OK) rettv->vval.v_float = log10(f); else rettv->vval.v_float = 0.0; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
87,834,138,542,035,080,000,000,000,000,000,000,000
10
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
} static inline zend_object_value date_object_new_period_ex(zend_class_entry *class_type, php_period_obj **ptr TSRMLS_DC) { php_period_obj *intern; zend_object_value retval; intern = emalloc(sizeof(php_period_obj)); memset(intern, 0, sizeof(php_period_obj)); if (ptr) { *ptr = intern; } zend_object_std_init(...
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
273,583,139,819,371,660,000,000,000,000,000,000,000
19
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static int __init atalk_init(void) { int rc; rc = proto_register(&ddp_proto, 0); if (rc) goto out; rc = sock_register(&atalk_family_ops); if (rc) goto out_proto; ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv); if (!ddp_dl) { pr_crit("Unable to register DDP with SNAP.\n"); goto out_sock; } de...
0
[ "CWE-476" ]
linux
9804501fa1228048857910a6bf23e085aade37cc
191,798,918,532,780,400,000,000,000,000,000,000,000
54
appletalk: Fix potential NULL pointer dereference in unregister_snap_client register_snap_client may return NULL, all the callers check it, but only print a warning. This will result in NULL pointer dereference in unregister_snap_client and other places. It has always been used like this since v2.6 Reported-by: Dan ...
drill_parse_coordinate(gerb_file_t *fd, char firstchar, gerbv_image_t *image, drill_state_t *state, ssize_t file_line) { int read; gerbv_drill_stats_t *stats = image->drill_stats; if(state->coordinate_mode == DRILL_MODE_ABSOLUTE) { if (firstchar == 'X') { state->curr_x = read_double...
0
[ "CWE-787" ]
gerbv
672214abb47a802fc000125996e6e0a46c623a4e
264,513,075,271,568,470,000,000,000,000,000,000,000
37
Add test to demonstrate buffer overrun
Address Zone::NewExpand(int size) { // Make sure the requested size is already properly aligned and that // there isn't enough room in the Zone to satisfy the request. ASSERT(size == RoundDown(size, kAlignment)); ASSERT(limit_ < position_ || reinterpret_cast<uintptr_t>(limit_) - reinte...
0
[ "CWE-119" ]
node
fcb9145e291e8cb82164bc1fe3db1c1dae219b55
269,115,489,881,344,600,000,000,000,000,000,000,000
50
deps: backport 3a9bfec from v8 upstream Some of the logic from `zone.cc` is found in `zone-inl.h` in this release stream. Original commit message: Fix overflow issue in Zone::New When requesting a large allocation near the end of the address space, the computation could overflow and erroneously *not* grow the...
void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires) { if (test_bit(__QDISC_STATE_DEACTIVATED, &qdisc_root_sleeping(wd->qdisc)->state)) return; qdisc_throttled(wd->qdisc); hrtimer_start(&wd->timer, ns_to_ktime(expires), HRTIMER_MODE_ABS); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
8,988,903,600,751,199,000,000,000,000,000,000,000
12
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
proxy_C_OpenSession (CK_X_FUNCTION_LIST *self, CK_SLOT_ID id, CK_FLAGS flags, CK_VOID_PTR user_data, CK_NOTIFY callback, CK_SESSION_HANDLE_PTR handle) { State *state = (State *)self; Session *sess; Mapping map; ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
310,621,013,694,844,920,000,000,000,000,000,000,000
48
Check for arithmetic overflows before allocating
unsigned long snmp_fold_field(void __percpu *mib[], int offt) { unsigned long res = 0; int i; for_each_possible_cpu(i) { res += *(((unsigned long *) per_cpu_ptr(mib[0], i)) + offt); res += *(((unsigned long *) per_cpu_ptr(mib[1], i)) + offt); } return res; }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
156,770,284,399,536,700,000,000,000,000,000,000,000
11
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
get_id_string (GtkWidget *widget) { char *id = NULL; g_return_val_if_fail (widget != NULL, NULL); g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); id = g_strdup_printf ("%" G_GUINT32_FORMAT, (guint32) GDK_WINDOW_XID (widget->window)); return id...
0
[ "CWE-362" ]
gnome-screensaver
ab08cc93f2dc6223c8c00bfa1ca4f2d89069dbe0
254,164,164,021,634,220,000,000,000,000,000,000,000
11
Work around x errors by asking dialog to die on cancel Basically, what is happening is that gnome-screensaver-dialog exits after the 5th failed attempt at unlocking the screen, but before the shake animation finishes. If the timing is slightly unlucky, this results in gnome-screensaver accessing X resources that have ...
static void option_import_marks(const char *marks, int from_stream, int ignore_missing) { if (import_marks_file) { if (from_stream) die("Only one import-marks command allowed per stream"); /* read previous mark file */ if(!import_marks_file_from_stream) read_marks(); } import_marks_file = make_fas...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
172,535,964,232,187,300,000,000,000,000,000,000,000
16
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)...
PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { while (HAS_CHAR(enc, ptr, end)) { switch (BYTE_TYPE(enc, ptr)) { # define LEAD_CASE(n) \ case BT_LEAD##n: ...
0
[ "CWE-116" ]
libexpat
3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6
308,725,000,234,310,680,000,000,000,000,000,000,000
32
lib: Add missing validation of encoding (CVE-2022-25235)
void ext4_free_inode(handle_t *handle, struct inode *inode) { struct super_block *sb = inode->i_sb; int is_directory; unsigned long ino; struct buffer_head *bitmap_bh = NULL; struct buffer_head *bh2; ext4_group_t block_group; unsigned long bit; struct ext4_group_desc *gdp; struct ext4_super_block *es; struct ...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
198,450,628,055,111,900,000,000,000,000,000,000,000
126
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
static int sas_check_eeds(struct domain_device *child, struct ex_phy *parent_phy, struct ex_phy *child_phy) { int res = 0; struct domain_device *parent = child->parent; if (SAS_ADDR(parent->port->disc.fanout_sas_addr) != 0) { res = -ENODEV; pr_warn("edge ex %016llx phy S:%02d <--> edge ex %016llx phy ...
0
[ "CWE-401" ]
linux
3b0541791453fbe7f42867e310e0c9eb6295364d
230,961,950,055,112,740,000,000,000,000,000,000,000
41
scsi: libsas: delete sas port if expander discover failed The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be deleted when the expander failed to discover. This will cause resource leak and a further issue of kernel BUG like below: [159785.843156] port-2:17:29: trying to add phy phy-2:17:29 f...
str_node_split_last_char(Node* node, OnigEncoding enc) { const UChar *p; Node* rn; StrNode* sn; sn = STR_(node); rn = NULL_NODE; if (sn->end > sn->s) { p = onigenc_get_prev_char_head(enc, sn->s, sn->end); if (p && p > sn->s) { /* can be split. */ rn = node_new_str(p, sn->end); CHECK_NUL...
0
[ "CWE-125" ]
oniguruma
aa0188eaedc056dca8374ac03d0177429b495515
62,533,865,006,682,890,000,000,000,000,000,000,000
21
fix #163: heap-buffer-overflow in gb18030_mbc_enc_len
void check_defer(int nid) { if (!obj_cleanup_defer && nid >= NUM_NID) obj_cleanup_defer = 1; }
0
[ "CWE-200" ]
openssl
0042fb5fd1c9d257d713b15a1f45da05cf5c1c87
295,926,872,774,369,150,000,000,000,000,000,000,000
5
Fix OID handling: - Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
XLogFileClose(void) { Assert(openLogFile >= 0); /* * WAL segment files will not be re-read in normal operation, so we advise * the OS to release any cached pages. But do not do so if WAL archiving * or streaming is active, because archiver and walsender process could * use the cache to read the WAL segment. ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
301,080,905,115,181,600,000,000,000,000,000,000,000
22
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp, struct tc_u_knode *n) { struct tc_u_hnode *ht = rtnl_dereference(n->ht_down); struct tc_u32_sel *s = &n->sel; struct tc_u_knode *new; new = kzalloc(struct_size(new, sel.keys, s->nkeys), GFP_KERNEL); if (!new) return NULL; RC...
0
[ "CWE-416" ]
linux
3db09e762dc79584a69c10d74a6b98f89a9979f8
145,493,295,207,329,800,000,000,000,000,000,000,000
48
net/sched: cls_u32: fix netns refcount changes in u32_change() We are now able to detect extra put_net() at the moment they happen, instead of much later in correct code paths. u32_init_knode() / tcf_exts_init() populates the ->exts.net pointer, but as mentioned in tcf_exts_init(), the refcount on netns has not been ...
class Err : public Exception {public: Err(const std::string &what) : Exception(INVALID_DATA_FORMAT, "HuffmanDecoder: " + what) {}};
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
265,208,991,094,461,700,000,000,000,000,000,000,000
1
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
void ssl_cert_free(CERT *c) { int i; if(c == NULL) return; i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT); #ifdef REF_PRINT REF_PRINT("CERT",c); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"ssl_cert_free, bad reference count\n"); abort(); /* ok */ } #endif #ifndef...
1
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
204,132,626,256,408,960,000,000,000,000,000,000,000
37
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
**/ CImg<T>& ror(const char *const expression) { return ror((+*this)._fill(expression,true,1,0,0,"ror",this));
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
311,759,792,952,793,900,000,000,000,000,000,000,000
3
.
static int lookup_path(struct fuse *f, fuse_ino_t nodeid, const char *name, const char *path, struct fuse_entry_param *e, struct fuse_file_info *fi) { int res; memset(e, 0, sizeof(struct fuse_entry_param)); if (fi) res = fuse_fs_fgetattr(f->fs, path, &e...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
137,306,481,014,879,720,000,000,000,000,000,000,000
36
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
static void cliprdr_write_unlock_clipdata(wStream* s, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData) { cliprdr_write_lock_unlock_clipdata(s, unlockClipboardData->clipDataId); }
0
[ "CWE-125" ]
FreeRDP
b73143cf7ee5fe4cdabcbf56908aa15d8a883821
38,691,301,595,662,716,000,000,000,000,000,000,000
5
Fixed oob read in cliprdr_read_format_list
static size_t reencrypt_buffer_length(struct luks2_reencrypt *rh) { if (rh->data_shift) return rh->data_shift; return rh->length; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
184,134,876,784,550,500,000,000,000,000,000,000,000
6
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static pyc_object *get_array_object_generic(RzBinPycObj *pyc, RzBuffer *buffer, ut32 size) { pyc_object *tmp = NULL; pyc_object *ret = NULL; ut32 i = 0; ret = RZ_NEW0(pyc_object); if (!ret) { return NULL; } ret->data = rz_list_newf((RzListFree)free_object); if (!ret->data) { free(ret); return NULL; } f...
0
[ "CWE-787" ]
rizin
38d8006cd609ac75de82b705891d3508d2c218d5
194,481,832,849,793,040,000,000,000,000,000,000,000
30
fix #2963 - oob write (1 byte) in pyc/marshal.c
int cil_gen_avrule(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint32_t rule_kind) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING | CIL_SYN_LIST, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); struct cil_avrule *rule ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
786,117,818,290,740,100,000,000,000,000,000,000
45
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) { /* * We will parse the partial (or complete) lines. * We will check the request syntax, and also join multi-line * headers. An index of all the lines will be elaborated while * parsing. * * For the parsing, we use a 28 states FS...
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
174,108,887,002,779,770,000,000,000,000,000,000,000
522
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
ews_connection_resolve_by_name (EEwsConnection *cnc, gint pri, const gchar *usename, gboolean is_user_name, gchar **smtp_address, GCancellable *cancellable) { ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
1,220,702,836,531,276,300,000,000,000,000,000,000
86
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip) { struct ftrace_hash *filter_hash; struct ftrace_hash *notrace_hash; int ret; filter_hash = rcu_dereference_raw(ops->filter_hash); notrace_hash = rcu_dereference_raw(ops->notrace_hash); if ((ftrace_hash_empty(filter_hash) || ftrace_lookup_ip(filter...
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
264,087,537,168,724,900,000,000,000,000,000,000,000
19
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
inline unsigned int float2uint(const float f) { int tmp = 0; std::memcpy(&tmp,&f,sizeof(float)); if (tmp>=0) return (unsigned int)f; unsigned int u; // use memcpy instead of assignment to avoid undesired optimizations by C++-compiler. std::memcpy(&u,&f,sizeof(float)); retur...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
74,682,279,325,873,810,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Xtal( byte bitmask , short d0 , int x , short **bar , short *b1 , short *b2 ) { short *a2; if (d0 != 0) d0 += *b1; a2 = *bar + x; /*dprintf1("[%02X]",*a2);*/ if (*a2 < d0) { d0 -= 16400; if (-4096 >= d0) { DifSubK...
0
[ "CWE-120" ]
ghostpdl
849e74e5ab450dd581942192da7101e0664fa5af
162,038,804,364,583,900,000,000,000,000,000,000,000
26
Bug 701799: avoid out-of-range array access in mj_color_correct(). Code is obscure, so this fix merely avoids out-of-range access in the simplest way possible, without understanding what the code is trying to do. Fixes: ./sanbin/gs -sOutputFile=tmp -sDEVICE=mj6000c ../bug-701799.pdf
static int selinux_socket_accept(struct socket *sock, struct socket *newsock) { int err; struct inode_security_struct *isec; struct inode_security_struct *newisec; u16 sclass; u32 sid; err = sock_has_perm(sock->sk, SOCKET__ACCEPT); if (err) return err; isec = inode_security_novalidate(SOCK_INODE(sock)); sp...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
97,842,865,112,262,720,000,000,000,000,000,000,000
25
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
xfs_iunlink_add_backref( struct xfs_perag *pag, xfs_agino_t prev_agino, xfs_agino_t this_agino) { struct xfs_iunlink *iu; if (XFS_TEST_ERROR(false, pag->pag_mount, XFS_ERRTAG_IUNLINK_FALLBACK)) return 0; iu = kmem_zalloc(sizeof(*iu), KM_NOFS); iu->iu_agino = prev_agino; iu->iu_next_unlinked = this_agino; ...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
22,123,685,518,476,144,000,000,000,000,000,000,000
16
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 tpacket_destruct_skb(struct sk_buff *skb) { struct packet_sock *po = pkt_sk(skb->sk); void *ph; BUG_ON(skb == NULL); if (likely(po->tx_ring.pg_vec)) { ph = skb_shinfo(skb)->destructor_arg; BUG_ON(__packet_get_status(po, ph) != TP_STATUS_SENDING); BUG_ON(atomic_read(&po->tx_ring.pending) == 0); ...
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
260,143,081,367,326,300,000,000,000,000,000,000,000
17
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
cockpit_session_ref (CockpitSession *session) { session->refs++; return session; }
0
[ "CWE-1021" ]
cockpit
46f6839d1af4e662648a85f3e54bba2d57f39f0e
221,664,694,920,174,300,000,000,000,000,000,000,000
5
ws: Restrict our cookie to the login host only Mark our cookie as `SameSite: Strict` [1]. The current `None` default will soon be moved to `Lax` by Firefox and Chromium, and recent versions started to throw a warning about it. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite https://...
unsigned int __fastcall TSCPFileSystem::ConfirmOverwrite( const UnicodeString & SourceFullFileName, const UnicodeString & TargetFileName, TOperationSide Side, const TOverwriteFileParams * FileParams, const TCopyParamType * CopyParam, int Params, TFileOperationProgressType * OperationProgress) { TSuspendFil...
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
124,826,737,456,486,770,000,000,000,000,000,000,000
21
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item) { if (item == NULL) { return false; } return (item->type & 0xFF) == cJSON_Number; }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
168,946,668,522,618,460,000,000,000,000,000,000,000
9
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly, MonoBoolean exportedOnly) { MonoArray *res = NULL; MonoArray *exceptions = NULL; MonoImage *image = NULL; MonoTableInfo *table = NULL; MonoDomain *domain; GList *list = NULL; int i, len, ex_count; MONO_ARCH_SAVE_REGS; domain = m...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
171,516,736,750,637,350,000,000,000,000,000,000,000
106
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
int getFlagsImpl( folly::WriteFlags flags, int /*defaultFlags*/) noexcept override { if (flags_) { return flags_; } else { return oldCallback_->getFlags(flags, false /*zeroCopyEnabled*/); } }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
183,221,260,825,135,340,000,000,000,000,000,000,000
9
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static inline int skb_transport_offset(const struct sk_buff *skb) { return skb_transport_header(skb) - skb->data;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
147,665,561,267,122,130,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
QPDFWriter::setContentNormalization(bool val) { this->m->normalize_content_set = true; this->m->normalize_content = val; }
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
84,730,516,710,118,200,000,000,000,000,000,000,000
5
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static int __net_init sit_init_net(struct net *net) { struct sit_net *sitn = net_generic(net, sit_net_id); struct ip_tunnel *t; int err; sitn->tunnels[0] = sitn->tunnels_wc; sitn->tunnels[1] = sitn->tunnels_l; sitn->tunnels[2] = sitn->tunnels_r; sitn->tunnels[3] = sitn->tunnels_r_l; if (!net_has_fallback_tunn...
1
[ "CWE-703", "CWE-772", "CWE-401" ]
linux
07f12b26e21ab359261bf75cfcb424fdc7daeb6d
119,900,929,803,756,780,000,000,000,000,000,000,000
45
net: sit: fix memory leak in sit_init_net() If register_netdev() is failed to register sitn->fb_tunnel_dev, it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev). BUG: memory leak unreferenced object 0xffff888378daad00 (size 512): comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s) ...
static double mp_ext(_cimg_math_parser& mp) { const unsigned int nb_args = (unsigned int)(mp.opcode[2] - 3)/2; CImgList<charT> _str; CImg<charT> it; for (unsigned int n = 0; n<nb_args; ++n) { const unsigned int siz = (unsigned int)mp.opcode[4 + 2*n]; if (siz) {...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
6,902,718,507,592,794,000,000,000,000,000,000,000
24
Fix other issues in 'CImg<T>::load_bmp()'.
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, const char __user *, put_old) { struct path new, old, root; struct mount *new_mnt, *root_mnt, *old_mnt, *root_parent, *ex_parent; struct mountpoint *old_mp, *root_mp; int error; if (!may_mount()) return -EPERM; error = user_path_at(AT_FDCWD, new_roo...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
90,281,275,639,063,970,000,000,000,000,000,000,000
98
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static ssize_t uvesafb_show_vbe_modes(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; int ret = 0, i; for (i = 0; i < par->vbe_modes_cnt && ret < PAGE_SIZE; i++) { ret += snprintf(buf + re...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
189,863,949,365,383,370,000,000,000,000,000,000,000
16
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
apply_aug(struct lys_node_augment *augment, struct unres_schema *unres) { struct lys_node *child, *parent; int clear_config; unsigned int u; uint8_t *v; struct lys_ext_instance *ext; assert(augment->target && (augment->flags & LYS_NOTAPPLIED)); if (!augment->child) { /* nothing to ...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
143,119,817,778,918,440,000,000,000,000,000,000,000
56
schema tree BUGFIX do not check features while still resolving schema Fixes #723
MessageCompressorManager& MessageCompressorManager::forSession( const transport::SessionHandle& session) { return getForSession(session.get()); }
0
[ "CWE-697" ]
mongo
1411cf602a21e45a5ef42b6869c480eb420976ee
275,844,410,538,812,100,000,000,000,000,000,000,000
4
SERVER-43751 Recompute compressor manager message parameters
virtual void make_send_field(THD *thd, Send_field *field) { orig_item->make_send_field(thd, field); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
2,941,151,002,421,449,000,000,000,000,000,000,000
2
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static void __reg_bound_offset32(struct bpf_reg_state *reg) { u64 mask = 0xffffFFFF; struct tnum range = tnum_range(reg->umin_value & mask, reg->umax_value & mask); struct tnum lo32 = tnum_cast(reg->var_off, 4); struct tnum hi32 = tnum_lshift(tnum_rshift(reg->var_off, 32), 32); reg->var_off = tnum_or(h...
0
[]
linux
294f2fc6da27620a506e6c050241655459ccd6bd
168,832,298,740,870,930,000,000,000,000,000,000,000
10
bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() Currently, for all op verification we call __red_deduce_bounds() and __red_bound_offset() but we only call __update_reg_bounds() in bitwise ops. However, we could benefit from calling __update_reg_bounds() in BPF_ADD, BPF_SUB, and BPF_MUL case...
xmlBufFree(xmlBufPtr buf) { if (buf == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, "xmlBufFree: buf == NULL\n"); #endif return; } if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { xmlFree(buf->contentIO); } else if ((buf->content !...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
275,163,149,008,988,980,000,000,000,000,000,000,000
18
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
static void rds_walk_conn_path_info(struct socket *sock, unsigned int len, struct rds_info_iterator *iter, struct rds_info_lengths *lens, int (*visitor)(struct rds_conn_path *, void *), u64 *buffer, size_t item_len) { struct hlist_head *head; struct rds_connection *conn; size_...
0
[ "CWE-401" ]
linux
5f9562ebe710c307adc5f666bf1a2162ee7977c0
30,739,440,361,677,527,000,000,000,000,000,000,000
48
rds: memory leak in __rds_conn_create() __rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0. Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Reviewed-by: Sharath Srinivasan <sharath.srini...
alloc_strvec_quoted_escaped(char *src) { char *token; vector_t *strvec; char cur_quote = 0; char *ofs_op; char *op_buf; char *ofs, *ofs1; char op_char; if (!src) { if (!buf_extern) return NULL; src = buf_extern; } /* Create a vector and alloc each command piece */ strvec = vector_alloc(); op_buf = ...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
155,778,752,420,457,450,000,000,000,000,000,000,000
158
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 ...
static int kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) { char dir_name[ITOA_MAX_LEN * 2]; int ret; if (!kvm_arch_has_vcpu_debugfs()) return 0; if (!debugfs_initialized()) return 0; snprintf(dir_name, sizeof(dir_name), "vcpu%d", vcpu->vcpu_id); vcpu->debugfs_dentry = debugfs_create_dir(dir_name, ...
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
111,103,409,912,627,330,000,000,000,000,000,000,000
25
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
alt_merge_mml(MinMax* to, MinMax* from) { if (to->min > from->min) to->min = from->min; if (to->max < from->max) to->max = from->max; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
135,471,007,453,841,840,000,000,000,000,000,000,000
5
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int bad_file_fsync(struct file *file, struct dentry *dentry, int datasync) { return -EIO; }
0
[]
linux-2.6
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8
31,953,404,454,453,220,000,000,000,000,000,000,000
5
[PATCH] fix memory corruption from misinterpreted bad_inode_ops return values CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; } #define EIO_ERROR ((void *) (return_EIO)) static struct ino...
static int dump_sa(struct xfrm_state *x, int count, void *ptr) { struct pfkey_sock *pfk = ptr; struct sk_buff *out_skb; struct sadb_msg *out_hdr; if (!pfkey_can_dump(&pfk->sk)) return -ENOBUFS; out_skb = pfkey_xfrm_state2msg(x); if (IS_ERR(out_skb)) return PTR_ERR(out_skb); out_hdr = (struct sadb_msg *) o...
0
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
93,502,043,918,503,870,000,000,000,000,000,000,000
29
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
static void sendsuboption(struct Curl_easy *data, int option) { ssize_t bytes_written; int err; unsigned short x, y; unsigned char *uc1, *uc2; struct TELNET *tn = data->req.p.telnet; struct connectdata *conn = data->conn; switch(option) { case CURL_TELOPT_NAWS: /* We prepare data to be sent */ ...
0
[ "CWE-200", "CWE-909" ]
curl
39ce47f219b09c380b81f89fe54ac586c8db6bde
328,033,818,543,348,170,000,000,000,000,000,000,000
53
telnet: check sscanf() for correct number of matches CVE-2021-22898 Bug: https://curl.se/docs/CVE-2021-22898.html
int main(void) { test_syslog_parse_identifier("pidu[111]: xxx", "pidu", "111", 11); test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 6); test_syslog_parse_identifier("pidu xxx", NULL, NULL, 0); return 0; }
1
[ "CWE-125" ]
systemd
a6aadf4ae0bae185dc4c414d492a4a781c80ffe5
143,810,187,732,362,600,000,000,000,000,000,000,000
7
journal: fix syslog_parse_identifier() Fixes #9829.
do_note_netbsd_version(struct magic_set *ms, int swap, void *v) { uint32_t desc; (void)memcpy(&desc, v, sizeof(desc)); desc = elf_getu32(swap, desc); if (file_printf(ms, ", for NetBSD") == -1) return; /* * The version number used to be stuck as 199905, and was thus * basically content-free. Newer versions ...
0
[ "CWE-20" ]
file
39c7ac1106be844a5296d3eb5971946cc09ffda0
262,702,104,121,224,020,000,000,000,000,000,000,000
43
Fix note bounds reading, Francisco Alonso / Red Hat
xmlBufferResize(xmlBufferPtr buf, unsigned int size) { unsigned int newSize; xmlChar* rebuf = NULL; size_t start_buf; if (buf == NULL) return(0); if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0); /* Don't resize if we don't have to */ if (size < buf->size) return 1;...
1
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
256,100,006,542,777,920,000,000,000,000,000,000,000
103
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
const int& getActiveId(const void* object, const StructInfo& info) { return *reinterpret_cast<const int*>( static_cast<const char*>(object) + info.unionExt->unionTypeOffset); }
0
[ "CWE-763" ]
fbthrift
bfda1efa547dce11a38592820916db01b05b9339
34,752,887,154,987,700,000,000,000,000,000,000,000
4
Fix handling of invalid union data in table-based serializer Summary: Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem...
void Smb4KUnmountJob::slotStartUnmount() { QList<Action> actions; QMutableListIterator<Smb4KShare *> it(m_shares); while (it.hasNext()) { Smb4KShare *share = it.next(); Action unmountAction; if (createUnmountAction(share, &unmountAction)) { connect(unmountAction.watcher(), SIGNAL(actionP...
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
307,415,806,844,168,760,000,000,000,000,000,000,000
35
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
static int jpc_putnumnewpasses(jpc_bitstream_t *out, int n) { int ret; if (n <= 0) { return -1; } else if (n == 1) { ret = jpc_bitstream_putbit(out, 0); } else if (n == 2) { ret = jpc_bitstream_putbits(out, 2, 2); } else if (n <= 5) { ret = jpc_bitstream_putbits(out, 4, 0xc | (n - 3)); } else if (n <= 36...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
182,658,449,843,694,600,000,000,000,000,000,000,000
25
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
bool matchRange(const std::string &range, int target) { string_array vArray = split(range, ","); bool match = false; std::string range_begin_str, range_end_str; int range_begin, range_end; static const std::string reg_num = "-?\\d+", reg_range = "(\\d+)-(\\d+)", reg_not = "\\!-?(\\d+)", reg_not_rang...
0
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
80,964,612,877,489,030,000,000,000,000,000,000,000
50
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
BlankResize(wi, he) int wi, he; { flayer->l_width = wi; flayer->l_height = he; return 0; }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
180,816,452,722,248,500,000,000,000,000,000,000,000
7
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
int btrfs_balance(struct btrfs_fs_info *fs_info, struct btrfs_balance_control *bctl, struct btrfs_ioctl_balance_args *bargs) { u64 meta_target, data_target; u64 allowed; int mixed = 0; int ret; u64 num_devices; unsigned seq; bool reducing_redundancy; int i; if (btrfs_fs_closing(fs_info) || atomic...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
290,617,209,899,359,220,000,000,000,000,000,000,000
185
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
static void *ct_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct net *net = seq_file_net(seq); int cpu; for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) { if (!cpu_possible(cpu)) continue; *pos = cpu + 1; return per_cpu_ptr(net->ct.stat, cpu); } (*pos)++; return NULL; }
0
[ "CWE-203" ]
linux
2671fa4dc0109d3fb581bc3078fdf17b5d9080f6
260,448,175,806,510,880,000,000,000,000,000,000,000
14
netfilter: conntrack: Make global sysctls readonly in non-init netns These sysctls point to global variables: - NF_SYSCTL_CT_MAX (&nf_conntrack_max) - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max) - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user) Because their data pointers are not updated to point to per-netns s...
Field_longlong(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg, bool zero_arg, bool unsigned_arg) :Field_int(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, z...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
58,849,654,403,878,290,000,000,000,000,000,000,000
7
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...
void DependencyOptimizer::GroupCrossDeviceControlEdges(bool host_granularity) { VLOG(1) << "DependencyOptimizer::GroupCrossDeviceControlEdges host_granularity=" << host_granularity; const int num_nodes = optimized_graph_->node_size(); for (int i = 0; i < num_nodes; ++i) { NodeDef* node = optimized...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
84,279,980,906,591,610,000,000,000,000,000,000,000
101
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
static void br_multicast_free_group(struct rcu_head *head) { struct net_bridge_mdb_entry *mp = container_of(head, struct net_bridge_mdb_entry, rcu); kfree(mp); }
0
[ "CWE-20" ]
linux
c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1
109,514,896,491,792,730,000,000,000,000,000,000,000
7
bridge: fix some kernel warning in multicast timer Several people reported the warning: "kernel BUG at kernel/timer.c:729!" and the stack trace is: #7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905 #8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge] #9 [ffff880214d25c80] br_mul...
static void inv_predict_4(uint8_t *p, const uint8_t *p_l, const uint8_t *p_tl, const uint8_t *p_t, const uint8_t *p_tr) { AV_COPY32(p, p_tl); }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
190,950,750,526,454,950,000,000,000,000,000,000,000
5
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
static int l_channel_close (lua_State *L) { return channel_close(L, 0, 0); }
0
[ "CWE-415" ]
nmap
350bbe0597d37ad67abe5fef8fba984707b4e9ad
38,741,907,828,797,375,000,000,000,000,000,000,000
3
Avoid a crash (double-free) when SSH connection fails
inline cimg_uint64 time() { #if cimg_OS==1 struct timeval st_time; gettimeofday(&st_time,0); return (cimg_uint64)st_time.tv_sec*1000 + (cimg_uint64)st_time.tv_usec/1000; #elif cimg_OS==2 ULARGE_INTEGER ul; FILETIME ft; GetSystemTimeAsFileTime(&ft); ul.LowPart = ft.dwLowDate...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
255,132,390,046,067,460,000,000,000,000,000,000,000
16
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr, enum ib_srq_attr_mask srq_attr_mask, struct ib_udata *udata) { struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq, ib_srq); struct bnxt_re_dev *rdev = srq->rdev; int rc; switch (srq_attr_mask) {...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
196,001,843,531,676,680,000,000,000,000,000,000,000
35
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
zfs_fuid_map_id(zfsvfs_t *zfsvfs, uint64_t fuid, cred_t *cr, zfs_fuid_type_t type) { uint32_t index = FUID_INDEX(fuid); const char *domain; uid_t id; if (index == 0) return (fuid); domain = zfs_fuid_find_by_idx(zfsvfs, index); ASSERT(domain != NULL); if (type == ZFS_OWNER || type == ZFS_ACE_USER) { (v...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
340,008,374,905,668,000,000,000,000,000,000,000,000
22
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
static void test_view_sp_list_fields() { int rc; MYSQL_RES *res; myheader("test_view_sp_list_fields"); rc= mysql_query(mysql, "DROP FUNCTION IF EXISTS f1"); myquery(rc); rc= mysql_query(mysql, "DROP TABLE IF EXISTS v1, t1, t2"); myquery(rc); rc= mysql_query(mysql, "DROP VIEW IF EXISTS v1, t1, t2"...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
183,107,458,361,600,500,000,000,000,000,000,000,000
34
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...
int amf_namf_callback_handle_sm_context_status( ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg) { int status = OGS_SBI_HTTP_STATUS_NO_CONTENT; amf_ue_t *amf_ue = NULL; amf_sess_t *sess = NULL; uint8_t pdu_session_identity; ogs_sbi_message_t sendmsg; ogs_sbi_response_t *response ...
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
298,277,028,044,318,470,000,000,000,000,000,000,000
99
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
void move_hugetlb_state(struct page *oldpage, struct page *newpage, int reason) { struct hstate *h = page_hstate(oldpage); hugetlb_cgroup_migrate(oldpage, newpage); set_page_owner_migrate_reason(newpage, reason); /* * transfer temporary state of the new huge page. This is * reverse to other transitions becaus...
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
164,169,507,471,621,870,000,000,000,000,000,000,000
38
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req) { if ((req == NULL) || (req->req_info == NULL)) return (NULL); return (X509_PUBKEY_get(req->req_info->pubkey)); }
0
[]
openssl
28a00bcd8e318da18031b2ac8778c64147cd54f9
295,071,508,872,970,200,000,000,000,000,000,000,000
6
Check public key is not NULL. CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
set<CChan*> CClient::MatchChans(const CString& sPatterns) const { VCString vsPatterns; sPatterns.Replace_n(",", " ") .Split(" ", vsPatterns, false, "", "", true, true); set<CChan*> sChans; for (const CString& sPattern : vsPatterns) { vector<CChan*> vChans = m_pNetwork->FindChans(sPatter...
0
[ "CWE-476" ]
znc
2390ad111bde16a78c98ac44572090b33c3bd2d8
267,917,219,290,303,050,000,000,000,000,000,000,000
12
Fix null pointer dereference in echo-message The bug was introduced while fixing #1705. If a client did not enable echo-message, and doesn't have a network, it crashes. Thanks to LunarBNC for reporting this
TEST(MatchHeadersTest, HeaderContainsMatch) { TestRequestHeaderMapImpl matching_headers{{"match-header", "123onevalue456"}}; TestRequestHeaderMapImpl unmatching_headers{{"match-header", "123anothervalue456"}}; const std::string yaml = R"EOF( name: match-header contains_match: onevalue )EOF"; std::vector<Hea...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
291,243,077,152,268,700,000,000,000,000,000,000,000
15
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void RemoteDevicePropertiesWidget::setType() { if (Type_SshFs==type->itemData(type->currentIndex()).toInt() && 0==sshPort->value()) { sshPort->setValue(22); } if (Type_Samba==type->itemData(type->currentIndex()).toInt() && 0==smbPort->value()) { smbPort->setValue(445); } }
1
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
239,930,985,927,667,620,000,000,000,000,000,000,000
9
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
quicklist *quicklistDup(quicklist *orig) { quicklist *copy; copy = quicklistNew(orig->fill, orig->compress); for (quicklistNode *current = orig->head; current; current = current->next) { quicklistNode *node = quicklistCreateNode(); if (current->encoding == QUICKLIST_NODE_ENCODING...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
264,707,165,259,199,260,000,000,000,000,000,000,000
30
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static int __init vsock_init(void) { int err = 0; vsock_init_tables(); vsock_proto.owner = THIS_MODULE; vsock_device.minor = MISC_DYNAMIC_MINOR; err = misc_register(&vsock_device); if (err) { pr_err("Failed to register misc device\n"); goto err_reset_transport; } err = proto_register(&vsock_proto, 1); /*...
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
145,832,482,134,551,150,000,000,000,000,000,000,000
36
vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copie...
static int kiocb_cancel(struct kiocb *kiocb) { kiocb_cancel_fn *old, *cancel; /* * Don't want to set kiocb->ki_cancel = KIOCB_CANCELLED unless it * actually has a cancel function, hence the cmpxchg() */ cancel = ACCESS_ONCE(kiocb->ki_cancel); do { if (!cancel || cancel == KIOCB_CANCELLED) return -EINVA...
0
[ "CWE-200" ]
linux
edfbbf388f293d70bf4b7c0bc38774d05e6f711a
276,900,837,685,467,470,000,000,000,000,000,000,000
20
aio: fix kernel memory disclosure in io_getevents() introduced in v3.10 A kernel memory disclosure was introduced in aio_read_events_ring() in v3.10 by commit a31ad380bed817aa25f8830ad23e1a0480fef797. The changes made to aio_read_events_ring() failed to correctly limit the index into ctx->ring_pages[], allowing an at...
static int mxf_parse_handle_essence(MXFContext *mxf) { AVIOContext *pb = mxf->fc->pb; int64_t ret; if (mxf->parsing_backward) { return mxf_seek_to_previous_partition(mxf); } else { uint64_t offset = mxf->footer_partition ? mxf->footer_partition ...
0
[ "CWE-703" ]
FFmpeg
f173cdfe669556aa92857adafe60cbe5f2aa1210
335,254,470,640,222,840,000,000,000,000,000,000,000
41
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c...
operator fmt::LongLong() const { return fmt::LongLong(1) << 32; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
89,804,457,303,494,100,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
static BOOL shadow_server_init_certificate(rdpShadowServer* server) { char* filepath; MAKECERT_CONTEXT* makecert = NULL; BOOL ret = FALSE; const char* makecert_argv[6] = { "makecert", "-rdp", "-live", "-silent", "-y", "5" }; int makecert_argc = (sizeof(makecert_argv) / sizeof(char*)); if (!PathFileExistsA(server...
0
[ "CWE-416", "CWE-703" ]
FreeRDP
6d86e20e1e7caaab4f0c7f89e36d32914dbccc52
205,795,162,041,318,440,000,000,000,000,000,000,000
64
Fixed double free
static CURLcode smtp_state_ehlo(struct connectdata *conn) { CURLcode result; struct smtp_conn *smtpc = &conn->proto.smtpc; smtpc->authmechs = 0; /* No known authentication mechanisms yet. */ smtpc->authused = 0; /* Clear the authentication mechanism used for ...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
812,266,533,318,707,600,000,000,000,000,000,000
18
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
ExpressionFieldPath::ExpressionFieldPath(ExpressionContext* const expCtx, const string& theFieldPath, Variables::Id variable) : Expression(expCtx), _fieldPath(theFieldPath), _variable(variable) {}
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
68,450,968,465,676,830,000,000,000,000,000,000,000
4
SERVER-49404 Enforce additional checks in $arrayToObject
xfs_alloc_lookup_le( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */ xfs_extlen_t len, /* length of extent */ int *stat) /* success/failure */ { int error; cur->bc_rec.a.ar_startblock = bno; cur->bc_rec.a.ar_blockcount = len; error = xfs_btree_lookup(cur, XF...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
91,583,010,924,405,980,000,000,000,000,000,000,000
13
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
static void Ins_AA( INS_ARG ) { (void)exc; (void)args; /* Intentional - no longer supported */ }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
4,490,127,871,059,351,000,000,000,000,000,000,000
4
Bug 698024: bounds check zone pointer in Ins_MIRP()