func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
local struct space *get_space(struct pool *pool)
{
struct space *space;
/* if can't create any more, wait for a space to show up */
possess(pool->have);
if (pool->limit == 0)
wait_for(pool->have, NOT_TO_BE, 0);
/* if a space is available, pull it from the list and return it */
if (pool... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 275,166,814,343,443,740,000,000,000,000,000,000,000 | 38 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... |
u32 rtl8xxxu_read32(struct rtl8xxxu_priv *priv, u16 addr)
{
struct usb_device *udev = priv->udev;
int len;
u32 data;
mutex_lock(&priv->usb_buf_mutex);
len = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
REALTEK_USB_CMD_REQ, REALTEK_USB_READ,
addr, 0, &priv->usb_buf.val32, sizeof(u32),
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 38,185,756,252,611,545,000,000,000,000,000,000,000 | 19 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail)
{
struct rar *rar = (struct rar *)(a->format->data);
const void *h = __archive_read_ahead(a, min, avail);
int ret;
if (avail)
{
if (a->archive.read_data_is_posix_read && *avail > (ssize_t)a->archive.read_data_requested)
*avail = a->a... | 0 | [
"CWE-416"
] | libarchive | bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 | 175,823,950,175,562,770,000,000,000,000,000,000,000 | 31 | rar: file split across multi-part archives must match
Fuzzing uncovered some UAF and memory overrun bugs where a file in a
single file archive reported that it was split across multiple
volumes. This was caused by ppmd7 operations calling
rar_br_fillup. This would invoke rar_read_ahead, which would in some
situations ... |
MYSQL * STDCALL
CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,ulong client_flag)
{
char buff[NAME_LEN+USERNAME_LENGTH+100];
int scramble_data_len, pkt_scramble_len= 0;
char *end,... | 0 | [
"CWE-416"
] | mysql-server | 4797ea0b772d5f4c5889bc552424132806f46e93 | 135,640,344,694,269,450,000,000,000,000,000,000,000 | 649 | BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST()
Analysis:
---------
Invalid memory access maybe observed when using prepared statements if:
a) The mysql client connection is lost after statement preparation
is complete and
b) There is at least one statement which is in initialized state but
not ... |
static void i40e_enable_pf_switch_lb(struct i40e_pf *pf)
{
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
struct i40e_vsi_context ctxt;
int ret;
ctxt.seid = pf->main_vsi_seid;
ctxt.pf_num = pf->hw.pf_id;
ctxt.vf_num = 0;
ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
if (ret) {
dev_info(&pf->pdev->dev,
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 104,367,023,186,887,500,000,000,000,000,000,000,000 | 29 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
void license_generate_keys(rdpLicense* license)
{
security_master_secret(license->PremasterSecret, license->ClientRandom,
license->ServerRandom, license->MasterSecret); /* MasterSecret */
security_session_key_blob(license->MasterSecret, license->ClientRandom,
license->ServerRandom, license->SessionKeyBlob); /*... | 0 | [] | FreeRDP | f1d6afca6ae620f9855a33280bdc6f3ad9153be0 | 300,621,595,579,369,300,000,000,000,000,000,000,000 | 44 | Fix CVE-2014-0791
This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc(). |
static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len)
{
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(sk);
stru... | 1 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 279,166,009,293,414,000,000,000,000,000,000,000,000 | 157 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
pthread_mutex_t mutex[32]; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 68,067,445,255,799,550,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void cmd_parse_list(struct ImapData *idata, char *s)
{
struct ImapList *list = NULL;
struct ImapList lb;
char delimbuf[5]; /* worst case: "\\"\0 */
unsigned int litlen;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
list = (struct ImapList *) idata->cmddata;
else
list = &lb;
memset... | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | e52393740334443ae0206cab2d7caef381646725 | 130,246,758,314,127,980,000,000,000,000,000,000,000 | 70 | quote imap strings more carefully
Co-authored-by: JerikoOne <jeriko.one@gmx.us> |
isClick1_clean(XtermWidget xw, XButtonEvent *event)
{
TScreen *screen = TScreenOf(xw);
int delta;
/* Disable on Shift-Click-1, including the application-mouse modes */
if (OverrideButton(event)
|| (okSendMousePos(xw) != MOUSE_OFF)
|| ExtendingSelection) /* Was moved */
return 0;
if (event->type... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 184,490,623,068,581,670,000,000,000,000,000,000,000 | 27 | snapshot of project "xterm", label xterm-365d |
void doCheckAuthorization(OperationContext* opCtx) const override {
uassertStatusOK(_command->checkAuthForOperation(
opCtx, _request->getDatabase().toString(), _request->body));
} | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 53,239,322,108,038,320,000,000,000,000,000,000,000 | 4 | SERVER-38275 ban find explain with UUID |
R_API char *r_bin_java_unmangle(const char *flags, const char *name, const char *descriptor) {
ut32 l_paren_pos = -1, r_paren_pos = -1;
char *result = NULL;
ut32 desc_len = descriptor && *descriptor ? strlen (descriptor) : 0,
name_len = name && *name ? strlen (name) : 0,
flags_len = flags && *flags ? strlen (flags... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 70,695,868,795,174,490,000,000,000,000,000,000,000 | 52 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
give_terminal_to (pgrp, force)
pid_t pgrp;
int force;
{
sigset_t set, oset;
int r, e;
r = 0;
if (job_control || force)
{
sigemptyset (&set);
sigaddset (&set, SIGTTOU);
sigaddset (&set, SIGTTIN);
sigaddset (&set, SIGTSTP);
sigaddset (&set, SIGCHLD);
sigemptyset ... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 143,277,150,233,273,760,000,000,000,000,000,000,000 | 38 | bash-4.4-rc2 release |
static int do_replace(struct net *net, const void __user *user,
unsigned int len)
{
int ret;
struct arpt_replace tmp;
struct xt_table_info *newinfo;
void *loc_cpu_entry;
struct arpt_entry *iter;
if (copy_from_user(&tmp, user, sizeof(tmp)) != 0)
return -EFAULT;
/* overflow check */
if (tmp.num_counte... | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 204,898,268,157,300,560,000,000,000,000,000,000,000 | 50 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
gx_default_get_xfont_device(gx_device * dev)
{
return dev;
} | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 324,196,041,970,061,260,000,000,000,000,000,000,000 | 4 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)
{
/* Libpng versions 1.0.0 and later are binary compatible if the version
* string matches through the second '.'; we must recompile any
* applications that use any older library version.
*/
if (user_png_ver != NULL)
{
... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 258,423,270,353,899,930,000,000,000,000,000,000,000 | 52 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
void HGraphBuilder::AddCheckConstantFunction(Handle<JSObject> holder,
HValue* receiver,
Handle<Map> receiver_map,
bool smi_and_map_check) {
// Constant functions have the nice propert... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 116,882,786,090,192,620,000,000,000,000,000,000,000 | 17 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
nbd_unlocked_get_meta_context (struct nbd_handle *h, size_t i)
{
char *ret;
if (i >= h->request_meta_contexts.size) {
set_error (EINVAL, "meta context request out of range");
return NULL;
}
ret = strdup (h->request_meta_contexts.ptr[i]);
if (ret == NULL)
set_error (errno, "strdup");
return re... | 0 | [
"CWE-252"
] | libnbd | c79706af4e7475bf58861a143b77b77a54e7a1cd | 279,224,404,321,108,670,000,000,000,000,000,000,000 | 15 | 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... |
static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int ret;
st = avformat_new_stream(c->fc, NULL);
if (!st) return AVERROR(ENOMEM);
st->id = -1;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!sc) return AVERROR(ENOMEM);
st-... | 0 | [
"CWE-703"
] | FFmpeg | c953baa084607dd1d84c3bfcce3cf6a87c3e6e05 | 150,259,372,779,413,260,000,000,000,000,000,000,000 | 130 | avformat/mov: Check count sums in build_open_gop_key_points()
Fixes: ffmpeg.md
Fixes: Out of array access
Fixes: CVE-2022-2566
Found-by: Andy Nguyen <theflow@google.com>
Found-by: 3pvd <3pvd@google.com>
Reviewed-by: Andy Nguyen <theflow@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
bjc_put_continue_image(gp_file *file, const byte *data, int count)
{
bjc_put_command(file, 'F', count);
bjc_put_bytes(file, data, count);
} | 0 | [
"CWE-787"
] | ghostpdl | bf72f1a3dd5392ee8291e3b1518a0c2c5dc6ba39 | 264,312,421,214,414,460,000,000,000,000,000,000,000 | 5 | Fix valgrind problems with gdevbjca.c
2 problems here. Firstly, we could access off the end of a row
while looking for runs. Change the indexing to fix this.
Secondly, we could overrun our gamma tables due to unexpectedly
large values. Add some clamping. |
std::string get_saves_dir()
{
const std::string dir_path = get_user_data_dir() + "/saves";
return get_dir(dir_path);
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 295,328,135,580,627,000,000,000,000,000,000,000,000 | 5 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
static void copy_xauthority(void) {
// copy XAUTHORITY_FILE in the new home directory
char *src = RUN_XAUTHORITY_FILE ;
char *dest;
if (asprintf(&dest, "%s/.Xauthority", cfg.homedir) == -1)
errExit("asprintf");
// if destination is a symbolic link, exit the sandbox!!!
if (is_link(dest)) {
fprintf(stderr, "E... | 0 | [
"CWE-284",
"CWE-269"
] | firejail | 38d418505e9ee2d326557e5639e8da49c298858f | 274,363,467,470,374,650,000,000,000,000,000,000,000 | 19 | security fix |
void parser(void)
{
char *arg;
#ifndef MINIMAL
char *sitearg;
#endif
#ifdef WITH_RFC2640
char *narg = NULL;
#endif
size_t n;
#ifdef IMPLICIT_TLS
(void) tls_init_new_session();
data_protection_level = CPL_PRIVATE;
#endif
for (;;) {
xferfd = -1;
if (state_needs_update != 0) {
... | 0 | [
"CWE-399"
] | pure-ftpd | 65c4d4ad331e94661de763e9b5304d28698999c4 | 187,874,985,686,837,440,000,000,000,000,000,000,000 | 591 | Flush the command buffer after switching to TLS.
Fixes a flaw similar to CVE-2011-0411. |
static void lhvc_parse_rep_format(HEVC_RepFormat *fmt, GF_BitStream *bs, u32 idx)
{
u8 chroma_bitdepth_present_flag;
fmt->pic_width_luma_samples = gf_bs_read_int_log_idx(bs, 16, "pic_width_luma_samples", idx);
fmt->pic_height_luma_samples = gf_bs_read_int_log_idx(bs, 16, "pic_height_luma_samples", idx);
chroma_bitd... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 198,692,843,804,381,350,000,000,000,000,000,000,000 | 21 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
init_cell_pool(void)
{
tor_assert(!cell_pool);
cell_pool = mp_pool_new(sizeof(packed_cell_t), 128*1024);
} | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 285,571,214,331,179,900,000,000,000,000,000,000,000 | 5 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
static int dt_to_map_one_config(struct pinctrl *p,
struct pinctrl_dev *hog_pctldev,
const char *statename,
struct device_node *np_config)
{
struct pinctrl_dev *pctldev = NULL;
struct device_node *np_pctldev;
const struct pinctrl_ops *ops;
int ret;
struct pinctrl_map *map;
unsigned num_maps;
bool allo... | 0 | [
"CWE-125"
] | linux | be4c60b563edee3712d392aaeb0943a768df7023 | 62,357,666,261,852,450,000,000,000,000,000,000,000 | 62 | pinctrl: devicetree: Avoid taking direct reference to device name string
When populating the pinctrl mapping table entries for a device, the
'dev_name' field for each entry is initialised to point directly at the
string returned by 'dev_name()' for the device and subsequently used by
'create_pinctrl()' when looking up... |
void do_remove_file(struct st_command *command)
{
int error;
static DYNAMIC_STRING ds_filename;
const struct command_arg rm_args[] = {
{ "filename", ARG_STRING, TRUE, &ds_filename, "File to delete" }
};
DBUG_ENTER("do_remove_file");
check_command_args(command, command->first_argument,
... | 0 | [] | server | 01b39b7b0730102b88d8ea43ec719a75e9316a1e | 336,296,002,941,940,520,000,000,000,000,000,000,000 | 19 | mysqltest: don't eat new lines in --exec
pass them through as is |
void LOG_SetMinSeverity(LOG_Severity severity)
{
log_min_severity = CLAMP(LOGS_DEBUG, severity, LOGS_FATAL);
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 146,354,383,914,686,420,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
roundLog2 (int x, LevelRoundingMode rmode)
{
return (rmode == ROUND_DOWN)? floorLog2 (x): ceilLog2 (x);
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 244,647,114,161,895,740,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int mounts_release(struct inode *inode, struct file *file)
{
struct proc_mounts *p = file->private_data;
path_put(&p->root);
put_mnt_ns(p->ns);
return seq_release(inode, file);
} | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 323,042,036,360,905,900,000,000,000,000,000,000,000 | 7 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
void acceptXdsConnection() {
AssertionResult result = // xds_connection_ is filled with the new FakeHttpConnection.
fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, xds_connection_);
RELEASE_ASSERT(result, result.message());
result = xds_connection_->waitForNewStream(*dispatcher_, xds_strea... | 0 | [
"CWE-703",
"CWE-674"
] | envoy | 4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31 | 301,412,356,780,288,500,000,000,000,000,000,000,000 | 9 | CVE-2022-23606
Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void check_user_namespace(void) {
EUID_ASSERT();
if (getuid() == 0)
goto errout;
// test user namespaces available in the kernel
struct stat s1;
struct stat s2;
struct stat s3;
if (stat("/proc/self/ns/user", &s1) == 0 &&
stat("/proc/self/uid_map", &s2) == 0 &&
stat("/proc/self/gid_map", &s3) == 0)
... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 75,492,344,756,163,270,000,000,000,000,000,000,000 | 23 | fixing CVE-2022-31214 |
void HeaderMapImpl::addCopy(const LowerCaseString& key, const std::string& value) {
auto* entry = getExistingInline(key.get());
if (entry != nullptr) {
const uint64_t added_size = appendToHeader(entry->value(), value);
addSize(added_size);
return;
}
HeaderString new_key;
new_key.setCopy(key.get().... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 63,008,782,411,544,175,000,000,000,000,000,000,000 | 15 | 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... |
GF_Err st3d_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Stereo3DBox *ptr = (GF_Stereo3DBox *)s;
ISOM_DECREASE_SIZE(ptr, 1)
ptr->stereo_type = gf_bs_read_u8(bs);
return GF_OK; | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 229,787,868,620,413,900,000,000,000,000,000,000,000 | 7 | fixed #1757 |
static MagickBooleanType CheckPrimitiveExtent(MVGInfo *mvg_info,
const size_t pad)
{
double
extent;
size_t
quantum;
/*
Check if there is enough storage for drawing pimitives.
*/
extent=(double) mvg_info->offset+pad+PrimitiveExtentPad;
quantum=sizeof(**mvg_info->primitive_info);
if (((exten... | 0 | [
"CWE-416"
] | ImageMagick | ecf7c6b288e11e7e7f75387c5e9e93e423b98397 | 302,686,450,971,517,220,000,000,000,000,000,000,000 | 46 | ... |
static void gap_device_name_read_cb(struct gatt_db_attribute *attrib,
unsigned int id, uint16_t offset,
uint8_t opcode, struct bt_att *att,
void *user_data)
{
struct btd_gatt_database *database = user_data;
uint8_t error = 0;
size_t len = 0;
const uint8_t *value = NULL;
const char *device_name;
DB... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 337,104,940,592,849,340,000,000,000,000,000,000,000 | 27 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
{
AHCIPortRegs *pr = &s->dev[port].port_regs;
DPRINTF(port, "offset: 0x%x val: 0x%x\n", offset, val);
switch (offset) {
case PORT_LST_ADDR:
pr->lst_addr = val;
break;
case PORT_LST_ADDR_HI... | 0 | [
"CWE-772",
"CWE-401"
] | qemu | d68f0f778e7f4fbd674627274267f269e40f0b04 | 210,968,862,048,578,560,000,000,000,000,000,000,000 | 81 | ide: ahci: call cleanup function in ahci unit
This can avoid memory leak when hotunplug the ahci device.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn
Signed-off-by: John Snow <jsnow@redhat.com> |
static struct inode *find_inode_fast(struct super_block *sb,
struct hlist_head *head, unsigned long ino)
{
struct inode *inode = NULL;
repeat:
hlist_for_each_entry(inode, head, i_hash) {
if (inode->i_ino != ino)
continue;
if (inode->i_sb != sb)
continue;
spin_lock(&inode->i_lock);
if (inode->i_stat... | 0 | [
"CWE-416"
] | tip | 8019ad13ef7f64be44d4f892af9c840179009254 | 93,699,168,238,642,140,000,000,000,000,000,000,000 | 26 | futex: Fix inode life-time issue
As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.
This sequence number is global, but shared (file backed) futexes are
rare enough that thi... |
static void enable_server_precedence(gnutls_priority_t c)
{
c->server_precedence = 1;
} | 0 | [
"CWE-310"
] | gnutls | 21f89efad7014a5ee0debd4cd3d59e27774b29e6 | 69,365,389,798,342,660,000,000,000,000,000,000,000 | 4 | handshake: add FALLBACK_SCSV priority option
This allows clients to enable the TLS_FALLBACK_SCSV mechanism during
the handshake, as defined in RFC7507. |
static GIOStatus irssi_ssl_write(GIOChannel *handle, const gchar *buf, gsize len, gsize *ret, GError **gerr)
{
GIOSSLChannel *chan = (GIOSSLChannel *)handle;
gint ret1, err;
const char *errstr;
ret1 = SSL_write(chan->ssl, (const char *)buf, len);
if(ret1 <= 0)
{
*ret = 0;
err = SSL_get_error(chan->ssl, ret1)... | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 241,769,993,549,192,600,000,000,000,000,000,000,000 | 42 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
Buf recvEncryptedStream(
StreamId streamId,
folly::IOBuf& data,
uint64_t offset = 0,
bool eof = false) {
PacketNum packetNum = clientNextAppDataPacketNum++;
auto packetData = packetToBuf(createStreamPacket(
clientConnectionId.value_or(getTestConnectionId()),
*server->ge... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 161,196,557,028,198,180,000,000,000,000,000,000,000 | 21 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
struct dentry *d_alloc_parallel(struct dentry *parent,
const struct qstr *name,
wait_queue_head_t *wq)
{
unsigned int hash = name->hash;
struct hlist_bl_head *b = in_lookup_hash(parent, hash);
struct hlist_bl_node *node;
struct dentry *new = d_alloc(parent, name);
struct dentry *dentry;
unsigned seq, r_se... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 178,982,290,877,122,550,000,000,000,000,000,000,000 | 102 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
static int update_modify_options(struct libmnt_update *upd, struct libmnt_lock *lc)
{
struct libmnt_table *tb = NULL;
int rc = 0;
struct libmnt_fs *fs;
assert(upd);
assert(upd->fs);
DBG(UPDATE, mnt_debug_h(upd, "%s: modify options", upd->filename));
fs = upd->fs;
if (upd->userspace_only)
rc = utab_lock(up... | 0 | [
"CWE-399"
] | util-linux | 28594c9d4fc8a4108408c5749b62933b967ba23b | 72,447,668,284,953,800,000,000,000,000,000,000,000 | 49 | libmount: block signals when update utab
Signed-off-by: Karel Zak <kzak@redhat.com> |
event_sched_in(struct perf_event *event,
struct perf_cpu_context *cpuctx,
struct perf_event_context *ctx)
{
u64 tstamp = perf_event_time(event);
int ret = 0;
lockdep_assert_held(&ctx->lock);
if (event->state <= PERF_EVENT_STATE_OFF)
return 0;
event->state = PERF_EVENT_STATE_ACTIVE;
event->oncpu = smp_p... | 0 | [
"CWE-667"
] | linux | 79c9ce57eb2d5f1497546a3946b4ae21b6fdc438 | 128,691,160,702,937,130,000,000,000,000,000,000,000 | 60 | perf/core: Fix perf_event_open() vs. execve() race
Jann reported that the ptrace_may_access() check in
find_lively_task_by_vpid() is racy against exec().
Specifically:
perf_event_open() execve()
ptrace_may_access()
commit_creds()
... if (get_dumpable() != SUID_DUMP_USER)
perf_event_exit_task();
... |
PHP_FUNCTION(log)
{
double num, base = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|d", &num, &base) == FAILURE) {
return;
}
if (ZEND_NUM_ARGS() == 1) {
RETURN_DOUBLE(log(num));
}
if (base <= 0.0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "base must be greater than 0");
RETURN_FALS... | 0 | [] | php-src | 0d822f6df946764f3f0348b82efae2e1eaa83aa0 | 266,591,247,696,122,760,000,000,000,000,000,000,000 | 20 | Bug #71201 round() segfault on 64-bit builds |
redrawcmd_preedit(void)
{
if ((State & MODE_CMDLINE)
&& xic != NULL
// && im_get_status() doesn't work when using SCIM
&& !p_imdisable
&& im_is_preediting())
{
int cmdpos = 0;
int cmdspos;
int old_row;
int old_col;
colnr_T col;
old_row = msg_row;
old_col = msg_col;
cmdspos = ((ccli... | 0 | [
"CWE-674",
"CWE-787"
] | vim | 51f0bfb88a3554ca2dde777d78a59880d1ee37a8 | 245,444,852,302,153,200,000,000,000,000,000,000,000 | 60 | patch 8.2.4975: recursive command line loop may cause a crash
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline(). |
format_time(void)
{
static char time_buf[TIME_STR_LEN+1];
strftime(time_buf, sizeof time_buf, "%T ", localtime(&time_now.tv_sec));
return time_buf;
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 176,076,528,800,831,600,000,000,000,000,000,000,000 | 8 | 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 ... |
pk_transaction_files_cb (PkBackendJob *job,
PkFiles *item,
PkTransaction *transaction)
{
guint i;
_cleanup_free_ gchar *package_id = NULL;
_cleanup_strv_free_ gchar **files = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
/* get data */
g_ob... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 322,095,512,342,308,900,000,000,000,000,000,000,000 | 44 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
int set_nonblock(int fd)
{
int flags;
flags = fcntl(fd, F_GETFL, 0);
if (!flags)
(void)fcntl(fd, F_SETFL, flags | O_NONBLOCK);
return fd;
} | 0 | [
"CWE-22"
] | uftpd | 455b47d3756aed162d2d0ef7f40b549f3b5b30fe | 243,868,009,757,168,000,000,000,000,000,000,000,000 | 10 | FTP/TFTP: Fix directory traversal regression, reported by Aaron Esau
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
gen_muldiv(codegen_scope *s, uint8_t op, uint16_t dst)
{
if (no_peephole(s)) {
normal:
genop_1(s, op, dst);
return;
}
else {
struct mrb_insn_data data = mrb_last_insn(s);
mrb_int n, n0;
if (addr_pc(s, data.addr) == s->lastlabel || !get_int_operand(s, &data, &n)) {
/* not integer immedi... | 0 | [
"CWE-415",
"CWE-122"
] | mruby | 38b164ace7d6ae1c367883a3d67d7f559783faad | 94,889,342,985,525,020,000,000,000,000,000,000,000 | 29 | codegen.c: fix a bug in `gen_values()`.
- Fix limit handling that fails 15 arguments method calls.
- Fix too early argument packing in arrays. |
static ssize_t wq_numa_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct workqueue_struct *wq = dev_to_wq(dev);
struct workqueue_attrs *attrs;
int v, ret = -ENOMEM;
apply_wqattrs_lock();
attrs = wq_sysfs_prep_attrs(wq);
if (!attrs)
goto out_unlock;
ret ... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 192,910,699,613,119,240,000,000,000,000,000,000,000 | 24 | 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... |
TEST_F(LoaderTest, NegativeShapeDimension) {
SavedModelBundle bundle;
RunOptions run_options;
SessionOptions session_options;
const string export_dir = io::JoinPath(testing::TensorFlowSrcRoot(),
kTestFuzzGeneratedNegativeShape);
Status st = LoadSavedModel(session_opti... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | adf095206f25471e864a8e63a0f1caef53a0e3a6 | 79,295,081,067,551,900,000,000,000,000,000,000,000 | 14 | Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`.
We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail.
PiperOrigin-RevId: 332536309
Change... |
virDomainRedirdevDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
xmlNodePtr cur;
virDomainRedirdevDefPtr def;
g_autofree char *bus = NULL;
g_autofree char *typ... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 42,442,255,307,602,324,000,000,000,000,000,000,000 | 68 | 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... |
TEST_P(HeaderIntegrationTest, TestTeHeaderSanitized) {
initializeFilter(HeaderMode::Append, false);
performRequest(
Http::TestRequestHeaderMapImpl{
{":method", "GET"},
{":path", "/"},
{":scheme", "http"},
{":authority", "no-headers.com"},
{"x-request-foo", "do... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 174,117,766,893,000,500,000,000,000,000,000,000,000 | 34 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void ContentLine_Analyzer::DoDeliver(int len, const u_char* data)
{
seq_delivered_in_lines = seq;
while ( len > 0 && ! SkipDeliveries() )
{
if ( (CR_LF_as_EOL & CR_as_EOL) &&
last_char == '\r' && *data == '\n' )
{
// CR is already considered as EOL.
// Compress CRLF to just one line termination.... | 0 | [
"CWE-787"
] | bro | 6c0f101a62489b1c5927b4ed63b0e1d37db40282 | 59,097,239,296,141,010,000,000,000,000,000,000,000 | 70 | Patch OOB write in content-line analyzer.
A combination of packets can trigger an out of bound write of '0' byte
in the content-line analyzer.
This bug was found by Frank Meier.
Addresses BIT-1856. |
ast_for_with_item(struct compiling *c, const node *n)
{
expr_ty context_expr, optional_vars = NULL;
REQ(n, with_item);
context_expr = ast_for_expr(c, CHILD(n, 0));
if (!context_expr)
return NULL;
if (NCH(n) == 3) {
optional_vars = ast_for_expr(c, CHILD(n, 2));
if (!optional... | 0 | [
"CWE-125"
] | cpython | a4d78362397fc3bced6ea80fbc7b5f4827aec55e | 110,318,338,920,496,130,000,000,000,000,000,000,000 | 21 | bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen. |
static NETJOIN_REC *netjoin_add(IRC_SERVER_REC *server, const char *nick,
GSList *channels)
{
NETJOIN_REC *rec;
NETJOIN_SERVER_REC *srec;
g_return_val_if_fail(server != NULL, NULL);
g_return_val_if_fail(nick != NULL, NULL);
rec = g_new0(NETJOIN_REC, 1);
rec->nick = g_strdup(nick);
while (channels != NULL) ... | 0 | [
"CWE-416"
] | irssi | a6cae91cecba2e8cf11ed779c5da5a229472575c | 76,743,204,857,834,800,000,000,000,000,000,000,000 | 30 | Merge pull request #812 from ailin-nemui/tape-netsplit
revert netsplit print optimisation
(cherry picked from commit 7de1378dab8081932d9096e19ae3d0921e560230) |
ofputil_encode_table_config(enum ofputil_table_miss miss,
enum ofputil_table_eviction eviction,
enum ofputil_table_vacancy vacancy,
enum ofp_version version)
{
uint32_t config = 0;
/* Search for "OFPTC_* Table Configuration" in ... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 311,694,692,303,058,900,000,000,000,000,000,000,000 | 52 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
int amqp_get_sockfd(amqp_connection_state_t state) {
return state->socket ? amqp_socket_get_sockfd(state->socket) : -1;
} | 0 | [
"CWE-20",
"CWE-190",
"CWE-787"
] | rabbitmq-c | fc85be7123050b91b054e45b91c78d3241a5047a | 109,626,118,367,520,200,000,000,000,000,000,000,000 | 3 | lib: check frame_size is >= INT32_MAX
When parsing a frame header, validate that the frame_size is less than
or equal to INT32_MAX. Given frame_max is limited between 0 and
INT32_MAX in amqp_login and friends, this does not change the API.
This prevents a potential buffer overflow when a malicious client sends
a fram... |
invoke_NPN_HasMethod(PluginInstance *plugin, NPObject *npobj, NPIdentifier methodName)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_HAS_METHOD,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_NP_... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 329,777,425,152,458,820,000,000,000,000,000,000,000 | 28 | Support all the new variables added |
get_n_bytes_readable_on_socket(evutil_socket_t fd)
{
#if defined(FIONREAD) && defined(WIN32)
unsigned long lng = EVBUFFER_MAX_READ;
if (ioctlsocket(fd, FIONREAD, &lng) < 0)
return -1;
return (int)lng;
#elif defined(FIONREAD)
int n = EVBUFFER_MAX_READ;
if (ioctl(fd, FIONREAD, &n) < 0)
return -1;
return n;
#els... | 1 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 52,901,552,374,686,530,000,000,000,000,000,000,000 | 16 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
int TfLiteIntArrayGetSizeInBytes(int size) {
static TfLiteIntArray dummy;
return sizeof(dummy) + sizeof(dummy.data[0]) * size;
} | 0 | [
"CWE-190"
] | tensorflow | 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5 | 318,392,206,259,349,770,000,000,000,000,000,000,000 | 4 | Fix a dangerous integer overflow and a malloc of negative size.
PiperOrigin-RevId: 371254154
Change-Id: I250a98a3df26328770167025670235a963a72da0 |
static int pcpu_size_to_slot(int size)
{
if (size == pcpu_unit_size)
return pcpu_nr_slots - 1;
return __pcpu_size_to_slot(size);
} | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 182,704,278,227,344,500,000,000,000,000,000,000,000 | 6 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
bool is_subpart,
uint32 *store_length_array,
uchar *min_value, uchar *max_value,
... | 0 | [] | server | f305a7ce4bccbd56520d874e1d81a4f29bc17a96 | 93,070,639,944,308,580,000,000,000,000,000,000,000 | 65 | bugfix: long partition names |
MagickExport void DestroyXResources(void)
{
register int
i;
unsigned int
number_windows;
XWindowInfo
*magick_windows[MaxXWindows];
XWindows
*windows;
DestroyXWidget();
windows=XSetWindows((XWindows *) ~0);
if ((windows == (XWindows *) NULL) || (windows->display == (Display *) NULL))
... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 204,204,063,678,795,100,000,000,000,000,000,000,000 | 189 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
bool CModules::ReloadModule(const CString& sModule, const CString& sArgs,
CUser* pUser, CIRCNetwork* pNetwork,
CString& sRetMsg) {
// Make a copy incase the reference passed in is from CModule::GetModName()
CString sMod = sModule;
CModule* pModule = F... | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 303,162,309,859,017,500,000,000,000,000,000,000,000 | 28 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
void* Type_ParametricCurve_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return (void*) cmsDupToneCurve((cmsToneCurve*) Ptr);
cmsUNUSED_PARAMETER(n);
cmsUNUSED_PARAMETER(self);
} | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 84,622,562,949,730,690,000,000,000,000,000,000,000 | 7 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
do_leave (VerifyContext *ctx, int delta)
{
int target = ((gint32)ctx->ip_offset) + delta;
if (target >= ctx->code_size || target < 0)
ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Branch target out of code at 0x%04x", ctx->ip_offset));
if (!is_correct_leave (ctx->header, ctx->ip_offset, target))
CODE_NOT_VERIFIABLE ... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 180,330,225,961,576,100,000,000,000,000,000,000,000 | 11 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
*/
GF_Err gf_isom_get_pssh(GF_ISOFile *file, u32 pssh_index, u8 **pssh_data, u32 *pssh_size)
{
GF_Err e;
u32 i=0;
GF_BitStream *bs;
u32 count=1;
GF_Box *pssh;
while ((pssh = (GF_Box *)gf_list_enum(file->moov->child_boxes, &i))) {
if (pssh->type != GF_ISOM_BOX_TYPE_PSSH) continue;
if (count == pssh_index) brea... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 64,240,267,662,658,990,000,000,000,000,000,000,000 | 21 | fixed #1706 |
i_register_root(gs_memory_t * mem, gs_gc_root_t * rp, gs_ptr_type_t ptype,
void **up, client_name_t cname)
{
gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem;
if (rp == NULL) {
rp = gs_raw_alloc_struct_immovable(imem->non_gc_memory, &st_gc_root_t,
... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 235,311,004,221,544,520,000,000,000,000,000,000,000 | 21 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
static int tracing_wait_pipe(struct file *filp)
{
struct trace_iterator *iter = filp->private_data;
int ret;
while (trace_empty(iter)) {
if ((filp->f_flags & O_NONBLOCK)) {
return -EAGAIN;
}
/*
* We block until we read something and tracing is disabled.
* We still block if tracing is disabled, but ... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 231,773,258,637,837,440,000,000,000,000,000,000,000 | 35 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
static int gtco_input_open(struct input_dev *inputdev)
{
struct gtco *device = input_get_drvdata(inputdev);
device->urbinfo->dev = device->usbdev;
if (usb_submit_urb(device->urbinfo, GFP_KERNEL))
return -EIO;
return 0;
} | 0 | [
"CWE-703"
] | linux | 162f98dea487206d9ab79fc12ed64700667a894d | 171,345,434,665,719,450,000,000,000,000,000,000,000 | 10 | Input: gtco - fix crash on detecting device without endpoints
The gtco driver expects at least one valid endpoint. If given malicious
descriptors that specify 0 for the number of endpoints, it will crash in
the probe function. Ensure there is at least one endpoint on the interface
before using it.
Also let's fix a mi... |
static void dviprint(DviContext *dvi, const char *command, int sub, const char *fmt, ...)
{
int i;
va_list ap;
printf("%s: ", dvi->filename);
for(i = 0; i < dvi->depth; i++)
printf(" ");
printf("%4lu: %s", dtell(dvi), command);
if(sub >= 0) printf("%d", sub);
if(*fmt) printf(": ");
va_start(ap, fmt);
vpri... | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 7,364,860,638,861,987,000,000,000,000,000,000,000 | 15 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
virDomainMemoryInsert(virDomainDefPtr def,
virDomainMemoryDefPtr mem)
{
unsigned long long memory = virDomainDefGetMemoryTotal(def);
int id = def->nmems;
if (mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
virDomainDefHasDeviceAddress(def, &mem->info)) {
virRe... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 118,276,773,087,171,070,000,000,000,000,000,000,000 | 21 | 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... |
gdk_pixbuf__gif_image_begin_load (GdkPixbufModuleSizeFunc size_func,
GdkPixbufModulePreparedFunc prepare_func,
GdkPixbufModuleUpdatedFunc update_func,
gpointer user_data,
GError **error)
{
GifContext *context;
#ifdef IO_GIFDEBUG
count = ... | 0 | [] | gdk-pixbuf | f8569bb13e2aa1584dde61ca545144750f7a7c98 | 187,629,085,131,836,830,000,000,000,000,000,000,000 | 28 | GIF: Don't return a partially initialized pixbuf structure
It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load()
routine did not properly handle certain return values from their subroutines.
A remote attacker could provide a specially-crafted GIF image, which once
opened in an application, linked ... |
dns_zonemgr_attach(dns_zonemgr_t *source, dns_zonemgr_t **target) {
REQUIRE(DNS_ZONEMGR_VALID(source));
REQUIRE(target != NULL && *target == NULL);
RWLOCK(&source->rwlock, isc_rwlocktype_write);
REQUIRE(source->refs > 0);
source->refs++;
INSIST(source->refs > 0);
RWUNLOCK(&source->rwlock, isc_rwlocktype_write);... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 275,110,464,353,074,440,000,000,000,000,000,000,000 | 11 | 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. |
kadm5_setv4key_principal(void *server_handle,
krb5_principal principal,
krb5_keyblock *keyblock)
{
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
krb5_int32 now;
kadm5_policy_ent_rec pol;
krb5_keysalt ... | 0 | [
"CWE-703"
] | krb5 | c5be6209311d4a8f10fda37d0d3f876c1b33b77b | 225,004,589,167,267,640,000,000,000,000,000,000,000 | 149 | Null pointer deref in kadmind [CVE-2012-1013]
The fix for #6626 could cause kadmind to dereference a null pointer if
a create-principal request contains no password but does contain the
KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix
name"). Only clients authorized to create principals can trigger ... |
PHP_FUNCTION(openssl_pkcs7_sign)
{
zval * zcert, * zprivkey, * zheaders;
zval * hval;
X509 * cert = NULL;
EVP_PKEY * privkey = NULL;
zend_long flags = PKCS7_DETACHED;
PKCS7 * p7 = NULL;
BIO * infile = NULL, * outfile = NULL;
STACK_OF(X509) *others = NULL;
zend_resource *certresource = NULL, *keyresource = NULL... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 212,698,264,110,996,840,000,000,000,000,000,000,000 | 113 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
static int handle_preemption_timer(struct kvm_vcpu *vcpu)
{
handle_fastpath_preemption_timer(vcpu);
return 1;
} | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 123,416,470,442,822,400,000,000,000,000,000,000,000 | 5 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
static char *get_reloc_name(RBinReloc *reloc, ut64 addr) {
char *reloc_name = NULL;
if (reloc->import && reloc->import->name) {
reloc_name = sdb_fmt ("reloc.%s_%d", reloc->import->name,
(int)(addr & 0xff));
if (!reloc_name) {
return NULL;
}
r_str_replace_char (reloc_name, '$', '_');
} else if (r... | 0 | [
"CWE-125"
] | radare2 | 1f37c04f2a762500222dda2459e6a04646feeedf | 121,930,589,473,574,170,000,000,000,000,000,000,000 | 23 | Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923) |
void get_file_timestamp_struct(unsigned int flags, struct tm *rectime,
struct file_header *file_hdr)
{
if (PRINT_TRUE_TIME(flags)) {
/* Get local time. This is just to fill fields with a default value. */
get_time(rectime, 0);
rectime->tm_mday = file_hdr->sa_day;
rectime->tm_mon = file_hdr->sa_mont... | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 81,410,228,440,687,500,000,000,000,000,000,000,000 | 21 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
Header headerLink(Header h)
{
if (h != NULL)
h->nrefs++;
return h;
} | 0 | [
"CWE-125"
] | rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | 236,391,050,723,906,800,000,000,000,000,000,000,000 | 6 | hdrblobInit() needs bounds checks too
Users can pass untrusted data to hdrblobInit() and it must be robust
against this. |
FileBody::FileBody(const fs::path& path, bool auto_delete)
: path_(path), chunk_size_(0), auto_delete_(auto_delete), size_(0) {
// Don't need to tell file size.
} | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 108,917,583,205,506,500,000,000,000,000,000,000,000 | 4 | fix static file serving security issue; fix url path encoding issue |
WasmResult Context::incrementMetric(uint32_t metric_id, int64_t offset) {
auto type = static_cast<MetricType>(metric_id & Wasm::kMetricTypeMask);
if (type == MetricType::Counter) {
auto it = wasm_->counters_.find(metric_id);
if (it != wasm_->counters_.end()) {
if (offset > 0) {
it->second->add... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 263,227,490,665,545,850,000,000,000,000,000,000,000 | 28 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static pj_status_t add_sdp_attr_rtcp_fb( pj_pool_t *pool,
const char *pt,
const pjmedia_rtcp_fb_cap *cap,
pjmedia_sdp_media *m)
{
pjmedia_sdp_attr *a;
char tmp[128];
pj_str_t val;
pj_str_t type_name = {0};
if (cap->type < PJMEDIA_RTCP_FB_OTHER)
pj_cstr(&type_name, rtcp_fb_type_na... | 0 | [
"CWE-125"
] | pjproject | 22af44e68a0c7d190ac1e25075e1382f77e9397a | 137,452,227,701,684,460,000,000,000,000,000,000,000 | 35 | Merge pull request from GHSA-m66q-q64c-hv36
* Prevent OOB read during RTP/RTCP parsing
* Add log
* Add more logs |
int nfc_llcp_send_snl_sdreq(struct nfc_llcp_local *local,
struct hlist_head *tlv_list, size_t tlvs_len)
{
struct nfc_llcp_sdp_tlv *sdreq;
struct hlist_node *n;
struct sk_buff *skb;
skb = nfc_llcp_allocate_snl(local, tlvs_len);
if (IS_ERR(skb))
return PTR_ERR(skb);
mutex_lock(&local->sdreq_lock);
if (... | 0 | [
"CWE-787"
] | linux | fe9c842695e26d8116b61b80bfb905356f07834b | 34,520,624,224,288,280,000,000,000,000,000,000,000 | 33 | NFC: llcp: Limit size of SDP URI
The tlv_len is u8, so we need to limit the size of the SDP URI. Enforce
this both in the NLA policy and in the code that performs the allocation
and copy, to avoid writing past the end of the allocated buffer.
Fixes: d9b8d8e19b073 ("NFC: llcp: Service Name Lookup netlink interface")
S... |
CompositeDeepScanLine::addSource(DeepScanLineInputPart* part)
{
_Data->check_valid(part->header());
_Data->_part.push_back(part);
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 225,567,365,837,657,200,000,000,000,000,000,000,000 | 5 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
finalize_common (CommonJob *common)
{
nautilus_progress_info_finish (common->progress);
g_timer_destroy (common->time);
eel_remove_weak_pointer (&common->parent_window);
if (common->skip_files) {
g_hash_table_destroy (common->skip_files);
}
if (common->skip_readdir_error) {
g_hash_table_destroy (common->ski... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 21,014,237,408,546,938,000,000,000,000,000,000,000 | 17 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
ecma_date_date_from_time (ecma_number_t time) /**< time value */
{
JERRY_ASSERT (!ecma_number_is_nan (time));
int32_t year = ecma_date_year_from_time (time);
int32_t day_within_year = ecma_date_day_from_time (time) - ecma_date_day_from_year (year);
JERRY_ASSERT (day_within_year >= 0 && day_within_year < ECMA_... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 124,600,463,056,735,080,000,000,000,000,000,000,000 | 24 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
left_adjust_char_head(const UChar* start, const UChar* s)
{
/* In this encoding
mb-trail bytes doesn't mix with single bytes.
*/
const UChar *p;
int len;
if (s <= start) return (UChar* )s;
p = s;
while (!eucjp_islead(*p) && p > start) p--;
len = enclen(ONIG_ENCODING_EUC_JP, p);
if (p + len > s)... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 101,681,450,883,534,530,000,000,000,000,000,000,000 | 17 | onig-5.9.2 |
bool ModMatchExpression::matchesSingleElement(const BSONElement& e, MatchDetails* details) const {
if (!e.isNumber())
return false;
return overflow::safeMod(e.numberLong(), static_cast<long long>(_divisor)) == _remainder;
} | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 214,142,098,964,362,830,000,000,000,000,000,000,000 | 5 | SERVER-43699 $mod should not overflow for large negative values |
static inline void write_IRQreg_ivpr(OpenPICState *opp, int n_IRQ, uint32_t val)
{
uint32_t mask;
/* NOTE when implementing newer FSL MPIC models: starting with v4.0,
* the polarity bit is read-only on internal interrupts.
*/
mask = IVPR_MASK_MASK | IVPR_PRIORITY_MASK | IVPR_SENSE_MASK |
... | 0 | [
"CWE-119"
] | qemu | 73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e | 105,850,682,462,908,080,000,000,000,000,000,000,000 | 36 | openpic: avoid buffer overrun on incoming migration
CVE-2013-4534
opp->nb_cpus is read from the wire and used to determine how many
IRQDest elements to read into opp->dst[]. If the value exceeds the
length of opp->dst[], MAX_CPU, opp->dst[] can be overrun with arbitrary
data from the wire.
Fix this by failing migrat... |
starttermcap(void)
{
if (full_screen && !termcap_active)
{
MAY_WANT_TO_LOG_THIS;
out_str(T_TI); // start termcap mode
out_str(T_CTI); // start "raw" mode
out_str(T_KS); // start "keypad transmit" mode
out_str(T_BE); // enable bracketed paste mode
#if defined(UNIX) || defined(VMS)
// Enable xterm... | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 60,664,700,138,903,040,000,000,000,000,000,000,000 | 34 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
static void ff_layout_reset_write(struct nfs_pgio_header *hdr, bool retry_pnfs)
{
struct rpc_task *task = &hdr->task;
pnfs_layoutcommit_inode(hdr->inode, false);
if (retry_pnfs) {
dprintk("%s Reset task %5u for i/o through pNFS "
"(req %s/%llu, %u bytes @ offset %llu)\n", __func__,
hdr->task.tk_pid,
hdr... | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 219,722,434,230,882,200,000,000,000,000,000,000,000 | 35 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
void EvaluateXYZ2Lab(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsCIELab Lab;
cmsCIEXYZ XYZ;
const cmsFloat64Number XYZadj = MAX_ENCODEABLE_XYZ;
// From 0..1.0 to XYZ
XYZ.X = In[0] * XYZadj;
XYZ.Y = In[1] * XYZadj;
XYZ.Z = In[2] * XYZadj;
cmsXYZ2Lab(N... | 0 | [] | Little-CMS | b0d5ffd4ad91cf8683ee106f13742db3dc66599a | 39,091,975,532,897,817,000,000,000,000,000,000,000 | 23 | Memory Squeezing: LCMS2: CLUTElemDup
Check for allocation failures and tidy up if found. |
PHP_FUNCTION(gethostbynamel)
{
char *hostname;
size_t hostname_len;
struct hostent *hp;
struct in_addr in;
int i;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &hostname, &hostname_len) == FAILURE) {
return;
}
if(hostname_len > MAXFQDNLEN) {
/* name too long, protect from CVE-2015-0235 */
php_error_do... | 0 | [
"CWE-125"
] | php-src | 8d3dfabef459fe7815e8ea2fd68753fd17859d7b | 284,799,578,494,294,060,000,000,000,000,000,000,000 | 30 | Fix #77369 - memcpy with negative length via crafted DNS response |
SSLHandshakeServerParseClientHello(
AsyncSSLSocket::UniquePtr socket,
bool preverifyResult,
bool verifyResult)
: SSLHandshakeBase(std::move(socket), preverifyResult, verifyResult) {
socket_->enableClientHelloParsing();
socket_->sslAccept(this, std::chrono::milliseconds::zero());
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 136,152,756,613,194,800,000,000,000,000,000,000,000 | 8 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static int __set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
{
int pending_vec, max_bits;
int mmu_reset_needed = 0;
int ret = __set_sregs_common(vcpu, sregs, &mmu_reset_needed, true);
if (ret)
return ret;
if (mmu_reset_needed)
kvm_mmu_reset_context(vcpu);
max_bits = KVM_NR_INTERRUPTS;
pending_ve... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 298,814,658,039,656,960,000,000,000,000,000,000,000 | 23 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static void crypt_reset_null_type(struct crypt_device *cd)
{
if (cd->type)
return;
free(cd->u.none.active_name);
cd->u.none.active_name = NULL;
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 48,651,799,691,174,460,000,000,000,000,000,000,000 | 8 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
pk_transaction_get_repo_list (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
PkBitfield filter;
_cleanup_error_free_ GError *error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
g_variant_get (param... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 288,193,525,608,056,730,000,000,000,000,000,000,000 | 33 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.