func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
QPDF::readHPageOffset(BitStream h)
{
// All comments referring to the PDF spec refer to the spec for
// version 1.4.
HPageOffset& t = this->m->page_offset_hints;
t.min_nobjects = h.getBits(32); // 1
t.first_page_offset = h.getBits(32); // 2
t.nbits_delta_nobjects = h.getBits(16); ... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 319,878,917,416,900,500,000,000,000,000,000,000,000 | 48 | 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 ... |
bool ContentSettingsObserver::IsWhitelistedForContentSettings() const {
// Whitelist ftp directory listings, as they require JavaScript to function
// properly.
if (!render_frame()) {
return false;
}
if (render_frame()->IsFTPDirectoryListing())
return true;
WebFrame* web_frame = render_frame()->Ge... | 0 | [
"CWE-20",
"CWE-200"
] | muon | c18663aa171c6cdf03da3e8c70df8663645b97c4 | 290,148,253,308,358,850,000,000,000,000,000,000,000 | 20 | Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer |
Status getCurrentUserRoles(OperationContext* opCtx,
AuthorizationManager* authzManager,
const UserName& userName,
stdx::unordered_set<RoleName>* roles) {
auto swUser = authzManager->acquireUser(opCtx, userName);
if (!swUser.isOK())... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 182,124,633,611,993,860,000,000,000,000,000,000,000 | 16 | SERVER-38984 Validate unique User ID on UserCache hit |
void posix_cpu_timers_exit(struct task_struct *tsk)
{
cleanup_timers(tsk->cpu_timers);
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 139,799,464,381,555,380,000,000,000,000,000,000,000 | 4 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
static int ip6ip6_gro_complete(struct sk_buff *skb, int nhoff)
{
skb->encapsulation = 1;
skb_shinfo(skb)->gso_type |= SKB_GSO_IPXIP6;
return ipv6_gro_complete(skb, nhoff);
} | 0 | [
"CWE-125"
] | linux | 2423496af35d94a87156b063ea5cedffc10a70a1 | 294,892,888,267,862,780,000,000,000,000,000,000,000 | 6 | ipv6: Prevent overrun when parsing v6 header options
The KASAN warning repoted below was discovered with a syzkaller
program. The reproducer is basically:
int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP);
send(s, &one_byte_of_data, 1, MSG_MORE);
send(s, &more_than_mtu_bytes_data, 2000, 0);
The socket() call set... |
ipx_netbios_print(netdissect_options *ndo,
const u_char *data, u_int length)
{
/*
* this is a hack till I work out how to parse the rest of the
* NetBIOS-over-IPX stuff
*/
int i;
const u_char *maxbuf;
maxbuf = data + length;
/* Don't go past the end of the captured ... | 0 | [
"CWE-125"
] | tcpdump | 96480ab95308cd9234b4f09b175ebf60e17792c6 | 319,826,992,090,240,340,000,000,000,000,000,000,000 | 28 | (for 4.9.3) SMB: Add two missing bounds checks |
com_quit(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
status.exit_status=0;
return 1;
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 226,600,518,840,823,060,000,000,000,000,000,000,000 | 6 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void read_final_goodbye(int f_in, int f_out)
{
int i, iflags, xlen;
uchar fnamecmp_type;
char xname[MAXPATHLEN];
shutting_down = True;
if (protocol_version < 29)
i = read_int(f_in);
else {
i = read_ndx_and_attrs(f_in, f_out, &iflags, &fnamecmp_type, xname, &xlen);
if (protocol_version >= 31 && i ==... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 170,096,593,215,175,300,000,000,000,000,000,000,000 | 32 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
http_isfiltered(const struct http *fm, unsigned u, unsigned how)
{
const char *e;
const struct http_hdrflg *f;
if (fm->hdf[u] & HDF_FILTER)
return (1);
e = strchr(fm->hd[u].b, ':');
if (e == NULL)
return (0);
f = http_hdr_flags(fm->hd[u].b, e);
return (f != NULL && f->flag & how);
} | 1 | [
"CWE-703"
] | varnish-cache | c5fd097e5cce8b461c6443af02b3448baef2491d | 122,529,399,994,073,190,000,000,000,000,000,000,000 | 13 | Do not call http_hdr_flags() on pseudo-headers
In http_EstimateWS(), all headers are passed to the http_isfiltered()
function to calculate how many bytes is needed to serialize the entire
struct http. http_isfiltered() will check the headers for whether they are
going to be filtered out later and if so skip them.
How... |
acl_fetch_chdr_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
if (!txn)
return 0;
if (txn->req.msg_state < HTTP_MSG_BODY)
return 0;
if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
/* ensure the indexes are not affect... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 237,200,924,680,389,000,000,000,000,000,000,000,000 | 17 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
Bool gf_isom_box_check_unique(GF_List *children, GF_Box *a)
{
u32 i, count;
if (!children) return GF_TRUE;
count = gf_list_count(children);
for (i=0; i<count; i++) {
GF_Box *c = gf_list_get(children, i);
if (c==a) continue;
if (c->type==a->type) return GF_FALSE;
}
return GF_TRUE; | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 219,254,398,119,176,760,000,000,000,000,000,000,000 | 12 | fixed #1768 |
f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
{
char_u *p = NULL;
#ifdef FEAT_SYN_HL
int id;
char_u *what;
char_u *mode;
char_u modebuf[NUMBUFLEN];
int modec;
id = (int)tv_get_number(&argvars[0]);
what = tv_get_string(&argvars[1]);
if (argvars[2].v_type != VAR_UNKNOWN)
... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 156,808,070,275,453,240,000,000,000,000,000,000,000 | 87 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
rfbSendSupportedMessages(rfbClientPtr cl)
{
rfbFramebufferUpdateRectHeader rect;
rfbSupportedMessages msgs;
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader
+ sz_rfbSupportedMessages > UPDATE_BUF_SIZE) {
if (!rfbSendUpdateBuf(cl))
return FALSE;
}
rect.encodin... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 139,786,454,483,157,000,000,000,000,000,000,000,000 | 56 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
sig_handler window_resize(int sig)
{
struct winsize window_size;
if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0)
terminal_width= window_size.ws_col;
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 108,870,173,110,509,530,000,000,000,000,000,000,000 | 7 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
struct ipv6_devconf *devconf, u32 portid,
u32 seq, int event, unsigned int flags,
int type)
{
struct nlmsghdr *nlh;
struct netconfmsg *ncm;
nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct netconfmsg),
fl... | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 210,594,746,001,842,450,000,000,000,000,000,000,000 | 40 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *dim = NULL;
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
if (IS_CV == IS_VAR && !container) {
zend_error_noreturn(E_ERR... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 324,330,055,428,913,100,000,000,000,000,000,000,000 | 23 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void MDSDaemon::_handle_mds_map(MDSMap *oldmap)
{
MDSMap::DaemonState new_state = mdsmap->get_state_gid(mds_gid_t(monc->get_global_id()));
// Normal rankless case, we're marked as standby
if (new_state == MDSMap::STATE_STANDBY) {
beacon.set_want_state(mdsmap, new_state);
dout(1) << "handle_mds_map standb... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 224,464,739,419,705,750,000,000,000,000,000,000,000 | 25 | 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 ... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteMulParams*>(node->builtin_data);
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input1 = GetInput(context, node, kInputTensor1);
const TfLiteTensor* input2 = GetInput(context, nod... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 320,636,433,887,139,200,000,000,000,000,000,000,000 | 25 | [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... |
static int bcm_rx_thr_flush(struct bcm_op *op)
{
int updated = 0;
if (op->nframes > 1) {
unsigned int i;
/* for MUX filter we start at index 1 */
for (i = 1; i < op->nframes; i++)
updated += bcm_rx_do_flush(op, i);
} else {
/* for RX_FILTER_ID and simple filter */
updated += bcm_rx_do_flush(op, 0);
... | 0 | [
"CWE-362"
] | linux | d5f9023fa61ee8b94f37a93f08e94b136cf1e463 | 90,857,128,833,859,870,000,000,000,000,000,000,000 | 18 | can: bcm: delay release of struct bcm_op after synchronize_rcu()
can_rx_register() callbacks may be called concurrently to the call to
can_rx_unregister(). The callbacks and callback data, though, are
protected by RCU and the struct sock reference count.
So the callback data is really attached to the life of sk, mean... |
int nfc_dep_link_down(struct nfc_dev *dev)
{
int rc = 0;
pr_debug("dev_name=%s\n", dev_name(&dev->dev));
if (!dev->ops->dep_link_down)
return -EOPNOTSUPP;
device_lock(&dev->dev);
if (!device_is_registered(&dev->dev)) {
rc = -ENODEV;
goto error;
}
if (dev->dep_link_up == false) {
rc = -EALREADY;
go... | 1 | [
"CWE-416"
] | linux | da5c0f119203ad9728920456a0f52a6d850c01cd | 265,221,450,712,098,920,000,000,000,000,000,000,000 | 35 | nfc: replace improper check device_is_registered() in netlink related functions
The device_is_registered() in nfc core is used to check whether
nfc device is registered in netlink related functions such as
nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered()
is protected by device_lock, there is ... |
bool operator==(absl::string_view rhs) const { return getStringView() == rhs; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 35,056,934,650,550,720,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
main (int argc _GL_UNUSED, char **argv)
{
struct timespec result;
struct timespec result2;
struct timespec expected;
struct timespec now;
const char *p;
int i;
long gmtoff;
time_t ref_time = 1304250918;
/* Set the time zone to US Eastern time with the 2012 rules. This
should disable any leap se... | 0 | [] | gnulib | 94e01571507835ff59dd8ce2a0b56a4b566965a4 | 17,995,844,621,108,712,000,000,000,000,000,000,000 | 341 | time_rz: fix heap buffer overflow vulnerability
This issue has been assigned CVE-2017-7476 and was
detected with American Fuzzy Lop 2.41b run on the
coreutils date(1) program with ASAN enabled.
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x...
WRITE of size 8 at 0x60d00000cff8 thread T0
#1 0x443020... |
data_available (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
NMVPNCPlugin *plugin = NM_VPNC_PLUGIN (data);
NMVPNCPluginPrivate *priv = NM_VPNC_PLUGIN_GET_PRIVATE (plugin);
GError *error = NULL;
Pipe *pipe = NULL;
gsize bytes_read = 0;
GIOStatus status;
/* Figure o... | 0 | [] | NetworkManager-vpnc | 07ac18a32b4e361a27ef48ac757d36cbb46e8e12 | 202,764,184,567,032,800,000,000,000,000,000,000,000 | 69 | service: disallow newlinies in configuration values (CVE-2018-10900)
The vpnc configuration format doesn't allow those. vpnc(8):
The values start exactly one space after the keywords, and run to the end
of line. This lets you put any kind of weird character (except CR, LF and
NUL) in your strings
We have no ch... |
njs_function_native_call(njs_vm_t *vm)
{
njs_int_t ret;
njs_function_t *function, *target;
njs_native_frame_t *native, *previous;
njs_function_native_t call;
native = vm->top_frame;
function = native->function;
if (njs_fast_path(function->bound == NULL)) {
... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 214,706,472,198,786,750,000,000,000,000,000,000,000 | 45 | Fixed recursive async function calls.
Previously, PromiseCapability record was stored (function->context)
directly in function object during a function invocation. This is
not correct, because PromiseCapability record should be linked to
current execution context. As a result, function->context is
overwritten with c... |
int allocate_vpid(void)
{
int vpid;
if (!enable_vpid)
return 0;
spin_lock(&vmx_vpid_lock);
vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
if (vpid < VMX_NR_VPIDS)
__set_bit(vpid, vmx_vpid_bitmap);
else
vpid = 0;
spin_unlock(&vmx_vpid_lock);
return vpid;
} | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 143,557,551,230,107,080,000,000,000,000,000,000,000 | 15 | 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 int tls1_alpn_handle_client_hello_late(SSL *s, int *al)
{
const unsigned char *selected = NULL;
unsigned char selected_len = 0;
if (s->ctx->alpn_select_cb != NULL && s->s3->alpn_proposed != NULL) {
int r = s->ctx->alpn_select_cb(s, &selected, &selected_len,
... | 0 | [
"CWE-20"
] | openssl | 4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2 | 107,863,909,269,247,350,000,000,000,000,000,000,000 | 31 | Don't change the state of the ETM flags until CCS processing
Changing the ciphersuite during a renegotiation can result in a crash
leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS
so this is TLS only.
The problem is caused by changing the flag indicating whether to use ETM
or not immediately on... |
UnicodeString UnicodeString::fromUTF8(StringPiece utf8) {
UnicodeString result;
result.setToUTF8(utf8);
return result;
} | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 30,977,530,590,608,877,000,000,000,000,000,000,000 | 5 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
bytes_join(PyBytesObject*self, PyObject *iterable_of_bytes)
/*[clinic end generated code: output=634aff14764ff997 input=7fe377b95bd549d2]*/
{
return stringlib_bytes_join((PyObject*)self, iterable_of_bytes);
} | 0 | [
"CWE-190"
] | cpython | fd8614c5c5466a14a945db5b059c10c0fb8f76d9 | 73,581,242,320,977,970,000,000,000,000,000,000,000 | 5 | bpo-30657: Fix CVE-2017-1000158 (#4664)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
evdev_init_button_scroll(struct evdev_device *device,
void (*change_scroll_method)(struct evdev_device *))
{
char timer_name[64];
snprintf(timer_name,
sizeof(timer_name),
"%s btnscroll",
evdev_device_get_sysname(device));
libinput_timer_init(&device->scroll.timer,
evdev_libinput_context(device),... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 331,047,410,266,266,570,000,000,000,000,000,000,000 | 30 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static int ntop_rrd_lastupdate(lua_State* vm) {
const char *filename;
time_t last_update;
char **ds_names;
char **last_ds;
unsigned long ds_count, i;
int status;
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_PARAM_ERROR);
if((filename = (const char*)lua_tostring(vm, 1))... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 99,301,297,548,870,700,000,000,000,000,000,000,000 | 26 | Security fix: prevents empty host from being used |
static int selinux_netlink_recv(struct sk_buff *skb, int capability)
{
int err;
struct common_audit_data ad;
err = cap_netlink_recv(skb, capability);
if (err)
return err;
COMMON_AUDIT_DATA_INIT(&ad, CAP);
ad.u.cap = capability;
return avc_has_perm(NETLINK_CB(skb).sid, NETLINK_CB(skb).sid,
SECCLASS_CA... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 76,230,654,504,069,320,000,000,000,000,000,000,000 | 15 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
int cell_size() const { return cell_size_; } | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 176,055,403,728,764,750,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
static MagickBooleanType DrawPolygonPrimitive(Image *image,
const DrawInfo *draw_info,const PrimitiveInfo *primitive_info)
{
CacheView
*image_view;
const char
*artifact;
double
mid;
ExceptionInfo
*exception;
MagickBooleanType
fill,
status;
PolygonInfo
**magick_restrict pol... | 0 | [] | ImageMagick6 | 4b5e026c704d777efe9c2ead5dd68ca4fe3b2aa1 | 322,404,174,611,421,800,000,000,000,000,000,000,000 | 228 | https://github.com/ImageMagick/ImageMagick/issues/3338 |
Output8bitPixel (
IN OUT EFI_IMAGE_INPUT *Image,
IN UINT8 *Data,
IN EFI_HII_IMAGE_PALETTE_INFO *PaletteInfo
)
{
UINT16 Xpos;
UINT16 Ypos;
UINTN OffsetY;
EFI_GRAPHICS_O... | 1 | [
"CWE-787"
] | edk2 | 89910a39dcfd788057caa5d88b7e76e112d187b5 | 77,576,051,015,365,805,000,000,000,000,000,000,000 | 52 | MdeModulePkg/HiiImage: Fix stack overflow when corrupted BMP is parsed (CVE-2018-12181)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135
For 4bit BMP, there are only 2^4 = 16 colors in the palette.
But when a corrupted BMP contains more than 16 colors in the palette,
today's implementation wrongly copies all ... |
void HtmlPage::conv(){
for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){
delete tmp->htext;
tmp->htext=HtmlFont::HtmlFilter(tmp->text,tmp->len);
int linkIndex = 0;
if (links->inLink(tmp->xMin,tmp->yMin,tmp->xMax,tmp->yMax, linkIndex)){
tmp->link = links->getLink(linkIndex);
}
}
} | 0 | [
"CWE-824"
] | poppler | 30c731b487190c02afff3f036736a392eb60cd9a | 182,325,728,351,003,500,000,000,000,000,000,000,000 | 11 | Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit.
Closes #742 |
CallResult<HermesValue> Runtime::interpretFunctionImpl(
CodeBlock *newCodeBlock) {
newCodeBlock->lazyCompile(this);
#if defined(HERMES_ENABLE_ALLOCATION_LOCATION_TRACES) || !defined(NDEBUG)
// We always call getCurrentIP() in a debug build as this has the effect
// of asserting the IP is correctly set (not i... | 0 | [
"CWE-670",
"CWE-703"
] | hermes | b2021df620824627f5a8c96615edbd1eb7fdddfc | 129,563,280,559,525,980,000,000,000,000,000,000,000 | 35 | Fix CVE-2020-1914 by using NEXTINST for SaveGeneratorLong
Summary:
If `SaveGeneratorLong` was emitted, it would accidentally jump to the
wrong next instruction, based on how long SaveGenerator was.
Make a callout function to handle the common case, and handle the dispatch
within each case of the interpreter loop.
Fi... |
QByteArray CoreUserInputHandler::encrypt(const QString &target, const QByteArray &message_, bool *didEncrypt) const
{
if (didEncrypt)
*didEncrypt = false;
if (message_.isEmpty())
return message_;
if (!Cipher::neededFeaturesAvailable())
return message_;
Cipher *cipher = network... | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 156,235,537,939,788,520,000,000,000,000,000,000,000 | 22 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip,
mz_zip_array *pArray,
size_t n) {
return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE);
} | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 316,663,406,216,605,840,000,000,000,000,000,000,000 | 5 | Make line_no with too large value(2**20) invalid. Fixes #124 |
md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
{
MD_TEXTTYPE text_type;
const MD_LINE* line = lines;
MD_MARK* prev_mark = NULL;
MD_MARK* mark;
OFF off = lines[0].beg;
OFF end = lines[n_lines-1].end;
int enforce_hardbreak = 0;
int ret = 0;
/* Find first resolved m... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 277,486,362,111,378,150,000,000,000,000,000,000,000 | 283 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
term_7to8bit(char_u *p)
{
if (*p == ESC)
{
if (p[1] == '[')
return CSI;
if (p[1] == ']')
return OSC;
if (p[1] == 'O')
return 0x8f;
}
return 0;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 130,047,075,388,086,570,000,000,000,000,000,000,000 | 13 | 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. |
**/
CImg<T>& XYZtoRGB(const bool use_D65=true) {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"XYZtoRGB(): Instance is not a XYZ image.",
cimg_instance);
T *p1 = data(0,0,0,0), *p2 = data(0,0,0,1), *p3 =... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 152,887,936,402,487,450,000,000,000,000,000,000,000 | 26 | . |
png_get_copyright(png_const_structrp png_ptr)
{
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.27 - December 29, 2016" PNG_STRING_NEWLINE \
"Copy... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 303,110,856,396,310,480,000,000,000,000,000,000,000 | 22 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
dp_packet_hwol_set_csum_sctp(struct dp_packet *b)
{
b->mbuf.ol_flags |= PKT_TX_SCTP_CKSUM;
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 109,861,064,494,277,610,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params)
{
/* Estimate CCtx size is supported for single-threaded compression only. */
if (params->nbWorkers > 0) { return ERROR(GENERIC); }
{ ZSTD_compressionParameters const cParams =
ZSTD_getCParamsFromCCtxParams(params... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 17,919,516,293,082,940,000,000,000,000,000,000,000 | 25 | fixed T36302429 |
static int rawsock_create(struct net *net, struct socket *sock,
const struct nfc_protocol *nfc_proto, int kern)
{
struct sock *sk;
pr_debug("sock=%p\n", sock);
if ((sock->type != SOCK_SEQPACKET) && (sock->type != SOCK_RAW))
return -ESOCKTNOSUPPORT;
if (sock->type == SOCK_RAW) {
if (!capable(CAP_NET_RAW)... | 0 | [
"CWE-276",
"CWE-703"
] | linux | 26896f01467a28651f7a536143fe5ac8449d4041 | 284,654,099,723,487,970,000,000,000,000,000,000,000 | 35 | net/nfc/rawsock.c: add CAP_NET_RAW check.
When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first.
Signed-off-by: Qingyu Li <ieatmuttonchuan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
_job_still_running(uint32_t job_id)
{
bool retval = false;
List steps;
ListIterator i;
step_loc_t *s = NULL;
steps = stepd_available(conf->spooldir, conf->node_name);
i = list_iterator_create(steps);
while ((s = list_next(i))) {
if (s->jobid == job_id) {
int fd;
fd = stepd_connect(s... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 137,017,751,096,842,440,000,000,000,000,000,000,000 | 32 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
static int stub_resume(struct usb_device *udev, pm_message_t message)
{
dev_dbg(&udev->dev, "stub_resume\n");
return 0;
} | 0 | [
"CWE-362"
] | linux | 22076557b07c12086eeb16b8ce2b0b735f7a27e7 | 70,987,587,293,307,350,000,000,000,000,000,000,000 | 6 | usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
usbip_host updates device status without holding lock from stub probe,
disconnect and rebind code paths. When multiple requests to import a
device are received, these unprotected code paths step all over each
other and drive fails with NULL-ptr deref and ... |
bool cma_release(struct cma *cma, const struct page *pages, unsigned int count)
{
unsigned long pfn;
if (!cma || !pages)
return false;
pr_debug("%s(page %p)\n", __func__, (void *)pages);
pfn = page_to_pfn(pages);
if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count)
return false;
VM_BUG_ON(pfn + ... | 0 | [
"CWE-682"
] | linux | 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e | 210,231,147,247,253,840,000,000,000,000,000,000,000 | 22 | mm: cma: fix incorrect type conversion for size during dma allocation
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.
show_stack+0x10/0x1c
dump_stack+0x74/0xc8
kasan_report_error+0x2b0/0x408
kasan_report+0x34/0x40
__asan_storeN... |
gss_complete_auth_token (OM_uint32 *minor_status,
const gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer)
{
OM_uint32 status;
gss_union_ctx_id_t ctx;
gss_mechanism mech;
if (context_handle == GSS_C_NO_CONTEXT)
return GSS_S_NO_CONTEXT;
/*
* s... | 1 | [
"CWE-415"
] | krb5 | 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf | 172,728,241,279,580,240,000,000,000,000,000,000,000 | 33 | Preserve GSS context on init/accept failure
After gss_init_sec_context() or gss_accept_sec_context() has created a
context, don't delete the mechglue context on failures from subsequent
calls, even if the mechanism deletes the mech-specific context (which
is allowed by RFC 2744 but not preferred). Check for union con... |
static StringFileInfo* Pe_r_bin_pe_parse_string_file_info(RBinPEObj* pe, PE_DWord* curAddr) {
StringFileInfo* stringFileInfo = calloc (1, sizeof (*stringFileInfo));
if (!stringFileInfo) {
pe_printf ("Warning: calloc (StringFileInfo)\n");
return NULL;
}
PE_DWord startAddr = *curAddr;
if ((stringFileInfo->wLen... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 192,071,492,126,832,430,000,000,000,000,000,000,000 | 89 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
wf_cliprdr_server_unlock_clipboard_data(CliprdrClientContext* context,
const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
(void)context;
(void)unlockClipboardData;
return CHANNEL_RC_OK;
} | 0 | [
"CWE-20"
] | FreeRDP | 0d79670a28c0ab049af08613621aa0c267f977e9 | 297,757,142,707,399,920,000,000,000,000,000,000,000 | 7 | Fixed missing input checks for file contents request
reported by Valentino Ricotta (Thalium) |
static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
X509 **pissuer, int *pscore, unsigned int *preasons,
STACK_OF(X509_CRL) *crls)
{
int i, crl_score, best_score = *pscore;
unsigned int reasons, best_reasons = 0;
X509 *x = ctx->current_ce... | 0 | [] | openssl | 33cc5dde478ba5ad79f8fd4acd8737f0e60e236e | 136,145,426,517,996,160,000,000,000,000,000,000,000 | 40 | Compat self-signed trust with reject-only aux data
When auxiliary data contains only reject entries, continue to trust
self-signed objects just as when no auxiliary data is present.
This makes it possible to reject specific uses without changing
what's accepted (and thus overring the underlying EKU).
Added new suppo... |
void ClientHello::Process(input_buffer& input, SSL& ssl)
{
if (input.get_error()) {
ssl.SetError(bad_input);
return;
}
// store version for pre master secret
ssl.useSecurity().use_connection().chVersion_ = client_version_;
if (client_version_.major_ != 3) {
ssl.SetError(bad... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 118,181,365,159,120,730,000,000,000,000,000,000,000 | 87 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int enable_large_pages(void) {
#if defined(HAVE_GETPAGESIZES) && defined(HAVE_MEMCNTL)
int ret = -1;
size_t sizes[32];
int avail = getpagesizes(sizes, 32);
if (avail != -1) {
size_t max = sizes[0];
struct memcntl_mha arg = {0};
int ii;
for (ii = 1; ii < avail; ++i... | 0 | [
"CWE-20"
] | memcached | d9cd01ede97f4145af9781d448c62a3318952719 | 30,847,009,964,751,030,000,000,000,000,000,000,000 | 38 | Use strncmp when checking for large ascii multigets. |
static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
{
struct sock *sk = sock->sk;
struct sockaddr_l2 la;
int len, err = 0;
BT_DBG("sk %p", sk);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
memset(&la, 0, sizeof(la));
len = min_t(unsigned int, sizeo... | 1 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | linux | f2fcfcd670257236ebf2088bbdf26f6a8ef459fe | 289,029,905,812,746,330,000,000,000,000,000,000,000 | 73 | Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming
mode. If the remote device specifies ERTM or Streaming mode, then the
same mode is proposed. Otherwise ERTM or Basic mode is used. And in case
of a state 2 device, the remote device... |
virtual bool find_function_processor (void *arg) { return 0; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 15,200,529,913,338,113,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static unsigned int php_read4(php_stream * stream TSRMLS_DC)
{
unsigned char a[4];
/* just return 0 if we hit the end-of-file */
if ((php_stream_read(stream, a, sizeof(a))) != sizeof(a)) return 0;
return (((unsigned int)a[0]) << 24)
+ (((unsigned int)a[1]) << 16)
+ (((unsigned int)a[2]) << 8)
+... | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 105,353,732,715,774,720,000,000,000,000,000,000,000 | 12 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
Result parse(const char *s, any &dt, const char *path = nullptr) const {
auto n = strlen(s);
return parse(s, n, dt, path);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 62,935,184,270,511,080,000,000,000,000,000,000,000 | 4 | Fix #122 |
static int samldb_prim_group_set(struct samldb_ctx *ac)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
uint32_t rid;
rid = ldb_msg_find_attr_as_uint(ac->msg, "primaryGroupID", (uint32_t) -1);
if (rid == (uint32_t) -1) {
/* we aren't affected of any primary group set */
return LDB_SUCCESS;
} else... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 217,411,722,851,605,130,000,000,000,000,000,000,000 | 18 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static HuffReader *get_huffman_group(WebPContext *s, ImageContext *img,
int x, int y)
{
ImageContext *gimg = &s->image[IMAGE_ROLE_ENTROPY];
int group = 0;
if (gimg->size_reduction > 0) {
int group_x = x >> gimg->size_reduction;
int group_y = y >> gimg->s... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 128,715,507,532,736,350,000,000,000,000,000,000,000 | 16 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
PyObject *PyString_AsDecodedString(PyObject *str,
const char *encoding,
const char *errors)
{
PyObject *v;
v = PyString_AsDecodedObject(str, encoding, errors);
if (v == NULL)
goto onError;
#ifdef Py_USING_UNICODE
/* Convert ... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 241,646,939,881,574,300,000,000,000,000,000,000,000 | 33 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
static void tg3_get_nvram_info(struct tg3 *tp)
{
u32 nvcfg1;
nvcfg1 = tr32(NVRAM_CFG1);
if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) {
tg3_flag_set(tp, FLASH);
} else {
nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
tw32(NVRAM_CFG1, nvcfg1);
}
if (tg3_asic_rev(tp) == ASIC_REV_5750 ||
tg3_flag(tp, 5780_CLASS)) {
swi... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 264,369,565,331,467,860,000,000,000,000,000,000,000 | 50 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
void ConnectionManagerImpl::ActiveStream::decodeData(Buffer::Instance& data, bool end_stream) {
ScopeTrackerScopeState scope(this,
connection_manager_.read_callbacks_->connection().dispatcher());
filter_manager_.maybeEndDecode(end_stream);
filter_manager_.streamInfo().addBytesReceiv... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 91,346,714,551,076,340,000,000,000,000,000,000,000 | 8 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
receive(
struct recvbuf *rbufp
)
{
register struct peer *peer; /* peer structure pointer */
register struct pkt *pkt; /* receive packet pointer */
u_char hisversion; /* packet version */
u_char hisleap; /* packet leap indicator */
u_char hismode; /* packet mode */
u_char hisstratum; /* packet stratum */
u_... | 1 | [
"CWE-254"
] | ntp | 50ef2f62dc326bc9edac166b2b4ba5b5d8b4f7d4 | 55,498,676,127,943,500,000,000,000,000,000,000,000 | 1,257 | [Sec 2935] use L_SUB instead of L_ISGT. Juergen Perlinger |
static inline int blkcipher_next_slow(struct blkcipher_desc *desc,
struct blkcipher_walk *walk,
unsigned int bsize,
unsigned int alignmask)
{
unsigned int n;
unsigned aligned_bsize = ALIGN(bsize, alignmask + 1);
if (walk->buffer)
goto ok;
walk->buffer = walk->page;
if (walk->buffe... | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 158,576,132,072,652,800,000,000,000,000,000,000,000 | 35 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
long keyctl_negate_key(key_serial_t id, unsigned timeout, key_serial_t ringid)
{
const struct cred *cred = current_cred();
struct request_key_auth *rka;
struct key *instkey, *dest_keyring;
long ret;
kenter("%d,%u,%d", id, timeout, ringid);
/* the appropriate instantiation authorisation key must have been
* as... | 0 | [
"CWE-399"
] | linux-2.6 | 0d54ee1c7850a954026deec4cd4885f331da35cc | 284,999,265,039,911,130,000,000,000,000,000,000,000 | 41 | security: introduce missing kfree
Plug this leak.
Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: <stable@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
GF_Err dOps_box_size(GF_Box *s)
{
GF_OpusSpecificBox *ptr = (GF_OpusSpecificBox *)s;
ptr->size += 11;
if (ptr->opcfg.ChannelMappingFamily)
ptr->size += 2 + ptr->opcfg.OutputChannelCount;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 306,080,832,316,940,180,000,000,000,000,000,000,000 | 9 | fixed #2255 |
int acpi_register_gsi(u32 gsi, int triggering, int polarity)
{
unsigned int irq;
unsigned int plat_gsi = gsi;
#ifdef CONFIG_PCI
/*
* Make sure all (legacy) PCI IRQs are set as level-triggered.
*/
if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
extern void eisa_set_level_irq(unsigned int irq);
if (triggering =... | 0 | [] | linux-2.6 | f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff | 200,884,129,183,344,530,000,000,000,000,000,000,000 | 25 | [PATCH] i386: add HPET(s) into resource map
Add HPET(s) into resource map. This will allow for the HPET(s) to be
visibile within /proc/iomem.
Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de> |
static int h2c_handle_settings(struct h2c *h2c)
{
unsigned int offset;
int error;
if (h2c->dff & H2_F_SETTINGS_ACK) {
if (h2c->dfl) {
error = H2_ERR_FRAME_SIZE_ERROR;
goto fail;
}
return 1;
}
if (h2c->dsi != 0) {
error = H2_ERR_PROTOCOL_ERROR;
goto fail;
}
if (h2c->dfl % 6) {
error = H2_ERR_... | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 227,583,535,081,816,730,000,000,000,000,000,000,000 | 74 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
void Gfx::opSetTextRender(Object args[], int numArgs) {
int rm = state->getRender();
state->setRender(args[0].getInt());
if ((args[0].getInt() & 4) && textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
doPatternFill(gTrue);... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 219,682,019,533,263,200,000,000,000,000,000,000,000 | 20 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static void gfar_init_bds(struct net_device *ndev)
{
struct gfar_private *priv = netdev_priv(ndev);
struct gfar __iomem *regs = priv->gfargrp[0].regs;
struct gfar_priv_tx_q *tx_queue = NULL;
struct gfar_priv_rx_q *rx_queue = NULL;
struct txbd8 *txbdp;
u32 __iomem *rfbptr;
int i, j;
for (i = 0; i < priv->num_tx... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 164,923,628,423,814,080,000,000,000,000,000,000,000 | 50 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
command[MaxTextExtent];
const char
*option;
graph_t
*graph;
Image
*image;
ImageInfo
*read_info;
MagickBooleanType
status;
/*
Open image file.
*/
assert(image_info != (const ImageIn... | 0 | [
"CWE-401"
] | ImageMagick6 | 6954a3f7f1bf1dad417260c5965f2c30a64fa25e | 310,244,404,358,310,900,000,000,000,000,000,000,000 | 71 | Fixed memory leak reported in #1558 and fixed other leak. |
int SimpleMessenger::start()
{
lock.Lock();
ldout(cct,1) << "messenger.start" << dendl;
// register at least one entity, first!
assert(my_inst.name.type() >= 0);
assert(!started);
started = true;
stopped = false;
if (!did_bind) {
my_inst.addr.nonce = nonce;
init_local_connection();
}
loc... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 235,152,845,739,429,150,000,000,000,000,000,000,000 | 23 | 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 ... |
UBaseType_t uxQueueGetQueueNumber( QueueHandle_t xQueue )
{
return ( ( Queue_t * ) xQueue )->uxQueueNumber;
}
| 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 290,372,655,420,855,180,000,000,000,000,000,000,000 | 4 | add assert for addition overflow on queue creation (#225) |
static int udp_v6_push_pending_frames(struct sock *sk, struct udp_sock *up)
{
struct sk_buff *skb;
struct udphdr *uh;
struct inet_sock *inet = inet_sk(sk);
struct flowi *fl = &inet->cork.fl;
int err = 0;
/* Grab the skbuff where UDP header space exists. */
if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
go... | 0 | [
"CWE-476"
] | linux-2.6 | 1e0c14f49d6b393179f423abbac47f85618d3d46 | 72,616,711,662,168,100,000,000,000,000,000,000,000 | 56 | [UDP]: Fix MSG_PROBE crash
UDP tracks corking status through the pending variable. The
IP layer also tracks it through the socket write queue. It
is possible for the two to get out of sync when MSG_PROBE is
used.
This patch changes UDP to check the write queue to ensure
that the two stay in sync.
Signed-off-by: He... |
static int r_bin_print_plugin_details(RBin *bin, RBinPlugin *bp, int json) {
if (json == 'q') {
bin->cb_printf ("%s\n", bp->name);
} else if (json) {
bin->cb_printf (
"{\"name\":\"%s\",\"description\":\"%s\","
"\"license\":\"%s\"}\n",
bp->name, bp->desc, bp->license? bp->license: "???");
} else {
bin-... | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 156,345,571,350,359,620,000,000,000,000,000,000,000 | 23 | Fix #8748 - Fix oobread on string search |
static void exprToRegister(Expr *pExpr, int iReg){
Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr);
p->op2 = p->op;
p->op = TK_REGISTER;
p->iTable = iReg;
ExprClearProperty(p, EP_Skip);
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 308,766,762,134,173,040,000,000,000,000,000,000,000 | 7 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
const GF_FilterRegister *naludmx_register(GF_FilterSession *session)
{
return &NALUDmxRegister;
} | 0 | [
"CWE-476"
] | gpac | b43f9d1a4b4e33d08edaef6d313e6ce4bdf554d3 | 148,047,905,254,432,380,000,000,000,000,000,000,000 | 4 | fixed #2223 |
StringStart(type)
enum string_t type;
{
curr->w_StringType = type;
curr->w_stringp = curr->w_string;
curr->w_state = ASTR;
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 287,622,817,811,476,870,000,000,000,000,000,000,000 | 7 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
void write_bigbuf(int f, const char *buf, size_t len)
{
size_t half_max = (iobuf.out.size - iobuf.out_empty_len) / 2;
while (len > half_max + 1024) {
write_buf(f, buf, half_max);
buf += half_max;
len -= half_max;
}
write_buf(f, buf, len);
} | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 212,768,812,142,599,160,000,000,000,000,000,000,000 | 12 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
xfs_inode_hasattr(
struct xfs_inode *ip)
{
if (!XFS_IFORK_Q(ip) ||
(ip->i_d.di_aformat == XFS_DINODE_FMT_EXTENTS &&
ip->i_d.di_anextents == 0))
return 0;
return 1;
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 165,682,104,030,676,970,000,000,000,000,000,000,000 | 9 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
bt_nofile(buf_T *buf)
{
return buf != NULL && buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f';
} | 0 | [
"CWE-416"
] | vim | 9b4a80a66544f2782040b641498754bcb5b8d461 | 158,685,750,682,531,750,000,000,000,000,000,000,000 | 4 | patch 8.2.4281: using freed memory with :lopen and :bwipe
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer. |
static int parse_guid(tvbuff_t *tvb, int offset, proto_tree *tree, e_guid_t *guid, const char *text)
{
const char *guid_str, *name, *bytes;
proto_tree *tr;
tvb_get_letohguid(tvb, offset, guid);
guid_str = guid_to_str(wmem_packet_scope(), guid);
name = guids_get_guid_name(guid);
tr = proto_tree_add_subtree_form... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 312,517,698,126,723,930,000,000,000,000,000,000,000 | 29 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
void ext4_ext_truncate(struct inode *inode)
{
struct address_space *mapping = inode->i_mapping;
struct super_block *sb = inode->i_sb;
ext4_lblk_t last_block;
handle_t *handle;
int err = 0;
/*
* finish any pending end_io work so we won't run the risk of
* converting any truncated blocks to initialized later
... | 0 | [
"CWE-703"
] | linux | 667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3 | 55,635,747,764,444,380,000,000,000,000,000,000,000 | 69 | ext4: reimplement convert and split_unwritten
Reimplement ext4_ext_convert_to_initialized() and
ext4_split_unwritten_extents() using ext4_split_extent()
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Allison Henderson <achender@linux.vnet.ibm.com> |
void ram_block_dump(Monitor *mon)
{
RAMBlock *block;
char *psize;
RCU_READ_LOCK_GUARD();
monitor_printf(mon, "%24s %8s %18s %18s %18s\n",
"Block Name", "PSize", "Offset", "Used", "Total");
RAMBLOCK_FOREACH(block) {
psize = size_to_str(block->page_size);
monitor_p... | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 106,298,676,973,297,200,000,000,000,000,000,000,000 | 18 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
xfs_attr_shortform_compare(const void *a, const void *b)
{
xfs_attr_sf_sort_t *sa, *sb;
sa = (xfs_attr_sf_sort_t *)a;
sb = (xfs_attr_sf_sort_t *)b;
if (sa->hash < sb->hash) {
return(-1);
} else if (sa->hash > sb->hash) {
return(1);
} else {
return(sa->entno - sb->entno);
}
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 169,958,942,054,051,050,000,000,000,000,000,000,000 | 14 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
linelen(int *has_tab)
{
char_u *line;
char_u *first;
char_u *last;
int save;
int len;
// Get the line. If it's empty bail out early (could be the empty string
// for an unloaded buffer).
line = ml_get_curline();
if (*line == NUL)
return 0;
// find the first non-bla... | 0 | [
"CWE-416"
] | vim | 37f47958b8a2a44abc60614271d9537e7f14e51a | 321,974,306,675,754,500,000,000,000,000,000,000,000 | 30 | patch 8.2.4253: using freed memory when substitute with function call
Problem: Using freed memory when substitute uses a recursive function call.
Solution: Make a copy of the substitute text. |
int __kvm_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
int user_alloc)
{
int r;
gfn_t base_gfn;
unsigned long npages;
unsigned long i;
struct kvm_memory_slot *memslot;
struct kvm_memory_slot old, new;
struct kvm_memslots *slots, *old_memslots;
r = check_memory_regio... | 0 | [
"CWE-399"
] | linux | 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8 | 234,418,246,721,358,880,000,000,000,000,000,000,000 | 167 | KVM: perform an invalid memslot step for gpa base change
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> |
static int ntop_lua_cli_print(lua_State* vm) {
int t;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
switch(t = lua_type(vm, 1)) {
case LUA_TSTRING:
{
char *str = (char*)lua_tostring(vm, 1);
if(str && (strlen(str) > 0))
ntop->getTrace()->traceEvent(TRACE_NORMAL, "%s",... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 45,119,344,248,105,650,000,000,000,000,000,000,000 | 27 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
BSONObj operand1() {
return BSON("" << 9LL);
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 44,373,465,916,580,460,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static Indirect *ext4_find_shared(struct inode *inode, int depth,
ext4_lblk_t offsets[4], Indirect chain[4],
__le32 *top)
{
Indirect *partial, *p;
int k, err;
*top = 0;
/* Make k index the deepest non-null offset + 1 */
for (k = depth; k > 1 && !offsets[k-1]; k--)
;
partial = ext4_get_branch(inode,... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 124,445,300,304,715,900,000,000,000,000,000,000,000 | 48 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
de265_error write_scaling_list(CABAC_encoder& out, const seq_parameter_set* sps,
scaling_list_data* sclist, bool inPPS)
{
assert(false);
// TODO
return DE265_OK;
} | 0 | [
"CWE-787"
] | libde265 | 8e89fe0e175d2870c39486fdd09250b230ec10b8 | 149,197,056,941,944,960,000,000,000,000,000,000,000 | 8 | error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590) |
mono_method_signature_checked (MonoMethod *m, MonoError *error)
{
int idx;
int size;
MonoImage* img;
const char *sig;
gboolean can_cache_signature;
MonoGenericContainer *container;
MonoMethodSignature *signature = NULL;
guint32 sig_offset;
/* We need memory barriers below because of the double-checked locking... | 0 | [] | mono | 8e890a3bf80a4620e417814dc14886b1bbd17625 | 15,975,714,519,592,084,000,000,000,000,000,000,000 | 143 | Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915... |
static long kvm_vcpu_compat_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = compat_ptr(arg);
int r;
if (vcpu->kvm->mm != current->mm)
return -EIO;
switch (ioctl) {
case KVM_SET_SIGNAL_MASK: {
struct kvm_signal_mask __use... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 338,411,762,718,769,100,000,000,000,000,000,000,000 | 39 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
bool streamErrorOnInvalidHttpMessaging() const override {
return stream_error_on_invalid_http_messaging_;
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 323,928,576,403,384,040,000,000,000,000,000,000,000 | 3 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
int snd_seq_queue_timer_close(int queueid)
{
struct snd_seq_queue *queue;
int result = 0;
queue = queueptr(queueid);
if (queue == NULL)
return -EINVAL;
snd_seq_timer_close(queue);
queuefree(queue);
return result;
} | 0 | [
"CWE-362"
] | linux | 3567eb6af614dac436c4b16a8d426f9faed639b3 | 339,069,908,406,292,500,000,000,000,000,000,000,000 | 12 | ALSA: seq: Fix race at timer setup and close
ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client. This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.
This patch papers over it by adding a proper queue->timer_mutex lock
around the timer... |
TEST_F(QueryPlannerTest, ElemMatchEmbeddedRegex) {
addIndex(BSON("a.b" << 1));
runQuery(fromjson("{a: {$elemMatch: {b: /foo/}}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: {a:{$elemMatch:{b:/foo/}}}, node: "
"{ixscan... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 116,852,283,462,545,230,000,000,000,000,000,000,000 | 10 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
_compare_dir_src_ents_by_authority_id(const void **_a, const void **_b)
{
const dir_src_ent_t *a = *_a, *b = *_b;
const networkstatus_voter_info_t *a_v = get_voter(a->v),
*b_v = get_voter(b->v);
const char *a_id, *b_id;
a_id = a->is_legacy ? a_v->legacy_id_digest : a_v->identity_digest;
b_id = b->is_legac... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 37,044,359,549,896,460,000,000,000,000,000,000,000 | 11 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static void skb_free_head(struct sk_buff *skb)
{
unsigned char *head = skb->head;
if (skb->head_frag)
skb_free_frag(head);
else
kfree(head);
} | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 333,798,218,104,650,280,000,000,000,000,000,000,000 | 9 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
void f2fs_drop_extent_tree(struct inode *inode)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct extent_tree *et = F2FS_I(inode)->extent_tree;
set_inode_flag(inode, FI_NO_EXTENT);
write_lock(&et->lock);
__free_extent_tree(sbi, et);
__drop_largest_extent(inode, 0, UINT_MAX);
write_unlock(&et->lock);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | dad48e73127ba10279ea33e6dbc8d3905c4d31c0 | 188,691,727,837,712,300,000,000,000,000,000,000,000 | 12 | f2fs: fix a bug caused by NULL extent tree
Thread A: Thread B:
-f2fs_remount
-sbi->mount_opt.opt = 0;
<--- -f2fs_iget
-do_read_inode
-f2fs_init_extent_tree
-F2FS_I(inode)->extent_tree is NULL
-default_options && parse_options
-remount return
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.