func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static bool socket_full(struct pool *pool, int wait)
{
SOCKETTYPE sock = pool->sock;
struct timeval timeout;
fd_set rd;
if (unlikely(wait < 0))
wait = 0;
FD_ZERO(&rd);
FD_SET(sock, &rd);
timeout.tv_usec = 0;
timeout.tv_sec = wait;
if (select(sock + 1, &rd, NULL, NULL, &timeout) > 0)
return true;
return f... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 279,595,691,977,606,570,000,000,000,000,000,000,000 | 16 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
void zend_shared_alloc_save_state(void)
{
int i;
for (i = 0; i < ZSMMG(shared_segments_count); i++) {
ZSMMG(shared_memory_state).positions[i] = ZSMMG(shared_segments)[i]->pos;
}
ZSMMG(shared_memory_state).shared_free = ZSMMG(shared_free);
} | 0 | [
"CWE-416"
] | php-src | 777c39f4042327eac4b63c7ee87dc1c7a09a3115 | 107,365,336,350,821,900,000,000,000,000,000,000,000 | 9 | Fixed #68677 |
format_STACK_PUSH(const struct ofpact_stack *a, struct ds *s)
{
nxm_format_stack_push(a, s);
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 136,510,273,736,415,060,000,000,000,000,000,000,000 | 4 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
format[MagickPathExtent],
keyword[MagickPathExtent],
tag[MagickPathExtent],
value[MagickPathExtent];
double
gamma;
Image
*image;
int
c;
MagickBooleanType
status,
value_expected;
r... | 0 | [
"CWE-190"
] | ImageMagick | 7db3fa20893d557259da6e99e111954de83d2495 | 173,279,673,709,704,500,000,000,000,000,000,000,000 | 374 | https://github.com/ImageMagick/ImageMagick/issues/1713 |
UTI_TimespecToTimeval(struct timespec *ts, struct timeval *tv)
{
tv->tv_sec = ts->tv_sec;
tv->tv_usec = ts->tv_nsec / 1000;
} | 0 | [
"CWE-59"
] | chrony | 7a4c396bba8f92a3ee8018620983529152050c74 | 225,483,250,102,342,360,000,000,000,000,000,000,000 | 5 | util: add functions for common file operations
Add a function to open a file for reading, writing, or appending.
In uppercase modes errors are handled as fatal, i.e. the caller doesn't
need to check for NULL. To avoid string manipulations in the callers,
the function accepts an optional directory and suffix. New files... |
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
{
unsigned int k;
int sgn;
if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative)
k = stbi_lrot(j->code_buffer, n);
j->code_buffer = ... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 77,190,489,284,268,640,000,000,000,000,000,000,000 | 13 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
int cma_get_default_gid_type(struct cma_device *cma_dev,
u32 port)
{
if (!rdma_is_port_valid(cma_dev->device, port))
return -EINVAL;
return cma_dev->default_gid_type[port - rdma_start_port(cma_dev->device)];
} | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 194,282,768,494,253,320,000,000,000,000,000,000,000 | 8 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
static netdev_tx_t catc_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{
struct catc *catc = netdev_priv(netdev);
unsigned long flags;
int r = 0;
char *tx_buf;
spin_lock_irqsave(&catc->tx_lock, flags);
catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
tx_buf = catc->tx_buf[catc->tx_idx] + ... | 0 | [
"CWE-20",
"CWE-119"
] | linux | 2d6a0e9de03ee658a9adc3bfb2f0ca55dff1e478 | 245,915,250,317,354,170,000,000,000,000,000,000,000 | 40 | catc: Use heap buffer for memory size test
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
long strnlen_user(const char __user *str, long count)
{
unsigned long max_addr, src_addr;
if (unlikely(count <= 0))
return 0;
max_addr = user_addr_max();
src_addr = (unsigned long)str;
if (likely(src_addr < max_addr)) {
unsigned long max = max_addr - src_addr;
long retval;
if (user_access_begin(str, max... | 0 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 166,880,695,876,088,750,000,000,000,000,000,000,000 | 21 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *param, int len)
{
struct adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
return -EINVAL;
if (is_broadcast_ether_addr(param->sta_addr))
return -... | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 59,641,263,759,110,030,000,000,000,000,000,000,000 | 13 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
int MonClient::wait_auth_rotating(double timeout)
{
std::unique_lock l(monc_lock);
// Must be initialized
ceph_assert(auth != nullptr);
if (auth->get_protocol() == CEPH_AUTH_NONE)
return 0;
if (!rotating_secrets)
return 0;
ldout(cct, 10) << __func__ << " waiting for " << timeout << dendl;
ut... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 31,120,254,996,079,467,000,000,000,000,000,000,000 | 26 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
.flags = GF_FS_REG_REQUIRES_RESOLVER,
.configure_pid = dasher_configure_pid,
.process = dasher_process,
.process_event = dasher_process_event, | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 16,170,766,976,451,350,000,000,000,000,000,000,000 | 4 | fixed #2138 |
static int isVERITY(const char *type)
{
return (type && !strcmp(CRYPT_VERITY, type));
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 96,368,291,319,083,520,000,000,000,000,000,000,000 | 4 | 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... |
PHP_FUNCTION(stream_select)
{
zval *r_array, *w_array, *e_array, **sec = NULL;
struct timeval tv;
struct timeval *tv_p = NULL;
fd_set rfds, wfds, efds;
php_socket_t max_fd = 0;
int retval, sets = 0;
long usec = 0;
int set_count, max_set_count = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_C... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 148,527,690,431,066,500,000,000,000,000,000,000,000 | 101 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
QPDFWriter::unparseObject(QPDFObjectHandle object, int level,
unsigned int flags)
{
unparseObject(object, level, flags, 0, false);
} | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 336,782,253,985,977,280,000,000,000,000,000,000,000 | 5 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
end_element(PInfo pi, const char *ename) {
if (TRACE <= pi->options->trace) {
char indent[128];
if (DEBUG <= pi->options->trace) {
char buf[1024];
printf("===== end element stack(%d) =====\n", helper_stack_depth(&pi->helpers));
snprintf(buf, sizeof(buf) - 1, "</%s>", ename);
debug_stack(... | 0 | [
"CWE-20"
] | ox | e4565dbc167f0d38c3f93243d7a4fcfc391cbfc8 | 321,650,113,391,547,800,000,000,000,000,000,000,000 | 119 | Avoid crash with invalid XML passed to Oj.parse_obj() |
tun_net_change_mtu(struct net_device *dev, int new_mtu)
{
if (new_mtu < MIN_MTU || new_mtu + dev->hard_header_len > MAX_MTU)
return -EINVAL;
dev->mtu = new_mtu;
return 0;
} | 0 | [
"CWE-119"
] | linux-2.6 | 3c8a9c63d5fd738c261bd0ceece04d9c8357ca13 | 71,123,601,198,478,430,000,000,000,000,000,000,000 | 7 | tun/tap: Fix crashes if open() /dev/net/tun and then poll() it.
Fix NULL pointer dereference in tun_chr_pool() introduced by commit
33dccbb050bbe35b88ca8cf1228dcf3e4d4b3554 ("tun: Limit amount of queued
packets per device") and triggered by this code:
int fd;
struct pollfd pfd;
fd = open("/dev/net/tun", O_RDWR);
... |
_set_source_rsvg_radial_gradient (RsvgDrawingCtx * ctx,
RsvgRadialGradient * radial,
guint32 current_color_rgb, guint8 opacity, RsvgBbox bbox)
{
cairo_t *cr = ((RsvgCairoRender *) ctx->render)->cr;
cairo_pattern_t *pattern;
cairo_matrix_t m... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 2,269,802,568,285,089,300,000,000,000,000,000,000 | 48 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
TEST_F(HttpConnectionManagerConfigTest, MaxRequestHeadersKbConfigured) {
const std::string yaml_string = R"EOF(
stat_prefix: ingress_http
max_request_headers_kb: 16
route_config:
name: local_route
http_filters:
- name: envoy.filters.http.router
)EOF";
HttpConnectionManagerConfig config(parseHttpCon... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 215,275,532,770,684,700,000,000,000,000,000,000,000 | 16 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int rev_body(int s, int stype, unsigned char *context)
{
char *buf = NULL;
int i;
int ret = 1;
SSL *con;
BIO *io, *ssl_bio, *sbio;
buf = app_malloc(bufsize, "server rev buffer");
io = BIO_new(BIO_f_buffer());
ssl_bio = BIO_new(BIO_f_ssl());
if ((io == NULL) || (ssl_bio == NUL... | 1 | [
"CWE-399"
] | openssl | 380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e | 323,155,601,631,557,500,000,000,000,000,000,000,000 | 151 | CVE-2016-0798: avoid memory leak in SRP
The SRP user database lookup method SRP_VBASE_get_by_user had confusing
memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no
way of distinguishing these two cases.
Specifically, SRP servers t... |
RemoveWQ(CephContext* cct, ObjectStore *&o, time_t ti, time_t si,
ThreadPool *tp)
: ThreadPool::WorkQueueVal<pair<PGRef, DeletingStateRef> >(
"OSD::RemoveWQ", ti, si, tp), cct(cct), store(o) {} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 74,651,405,784,481,720,000,000,000,000,000,000,000 | 4 | 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 ... |
void Http2Session::OnStreamAfterWriteImpl(WriteWrap* w, int status, void* ctx) {
Http2Session* session = static_cast<Http2Session*>(ctx);
DEBUG_HTTP2SESSION2(session, "write finished with status %d", status);
// Inform all pending writes about their completion.
session->ClearOutgoing(status);
if (!(session-... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 98,738,342,171,689,840,000,000,000,000,000,000,000 | 12 | 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> |
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
if (force_o_largefile())
flags |= O_LARGEFILE;
return do_sys_open(AT_FDCWD, filename, flags, mode);
} | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 173,595,485,071,857,200,000,000,000,000,000,000,000 | 7 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
void SplashOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
int width, int height, bool invert,
bool interpolate, bool inlineImg) {
SplashCoord mat[6];
SplashOutImageMaskData imgMaskData;
if (state->getFillColorSpace()->isNonMarking()) {
return;
}
setOverprintMask(state... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 33,106,309,420,190,350,000,000,000,000,000,000,000 | 41 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
restore_prompt()
{
if (interactive) {
#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE)
# if !defined(MISSING_RL_FORCED_UPDATE_DISPLAY)
rl_forced_update_display();
# else
rl_redisplay();
# endif
#else
fputs(PROMPT, stderr);
fflush(stderr);
#endif
}
} | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 143,176,777,512,107,370,000,000,000,000,000,000,000 | 15 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
TensorBuffer* FromProtoField(Allocator* a, const TensorProto& in, int64_t n) {
CHECK_GT(n, 0);
Buffer<T>* buf = new Buffer<T>(a, n);
T* data = buf->template base<T>();
if (data == nullptr) {
buf->Unref();
return nullptr;
}
const int64_t in_n = ProtoHelper<T>::NumElements(in);
if (in_n <= 0) {
... | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 239,651,800,790,192,000,000,000,000,000,000,000,000 | 30 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
readbuf1_empty(void)
{
return (readbuf1.bh_first.b_next == NULL);
} | 0 | [
"CWE-78"
] | vim | 53575521406739cf20bbe4e384d88e7dca11f040 | 326,475,249,074,838,570,000,000,000,000,000,000,000 | 4 | patch 8.1.1365: source command doesn't check for the sandbox
Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
Solution: Check for the sandbox when sourcing a file. |
*/
static void php_wddx_serialize_number(wddx_packet *packet, zval *var)
{
char tmp_buf[WDDX_BUF_LEN];
zend_string *str = zval_get_string(var);
snprintf(tmp_buf, sizeof(tmp_buf), WDDX_NUMBER, ZSTR_VAL(str));
zend_string_release(str);
php_wddx_add_chunk(packet, tmp_buf); | 0 | [] | php-src | 366f9505a4aae98ef2f4ca39a838f628a324b746 | 324,891,066,341,413,060,000,000,000,000,000,000,000 | 9 | Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
Conflicts:
ext/wddx/wddx.c |
static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode)
{
struct inode_security_struct *isec = inode_security(inode);
struct task_security_struct *tsec = new->security;
u32 sid = current_sid();
int ret;
ret = avc_has_perm(sid, isec->sid,
SECCLASS_KERNEL_SERVICE,
KERNEL_SERVICE... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 177,284,531,221,423,100,000,000,000,000,000,000,000 | 16 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
sf_open (const char *path, int mode, SF_INFO *sfinfo)
{ SF_PRIVATE *psf ;
/* Ultimate sanity check. */
assert (sizeof (sf_count_t) == 8) ;
if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
{ sf_errno = SFE_MALLOC_FAILED ;
return NULL ;
} ;
psf_init_files (psf) ;
psf_log_printf (psf, "File : %s\n", pat... | 1 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 316,772,211,779,192,140,000,000,000,000,000,000,000 | 28 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
signal_is_pending (sig)
int sig;
{
return (pending_traps[sig]);
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 124,777,350,559,481,580,000,000,000,000,000,000,000 | 5 | bash-4.4-rc2 release |
void cgit_print_pageheader(void)
{
html("<div id='cgit'>");
if (!ctx.env.authenticated || !ctx.cfg.noheader)
print_header();
html("<table class='tabs'><tr><td>\n");
if (ctx.env.authenticated && ctx.repo) {
if (ctx.repo->readme.nr)
reporevlink("about", "about", NULL,
hc("about"), ctx.qry.head, NULL,
... | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 205,860,194,025,170,600,000,000,000,000,000,000,000 | 83 | ui-shared: prevent malicious filename from injecting headers |
static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap)
{
if (usb_set_interface(adap->dev->udev, 0, 0) < 0)
err("set interface failed");
cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config,
&adap->dev->i2c_adap);
if ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 322,985,841,748,225,400,000,000,000,000,000,000,000 | 20 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
Header(const ByteOrder& order, int v, int size, uint64_t offset):
byteOrder_(order),
version_(v),
data_size_(size),
dir_offset_(offset)
{
} | 0 | [
"CWE-617"
] | exiv2 | 1647908e00a4df7246d76678e59587e62c690dcd | 66,164,276,885,280,530,000,000,000,000,000,000,000 | 8 | fix for crash in bigtiff (issue #208) |
Status ReductionShape(InferenceContext* c) {
ShapeHandle input = c->input(0);
ShapeHandle indices;
// Older versions of TensorFlow accidentally allowed higher rank tensors like
// [[1,2]] or [[1],[2]] to represent axis=[1,2].
if (c->graph_def_version() < 21) {
indices = c->input(1);
} else {
TF_RET... | 0 | [
"CWE-125"
] | tensorflow | a0d64445116c43cf46a5666bd4eee28e7a82f244 | 332,903,579,320,707,370,000,000,000,000,000,000,000 | 56 | Prevent OOB access in QuantizeV2 shape inference
PiperOrigin-RevId: 400309614
Change-Id: I31412c71b05b4f21b677f7fa715a61499cbee39d |
static void TS_RESP_CTX_cleanup(TS_RESP_CTX *ctx)
{
TS_REQ_free(ctx->request);
ctx->request = NULL;
TS_RESP_free(ctx->response);
ctx->response = NULL;
TS_TST_INFO_free(ctx->tst_info);
ctx->tst_info = NULL;
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 53,711,996,366,795,610,000,000,000,000,000,000,000 | 9 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
int gnutls_subject_alt_names_get(gnutls_subject_alt_names_t sans,
unsigned int seq, unsigned int *san_type,
gnutls_datum_t * san,
gnutls_datum_t * othername_oid)
{
if (seq >= sans->size)
return gnutls_assert_val(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE);
if (san) {
memcpy(san, &sans->names[seq].san, ... | 0 | [] | gnutls | d6972be33264ecc49a86cd0958209cd7363af1e9 | 249,016,708,688,537,970,000,000,000,000,000,000,000 | 22 | eliminated double-free in the parsing of dist points
Reported by Robert Święcki. |
delete_all_variables (hashed_vars)
HASH_TABLE *hashed_vars;
{
hash_flush (hashed_vars, free_variable_hash_data);
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 199,901,635,746,042,920,000,000,000,000,000,000,000 | 5 | commit bash-20120224 snapshot |
id_to_memslot(struct kvm_memslots *slots, int id)
{
int index = slots->id_to_index[id];
struct kvm_memory_slot *slot;
slot = &slots->memslots[index];
WARN_ON(slot->id != id);
return slot;
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 80,112,434,342,171,120,000,000,000,000,000,000,000 | 10 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
uid_from_header (const char *p, size_t s)
{
return from_header (p, s, "uid_t",
TYPE_MINIMUM (uid_t), TYPE_MAXIMUM (uid_t),
false, false);
} | 0 | [
"CWE-125"
] | tar | d9d4435692150fa8ff68e1b1a473d187cc3fd777 | 108,197,217,747,729,460,000,000,000,000,000,000,000 | 6 | Fix memory leak in read_header
Bug reported in https://savannah.gnu.org/bugs/?59897
* src/list.c (read_header): Don't return directly from the loop.
Instead set the status and break. Return the status. Free
next_long_name and next_long_link before returning. |
AnyP::Uri::absolute() const
{
if (absolute_.isEmpty()) {
// TODO: most URL will be much shorter, avoid allocating this much
absolute_.reserveCapacity(MAX_URL);
absolute_.append(getScheme().image());
absolute_.append(":",1);
if (getScheme() != AnyP::PROTO_URN) {
a... | 0 | [
"CWE-20"
] | squid | dfd818595b54942cb1adc45f6aed95c9b706e3a8 | 275,504,619,620,986,100,000,000,000,000,000,000,000 | 30 | Merge pull request from GHSA-jvf6-h9gj-pmj6
* Add slash prefix to path-rootless or path-noscheme URLs
* Update src/anyp/Uri.cc
Co-authored-by: Alex Rousskov <rousskov@measurement-factory.com>
* restore file trailer GH auto-removes
* Remove redundant path-empty check
* Removed stale comment left behind by b2ab59a
... |
evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg) {
struct request *const req = (struct request *) arg;
struct evdns_base *base = req->base;
(void) fd;
(void) events;
log(EVDNS_LOG_DEBUG, "Request %p timed out", arg);
EVDNS_LOCK(base);
if (req->tx_count >= req->base->global_max_retra... | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 243,737,372,598,739,640,000,000,000,000,000,000,000 | 36 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
{
struct fxsave *fxsave = (struct fxsave *)&vcpu->arch.guest_fx_image;
vcpu_load(vcpu);
memcpy(fpu->fpr, fxsave->st_space, 128);
fpu->fcw = fxsave->cwd;
fpu->fsw = fxsave->swd;
fpu->ftwx = fxsave->twd;
fpu->last_opcode = fxsave->fop;
... | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 51,525,573,860,426,650,000,000,000,000,000,000,000 | 19 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
dwg_paper_space_ref (Dwg_Data *dwg)
{
if (dwg->header_vars.BLOCK_RECORD_PSPACE
&& dwg->header_vars.BLOCK_RECORD_PSPACE->obj)
return dwg->header_vars.BLOCK_RECORD_PSPACE;
return dwg->block_control.paper_space && dwg->block_control.paper_space->obj
? dwg->block_control.paper_space
... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 171,073,370,899,892,650,000,000,000,000,000,000,000 | 9 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
bool btd_adapter_get_pairable(struct btd_adapter *adapter)
{
if (adapter->current_settings & MGMT_SETTING_BONDABLE)
return true;
return false;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 19,937,257,668,045,161,000,000,000,000,000,000,000 | 7 | 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. |
void testCopy()
{
cxxtools::QueryParams q;
q.add("p1", "value1");
q.add("p2", "value2");
q.add("value3");
cxxtools::QueryParams q2 = q;
CXXTOOLS_UNIT_ASSERT(q2.has("p1"));
CXXTOOLS_UNIT_ASSERT(q2.has("p2"));
... | 0 | [
"CWE-399"
] | cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | 330,751,395,139,047,500,000,000,000,000,000,000,000 | 14 | fix parsing double % in query parameters |
int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
{
int from, to, merge, todo;
struct skb_frag_struct *fragfrom, *fragto;
BUG_ON(shiftlen > skb->len);
BUG_ON(skb_headlen(skb)); /* Would corrupt stream */
todo = shiftlen;
from = 0;
to = skb_shinfo(tgt)->nr_frags;
fragfrom = &skb_shinfo(skb)... | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 95,164,073,028,772,950,000,000,000,000,000,000,000 | 115 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
static void kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
struct mm_struct *mm,
unsigned long start,
unsigned long end)
{
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int need_tlb_flush = 0, idx;
idx = srcu_read_lock(&kvm->srcu);
spin_lock(&kvm->mmu_lock);
/*
* The... | 0 | [
"CWE-20",
"CWE-787"
] | linux | fa3d315a4ce2c0891cdde262562e710d95fba19e | 276,705,264,350,318,460,000,000,000,000,000,000,000 | 26 | KVM: Validate userspace_addr of memslot when registered
This way, we can avoid checking the user space address many times when
we read the guest memory.
Although we can do the same for write if we check which slots are
writable, we do not care write now: reading the guest memory happens
more often than writing.
[avi... |
int LZ4IO_setStreamChecksumMode(int xxhash)
{
streamChecksum = (xxhash != 0);
return streamChecksum;
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 115,341,668,419,151,900,000,000,000,000,000,000,000 | 5 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static void rng_backend_free_requests(RngBackend *s)
{
GSList *i;
for (i = s->requests; i; i = i->next) {
rng_backend_free_request(i->data);
}
g_slist_free(s->requests);
s->requests = NULL;
} | 0 | [
"CWE-119"
] | qemu | 60253ed1e6ec6d8e5ef2efe7bf755f475dce9956 | 9,893,640,541,527,786,000,000,000,000,000,000,000 | 11 | rng: add request queue support to rng-random
Requests are now created in the RngBackend parent class and the
code path is shared by both rng-egd and rng-random.
This commit fixes the rng-random implementation which processed
only one request at a time and simply discarded all but the most
recent one. In the guest thi... |
request_finished(struct request *const req, struct request **head, int free_handle) {
struct evdns_base *base = req->base;
int was_inflight = (head != &base->req_waiting_head);
EVDNS_LOCK(base);
ASSERT_VALID_REQUEST(req);
if (head)
evdns_request_remove(req, head);
log(EVDNS_LOG_DEBUG, "Removing timeout for re... | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 55,171,596,697,467,350,000,000,000,000,000,000,000 | 58 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
HandleAddressMessage(address_message_t *msg, undo_lists_t *lists)
{
DWORD err;
PMIB_UNICASTIPADDRESS_ROW addr_row;
BOOL add = msg->header.type == msg_add_address;
addr_row = malloc(sizeof(*addr_row));
if (addr_row == NULL)
{
return ERROR_OUTOFMEMORY;
}
InitializeUnicastIpAddres... | 0 | [
"CWE-415"
] | openvpn | 1394192b210cb3c6624a7419bcf3ff966742e79b | 117,019,810,602,425,200,000,000,000,000,000,000,000 | 64 | Fix potential double-free() in Interactive Service (CVE-2018-9336)
Malformed input data on the service pipe towards the OpenVPN interactive
service (normally used by the OpenVPN GUI to request openvpn instances
from the service) can result in a double free() in the error handling code.
This usually only leads to a pr... |
static guint parse_rle_data_grayscale(TGAContext *ctx)
{
TGAColor tone;
guint rle_num, raw_num;
guchar *s, tag;
guint n;
g_return_val_if_fail(ctx->in->size > 0, 0);
s = ctx->in->data;
for (n = 0; n < ctx->in->size; ) {
tag = *s;
s++, n++;
if (tag & 0x80) {
if (n + (ctx->pbuf->n_channels == 4 ? 2 : 1) ... | 0 | [
"CWE-119"
] | gdk-pixbuf | edf6fb8d856574bc3bb3a703037f56533229267c | 248,654,407,893,506,860,000,000,000,000,000,000,000 | 56 | tga: Wrap TGAColormap struct in its own API
Instead of poking into it directly. |
static int bpf_raw_tp_link_fill_link_info(const struct bpf_link *link,
struct bpf_link_info *info)
{
struct bpf_raw_tp_link *raw_tp_link =
container_of(link, struct bpf_raw_tp_link, link);
char __user *ubuf = u64_to_user_ptr(info->raw_tracepoint.tp_name);
const char *tp_name = raw_tp_link->btp->tp->name;
u... | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 315,378,834,855,516,750,000,000,000,000,000,000,000 | 33 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
MagickExport MagickBooleanType AnnotateImage(Image *image,
const DrawInfo *draw_info,ExceptionInfo *exception)
{
char
*p,
primitive[MagickPathExtent],
*text,
**textlist;
DrawInfo
*annotate,
*annotate_info;
GeometryInfo
geometry_info;
MagickBooleanType
status;
PointInfo
... | 0 | [
"CWE-125"
] | ImageMagick | 7c2c5ba5b8e3a0b2b82f56c71dfab74ed4006df7 | 233,492,513,840,079,600,000,000,000,000,000,000,000 | 315 | https://github.com/ImageMagick/ImageMagick/issues/1588 |
LoRaMacStatus_t LoRaMacQueryTxPossible( uint8_t size, LoRaMacTxInfo_t* txInfo )
{
CalcNextAdrParams_t adrNext;
uint32_t adrAckCounter = MacCtx.NvmCtx->AdrAckCounter;
int8_t datarate = MacCtx.NvmCtx->MacParamsDefaults.ChannelsDatarate;
int8_t txPower = MacCtx.NvmCtx->MacParamsDefaults.ChannelsTxPowe... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 301,343,557,842,879,750,000,000,000,000,000,000,000 | 57 | Added received buffer size checks. |
qf_init_process_nextline(
qf_list_T *qfl,
efm_T *fmt_first,
qfstate_T *state,
qffields_T *fields)
{
int status;
// Get the next line from a file/buffer/list/string
status = qf_get_nextline(state);
if (status != QF_OK)
return status;
status = qf_parse_line(qfl, state->linebuf, state->lin... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 192,714,157,167,370,530,000,000,000,000,000,000,000 | 37 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static char *php_gethostbyname(char *name)
{
struct hostent *hp;
struct in_addr in;
hp = gethostbyname(name);
if (!hp || !*(hp->h_addr_list)) {
return estrdup(name);
}
memcpy(&in.s_addr, *(hp->h_addr_list), sizeof(in.s_addr));
return estrdup(inet_ntoa(in));
} | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 2fefae47716d501aec41c1102f3fd4531f070b05 | 58,203,624,759,461,715,000,000,000,000,000,000,000 | 15 | Fixed Sec Bug #67717 segfault in dns_get_record CVE-2014-3597
Incomplete fix for CVE-2014-4049
Check possible buffer overflow
- pass real buffer end to dn_expand calls
- check buffer len before each read |
EmpathyAdiumData *
empathy_adium_data_new (const gchar *path)
{
EmpathyAdiumData *data;
GHashTable *info;
info = empathy_adium_info_new (path);
data = empathy_adium_data_new_with_info (path, info);
g_hash_table_unref (info);
return data; | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 192,566,411,800,384,720,000,000,000,000,000,000,000 | 11 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
static struct ring_buffer *ring_buffer_get(struct perf_event *event)
{
struct ring_buffer *rb;
rcu_read_lock();
rb = rcu_dereference(event->rb);
if (rb) {
if (!atomic_inc_not_zero(&rb->refcount))
rb = NULL;
}
rcu_read_unlock();
return rb;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 290,555,886,429,786,170,000,000,000,000,000,000,000 | 14 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
tls_client_basic_ctx_init(SSL_CTX * ctx,
host_item * host, smtp_transport_options_block * ob, tls_ext_ctx_cb * cbinfo
)
{
int rc;
/* stick to the old behaviour for compatibility if tls_verify_certificates is
set but both tls_verify_hosts and tls_try_verify_hosts is not set. Check only
the specified host... | 0 | [
"CWE-264"
] | exim | 43ba2742c700d625dcdcdaf7bbadc2f72776854a | 153,387,995,698,469,650,000,000,000,000,000,000,000 | 37 | Fix CVE-2016-1531
Add keep_environment, add_environment.
Change the working directory to "/" during the early startup
phase.
(cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0)
(cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832)
(cherry picked from commit 14b82c8b736c8ed24eda... |
static void free_trace_buffer(struct trace_buffer *buf)
{
if (buf->buffer) {
ring_buffer_free(buf->buffer);
buf->buffer = NULL;
free_percpu(buf->data);
buf->data = NULL;
}
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 43,691,073,484,487,520,000,000,000,000,000,000,000 | 9 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static void terminate_pending_irp_threads(SERIAL_DEVICE* serial)
{
ULONG_PTR* ids;
int i, nbIds;
nbIds = ListDictionary_GetKeys(serial->IrpThreads, &ids);
WLog_Print(serial->log, WLOG_DEBUG, "Terminating %d IRP thread(s)", nbIds);
for (i = 0; i < nbIds; i++)
{
HANDLE irpThread;
ULONG_PTR id = ids[i];
irpTh... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 72,764,610,907,873,080,000,000,000,000,000,000,000 | 27 | Fixed oob read in irp_write and similar |
TEST_F(QueryPlannerTest, NegationCantUseSparseIndex) {
// false means not multikey, true means sparse
addIndex(BSON("i" << 1), false, true);
runQuery(fromjson("{i: {$ne: 4}}"));
assertNumSolutions(1U);
assertSolutionExists("{cscan: {dir: 1}}");
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 224,491,270,161,673,700,000,000,000,000,000,000,000 | 8 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
calculateNumTiles (int *numTiles,
int numLevels,
int min, int max,
int size,
LevelRoundingMode rmode)
{
for (int i = 0; i < numLevels; i++)
{
// use 64 bits to avoid int overflow if size is large.
Int64 l = levelSize (min, max, i, rmode);
numTiles[i] = (l + size - 1) ... | 0 | [
"CWE-190"
] | openexr | 2a18ed424a854598c2a20b5dd7e782b436a1e753 | 70,611,141,410,577,230,000,000,000,000,000,000,000 | 13 | Avoid overflow in calculateNumTiles when size=MAX_INT (#825)
* Avoid overflow in calculateNumTiles when size=MAX_INT
Signed-off-by: Cary Phillips <cary@ilm.com>
* Compute level size with 64 bits to avoid overflow
Signed-off-by: Cary Phillips <cary@ilm.com> |
ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode)
{
HeapTuple tuple;
AttrNumber attnum;
Relation attr_rel;
List *indexoidlist;
ListCell *indexoidscan;
/*
* lookup the attribute
*/
attr_rel = heap_open(AttributeRelationId, RowExclusiveLock);
tuple = SearchSysCacheCopyAttName(Rela... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 328,398,602,306,498,000,000,000,000,000,000,000,000 | 91 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void wq_barrier_func(struct work_struct *work)
{
struct wq_barrier *barr = container_of(work, struct wq_barrier, work);
complete(&barr->done);
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 180,125,799,875,856,660,000,000,000,000,000,000,000 | 5 | 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... |
void Connection::CleanPreMaster()
{
if (pre_master_secret_) {
volatile opaque* p = pre_master_secret_;
clean(p, pre_secret_len_, random_);
ysArrayDelete(pre_master_secret_);
pre_master_secret_ = 0;
}
} | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 293,824,982,120,992,000,000,000,000,000,000,000,000 | 10 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
{
int ret;
ret = X509_check_issued(issuer, x);
if (ret == X509_V_OK)
return 1;
/* If we haven't asked for issuer errors don't set ctx */
if (!(ctx->param->flags & X509_V_FLAG_CB_ISSUER_CHECK))
return 0;
ctx->err... | 0 | [] | openssl | a3baa171053547488475709c7197592c66e427cf | 34,126,455,155,366,148,000,000,000,000,000,000,000 | 15 | Fix missing ok=0 with locally blacklisted CAs
Also in X509_verify_cert() avoid using "i" not only as a loop
counter, but also as a trust outcome and as an error ordinal.
Finally, make sure that all "goto end" jumps return an error, with
"end" renamed to "err" accordingly.
[ The 1.1.0 version of X509_verify_cert() is... |
static int ucma_free_ctx(struct ucma_context *ctx)
{
int events_reported;
struct ucma_event *uevent, *tmp;
LIST_HEAD(list);
ucma_cleanup_multicast(ctx);
/* Cleanup events not yet reported to the user. */
mutex_lock(&ctx->file->mut);
list_for_each_entry_safe(uevent, tmp, &ctx->file->event_list, list) {
if (ue... | 0 | [
"CWE-416"
] | linux | f5449e74802c1112dea984aec8af7a33c4516af1 | 334,028,628,789,891,950,000,000,000,000,000,000,000 | 34 | RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy
ucma_destroy_id() assumes that all things accessing the ctx will do so via
the xarray. This assumption violated only in the case the FD is being
closed, then the ctx is reached via the ctx_list. Normally this is OK
since ucma_destroy_id() cannot run concu... |
assegment_dup_all (struct assegment *seg)
{
struct assegment *new = NULL;
struct assegment *head = NULL;
while (seg)
{
if (head)
{
new->next = assegment_dup (seg);
new = new->next;
}
else
head = new = assegment_dup (seg);
seg = seg->next;... | 0 | [
"CWE-20"
] | quagga | 7a42b78be9a4108d98833069a88e6fddb9285008 | 10,755,230,473,389,850,000,000,000,000,000,000,000 | 19 | bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up. The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message. This patch addresses... |
static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
int rc = -ENOIOCTLCMD;
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;
switch (cmd) {
/* Protocol layer */
case TIOCOUTQ: {
long amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amou... | 0 | [
"CWE-200"
] | linux-2.6 | 3d392475c873c10c10d6d96b94d092a34ebd4791 | 134,364,753,918,784,330,000,000,000,000,000,000,000 | 58 | appletalk: fix atalk_getname() leak
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
uint32_t readString(folly::fbstring& str) {
T_VIRTUAL_CALL();
std::string data;
uint32_t ret = readString_virt(data);
str = data;
return ret;
} | 0 | [
"CWE-20",
"CWE-755"
] | fbthrift | 01686e15ec77ccb4d49a77d5bce3a01601e54d64 | 284,758,871,297,010,380,000,000,000,000,000,000,000 | 7 | Throw on skipping an invalid type.
Summary:
Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to
can cause thrift to loop unboundedly.
Reviewed By: spalamarchuk
Differential Revision: D15102451
fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f |
static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
int evpd, int pc, void **inq, Error **errp)
{
int full_size;
struct scsi_task *task = NULL;
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64);
if (task == NULL || task->status != S... | 0 | [
"CWE-125"
] | qemu | ff0507c239a246fd7215b31c5658fc6a3ee1e4c5 | 278,771,147,066,052,600,000,000,000,000,000,000,000 | 37 | block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb
There is an overflow, the source 'datain.data[2]' is 100 bytes,
but the 'ss' is 252 bytes.This may cause a security issue because
we can access a lot of unrelated memory data.
The len for sbp copy data should take the minimum of mx_sb_len and
sb_len_wr, no... |
DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of the line")
{
if (Currentbuf->firstLine == NULL)
return;
while (Currentbuf->currentLine->prev && Currentbuf->currentLine->bpos)
cursorUp0(Currentbuf, 1);
Currentbuf->pos = 0;
arrangeCursor(Currentbuf);
displayBuffer(Currentbuf, B_NORMAL);
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 264,349,969,788,666,600,000,000,000,000,000,000,000 | 10 | Make temporary directory safely when ~/.w3m is unwritable |
nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_readdirargs *args)
{
int len;
u32 max_blocksize = svc_max_payload(rqstp);
p = decode_fh(p, &args->fh);
if (!p)
return 0;
p = xdr_decode_hyper(p, &args->cookie);
args->verf = p; p += 2;
args->dircount = ntohl(*p++);
args->... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 160,801,202,967,746,780,000,000,000,000,000,000,000 | 24 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
void SetName(v8::Isolate* isolate, const std::string& name) {
content::RenderFrame* render_frame;
if (!MaybeGetRenderFrame(isolate, "setName", &render_frame))
return;
render_frame->GetWebFrame()->SetName(blink::WebString::FromUTF8(name));
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 83,412,467,395,267,970,000,000,000,000,000,000,000 | 7 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static void nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data)
{
if (nfs4_setup_sequence(NFS_SERVER(data->inode),
&data->args.seq_args,
&data->res.seq_res,
task))
return;
rpc_call_start(task);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 20e0fa98b751facf9a1101edaefbc19c82616a68 | 46,848,215,447,306,820,000,000,000,000,000,000,000 | 9 | Fix length of buffer copied in __nfs4_get_acl_uncached
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap... |
void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
{
struct inode *inode = cifs_file->dentry->d_inode;
struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
struct TCP_Server_Info *server = tcon->ses->server;
struct cifsInodeInfo *cifsi = CIFS_I(inode);
struct super_block *sb = inode->i_sb;
struct cifs_sb_inf... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 277,281,432,331,465,280,000,000,000,000,000,000,000 | 75 | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... |
**/
CImg<T> operator&(const char *const expression) const {
return (+*this)&=expression; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 239,385,361,655,501,140,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
*/
static bool bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq)
{
bfq_log_bfqq(bfqq->bfqd, bfqq,
"may_budget_timeout: wait_request %d left %d timeout %d",
bfq_bfqq_wait_request(bfqq),
bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3,
bfq_bfqq_budget_timeout(bfqq));
return (!bfq_bfqq_wait_reque... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 160,278,537,886,612,220,000,000,000,000,000,000,000 | 13 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
struct t_hashtable *hashtable)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hashtable *value;
/* make C compiler happy */
(void) plugin;
if (!info_name || !info_name[0])
return NULL... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 36,300,090,142,926,310,000,000,000,000,000,000,000 | 41 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
void do_request(int fd) override {
conn->handle_write();
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 90,119,982,313,270,160,000,000,000,000,000,000,000 | 3 | 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 ... |
TEST_P(ProtocolIntegrationTest, AddBodyToResponseAndWaitForIt) {
// filters are prepended, so add them in reverse order
config_helper_.addFilter(R"EOF(
name: add-body-filter
)EOF");
config_helper_.addFilter(R"EOF(
name: wait-for-whole-request-and-response-filter
)EOF");
initialize();
codec_client_ = m... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 178,078,803,336,707,180,000,000,000,000,000,000,000 | 21 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static void prune_dead_connections(struct SessionHandle *data)
{
struct timeval now = Curl_tvnow();
long elapsed = Curl_tvdiff(now, data->state.conn_cache->last_cleanup);
if(elapsed >= 1000L) {
Curl_conncache_foreach(data->state.conn_cache, data,
call_disconnect_if_dead);
data-... | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 128,817,130,736,529,370,000,000,000,000,000,000,000 | 11 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
RemoveForeignDataWrapperById(Oid fdwId)
{
HeapTuple tp;
Relation rel;
rel = table_open(ForeignDataWrapperRelationId, RowExclusiveLock);
tp = SearchSysCache1(FOREIGNDATAWRAPPEROID, ObjectIdGetDatum(fdwId));
if (!HeapTupleIsValid(tp))
elog(ERROR, "cache lookup failed for foreign-data wrapper %u", fdwId);
Cata... | 0 | [
"CWE-94"
] | postgres | 7e92f78abe80e4b30e648a40073abb59057e21f8 | 246,101,625,933,908,800,000,000,000,000,000,000,000 | 18 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
ecma_finalize_lit_storage (void)
{
#if JERRY_ESNEXT
ecma_free_symbol_list (JERRY_CONTEXT (symbol_list_first_cp));
#endif /* JERRY_ESNEXT */
ecma_free_string_list (JERRY_CONTEXT (string_list_first_cp));
ecma_free_number_list (JERRY_CONTEXT (number_list_first_cp));
#if JERRY_BUILTIN_BIGINT
ecma_free_bigint_list (... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 41,655,581,956,905,262,000,000,000,000,000,000,000 | 11 | 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 |
HttpTransact::is_response_cacheable(State* s, HTTPHdr* request, HTTPHdr* response)
{
// If the use_client_target_addr is specified but the client
// specified OS addr does not match any of trafficserver's looked up
// host addresses, do not allow cache. This may cause DNS cache poisoning
// of other trafficser... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 282,576,975,139,190,360,000,000,000,000,000,000,000 | 221 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
test_multi_step_fail (Test *test,
gconstpointer data)
{
GHashTable *headers = NULL;
gint spot = 0;
gchar *id = NULL;
gchar *prompt = NULL;
const ErrorMultiFixture *fix = data;
if (fix->message)
cockpit_expect_message (fix->message);
for (spot = 0; fix->headers[spot]; spot++)
... | 0 | [] | cockpit | c51f6177576d7e12614c64d316cf0b67addd17c9 | 67,064,032,954,292,310,000,000,000,000,000,000,000 | 94 | ws: Fix bug parsing invalid base64 headers
The len parameter to g_base64_decode_inplace() is a inout
parameter, and needs to be initialized. Lets just use
the simpler g_base64_decode() function. This fixes a segfault.
Closes #10819 |
int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa)
{
return ASN1_i2d_fp_of_const(DSA,i2d_DSAPrivateKey,fp,dsa);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 214,332,281,083,885,900,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
static char *Sys_PIDFileName( void )
{
return va( "%s/%s", Sys_DefaultHomePath( ), PID_FILENAME );
} | 0 | [
"CWE-59"
] | ioq3 | b5acc31a4da72cc3a4a6d88facb15b6214d745c6 | 188,782,516,672,117,270,000,000,000,000,000,000,000 | 4 | CVE-2012-3345 |
TfLiteStatus Rfft2dHelper(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
const float* input_data = GetTensorData<float>(input);
const TfLiteTensor* fft_length;
TF_LITE_ENSURE_OK(context,
... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 245,261,777,038,159,900,000,000,000,000,000,000,000 | 76 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
const DyldExportsTrie* Binary::dyld_exports_trie() const {
return command<DyldExportsTrie>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 232,469,857,208,807,370,000,000,000,000,000,000,000 | 3 | Resolve #764 |
static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_delegation *delegation;
struct nfs4_opendata *opendata;
fmode_t delegation_type = 0;
int status;
opendata = nfs4_open_recoverdata_alloc(ctx, state,
NFS4_OPEN_CLAIM_PREVIOUS);
if (IS_ERR(opendata))
return PT... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 48,014,099,122,456,730,000,000,000,000,000,000,000 | 21 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
DnsOverTlsMode dns_server_get_dns_over_tls_mode(DnsServer *s) {
assert(s);
if (s->link)
return link_get_dns_over_tls_mode(s->link);
return manager_get_dns_over_tls_mode(s->manager);
} | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 222,000,969,907,145,570,000,000,000,000,000,000,000 | 8 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
uint32_t Image::byteSwap(uint32_t value,bool bSwap) const
{
uint32_t result = 0;
result |= (value & 0x000000FF) << 24;
result |= (value & 0x0000FF00) << 8;
result |= (value & 0x00FF0000) >> 8;
result |= (value & 0xFF000000) >> 24;
return bSwap ? result : value;
... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 259,557,259,303,238,700,000,000,000,000,000,000,000 | 9 | Fix https://github.com/Exiv2/exiv2/issues/55 |
CModule::EModRet CModule::OnUserPartMessage(CPartMessage& Message) {
CString sChan = Message.GetTarget();
CString sReason = Message.GetReason();
EModRet ret = OnUserPart(sChan, sReason);
Message.SetTarget(sChan);
Message.SetReason(sReason);
return ret;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 141,975,748,052,041,280,000,000,000,000,000,000,000 | 8 | 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 |
ClientHttpRequest::initRequest(HttpRequest *aRequest)
{
assignRequest(aRequest);
if (const auto csd = getConn()) {
if (!csd->notes()->empty())
request->notes()->appendNewOnly(csd->notes().getRaw());
}
// al is created in the constructor
assert(al);
if (!al->request) {
... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 225,119,671,287,357,800,000,000,000,000,000,000,000 | 15 | Handle more Range requests (#790)
Also removed some effectively unused code. |
reset_tty_settings(int fd, TTY * tty_settings)
{
GET_TTY(fd, tty_settings);
#ifdef TERMIOS
#if defined(VDISCARD) && defined(CDISCARD)
reset_char(VDISCARD, CDISCARD);
#endif
reset_char(VEOF, CEOF);
reset_char(VERASE, CERASE);
#if defined(VFLUSH) && defined(CFLUSH)
reset_char(VFLUSH, CFLUSH);
#endif
... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 268,379,132,531,861,740,000,000,000,000,000,000,000 | 138 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
R_API void r_config_restore(RConfigHold *h) {
RListIter *iter;
RConfigHoldChar *hchar;
RConfigHoldNum *hnum;
if (h) {
r_list_foreach (h->list_num, iter, hnum) {
(void)r_config_set_i (h->cfg, hnum->key, hnum->value);
}
r_list_foreach (h->list_char, iter, hchar) {
(void)r_config_set (h->cfg, hchar->key, h... | 0 | [
"CWE-416"
] | radare2 | f85bc674b2a2256a364fe796351bc1971e106005 | 95,456,247,180,003,840,000,000,000,000,000,000,000 | 13 | Fix #7698 - UAF in r_config_set when loading a dex |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.