func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
__gfn_to_hva_memslot(struct kvm_memory_slot *slot, gfn_t gfn) { return slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE; }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
13,103,144,539,224,706,000,000,000,000,000,000,000
4
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
virDomainDiskDefCheckDuplicateInfo(const virDomainDiskDef *a, const virDomainDiskDef *b) { if (STREQ(a->dst, b->dst)) { virReportError(VIR_ERR_XML_ERROR, _("target '%s' duplicated for disk sources '%s' and '%s'"), a->dst, ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
235,371,201,691,049,780,000,000,000,000,000,000,000
17
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static double mp_bitwise_and(_cimg_math_parser& mp) { return (double)((longT)_mp_arg(2) & (longT)_mp_arg(3)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
305,194,306,434,608,630,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 kernel_power_off(void) { kernel_shutdown_prepare(SYSTEM_POWER_OFF); if (pm_power_off_prepare) pm_power_off_prepare(); disable_nonboot_cpus(); syscore_shutdown(); printk(KERN_EMERG "Power down.\n"); kmsg_dump(KMSG_DUMP_POWEROFF); machine_power_off(); }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
321,964,878,151,573,030,000,000,000,000,000,000,000
11
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static void test_helper_initialized(VncConnection *conn, gpointer opaque) { struct GVncTest *test = opaque; gint32 encodings[] = { VNC_CONNECTION_ENCODING_DESKTOP_RESIZE, VNC_CONNECTION_ENCODING_ZRLE, VNC_CONNECTION_ENC...
0
[]
gtk-vnc
ea0386933214c9178aaea9f2f85049ea3fa3e14a
82,850,833,000,416,610,000,000,000,000,000,000,000
38
Fix bounds checking for RRE, hextile & copyrect encodings While the client would bounds check the overall update region, it failed to bounds check the payload data parameters. Add a test case to validate bounds checking. https://bugzilla.gnome.org/show_bug.cgi?id=778048 CVE-2017-5884 Signed-off-by: Daniel P. Berra...
static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) { struct platform_device *pdev = to_platform_device(dev); ssize_t len; device_lock(dev); len = sprintf(buf, "%s\n", pdev->driver_override); device_unlock(dev); return len; }
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
193,885,374,034,574,530,000,000,000,000,000,000,000
11
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static void xmlwriter_object_free_storage(void *object TSRMLS_DC) { ze_xmlwriter_object * intern = (ze_xmlwriter_object *) object; if (!intern) { return; } if (intern->xmlwriter_ptr) { xmlwriter_free_resource_ptr(intern->xmlwriter_ptr TSRMLS_CC); } intern->xmlwriter_ptr = NULL; zend_object_std_dtor(&intern->...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
313,961,543,550,747,400,000,000,000,000,000,000,000
14
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
xmlCleanupCharEncodingHandlers(void) { xmlCleanupEncodingAliases(); if (handlers == NULL) return; for (;nbCharEncodingHandler > 0;) { nbCharEncodingHandler--; if (handlers[nbCharEncodingHandler] != NULL) { if (handlers[nbCharEncodingHandler]->name != NULL) xmlFree(handlers[nbCharEncodingHa...
0
[ "CWE-189" ]
libxml2
69f04562f75212bfcabecd190ea8b06ace28ece2
83,010,041,697,289,220,000,000,000,000,000,000,000
18
Fix an off by one error in encoding this off by one error doesn't seems to reproduce on linux but the error is real.
send_append_header (char const *text) { char *p; size_t len; char *name; p = strchr (text, ':'); if (!p) { mu_error (_("Invalid header: %s"), text); return; } len = p - text; name = mu_alloc (len + 1); memcpy (name, text, len); name[len] = 0; for (p++; *p && mu_isspace (*p); p++...
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
125,551,835,143,986,610,000,000,000,000,000,000,000
21
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
pxa3xx_gcu_reset(struct pxa3xx_gcu_priv *priv) { QDUMP("RESET"); /* disable interrupts */ gc_writel(priv, REG_GCIECR, 0); /* reset hardware */ gc_writel(priv, REG_GCCR, GCCR_ABORT); gc_writel(priv, REG_GCCR, 0); memset(priv->shared, 0, SHARED_SIZE); priv->shared->buffer_phys = priv->shared_phys; priv->share...
0
[ "CWE-190", "CWE-703" ]
linux
a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7
144,908,964,952,026,480,000,000,000,000,000,000,000
25
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of type int. Then, copy_from_user() may cause a heap overflow because it is used as the third argument of copy_from_user(). Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com> Signed...
void CServer::SetClientName(int ClientID, const char *pName) { if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State < CClient::STATE_READY) return; if(!pName) return; char aCleanName[MAX_NAME_LENGTH]; str_copy(aCleanName, pName, sizeof(aCleanName)); // clear name for(char *p = aCleanN...
0
[ "CWE-20" ]
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
168,884,148,979,805,630,000,000,000,000,000,000,000
30
fixed a server crash
napi_status napi_open_escapable_handle_scope( napi_env env, napi_escapable_handle_scope* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. CHECK_ENV(env); CHECK_ARG(env, result); *result = v8impl::JsEscapableHandleScopeFromV8EscapableHandleScop...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
155,114,705,293,476,570,000,000,000,000,000,000,000
13
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
nbd_unlocked_set_pread_initialize (struct nbd_handle *h, bool request) { h->pread_initialize = request; return 0; }
0
[ "CWE-252" ]
libnbd
c79706af4e7475bf58861a143b77b77a54e7a1cd
20,970,767,510,574,243,000,000,000,000,000,000,000
5
api: Add new API nbd_set_pread_initialize() The recent patch series for CVE-2022-0485 demonstrated that when applications using libnbd are not careful about error checking, the difference on whether a data leak is at least sanitized (all zeroes, partial reads, or data leftover from a prior read) vs. a dangerous inform...
int snd_sof_ipc_set_get_comp_data(struct snd_sof_ipc *ipc, struct snd_sof_control *scontrol, u32 ipc_cmd, enum sof_ipc_ctrl_type ctrl_type, enum sof_ipc_ctrl_cmd ctrl_cmd, bool send) { struct sof_ipc_ctrl_data *cdata = scontrol->control_data; struct snd_sof_dev *sdev = ipc->sdev; struct...
0
[ "CWE-400", "CWE-401" ]
linux
45c1380358b12bf2d1db20a5874e9544f56b34ab
285,121,149,465,261,130,000,000,000,000,000,000,000
100
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data In the implementation of sof_set_get_large_ctrl_data() there is a memory leak in case an error. Release partdata if sof_get_ctrl_copy_params() fails. Fixes: 54d198d5019d ("ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly") Signed-off-by: Nav...
void InstanceKlass::do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle mirror, TRAPS) { for (JavaFieldStream fs(this); !fs.done(); fs.next()) { if (fs.access_flags().is_static()) { fieldDescriptor& fd = fs.field_descriptor(); f(&fd, mirror, CHECK); } } }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
129,879,195,894,442,350,000,000,000,000,000,000,000
8
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
get_varp(struct vimoption *p) { // hidden option, always return NULL if (p->var == NULL) return NULL; switch ((int)p->indir) { case PV_NONE: return p->var; // global option with local value: use local value if it's been set case PV_EP: return *curbuf->b_p_ep != NUL ? (char_u *)&curbuf->b_p...
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
42,410,428,682,983,880,000,000,000,000,000,000,000
253
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
int imap_wordcasecmp(const char *a, const char *b) { char tmp[SHORT_STRING]; char *s = (char *)b; int i; tmp[SHORT_STRING-1] = 0; for(i=0;i < SHORT_STRING-2;i++,s++) { if (!*s || ISSPACE(*s)) { tmp[i] = 0; break; } tmp[i] = *s; } tmp[i+1] = 0; return ascii_strcasecmp(a, t...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
268,998,181,874,534,300,000,000,000,000,000,000,000
20
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
char *get_proxy(char *url, struct pool *pool) { pool->rpc_proxy = NULL; char *split; int plen, len, i; for (i = 0; proxynames[i].name; i++) { plen = strlen(proxynames[i].name); if (strncmp(url, proxynames[i].name, plen) == 0) { if (!(split = strchr(url, '|'))) return url; *split = '\0'; len = sp...
0
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
294,451,985,977,689,800,000,000,000,000,000,000,000
28
Do some random sanity checking for stratum message parsing
const Tensor& indices() const { return ix_; }
0
[ "CWE-703", "CWE-787" ]
tensorflow
8ba6fa29cd8bf9cef9b718dc31c78c73081f5b31
8,986,645,232,521,310,000,000,000,000,000,000,000
1
Fix heap-buffer-overflow issue with `tf.raw_ops.SparseSplit`. PiperOrigin-RevId: 371242872 Change-Id: I482bb3d12602c7c3cc9446f97fb9f584bb98e9a4
static void ssl_write_supported_point_formats_ext( mbedtls_ssl_context *ssl, unsigned char *buf, size_t *olen ) { unsigned char *p = buf; ((void) ssl); if( ( ssl->handshake->cli_exts & MBEDTLS_TL...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
314,612,863,980,758,870,000,000,000,000,000,000,000
27
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
Get the key size of cipher */ PHP_FUNCTION(mcrypt_get_cipher_name) { char *cipher_dir_string; char *module_dir_string; char *cipher_name; char *cipher; int cipher_len; MCRYPT td; MCRYPT_GET_INI if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &cipher, &cipher_len) == FAILURE) { return; } ...
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
249,924,067,127,107,570,000,000,000,000,000,000,000
37
Fix bug #72455: Heap Overflow due to integer overflows
qedi_dbg_err(struct qedi_dbg_ctx *qedi, const char *func, u32 line, const char *fmt, ...) { va_list va; struct va_format vaf; char nfunc[32]; memset(nfunc, 0, sizeof(nfunc)); memcpy(nfunc, func, sizeof(nfunc) - 1); va_start(va, fmt); vaf.fmt = fmt; vaf.va = &va; if (likely(qedi) && likely(qedi->pdev)...
1
[ "CWE-125" ]
linux
c09581a52765a85f19fc35340127396d5e3379cc
227,926,972,015,987,130,000,000,000,000,000,000,000
23
scsi: qedi: remove memset/memcpy to nfunc and use func instead KASAN reports this: BUG: KASAN: global-out-of-bounds in qedi_dbg_err+0xda/0x330 [qedi] Read of size 31 at addr ffffffffc12b0ae0 by task syz-executor.0/2429 CPU: 0 PID: 2429 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (...
struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf) { return SMB_VFS_FILE_ID_CREATE(conn, sbuf); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
134,506,062,571,524,440,000,000,000,000,000,000,000
4
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
MouseMode(mode) int mode; { if (!display) return; if (mode < D_mousetrack) mode = D_mousetrack; if (D_mouse != mode) { char mousebuf[20]; if (!D_CXT) return; if (D_mouse) { sprintf(mousebuf, "\033[?%dl", D_mouse); AddStr(mousebuf); } if (mode) ...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
204,395,167,282,260,400,000,000,000,000,000,000,000
28
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 ...
bool Http2Session::AddSettings(Http2Session::Http2Settings* settings) { if (outstanding_settings_.size() == max_outstanding_settings_) return false; outstanding_settings_.push(settings); return true; }
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
33,588,115,788,251,617,000,000,000,000,000,000,000
6
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
inline void BinaryBroadcastFiveFold(const ArithmeticParams& unswitched_params, const RuntimeShape& unswitched_input1_shape, const T* unswitched_input1_data, const RuntimeShape& unswitched_input2_shape, ...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
107,181,671,241,159,970,000,000,000,000,000,000,000
92
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
template<typename tf, typename tc> CImg<floatT> get_projections3d(CImgList<tf>& primitives, CImgList<tc>& colors, const unsigned int x0, const unsigned int y0, const unsigned int z0, const bool normalize_colors=false) const { float m = ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
146,030,395,303,578,900,000,000,000,000,000,000,000
38
Fix other issues in 'CImg<T>::load_bmp()'.
directory_too_idle_to_fetch_descriptors(or_options_t *options, time_t now) { return !directory_caches_dir_info(options) && !options->FetchUselessDescriptors && rep_hist_circbuilding_dormant(now); }
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
118,617,088,297,846,420,000,000,000,000,000,000,000
6
Don't give the Guard flag to relays without the CVE-2011-2768 fix
f_settabwinvar(typval_T *argvars, typval_T *rettv UNUSED) { if (in_vim9script() && (check_for_number_arg(argvars, 0) == FAIL || check_for_number_arg(argvars, 1) == FAIL || check_for_string_arg(argvars, 2) == FAIL)) return; setwinvar(argvars, 1); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
154,481,127,464,732,180,000,000,000,000,000,000,000
10
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
if (key->idx != ECC_CUSTOM_IDX && ecc_sets[key->idx].id == ECC_SECP384R1) { return sp_ecc_verify_384(hash, hashlen, key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res, key->heap); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
237,471,086,811,797,900,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
e1000e_write_ps_rx_descr(E1000ECore *core, uint8_t *desc, struct NetRxPkt *pkt, const E1000E_RSSInfo *rss_info, size_t ps_hdr_len, uint16_t(*written)[MAX_PS_BUFFERS]) { int i; union e1000_rx_desc_packet_split *d ...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
139,829,987,335,434,300,000,000,000,000,000,000,000
32
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....
TEST_F(QueryPlannerTest, MultikeyNestedElemMatch) { // true means multikey addIndex(BSON("a.b.c" << 1), true); runQuery(fromjson("{a: {$elemMatch: {b: {$elemMatch: {c: {$gte: 1, $lte: 1}}}}}}")); assertNumSolutions(3U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
274,669,124,571,963,200,000,000,000,000,000,000,000
14
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
tor_version_as_new_as(const char *platform, const char *cutoff) { tor_version_t cutoff_version, router_version; char *s, *s2, *start; char tmp[128]; tor_assert(platform); if (tor_version_parse(cutoff, &cutoff_version)<0) { log_warn(LD_BUG,"cutoff version '%s' unparseable.",cutoff); return 0; } i...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
47,950,301,969,991,550,000,000,000,000,000,000,000
42
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
query (void) { static const GimpParamDef load_args[] = { { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, { GIMP_PDB_STRING, "filename", "The name of the file to load" }, { GIMP_PDB_STRING, "raw-filename", "The name of the file to load" } }; st...
0
[ "CWE-125" ]
gimp
eb2980683e6472aff35a3117587c4f814515c74d
146,106,454,201,259,140,000,000,000,000,000,000,000
67
Bug 790853 - (CVE-2017-17787) heap overread in psp importer. As any external data, we have to check that strings being read at fixed length are properly nul-terminated.
This function encrypts the plaintext */ PHP_FUNCTION(mcrypt_generic) { zval *mcryptind; char *data; int data_len; php_mcrypt *pm; unsigned char* data_s; int block_size, data_size; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &mcryptind, &data, &data_len) == FAILURE) { return; } ZEND_FETCH...
1
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
281,110,117,196,865,200,000,000,000,000,000,000,000
41
Fix bug #72455: Heap Overflow due to integer overflows
void WriteOutputSlice(int64 begin, int64 end) override { std::vector<int> combination(features_.size(), 0); for (int64 b = begin; b < end; ++b) { auto row_start = splits_out_(b); auto row_limit = splits_out_(b + 1); for (auto i = row_start; i < row_limit; ++i) { WriteCombination(b, c...
0
[ "CWE-125", "CWE-369" ]
tensorflow
44b7f486c0143f68b56c34e2d01e146ee445134a
313,236,042,697,283,140,000,000,000,000,000,000,000
12
Fix out of bounds read in `ragged_cross_op.cc`. PiperOrigin-RevId: 369757702 Change-Id: Ie6e5d2c21513a8d56bf41fcf35960caf76e890f9
pdf14_get_num_spots(gx_device * dev) { cmm_dev_profile_t *dev_profile; cmm_profile_t *icc_profile; gsicc_rendering_param_t render_cond; dev_proc(dev, get_profile)(dev, &dev_profile); gsicc_extract_profile(GS_UNKNOWN_TAG, dev_profile, &icc_profile, &render_cond); return dev->color_info.n...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
44,979,870,227,127,770,000,000,000,000,000,000,000
11
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
void inet_csk_delete_keepalive_timer(struct sock *sk) { sk_stop_timer(sk, &sk->sk_timer); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
336,085,382,587,982,430,000,000,000,000,000,000,000
4
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static int snmp6_alloc_dev(struct inet6_dev *idev) { int i; idev->stats.ipv6 = alloc_percpu(struct ipstats_mib); if (!idev->stats.ipv6) goto err_ip; for_each_possible_cpu(i) { struct ipstats_mib *addrconf_stats; addrconf_stats = per_cpu_ptr(idev->stats.ipv6, i); u64_stats_init(&addrconf_stats->syncp); } ...
0
[ "CWE-20" ]
linux
77751427a1ff25b27d47a4c36b12c3c8667855ac
5,282,622,595,310,851,300,000,000,000,000,000,000
33
ipv6: addrconf: validate new MTU before applying it Currently we don't check if the new MTU is valid or not and this allows one to configure a smaller than minimum allowed by RFCs or even bigger than interface own MTU, which is a problem as it may lead to packet drops. If you have a daemon like NetworkManager running...
b64encode(uschar *clear, int len) { uschar *code = store_get(4*((len+2)/3) + 1); uschar *p = code; while (len-- >0) { int x, y; x = *clear++; *p++ = enc64table[(x >> 2) & 63]; if (len-- <= 0) { *p++ = enc64table[(x << 4) & 63]; *p++ = '='; *p++ = '='; break; } y = *clear++; *p+...
0
[ "CWE-119" ]
exim
cf3cd306062a08969c41a1cdd32c6855f1abecf1
39,699,741,195,160,380,000,000,000,000,000,000,000
40
Fix base64d() buffer size (CVE-2018-6789) Credits for discovering this bug: Meh Chang <meh@devco.re> (cherry picked from commit 062990cc1b2f9e5d82a413b53c8f0569075de700)
static int sco_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; int len, err = 0; BT_DBG("sk %p", sk); if (level == SOL_SCO) return sco_sock_getsockopt_old(sock, optname, optval, optlen); if (get_user(len, optlen)) return -EF...
0
[ "CWE-200" ]
linux
c4c896e1471aec3b004a693c689f60be3b17ac86
204,963,287,871,973,960,000,000,000,000,000,000,000
24
Bluetooth: sco: fix information leak to userspace struct sco_conninfo has one padding byte in the end. Local variable cinfo of type sco_conninfo is copied to userspace with this uninizialized one byte, leading to old stack contents leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. ...
netsnmp_init_mib(void) { const char *prefix; char *env_var, *entry; PrefixListPtr pp = &mib_prefixes[0]; char *st = NULL; if (Mib) return; netsnmp_init_mib_internals(); /* * Initialise the MIB directory/ies */ netsnmp_fixup_mib_directory(); ...
1
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
274,098,571,578,956,330,000,000,000,000,000,000,000
179
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
xsltCopyTree(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr insert, int literal) { return(xsltCopyTreeInternal(ctxt, node, node, insert, literal, 0)); }
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
10,734,302,381,965,014,000,000,000,000,000,000,000
6
Fix default template processing on namespace nodes
int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, struct cfg80211_deauth_request *req) { struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; bool tx = !req->local_state_change; if (ifmgd->auth_data && ether_addr_equal(ifmgd->auth_data->bss->bssid, req-...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
16,226,994,718,408,385,000,000,000,000,000,000,000
63
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
vrrp_preempt_handler(__attribute__((unused)) vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); vrrp->nopreempt = 0; }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
311,997,241,565,514,070,000,000,000,000,000,000,000
5
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 unsigned int attr_flags_to_mnt_flags(u64 attr_flags) { unsigned int mnt_flags = 0; if (attr_flags & MOUNT_ATTR_RDONLY) mnt_flags |= MNT_READONLY; if (attr_flags & MOUNT_ATTR_NOSUID) mnt_flags |= MNT_NOSUID; if (attr_flags & MOUNT_ATTR_NODEV) mnt_flags |= MNT_NODEV; if (attr_flags & MOUNT_ATTR_NOEXEC)...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
172,492,931,819,316,300,000,000,000,000,000,000,000
19
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: ...
struct mempolicy *get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr) { struct mempolicy *pol = task->mempolicy; if (vma) { if (vma->vm_ops && vma->vm_ops->get_policy) { struct mempolicy *vpol = vma->vm_ops->get_policy(vma, addr); if (vpol) pol = vpol; } ...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
72,495,857,089,014,880,000,000,000,000,000,000,000
18
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void kvm_arch_flush_shadow(struct kvm *kvm) { kvm_mmu_zap_all(kvm); kvm_reload_remote_mmus(kvm); }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
26,392,869,660,055,403,000,000,000,000,000,000,000
5
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
nl80211_prep_sched_scan_msg(struct sk_buff *msg, struct cfg80211_sched_scan_request *req, u32 cmd) { void *hdr; hdr = nl80211hdr_put(msg, 0, 0, 0, cmd); if (!hdr) return -1; if (nla_put_u32(msg, NL80211_ATTR_WIPHY, wiphy_to_rdev(req->wiphy)->wiphy_idx) || nla_put_u32(msg, NL80211_ATTR_IFINDEX, re...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
231,844,908,532,185,400,000,000,000,000,000,000,000
23
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
bool walk_args(Item_processor processor, bool walk_subquery, void *arg) { for (uint i= 0; i < arg_count; i++) { if (args[i]->walk(processor, walk_subquery, arg)) return true; } return false; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
96,438,192,880,099,650,000,000,000,000,000,000,000
9
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
SecureElementStatus_t SecureElementSetDevEui( uint8_t* devEui ) { if( devEui == NULL ) { return SECURE_ELEMENT_ERROR_NPE; } memcpy1( SeContext.DevEui, devEui, SE_EUI_SIZE ); SeNvmCtxChanged( ); return SECURE_ELEMENT_SUCCESS; }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
115,604,445,340,252,450,000,000,000,000,000,000,000
10
Added received buffer size checks.
void zend_shared_alloc_lock(TSRMLS_D) { #ifndef ZEND_WIN32 #ifdef ZTS tsrm_mutex_lock(zts_lock); #endif #if 0 /* this will happen once per process, and will un-globalize mem_write_lock */ if (mem_write_lock.l_pid == -1) { mem_write_lock.l_pid = getpid(); } #endif while (1) { if (fcntl(lock_file, F_SETLKW, &...
0
[ "CWE-416" ]
php-src
0a8f28b43212cc2ddbc1f2df710e37b1bec0addd
12,456,624,217,880,618,000,000,000,000,000,000,000
38
Fixed bug #68677 (Use After Free in OPcache) (cherry picked from commit 777c39f4042327eac4b63c7ee87dc1c7a09a3115)
int qeth_do_run_thread(struct qeth_card *card, unsigned long thread) { int rc = 0; wait_event(card->wait_q, (rc = __qeth_do_run_thread(card, thread)) >= 0); return rc; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
335,395,097,167,771,840,000,000,000,000,000,000,000
8
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
jas_cmprof_t *jas_cmprof_copy(jas_cmprof_t *prof) { jas_cmprof_t *newprof; int i; if (!(newprof = jas_cmprof_create())) goto error; newprof->clrspc = prof->clrspc; newprof->numchans = prof->numchans; newprof->refclrspc = prof->refclrspc; newprof->numrefchans = prof->numrefchans; newprof->iccprof = jas_iccpro...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
114,926,668,317,368,450,000,000,000,000,000,000,000
22
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...
static int network_init(void) { static _Bool have_init = 0; /* Check if we were already initialized. If so, just return - there's * nothing more to do (for now, that is). */ if (have_init) return (0); have_init = 1; if (network_config_stats) plugin_register_read("network", network_stats_read); ...
0
[ "CWE-835" ]
collectd
f6be4f9b49b949b379326c3d7002476e6ce4f211
337,515,615,047,699,360,000,000,000,000,000,000,000
62
network plugin: Fix endless loop DOS in parse_packet() When correct 'Signature part' is received by Collectd, configured without AuthFile option, condition for endless loop occurs due to missing increase of pointer to next unprocessed part. This is a forward-port of #2233. Fixes: CVE-2017-7401 Closes: #2174 Signed-o...
static gboolean property_get_discovering(const GDBusPropertyTable *property, DBusMessageIter *iter, void *user_data) { struct btd_adapter *adapter = user_data; dbus_bool_t discovering = adapter->discovering; dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &discovering); return TRUE; }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
12,912,612,943,301,900,000,000,000,000,000,000,000
10
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
HttpTransact::HandleFiltering(State* s) { ink_release_assert(!"Fix-Me AUTH MERGE"); if (s->method == HTTP_WKSIDX_PUSH && s->http_config_param->push_method_enabled == 0) { // config file says this request is not authorized. // send back error response to client. DebugTxn("http_trans", "[HandleFiltering]...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
224,377,385,395,449,960,000,000,000,000,000,000,000
26
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
zone_send_securedb(dns_zone_t *zone, dns_db_t *db) { isc_event_t *e; dns_db_t *dummy = NULL; dns_zone_t *secure = NULL; e = isc_event_allocate(zone->secure->mctx, zone, DNS_EVENT_ZONESECUREDB, receive_secure_db, zone->secure, sizeof(struct secure_event)); if (e == NULL) return (ISC...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
48,891,394,583,787,400,000,000,000,000,000,000,000
19
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static int TS_find_cert(STACK_OF(ESS_CERT_ID) *cert_ids, X509 *cert) { int i; if (!cert_ids || !cert) return -1; /* Recompute SHA1 hash of certificate if necessary (side effect). */ X509_check_purpose(cert, -1, 0); /* Look for cert in the cert_ids vector. */ for (i = 0; i < sk_ESS_CERT_ID_num(cert_ids); ++i) ...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
82,657,138,462,581,360,000,000,000,000,000,000,000
28
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static struct buf *cache_buf(const struct index_record *record) { static struct buf staticbuf; buf_init_ro(&staticbuf, cache_base(record), cache_len(record)); return &staticbuf; }
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
152,024,775,229,111,270,000,000,000,000,000,000,000
10
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
PHP_METHOD(Phar, mount) { char *fname, *arch = NULL, *entry = NULL, *path, *actual; int fname_len, arch_len, entry_len; size_t path_len, actual_len; phar_archive_data *pphar; if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &path, &path_len, &actual, &actual_len) == FAILURE) { return; } fname = (char*)zend_g...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
250,141,251,423,059,450,000,000,000,000,000,000,000
81
Fix bug #71860: Require valid paths for phar filenames
fr_window_show_cb (GtkWidget *widget, FrWindow *window) { fr_window_update_current_location (window); set_active (window, "ViewStatusbar", g_settings_get_boolean (window->priv->settings_ui, PREF_UI_VIEW_STATUSBAR)); window->priv->view_folders = g_settings_get_boolean (window->priv->settings_ui, PREF_UI_VIEW_...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
89,295,416,946,787,250,000,000,000,000,000,000,000
14
libarchive: sanitize filenames before extracting
__export struct rad_dict_attr_t *rad_dict_find_attr(const char *name) { return dict_find_attr(&dict->items, name); }
0
[ "CWE-787" ]
accel-ppp
d4cb89721cc8e5b3dd3fbefaf173eb77ecb85615
292,984,124,311,788,200,000,000,000,000,000,000,000
4
fix buffer overflow when receive radius packet This patch fixes buffer overflow if radius packet contains invalid atribute length and attrubute type from the following list: ipv4addr, ipv6addr, ipv6prefix or ifid Reported-by: Chloe Ong Reported-by: Eugene Lim <spaceraccoon@users.noreply.github.com> Reported-by: Kar We...
template<typename t> CImg<T>& _LU(CImg<t>& indx, bool& d) { const int N = width(); int imax = 0; CImg<Tfloat> vv(N); indx.assign(N); d = true; bool return0 = false; cimg_pragma_openmp(parallel for cimg_openmp_if(_width*_height>=512)) cimg_forX(*this,i) { ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
183,557,371,346,623,800,000,000,000,000,000,000,000
49
.
static void collect_signal(int sig, struct sigpending *list, kernel_siginfo_t *info, bool *resched_timer) { struct sigqueue *q, *first = NULL; /* * Collect the siginfo appropriate to this signal. Check if * there is another siginfo for the same signal. */ list_for_each_entry(q, &list->list, list) { if...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
242,384,130,263,043,700,000,000,000,000,000,000,000
44
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
explicit MockRequestIDExtension(Random::RandomGenerator& random) : real_(Extensions::RequestId::UUIDRequestIDExtension::defaultInstance(random)) { ON_CALL(*this, set(_, _)) .WillByDefault([this](Http::RequestHeaderMap& request_headers, bool force) { return real_->set(request_headers, force...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
249,007,305,682,464,200,000,000,000,000,000,000,000
25
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) { struct net *net = sock_net(skb->sk); struct ndmsg *ndm; struct nlattr *tb[NDA_MAX+1]; struct net_device *dev; u8 *addr; int err; err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL); if (err < 0) return err; ndm = nlmsg_data...
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
30,966,248,985,159,734,000,000,000,000,000,000,000
65
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
static gboolean netscreen_check_file_type(wtap *wth, int *err, gchar **err_info) { char buf[NETSCREEN_LINE_LENGTH]; guint reclen, line; buf[NETSCREEN_LINE_LENGTH-1] = '\0'; for (line = 0; line < NETSCREEN_HEADER_LINES_TO_CHECK; line++) { if (file_gets(buf, NETSCREEN_LINE_LENGTH, wth->fh) == NULL) { /* EOF or...
0
[ "CWE-20" ]
wireshark
11edc83b98a61e890d7bb01855389d40e984ea82
202,793,941,967,959,070,000,000,000,000,000,000,000
28
Don't treat the packet length as unsigned. The scanf family of functions are as annoyingly bad at handling unsigned numbers as strtoul() is - both of them are perfectly willing to accept a value beginning with a negative sign as an unsigned value. When using strtoul(), you can compensate for this by explicitly checki...
static void unit_emit_audit_start(Unit *u) { assert(u); if (u->type != UNIT_SERVICE) return; /* Write audit record if we have just finished starting up */ manager_send_unit_audit(u->manager, u, AUDIT_SERVICE_START, true); u->in_audit = true; }
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
269,984,704,752,399,930,000,000,000,000,000,000,000
10
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static MagickBooleanType AssignImageColors(Image *image,CubeInfo *cube_info, ExceptionInfo *exception) { #define AssignImageTag "Assign/Image" ssize_t y; /* Allocate image colormap. */ if ((cube_info->quantize_info->colorspace != UndefinedColorspace) && (cube_info->quantize_info->colorspace !...
0
[ "CWE-703", "CWE-772" ]
ImageMagick
0417cea1b6d72f90bd4f1f573f91e42a8ba66a89
312,526,643,901,289,000,000,000,000,000,000,000,000
181
https://github.com/ImageMagick/ImageMagick/issues/574
int pm_qos_sysfs_add_resume_latency(struct device *dev) { return sysfs_merge_group(&dev->kobj, &pm_qos_resume_latency_attr_group); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
296,990,423,725,061,130,000,000,000,000,000,000,000
4
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static toff_t tiff_sizeproc(thandle_t clientdata) { tiff_handle *th = (tiff_handle *)clientdata; return th->size; }
0
[ "CWE-125" ]
libgd
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
123,322,264,993,035,780,000,000,000,000,000,000,000
5
Fix invalid read in gdImageCreateFromTiffPtr() tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, bu...
static void qxl_enter_vga_mode(PCIQXLDevice *d) { if (d->mode == QXL_MODE_VGA) { return; } trace_qxl_enter_vga_mode(d->id); spice_qxl_driver_unload(&d->ssd.qxl); graphic_console_set_hwops(d->ssd.dcl.con, d->vga.hw_ops, &d->vga); update_displaychangelistener(&d->ssd.dcl, GUI_REFRESH_INTER...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
189,741,224,328,569,730,000,000,000,000,000,000,000
15
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
static void register_hooks(apr_pool_t * p) { ap_register_output_filter("MOD_SESSION_OUT", session_output_filter, NULL, AP_FTYPE_CONTENT_SET); ap_hook_insert_filter(session_insert_output_filter, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_insert_error_filter(...
0
[ "CWE-476" ]
httpd
67bd9bfe6c38831e14fe7122f1d84391472498f8
81,816,317,082,417,330,000,000,000,000,000,000,000
18
mod_session: save one apr_strtok() in session_identity_decode(). When the encoding is invalid (missing '='), no need to parse further. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887050 13f79535-47bb-0310-9956-ffa450edef68
int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid) { return security_ops->secctx_to_secid(secdata, seclen, secid); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
44,303,721,089,161,330,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int client_gen_key_share(gnutls_session_t session, const gnutls_group_entry_st *group, gnutls_buffer_st *extdata) { gnutls_datum_t tmp = {NULL, 0}; int ret; if (group->pk != GNUTLS_PK_EC && group->pk != GNUTLS_PK_ECDH_X25519 && group->pk != GNUTLS_PK_ECDH_X448 && group->pk != GNUTLS_PK_DH) { _gnu...
0
[ "CWE-416" ]
gnutls
15beb4b193b2714d88107e7dffca781798684e7e
45,013,412,884,831,200,000,000,000,000,000,000,000
117
key_share: avoid use-after-free around realloc Signed-off-by: Daiki Ueno <ueno@gnu.org>
asmlinkage long do_ni_syscall(struct pt_regs *regs) { #ifdef CONFIG_COMPAT long ret; if (is_compat_task()) { ret = compat_arm_syscall(regs); if (ret != -ENOSYS) return ret; } #endif if (show_unhandled_signals && printk_ratelimit()) { pr_info("%s[%d]: syscall %d\n", current->comm, task_pid_nr(current), ...
0
[ "CWE-703" ]
linux
9955ac47f4ba1c95ecb6092aeaefb40a22e99268
151,307,917,382,259,930,000,000,000,000,000,000,000
21
arm64: don't kill the kernel on a bad esr from el0 Rather than completely killing the kernel if we receive an esr value we can't deal with in the el0 handlers, send the process a SIGILL and log the esr value in the hope that we can debug it. If we receive a bad esr from el1, we'll die() as before. Signed-off-by: Mark...
static void storageDriverUnlock(void) { virMutexUnlock(&driver->lock); }
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
316,938,069,576,283,230,000,000,000,000,000,000,000
4
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
int group_concat_key_cmp_with_distinct(void* arg, const void* key1, const void* key2) { Item_func_group_concat *item_func= (Item_func_group_concat*)arg; for (uint i= 0; i < item_func->arg_count_field; i++) { Item *item= item_func->args[i]; /* If item is a con...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
327,611,895,292,065,600,000,000,000,000,000,000,000
32
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...
inline unsigned int nb_cpus() { unsigned int res = 1; #if cimg_OS==2 SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); res = (unsigned int)sysinfo.dwNumberOfProcessors; #elif cimg_OS == 1 res = (unsigned int)sysconf(_SC_NPROCESSORS_ONLN); #endif return res?res:1U; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
259,420,469,743,656,300,000,000,000,000,000,000,000
11
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void CLASS parseOlympus_CameraSettings (int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer) { // uptag 0x2020 int c; uchar uc; switch (tag) { case 0x0101: if (dng_writer == nonDNG) { thumb_offset = get4() + base; } break; case 0x0102: if (dng_writer == nonDNG) { ...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
49,606,776,350,720,260,000,000,000,000,000,000,000
67
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
void* LibRaw:: calloc(size_t n,size_t t) { void *p = memmgr.calloc(n,t); if(!p) throw LIBRAW_EXCEPTION_ALLOC; return p; }
0
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
239,091,623,914,376,500,000,000,000,000,000,000,000
7
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
void qemu_ram_unset_migratable(RAMBlock *rb) { rb->flags &= ~RAM_MIGRATABLE; }
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
327,602,838,526,123,640,000,000,000,000,000,000,000
4
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
static int smtp_server_connection_output(struct smtp_server_connection *conn) { int ret; e_debug(conn->event, "Sending replies"); smtp_server_connection_ref(conn); o_stream_cork(conn->conn.output); ret = smtp_server_connection_flush(conn); if (ret > 0) { smtp_server_connection_timeout_reset(conn); smtp_serv...
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
23,920,092,741,160,516,000,000,000,000,000,000,000
22
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
static int l2_table_update(struct qcow_state *s, uint64_t *l2_table, uint64_t l2_table_offset, unsigned int l2_index, uint64_t cluster_offset) { ssize_t ret; tcmu_dbg("%s: setting %llx[%d] to %llx\n", __func__, l2_table_offset, l2_index, cluster_offset); l2_table[l2_index] = htobe64(cluster_offset); r...
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
222,851,737,519,212,970,000,000,000,000,000,000,000
20
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
GF_Err schm_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SchemeTypeBox *ptr = (GF_SchemeTypeBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->scheme_type); gf_bs_write_u32(bs, ptr->scheme_version); if (ptr->flags & 0x000001) { if (ptr-...
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
23,703,595,021,331,565,000,000,000,000,000,000,000
17
fixed #1879
flatpak_dir_read_latest (FlatpakDir *self, const char *remote, const char *ref, char **out_alt_id, GCancellable *cancellable, GError **error) { g_autofree char *remote_and_ref...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
324,558,140,338,763,600,000,000,000,000,000,000,000
39
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
void nghttp2_session_set_user_data(nghttp2_session *session, void *user_data) { session->user_data = user_data; }
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
146,056,511,129,161,870,000,000,000,000,000,000,000
3
Add nghttp2_option_set_max_outbound_ack
static int init_dumping(char *database, int init_func(char*)) { if (mysql_select_db(mysql, database)) { DB_error(mysql, "when selecting the database"); return 1; /* If --force */ } if (!path && !opt_xml) { if (opt_databases || opt_alldbs) { /* length of table na...
1
[]
mysql-server
d982e717aba67227ec40761a21a4211db91aa0e2
290,048,595,450,187,300,000,000,000,000,000,000,000
32
Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES Description: Mysqldump utility fails for specific clauses used with the option, 'where'. Analysis:- Method, "fix_identifier_with_newline()" that prefixes all occurrences of newline char ('\n') in incoming buffer does not verify the size of the buffer. The buf...
static void isdn_ppp_ccp_reset_ack_rcvd(struct ippp_struct *is, unsigned char id) { struct ippp_ccp_reset_state *rs = is->reset->rs[id]; if (rs) { if (rs->ta && rs->state == CCPResetSentReq) { /* Great, we are correct */ if (!rs->expra) printk(KERN_DEBUG "ippp_ccp: ResetAck received" " fo...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
298,831,038,805,594,130,000,000,000,000,000,000,000
27
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...
static opj_bool pi_next_rpcl(opj_pi_iterator_t * pi) { opj_pi_comp_t *comp = NULL; opj_pi_resolution_t *res = NULL; long index = 0; if (!pi->first) { goto LABEL_SKIP; } else { int compno, resno; pi->first = 0; pi->dx = 0; pi->dy = 0; for (compno = 0; ...
1
[ "CWE-369" ]
openjpeg
c5bd64ea146162967c29bd2af0cbb845ba3eaaaf
308,604,278,359,727,300,000,000,000,000,000,000,000
93
[MJ2] To avoid divisions by zero / undefined behaviour on shift Signed-off-by: Young_X <YangX92@hotmail.com>
logger_get_line_tag_info (int tags_count, const char **tags, int *log_level, int *prefix_is_nick) { int i, log_level_set, prefix_is_nick_set; if (log_level) *log_level = LOGGER_LEVEL_DEFAULT; if (prefix_is_nick) *prefix_is_nick = 0; log_level_set = 0; pref...
0
[ "CWE-119", "CWE-787" ]
weechat
f105c6f0b56fb5687b2d2aedf37cb1d1b434d556
42,925,856,013,064,375,000,000,000,000,000,000,000
43
logger: call strftime before replacing buffer local variables
virtual void ms_handle_fast_accept(Connection *con) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
270,075,581,415,266,130,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
get_highlight_default(void) { int i; i = findoption((char_u *)"hl"); if (i >= 0) return options[i].def_val[VI_DEFAULT]; return (char_u *)NULL; }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
260,757,513,646,335,550,000,000,000,000,000,000,000
9
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
guessContentTypeFromTable(struct table2 *table, char *filename) { struct table2 *t; char *p; if (table == NULL) return NULL; p = &filename[strlen(filename) - 1]; while (filename < p && *p != '.') p--; if (p == filename) return NULL; p++; for (t = table; t->item1; t++) { if (!strcmp(p...
0
[ "CWE-119" ]
w3m
ba9d78faeba9024c3e8840579c3b0e959ae2cb0f
168,751,077,973,286,570,000,000,000,000,000,000,000
22
Prevent global-buffer-overflow in parseURL() Bug-Debian: https://github.com/tats/w3m/issues/41
BOOL INSTAPI SQLCreateDataSourceW( HWND hwndParent, LPCWSTR lpszDSN ) { BOOL ret; char *ms = _multi_string_alloc_and_copy( lpszDSN ); inst_logClear(); ret = SQLCreateDataSource( hwndParent, ms ); free( ms ); return ret; }
0
[ "CWE-119", "CWE-369" ]
unixODBC
45ef78e037f578b15fc58938a3a3251655e71d6f
232,313,348,950,250,100,000,000,000,000,000,000,000
13
New Pre Source
static int nf_tables_delrule(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_next(info->net); u8 family = info->nfmsg->nfgen_family; struct nft_chain *chain = NULL; struct net *net = info->net; ...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
142,198,909,769,237,900,000,000,000,000,000,000,000
67
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
int tcp_test(const char* ip_str, const short port) { int sock, i; struct sockaddr_in s_in; int packetsize = 1024; unsigned char packet[packetsize]; struct timeval tv, tv2, tv3; int caplen = 0; int times[REQUESTS]; int min, avg, max, len; struct net_hdr nh; tv3.tv_sec=0; tv3....
0
[ "CWE-787" ]
aircrack-ng
091b153f294b9b695b0b2831e65936438b550d7b
277,492,381,212,296,460,000,000,000,000,000,000,000
206
Aireplay-ng: Fixed tcp_test stack overflow (Closes #14 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2417 28c6078b-6c39-48e3-add9-af49d547ecab
static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep) { struct vdpa_device *vdpa = v->vdpa; const struct vdpa_config_ops *ops = vdpa->config; u64 features; /* * It's not allowed to change the features after they have * been negotiated. */ if (ops->get_status(vdpa) & VIRTIO_CONFIG_S...
0
[ "CWE-416" ]
linux
f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9
213,755,958,905,908,930,000,000,000,000,000,000,000
21
vhost-vdpa: fix use-after-free of v->config_ctx When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-free issues like the foll...
OJPEGPreDecodeSkipScanlines(TIFF* tif) { static const char module[]="OJPEGPreDecodeSkipScanlines"; OJPEGState* sp=(OJPEGState*)tif->tif_data; uint32 m; if (sp->skip_buffer==NULL) { sp->skip_buffer=_TIFFmalloc(sp->bytes_per_line); if (sp->skip_buffer==NULL) { TIFFErrorExt(tif->tif_clientdata,module,"Out of...
0
[ "CWE-369" ]
libtiff
43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec
257,189,592,853,330,620,000,000,000,000,000,000,000
21
* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611