func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
struct file_list *get_dirlist(char *dirname, int dlen, int flags) { struct file_list *dirlist; char dirbuf[MAXPATHLEN]; int save_recurse = recurse; int save_xfer_dirs = xfer_dirs; int save_prune_empty_dirs = prune_empty_dirs; int senddir_fd = flags & GDL_IGNORE_FILTER_RULES ? -2 : -1; int senddir_flags = FLAG_CO...
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
212,998,917,660,181,600,000,000,000,000,000,000,000
40
Some extra file-list safety checks.
stat_location_begin (SoupURI *uri, gboolean count_children) { SoupMessage *msg; const char *depth; static const char *stat_profind_body = PROPSTAT_XML_BEGIN PROPSTAT_XML_PROP_BEGIN "<D:resourcetype/>\n" PROPSTAT_XML_PROP_END PROPSTAT_XML_END; msg = soup_m...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
222,319,497,138,622,540,000,000,000,000,000,000,000
27
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) { if ((cmd == F_GETLK64) || (cmd == F_SETLK64) || (cmd == F_SETLKW64)) return -EINVAL; return compat_sys_fcntl64(fd, cmd, arg); }
0
[]
linux-2.6
822191a2fa1584a29c3224ab328507adcaeac1ab
251,793,236,289,075,850,000,000,000,000,000,000,000
7
[PATCH] skip data conversion in compat_sys_mount when data_page is NULL OpenVZ Linux kernel team has found a problem with mounting in compat mode. Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode leads to oops: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp...
unsigned char *string_to_hex(const char *str, long *len) { unsigned char *hexbuf, *q; unsigned char ch, cl, *p; if(!str) { X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_INVALID_NULL_ARGUMENT); return NULL; } if(!(hexbuf = OPENSSL_malloc(strlen(str) >> 1))) goto err; for(p = (unsigned char *)str, q = hexbuf; *p;) ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
211,446,351,218,570,600,000,000,000,000,000,000,000
53
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
LogLevelSetter::~LogLevelSetter() { auto prev_level = previous_levels_.begin(); for (Logger::Logger& logger : Logger::Registry::loggers()) { ASSERT(prev_level != previous_levels_.end()); logger.setLevel(*prev_level); ++prev_level; } ASSERT(prev_level == previous_levels_.end()); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
189,850,112,446,779,200,000,000,000,000,000,000
9
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static RBinWasmExportEntry *parse_export_entry(RBinWasmObj *bin, ut64 bound, ut32 index) { RBuffer *b = bin->buf; RBinWasmExportEntry *export = R_NEW0 (RBinWasmExportEntry); if (export) { export->sec_i = index; export->file_offset = r_buf_tell (b); if (!consume_encoded_name_new (b, bound, &export->field_len, &...
0
[ "CWE-787" ]
radare2
b4ca66f5d4363d68a6379e5706353b3bde5104a4
230,570,462,671,717,120,000,000,000,000,000,000,000
21
Fix #20336 - wasm bin parser ##crash
static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { switch (PB_HTYPE(field->type)) { case PB_HTYPE_REQUIRED: if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); retu...
0
[ "CWE-125" ]
nanopb
45582f1f97f49e2abfdba1463d1e1027682d9856
66,783,130,227,578,900,000,000,000,000,000,000,000
87
Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)
static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd, struct msqid_ds __user *buf, int version) { struct kern_ipc_perm *ipcp; struct msqid64_ds uninitialized_var(msqid64); struct msg_queue *msq; int err; if (cmd == IPC_SET) { if (copy_msqid_from_user(&msqid64, buf, version)) return -E...
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
192,583,987,524,751,740,000,000,000,000,000,000,000
72
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state c...
static int shash_async_final(struct ahash_request *req) { return crypto_shash_final(ahash_request_ctx(req), req->result); }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
153,254,987,181,354,540,000,000,000,000,000,000,000
4
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
cmsUInt32Number CMSEXPORT cmsGetHeaderFlags(cmsHPROFILE hProfile) { _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; return (cmsUInt32Number) Icc -> flags; }
0
[]
Little-CMS
d2d902b9a03583ae482c782b2f243f7e5268a47d
53,626,728,064,807,290,000,000,000,000,000,000,000
5
>Changes from Richard Hughes
static const char *kernel_type_name(const struct btf* btf, u32 id) { return btf_name_by_offset(btf, btf_type_by_id(btf, id)->name_off); }
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
126,743,147,586,803,360,000,000,000,000,000,000,000
4
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
void M_LoadDefaults (void) { int i; int len; FILE* f; char def[80]; char strparm[100]; char* newstring; int parm; boolean isstring; // set everything to base values numdefaults = sizeof(defaults)/sizeof(defaults[0]); for (i=0 ; i<numdefaults ; i++) *defaults[i].locat...
0
[ "CWE-120", "CWE-787" ]
doom-vanille
8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec
235,405,443,936,260,350,000,000,000,000,000,000,000
74
Fix buffer overflow in M_LoadDefaults Too much data will most likely result in a crash or freeze, but you can overwrite the stack which can be used to do an arbitrary code execution. (https://twitter.com/notrevenant/status/1268654123903340544)
int __virt_addr_valid(const volatile void *kaddr) { return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
286,675,363,560,881,550,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
int ha_myisam::close(void) { MI_INFO *tmp=file; file=0; return mi_close(tmp); }
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
190,797,205,035,226,060,000,000,000,000,000,000,000
6
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
compile_length_tree(Node* node, regex_t* reg) { int len, type, r; type = NTYPE(node); switch (type) { case NT_LIST: len = 0; do { r = compile_length_tree(NCAR(node), reg); if (r < 0) return r; len += r; } while (IS_NOT_NULL(node = NCDR(node))); r = len; break; case NT_A...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
25,932,265,285,327,873,000,000,000,000,000,000,000
91
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
inline void Tanh16bitPrecision(const TanhParams& params, const RuntimeShape& input_shape, const int8* input_data, const RuntimeShape& output_shape, int8* output_data) { // Note that this is almo...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
333,624,958,125,470,500,000,000,000,000,000,000,000
92
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
static u32 avc_add_emulation_bytes(const char *buffer_src, char *buffer_dst, u32 nal_size) { u32 i = 0, emulation_bytes_count = 0; u8 num_zero = 0; while (i < nal_size) { /*ISO 14496-10: "Within the NAL unit, any four-byte sequence that starts with 0x000003 other than the following sequences shall not occur at ...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
303,446,385,141,345,230,000,000,000,000,000,000,000
31
fix some exploitable overflows (#994, #997)
calculate_ld_cache_checksum (GBytes *app_deploy_data, GBytes *runtime_deploy_data, const char *app_extensions, const char *runtime_extensions) { g_autoptr(GChecksum) ld_so_checksum = g_checksum_new (G_CHECKSUM_SHA256); if (ap...
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
68,170,449,317,326,470,000,000,000,000,000,000,000
16
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
static void correctstack (lua_State *L, StkId oldstack, StkId newstack) { CallInfo *ci; UpVal *up; if (oldstack == newstack) return; /* stack address did not change */ L->top = (L->top - oldstack) + newstack; for (up = L->openupval; up != NULL; up = up->u.open.next) up->v = s2v((uplevel(up) - oldstac...
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
27,960,392,311,706,550,000,000,000,000,000,000,000
15
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
PackLinuxElf32mipseb::~PackLinuxElf32mipseb() { }
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
283,546,935,179,223,830,000,000,000,000,000,000,000
3
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
static const char *set_server_root(cmd_parms *cmd, void *dummy, const char *arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { return err; } if ((apr_filepath_merge((char**)&ap_server_root, NULL, arg, ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
234,379,201,893,925,000,000,000,000,000,000,000,000
17
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
void onFailure(const Http::AsyncClient::Request&, Http::AsyncClient::FailureReason) override {}
0
[ "CWE-416" ]
envoy
7ffda4e809dec74449ebc330cebb9d2f4ab61360
140,146,755,117,099,540,000,000,000,000,000,000,000
1
oauth2: do not blindly accept requests with a token in the Authorization headera (781) The logic was broken because it assumed an additional call would be performed to the auth server, which isn't the case. Per the filter documentation, a request is only considered subsequently authenticated if there's valid cookie th...
add_code_range(BBuf** pbuf, ScanEnv* env, OnigCodePoint from, OnigCodePoint to) { return add_code_range0(pbuf, env, from, to, 1); }
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
329,681,790,993,154,580,000,000,000,000,000,000,000
4
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
test_HaveKeyIncorrect(void) { const keyid_t KEYNO = 2; TEST_ASSERT_FALSE(auth_havekey(KEYNO)); TEST_ASSERT_FALSE(authhavekey(KEYNO)); return; }
0
[ "CWE-287" ]
ntp
71a962710bfe066f76da9679cf4cfdeffe34e95e
302,764,379,102,241,280,000,000,000,000,000,000,000
9
[Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
bool Table_scope_and_contents_source_st::check_period_fields( THD *thd, Alter_info *alter_info) { if (!period_info.name) return false; if (tmp_table()) { my_error(ER_PERIOD_TEMPORARY_NOT_ALLOWED, MYF(0)); return true; } Table_period_info::start_end_t &period= period_info.period; ...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
101,230,278,413,020,780,000,000,000,000,000,000,000
42
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
struct device *tty_register_device_attr(struct tty_driver *driver, unsigned index, struct device *device, void *drvdata, const struct attribute_group **attr_grp) { char name[64]; dev_t devt = MKDEV(driver->major, driver->minor_start) + index; struct device *dev = NULL; int retval = -ENODEV; bo...
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
91,058,657,077,815,800,000,000,000,000,000,000,000
57
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...
static int TS_find_name(STACK_OF(GENERAL_NAME) *gen_names, GENERAL_NAME *name) { int i, found; for (i = 0, found = 0; !found && i < sk_GENERAL_NAME_num(gen_names); ++i) { GENERAL_NAME *current = sk_GENERAL_NAME_value(gen_names, i); found = GENERAL_NAME_cmp(current, name) == 0; } return found ? i - 1 :...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
278,454,853,476,562,270,000,000,000,000,000,000,000
11
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
call_callback_retnr( callback_T *callback, int argcount, // number of "argvars" typval_T *argvars) // vars for arguments, must have "argcount" // PLUS ONE elements! { typval_T rettv; varnumber_T retval; if (call_callback(callback, -1, &rettv, argcount, argvars) == FAIL) return -2; re...
0
[ "CWE-416" ]
vim
91c7cbfe31bbef57d5fcf7d76989fc159f73ef15
230,585,615,355,651,080,000,000,000,000,000,000,000
16
patch 9.0.0225: using freed memory with multiple line breaks in expression Problem: Using freed memory with multiple line breaks in expression. Solution: Free eval_tofree later.
static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc, unsigned int *rsize) { struct sony_sc *sc = hid_get_drvdata(hdev); if (sc->quirks & (SINO_LITE_CONTROLLER | FUTUREMAX_DANCE_MAT)) return rdesc; /* * Some Sony RF receivers wrongly declare the mouse pointer as a * a constant non-data variable....
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
246,209,157,167,379,860,000,000,000,000,000,000,000
32
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static void sig_message_join(SERVER_REC *server, const char *channel, const char *nick, const char *address) { CHANNEL_REC *chanrec; g_return_if_fail(nick != NULL); chanrec = channel_find(server, channel); if (chanrec != NULL) CHANNEL_LAST_MSG_ADD(chanrec, nick, FALSE); }
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
338,443,019,006,561,430,000,000,000,000,000,000,000
10
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, s32 value, struct lg_drv_data *drv_data) { struct lg4ff_device_entry *entry = drv_data->device_props; s32 new_value = 0; if (!entry) { hid_err(hid, "Device properties not found"); return 0; } switch...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
278,417,719,863,927,900,000,000,000,000,000,000,000
25
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
int lxc_write_to_file(const char *filename, const void* buf, size_t count, bool add_newline) { int fd, saved_errno; ssize_t ret; fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0666); if (fd < 0) return -1; ret = lxc_write_nointr(fd, buf, count); if (ret < 0) goto out_error; if ((size_t)ret !=...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
89,253,626,474,823,570,000,000,000,000,000,000,000
27
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void nfs_readdir_free_pages(struct page **pages, size_t npages) { while (npages--) put_page(pages[npages]); kfree(pages); }
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
98,875,719,492,674,500,000,000,000,000,000,000,000
6
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
static NTSTATUS set_sd(files_struct *fsp, uint8 *data, uint32 sd_len, uint32 security_info_sent) { SEC_DESC *psd = NULL; NTSTATUS status; if (sd_len == 0) { return NT_STATUS_INVALID_PARAMETER; } if (!CAN_WRITE(fsp->conn)) { return NT_STATUS_ACCESS_DENIED; } if (!lp_nt_acl_support(SNUM(fsp->conn))...
0
[ "CWE-189" ]
samba
6ef0e33fe8afa0ebb81652b9d42b42d20efadf04
61,182,210,407,709,990,000,000,000,000,000,000,000
86
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
static int nft_flush_table(struct nft_ctx *ctx) { int err; struct nft_chain *chain, *nc; struct nft_set *set, *ns; list_for_each_entry_safe(chain, nc, &ctx->table->chains, list) { ctx->chain = chain; err = nft_delrule_by_chain(ctx); if (err < 0) goto out; err = nft_delchain(ctx); if (err < 0) got...
1
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
106,537,404,727,739,100,000,000,000,000,000,000,000
32
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
void EbmlMaster::Remove(EBML_MASTER_ITERATOR & Itr) { ElementList.erase(Itr); }
0
[ "CWE-703" ]
libebml
88409e2a94dd3b40ff81d08bf6d92f486d036b24
107,963,594,179,406,500,000,000,000,000,000,000,000
4
EbmlMaster: propagate upper level element after infinite sized one correctly When the parser encountered a deeply nested element with an infinite size then a following element of an upper level was not propagated correctly. Instead the element with the infinite size was added into the EBML element tree a second time r...
static void fuse_readahead(struct readahead_control *rac) { struct inode *inode = rac->mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); unsigned int i, max_pages, nr_pages = 0; if (fuse_is_bad(inode)) return; max_pages = min_t(unsigned int, fc->max_pages, fc->max_read / PAGE_SIZE); for (;;) { ...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
14,698,929,803,452,258,000,000,000,000,000,000,000
35
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
void StreamTcpFreeConfig(bool quiet) { StreamTcpReassembleFree(quiet); SCMutexLock(&ssn_pool_mutex); if (ssn_pool != NULL) { PoolThreadFree(ssn_pool); ssn_pool = NULL; } SCMutexUnlock(&ssn_pool_mutex); SCMutexDestroy(&ssn_pool_mutex); SCLogDebug("ssn_pool_cnt %"PRIu64"", ss...
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
305,059,244,893,515,370,000,000,000,000,000,000,000
14
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
void CLASS process_Sony_0x9403(uchar *buf) { short bufx = SonySubstitution[buf[4]]; if ((bufx == 0x00) || (bufx == 0x94)) return; imgdata.other.SensorTemperature = (float) ((short) SonySubstitution[buf[5]]); return; }
0
[ "CWE-119", "CWE-125" ]
LibRaw
f1394822a0152ceed77815eafa5cac4e8baab10a
211,526,799,836,581,720,000,000,000,000,000,000,000
10
SECUNIA advisory 76000 #1 (wrong fuji width set via tiff tag
proto_tree_add_node(proto_tree *tree, field_info *fi) { proto_node *pnode, *tnode, *sibling; field_info *tfi; guint depth = 1; /* * Restrict our depth. proto_tree_traverse_pre_order and * proto_tree_traverse_post_order (and possibly others) are recursive * so we need to be mindful of our stack size. */ if...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
129,931,400,736,449,500,000,000,000,000,000,000,000
58
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static int diriter_update_paths(git_path_diriter *diriter) { size_t filename_len, path_len; filename_len = wcslen(diriter->current.cFileName); if (GIT_ADD_SIZET_OVERFLOW(&path_len, diriter->parent_len, filename_len) || GIT_ADD_SIZET_OVERFLOW(&path_len, path_len, 2)) return -1; if (path_len > GIT_WIN_PATH_UTF...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
323,619,300,115,123,180,000,000,000,000,000,000,000
35
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
static double Quadratic(const double x, const ResizeFilter *magick_unused(resize_filter)) { magick_unreferenced(resize_filter); /* 2rd order (quadratic) B-Spline approximation of Gaussian. */ if (x < 0.5) return(0.75-x*x); if (x < 1.5) return(0.5*(x-1.5)*(x-1.5)); return(0.0); }
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
177,736,433,456,271,230,000,000,000,000,000,000,000
14
https://github.com/ImageMagick/ImageMagick/issues/717
const CImg<T>& save_dlm(const char *const filename) const { return _save_dlm(0,filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
256,993,912,185,387,430,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void HttpIntegrationTest::testEnvoyProxying100Continue(bool continue_before_upstream_complete, bool with_encoder_filter) { if (with_encoder_filter) { // Because 100-continue only affects encoder filters, make sure it plays well with one. config_helper_.ad...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
154,329,582,485,128,870,000,000,000,000,000,000,000
61
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
//! Return a reference to the maximum pixel value of the instance list. /** **/ T& max() { if (is_empty()) throw CImgInstanceException(_cimglist_instance "max(): Empty instance.", cimglist_instance); T *ptr_max ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
83,897,878,767,811,360,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
DeepScanLineInputFile::lastScanLineInChunk(int y) const { int minY = firstScanLineInChunk(y); return min(minY+_data->linesInBuffer-1,_data->maxY); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
154,826,952,305,522,600,000,000,000,000,000,000,000
5
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int alloc_apic_access_page(struct kvm *kvm) { struct kvm_userspace_memory_region kvm_userspace_mem; int r = 0; mutex_lock(&kvm->slots_lock); if (kvm->arch.apic_access_page) goto out; kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT; kvm_userspace_mem.flags = 0; kvm_userspace_mem.guest_phys_add...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
99,655,461,385,229,200,000,000,000,000,000,000,000
21
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err) { struct iscsi_session *session = conn->session; spin_lock_bh(&session->frwd_lock); if (session->state == ISCSI_STATE_FAILED) { spin_unlock_bh(&session->frwd_lock); return; } if (conn->stop_stage == 0) session->state = ISCSI_STATE_FAILED;...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
152,686,055,045,075,660,000,000,000,000,000,000,000
18
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
static int workqueue_apply_unbound_cpumask(void) { LIST_HEAD(ctxs); int ret = 0; struct workqueue_struct *wq; struct apply_wqattrs_ctx *ctx, *n; lockdep_assert_held(&wq_pool_mutex); list_for_each_entry(wq, &workqueues, list) { if (!(wq->flags & WQ_UNBOUND)) continue; /* creating multiple pwqs breaks orde...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
304,698,226,964,960,830,000,000,000,000,000,000,000
33
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
SplineFont *SFDirRead(char *filename) { return( SFD_Read(filename,NULL,true)); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
252,377,301,465,733,700,000,000,000,000,000,000,000
3
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
static ssize_t demote_size_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { int nid; struct hstate *h = kobj_to_hstate(kobj, &nid); unsigned long demote_size = (PAGE_SIZE << h->demote_order) / SZ_1K; return sysfs_emit(buf, "%lukB\n", demote_size); }
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
278,793,631,108,508,250,000,000,000,000,000,000,000
9
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...
inline static jas_int_asr(int x, int n) { assert(n >= 0); return x >> n; }
0
[ "CWE-476" ]
jasper
2e82fa00466ae525339754bb3ab0a0474a31d4bd
298,906,406,661,649,840,000,000,000,000,000,000,000
5
Fixed an integral type promotion problem by adding a JAS_CAST. Modified the jpc_tsfb_synthesize function so that it will be a noop for an empty sequence (in order to avoid dereferencing a null pointer).
flip_line (guchar *buf, tga_info *info) { guchar temp; guchar *alt; gint x, s; alt = buf + (info->bytes * (info->width - 1)); for (x = 0; x * 2 < info->width; x++) { for (s = 0; s < info->bytes; ++s) { temp = buf[s]; buf[s] = alt[s]; alt[s] = ...
0
[ "CWE-125" ]
GIMP
674b62ad45b6579ec6d7923dc3cb1ef4e8b5498b
253,428,225,117,255,300,000,000,000,000,000,000,000
22
Bug 739134 - (CVE-2017-17786) Out of bounds read / heap overflow in... ... TGA importer. Be more thorough on valid TGA RGB and RGBA images. In particular current TGA plug-in can import RGBA as 32 bits (8 bits per channel) and 16 bits (5 bits per color channel and 1 bit for alpha), and RGB as 15 and 24 bits. Maybe the...
ssize_t sys_send(int s, const void *msg, size_t len, int flags) { ssize_t ret; do { ret = send(s, msg, len, flags); #if defined(EWOULDBLOCK) } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); #else } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
101,532,297,834,599,230,000,000,000,000,000,000,000
10
s3: nmbd: Fix bug 10633 - nmbd denial of service The Linux kernel has a bug in that it can give spurious wakeups on a non-blocking UDP socket for a non-deliverable packet. When nmbd was changed to use non-blocking sockets it became vulnerable to a spurious wakeup from poll/epoll. Fix sys_recvfile() to return on EWOU...
static void build_skb_flow_key(struct flowi4 *fl4, const struct sk_buff *skb, const struct sock *sk) { const struct net *net = dev_net(skb->dev); const struct iphdr *iph = ip_hdr(skb); int oif = skb->dev->ifindex; u8 tos = RT_TOS(iph->tos); u8 prot = iph->protocol; u32 mark = skb->mark; __build_flow_k...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
200,423,889,957,904,280,000,000,000,000,000,000,000
12
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
static int test_gf2m_modinv(void) { BIGNUM *a = NULL, *b[2] = {NULL, NULL}, *c = NULL, *d = NULL; int i, j, st = 0; if (!TEST_ptr(a = BN_new()) || !TEST_ptr(b[0] = BN_new()) || !TEST_ptr(b[1] = BN_new()) || !TEST_ptr(c = BN_new()) || !TEST_ptr(d = BN_new())) ...
0
[]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
309,651,719,571,767,550,000,000,000,000,000,000,000
36
Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets bn_sqr_comba8 does for instance compute a wrong result for the value: a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45 The correct result is: r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f 9...
TEST_F(RouterTest, MissingRequiredHeaders) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::ConnectionPool::C...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
275,667,013,226,429,230,000,000,000,000,000,000,000
31
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
void udf_handler::cleanup() { if (!not_original) { if (initialized) { if (u_d->func_deinit != NULL) { Udf_func_deinit deinit= u_d->func_deinit; (*deinit)(&initid); } free_udf(u_d); initialized= FALSE; } if (buffers) // Because of bug in ecc dele...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
74,799,937,123,963,985,000,000,000,000,000,000,000
19
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
copy_node_opt_info(OptNode* to, OptNode* from) { *to = *from; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
251,935,509,783,282,600,000,000,000,000,000,000,000
4
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int megasas_map_sgl(MegasasState *s, MegasasCmd *cmd, union mfi_sgl *sgl) { int i; int iov_count = 0; size_t iov_size = 0; cmd->flags = le16_to_cpu(cmd->frame->header.flags); iov_count = cmd->frame->header.sge_count; if (iov_count > MEGASAS_MAX_SGE) { trace_megasas_iovec_sgl_over...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
314,098,575,368,446,580,000,000,000,000,000,000,000
43
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
FileInputSource::destroy() { if (this->file && this->close_file) { fclose(this->file); this->file = 0; } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
297,458,977,006,959,500,000,000,000,000,000,000,000
8
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 uint64_t intel_hda_mmio_read(void *opaque, hwaddr addr, unsigned size) { IntelHDAState *d = opaque; const IntelHDAReg *reg = intel_hda_reg_find(d, addr); return intel_hda_reg_read(d, reg, MAKE_64BIT_MASK(0, size * 8));
0
[ "CWE-787" ]
qemu
79fa99831debc9782087e834382c577215f2f511
274,806,600,609,064,860,000,000,000,000,000,000,000
7
hw/audio/intel-hda: Restrict DMA engine to memories (not MMIO devices) Issue #542 reports a reentrancy problem when the DMA engine accesses the HDA controller I/O registers. Fix by restricting the DMA engine to memories regions (forbidding MMIO devices such the HDA controller). Reported-by: OSS-Fuzz (Issue 28435) Rep...
struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, u16 name_len, int mod) { int ret; struct btrfs_key key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; key.objectid = dir; key....
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
318,890,156,407,318,300,000,000,000,000,000,000,000
22
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
static int mount_entry(const char *fsname, const char *target, const char *fstype, unsigned long mountflags, const char *data, int optional, const char *rootfs) { #ifdef HAVE_STATVFS struct statvfs sb; #endif if (safe_mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data, rootfs)) { if (op...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
112,853,323,388,564,720,000,000,000,000,000,000,000
76
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, int (*open)(struct inode *, struct file *)) { if (IS_ERR(nd->intent.open.file)) goto out; if (IS_ERR(dentry)) goto out_err; nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt), nd->intent.open.flags - 1, ...
0
[ "CWE-264" ]
linux-2.6
7b82dc0e64e93f430182f36b46b79fcee87d3532
56,340,216,466,390,940,000,000,000,000,000,000,000
18
Remove suid/sgid bits on [f]truncate() .. to match what we do on write(). This way, people who write to files by using [f]truncate + writable mmap have the same semantics as if they were using the write() family of system calls. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
char Type() const { return static_cast<char>(type_); }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
294,836,760,051,229,770,000,000,000,000,000,000,000
1
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !var_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
339,175,670,476,015,300,000,000,000,000,000,000,000
40
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void Item_udf_func::cleanup() { udf.cleanup(); Item_func::cleanup(); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
304,046,267,067,744,770,000,000,000,000,000,000,000
5
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq) { struct rt_prio_array *array; int i; array = &rt_rq->active; for (i = 0; i < MAX_RT_PRIO; i++) { INIT_LIST_HEAD(array->queue + i); __clear_bit(i, array->bitmap); } /* delimiter for bitsearch: */ __set_bit(MAX_RT_PRIO, array->bitmap); #if defined C...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
317,355,356,533,968,600,000,000,000,000,000,000,000
31
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
my_bool STDCALL mysql_rollback(MYSQL *mysql) { return((my_bool)mysql_real_query(mysql, "ROLLBACK", (unsigned long)sizeof("ROLLBACK"))); }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
224,646,150,069,294,200,000,000,000,000,000,000,000
4
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
static int text_enriched_handler (BODY *a, STATE *s) { enum { TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE } state = TEXT; LOFF_T bytes = a->length; struct enriched_state stte; wchar_t wc = 0; int tag_len = 0; wchar_t tag[LONG_STRING + 1]; memset (&stte, 0, sizeof (stte)); stte.s = s; s...
0
[ "CWE-120" ]
mutt
e5ed080c00e59701ca62ef9b2a6d2612ebf765a5
336,995,845,101,859,240,000,000,000,000,000,000,000
127
Fix uudecode buffer overflow. mutt_decode_uuencoded() used each line's initial "length character" without any validation. It would happily read past the end of the input line, and with a suitable value even past the length of the input buffer. As I noted in ticket 404, there are several other changes that could be a...
void start_tty(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->flow_lock, flags); __start_tty(tty); spin_unlock_irqrestore(&tty->flow_lock, flags); }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
194,944,603,749,319,560,000,000,000,000,000,000,000
8
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...
int print_msg_junit_test(char *code,FILE* fd,char header,char segregationLevel) { unsigned short int i,j,l,m,msglen; int k; char r,*msg; unsigned char *payload; payload=(unsigned char*)code; memcpy(&i,code,2);/*the CODE of the request/response*/ memcpy(&j,&code[MSG_START_IDX],2);/*where the MSG sta...
0
[ "CWE-119", "CWE-284" ]
kamailio
f50c9c853e7809810099c970780c30b0765b0643
263,947,568,256,363,770,000,000,000,000,000,000,000
52
seas: safety check for target buffer size before copying message in encode_msg() - avoid buffer overflow for large SIP messages - reported by Stelios Tsampas
buf32_to_ulong (const void *buffer) { const unsigned char *p = buffer; return (((unsigned long)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
227,666,570,791,182,370,000,000,000,000,000,000,000
6
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static inline int needs_hiding(const char *path) { const char *basename; if (hide_dotfiles == HIDE_DOTFILES_FALSE) return 0; /* We cannot use basename(), as it would remove trailing slashes */ mingw_skip_dos_drive_prefix((char **)&path); if (!*path) return 0; for (basename = path; *path; path++) if (is_d...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
235,439,294,745,135,330,000,000,000,000,000,000,000
29
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
_bt_insert_parent(Relation rel, Buffer buf, Buffer rbuf, BTStack stack, bool is_root, bool is_only) { /* * Here we have to do something Lehman and Yao don't talk about: deal with * a root split and construction of a new root. If our stack is empty * then we have just split a node o...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
212,431,743,477,211,670,000,000,000,000,000,000,000
98
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
e1000e_set_fcrtl(E1000ECore *core, int index, uint32_t val) { core->mac[FCRTL] = val & 0x8000FFF8; }
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
317,849,823,251,705,900,000,000,000,000,000,000,000
4
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static int ssl_parse_renegotiation_info( ssl_context *ssl, unsigned char *buf, size_t len ) { int ret; if( ssl->renegotiation == SSL_INITIAL_HANDSHAKE ) { if( len != 1 || buf[0] != 0x0 ) { SSL_DEBU...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
115,107,635,843,193,600,000,000,000,000,000,000,000
39
RSA blinding on CRT operations to counter timing attacks
ClientRequestContext::hostHeaderIpVerify(const ipcache_addrs* ia, const Dns::LookupDetails &dns) { Comm::ConnectionPointer clientConn = http->getConn()->clientConnection; // note the DNS details for the transaction stats. http->request->recordLookup(dns); if (ia != NULL && ia->count > 0) { // ...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
111,612,286,288,572,770,000,000,000,000,000,000,000
22
Handle more Range requests (#790) Also removed some effectively unused code.
static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect, int enable_seek) { uint32_t sector; int ret; if (track > drv->max_track || (head != 0 && (drv->flags & FDISK_DBL_SIDES) == 0)) { FLOPPY_DPRINTF("try to read %d %02x %02x (max=%d %d %02x %02x)\n", ...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
161,890,760,174,043,720,000,000,000,000,000,000,000
50
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
vte_sequence_handler_sf (VteTerminal *terminal, GValueArray *params) { _vte_terminal_cursor_down (terminal); }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
111,100,684,699,734,970,000,000,000,000,000,000,000
4
fix bug #548272 svn path=/trunk/; revision=2365
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
316,178,513,155,786,840,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void bnx2x_pf_q_prep_init(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_queue_init_params *init_params) { u8 cos; int cxt_index, cxt_offset; /* FCoE Queue uses Default SB, thus has no HC capabilities */ if (!IS_FCOE_FP(fp)) { __set_bit(BNX2X_Q_FLG_HC, &init_params->rx.flags); __set_bit(BNX2...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
247,093,855,780,966,600,000,000,000,000,000,000,000
50
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void l2cap_cleanup_sockets(void) { bt_procfs_cleanup(&init_net, "l2cap"); bt_sock_unregister(BTPROTO_L2CAP); proto_unregister(&l2cap_proto); }
0
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
277,748,837,710,849,700,000,000,000,000,000,000,000
6
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
png_handle_gAMA(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_fixed_point igamma; png_byte buf[4]; png_debug(1, "in png_handle_gAMA"); if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) png_chunk_error(png_ptr, "missing IHDR"); else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE...
0
[ "CWE-120" ]
libpng
a901eb3ce6087e0afeef988247f1a1aa208cb54d
29,718,697,535,612,460,000,000,000,000,000,000,000
34
[libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta).
TEST_F(QueryPlannerTest, ContainedOrOneChildUsesPredicate) { addIndex(BSON("b" << 1 << "a" << 1)); addIndex(BSON("c" << 1)); runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: 6}, {c: 7}]}]}")); assertNumSolutions(2); assertSolutionExists( "{fetch: {filter: {a: 5}, node: {or: {nodes: [" ...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
88,302,958,427,687,320,000,000,000,000,000,000,000
14
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
inline void remove_value_from_items() { if (perform_no_action) return; List_iterator_fast<Item_sum> it(sum_functions); Item_sum *item_sum; while ((item_sum= it++)) { item_sum->remove(); } }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
283,290,623,513,656,430,000,000,000,000,000,000,000
12
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static struct hlist_head *vport_hash_bucket(const struct datapath *dp, u16 port_no) { return &dp->ports[port_no & (DP_VPORT_HASH_BUCKETS - 1)]; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
330,072,814,421,787,370,000,000,000,000,000,000,000
5
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
ppp_set_compress(struct ppp *ppp, unsigned long arg) { int err; struct compressor *cp, *ocomp; struct ppp_option_data data; void *state, *ostate; unsigned char ccp_option[CCP_MAX_OPTION_LENGTH]; err = -EFAULT; if (copy_from_user(&data, (void __user *) arg, sizeof(data)) || (data.length <= CCP_MAX_OPTION_LE...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
150,604,490,435,238,410,000,000,000,000,000,000,000
65
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...
void *tq_pop(struct thread_q *tq, const struct timespec *abstime) { struct tq_ent *ent; void *rval = NULL; int rc; mutex_lock(&tq->mutex); if (!list_empty(&tq->q)) goto pop; if (abstime) rc = pthread_cond_timedwait(&tq->cond, &tq->mutex, abstime); else rc = pthread_cond_wait(&tq->cond, &tq->mutex); if (...
0
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
192,158,906,173,679,030,000,000,000,000,000,000,000
29
Do some random sanity checking for stratum message parsing
pre_ssout(struct uprobe *uprobe, struct pt_regs *regs, unsigned long bp_vaddr) { struct uprobe_task *utask; unsigned long xol_vaddr; int err; utask = get_utask(); if (!utask) return -ENOMEM; xol_vaddr = xol_get_insn_slot(uprobe); if (!xol_vaddr) return -ENOMEM; utask->xol_vaddr = xol_vaddr; utask->vaddr...
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
116,470,095,140,605,080,000,000,000,000,000,000,000
27
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
RGWOp *RGWHandler_REST_Obj_S3::op_options() { return new RGWOptionsCORS_ObjStore_S3; }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
263,456,145,512,318,020,000,000,000,000,000,000,000
4
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static int ocfs2_extend_file(struct inode *inode, struct buffer_head *di_bh, u64 new_i_size) { int ret = 0; struct ocfs2_inode_info *oi = OCFS2_I(inode); BUG_ON(!di_bh); /* setattr sometimes calls us like this. */ if (new_i_size == 0) goto out; if (i_size_read(inode) == new_i_size) goto out...
0
[ "CWE-401" ]
linux
28f5a8a7c033cbf3e32277f4cc9c6afd74f05300
299,851,268,452,807,100,000,000,000,000,000,000,000
65
ocfs2: should wait dio before inode lock in ocfs2_setattr() we should wait dio requests to finish before inode lock in ocfs2_setattr(), otherwise the following deadlock will happen: process 1 process 2 process 3 truncate file 'A' end_io of writing file 'A' receiving the ...
int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) { struct dnotify_struct *dn; struct dnotify_struct *odn; struct dnotify_struct **prev; struct inode *inode; fl_owner_t id = current->files; int error = 0; if ((arg & ~DN_MULTISHOT) == 0) { dnotify_flush(filp, id); return 0; } if (!dir_notif...
1
[ "CWE-362" ]
linux-2.6
214b7049a7929f03bbd2786aaef04b8b79db34e2
125,123,024,928,884,710,000,000,000,000,000,000,000
55
Fix dnotify/close race We have a race between fcntl() and close() that can lead to dnotify_struct inserted into inode's list *after* the last descriptor had been gone from current->files. Since that's the only point where dnotify_struct gets evicted, we are screwed - it will stick around indefinitely. Even after str...
static int cqspi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) { int ret; ret = cqspi_set_protocol(nor, 0); if (!ret) ret = cqspi_command_read(nor, &opcode, 1, buf, len); return ret; }
0
[ "CWE-119", "CWE-787" ]
linux
193e87143c290ec16838f5368adc0e0bc94eb931
168,728,262,021,637,700,000,000,000,000,000,000,000
10
mtd: spi-nor: Off by one in cqspi_setup_flash() There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the > should be >=. Fixes: 140623410536 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Marek Vasut <marex@denx.de> ...
cpu_util(double pcpu[3]) { static struct timeval last; static clock_t clast; static struct rusage rlast; struct timeval temp; clock_t ctemp; struct rusage rtemp; double timediff; double userdiff; double systemdiff; if (pcpu == NULL) { gettimeofday(&last, NULL); c...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
217,593,531,612,021,760,000,000,000,000,000,000,000
34
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
static ValidatorFunction waitForInexactMatch(const char* data_to_wait_for) { return [data_to_wait_for](const std::string& data) -> bool { return data.find(data_to_wait_for) != std::string::npos; }; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
201,213,279,448,315,600,000,000,000,000,000,000,000
5
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&o...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
283,478,268,589,466,450,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static inline void inc_slabs_node(struct kmem_cache *s, int node, int objects) { struct kmem_cache_node *n = get_node(s, node); /* * May be called early in order to allocate a slab for the * kmem_cache_node structure. Solve the chicken-egg * dilemma by deferring the increment of the count during * bootstrap ...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
295,366,557,524,521,120,000,000,000,000,000,000,000
15
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 ...
long sched_group_rt_period(struct task_group *tg) { u64 rt_period_us; rt_period_us = ktime_to_ns(tg->rt_bandwidth.rt_period); do_div(rt_period_us, NSEC_PER_USEC); return rt_period_us; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
231,937,993,463,027,540,000,000,000,000,000,000,000
8
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...