func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline int numeric_entity_is_allowed(unsigned uni_cp, int document_type)
{
/* less restrictive than unicode_cp_is_allowed */
switch (document_type) {
case ENT_HTML_DOC_HTML401:
/* all non-SGML characters (those marked with UNUSED in DESCSET) should be
* representable with numeric entities */
return uni... | 0 | [
"CWE-190"
] | php-src | 0da8b8b801f9276359262f1ef8274c7812d3dfda | 249,681,271,228,156,140,000,000,000,000,000,000,000 | 28 | Fix bug #72135 - don't create strings with lengths outside int range |
static ut64 getmainsymbol(ELFOBJ *bin) {
struct r_bin_elf_symbol_t *symbol;
int i;
if (!(symbol = Elf_(r_bin_elf_get_symbols) (bin))) {
return UT64_MAX;
}
for (i = 0; !symbol[i].last; i++) {
if (!strcmp (symbol[i].name, "main")) {
ut64 paddr = symbol[i].offset;
return Elf_(r_bin_elf_p2v) (bin, paddr);
... | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 299,639,023,661,061,870,000,000,000,000,000,000,000 | 14 | Fix #8731 - Crash in ELF parser with negative 32bit number |
virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
virStorageSourcePtr src,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
xmlNodePtr source;
g_autoptr(virStorageSource) b... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 256,973,968,503,482,900,000,000,000,000,000,000,000 | 51 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
int set_plugin()
{
int reply;
int plugin_set= 0;
char *strength;
bool option_read= FALSE;
reply= get_response((const char *) "\n\nVALIDATE PASSWORD PLUGIN can be used "
"to test passwords\nand improve security. "
"It checks the strength of password\nand "
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 323,958,935,381,689,700,000,000,000,000,000,000,000 | 76 | 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 cli_session_setup_gensec_remote_done(struct tevent_req *subreq)
{
struct tevent_req *req =
tevent_req_callback_data(subreq,
struct tevent_req);
struct cli_session_setup_gensec_state *state =
tevent_req_data(req,
struct cli_session_setup_gensec_state);
NTSTATUS status;
TALLOC_FREE(state->inbuf);... | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 121,087,376,748,242,800,000,000,000,000,000,000,000 | 59 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
static tool_rc check_options(void) {
tool_rc rc = tool_rc_success;
/* Check the tpm import specific options */
if (ctx.import_tpm) {
if (!ctx.input_seed_file) {
LOG_ERR("Expected SymSeed to be specified via \"-s\","
" missing option.");
rc = tool_rc_opti... | 0 | [
"CWE-798"
] | tpm2-tools | c069e4f179d5e6653a84fb236816c375dca82515 | 8,323,635,901,329,901,000,000,000,000,000,000,000 | 67 | tpm2_import: fix fixed AES key CVE-2021-3565
tpm2_import used a fixed AES key for the inner wrapper, which means that
a MITM attack would be able to unwrap the imported key. Even the
use of an encrypted session will not prevent this. The TPM only
encrypts the first parameter which is the fixed symmetric key.
To fix t... |
static void pty_chr_update_read_handler_locked(CharDriverState *chr)
{
PtyCharDriver *s = chr->opaque;
GPollFD pfd;
int rc;
QIOChannelFile *fioc = QIO_CHANNEL_FILE(s->ioc);
pfd.fd = fioc->fd;
pfd.events = G_IO_OUT;
pfd.revents = 0;
do {
rc = g_poll(&pfd, 1, 0);
} while (rc =... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 31,362,492,708,349,070,000,000,000,000,000,000,000 | 21 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
rfbSendUpdateBuf(rfbClientPtr cl)
{
if(cl->sock<0)
return FALSE;
if (rfbWriteExact(cl, cl->updateBuf, cl->ublen) < 0) {
rfbLogPerror("rfbSendUpdateBuf: write");
rfbCloseClient(cl);
return FALSE;
}
cl->ublen = 0;
return TRUE;
} | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 218,710,907,035,448,860,000,000,000,000,000,000,000 | 14 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
_XimDelayModeGetIMValues(
Xim im,
XIMArg *arg)
{
XimDefIMValues im_values;
_XimGetCurrentIMValues(im, &im_values);
return(_XimGetIMValueData(im, (XPointer)&im_values, arg,
im->core.im_resources, im->core.im_num_resources));
} | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 338,729,451,245,497,630,000,000,000,000,000,000,000 | 10 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
static int get_sample_rate_v2(struct snd_usb_audio *chip, int iface,
int altsetting, int clock)
{
struct usb_device *dev = chip->dev;
__le32 data;
int err;
err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
UAC2_CS_CONTROL_... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 8,380,453,448,635,180,000,000,000,000,000,000,000 | 20 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
bool ms_verify_authorizer(Connection *con, int peer_type, int protocol,
bufferlist& authorizer, bufferlist& authorizer_reply,
bool& isvalid, CryptoKey& session_key,
std::unique_ptr<AuthAuthorizerChallenge> *challenge) override {
isvalid = tr... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 156,014,642,889,801,580,000,000,000,000,000,000,000 | 7 | 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 ... |
CanonOutputT() : buffer_(NULL), buffer_len_(0), cur_len_(0) {} | 0 | [] | envoy | 3b5acb2f43548862dadb243de7cf3994986a8e04 | 186,598,519,041,358,840,000,000,000,000,000,000,000 | 1 | http, url: Bring back chromium_url and http_parser_parse_url (#198)
* Revert GURL as HTTP URL parser utility
This reverts:
1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d
2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32
3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62
Signed-off-by: Dhi Aurrahman <dio@tetrat... |
Item_field *field_for_view_update() { return 0; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 221,477,565,287,919,360,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.... |
circle_draw( FT_F26Dot6 center_x,
FT_F26Dot6 center_y,
FT_F26Dot6 radius,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline outline;
ft_outline_new_circle( &outline, radius, handle );
FT_Out... | 0 | [
"CWE-120"
] | freetype2-demos | b995299b73ba4cd259f221f500d4e63095508bec | 266,875,825,959,375,660,000,000,000,000,000,000,000 | 16 | Fix Savannah bug #30054.
* src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c,
src/ftview.c: Use precision for `%s' where appropriate to avoid
buffer overflows. |
ttml_xml_type_find (GstTypeFind * tf, gpointer unused)
{
if (xml_check_first_element (tf, "tt", 2, FALSE)) {
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, TTML_XML_CAPS);
}
} | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 286,906,739,885,102,700,000,000,000,000,000,000,000 | 6 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 |
psutil_disk_partitions(PyObject *self, PyObject *args) {
DWORD num_bytes;
char drive_strings[255];
char *drive_letter = drive_strings;
char mp_buf[MAX_PATH];
char mp_path[MAX_PATH];
int all;
int type;
int ret;
unsigned int old_mode = 0;
char opts[20];
HANDLE mp_h;
BOOL mp... | 1 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 83,376,880,753,088,590,000,000,000,000,000,000,000 | 149 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
base64_decode_string (const char *enc)
{
if (enc == NULL)
return NULL;
char *dec = g_strdup (enc);
gsize len;
g_base64_decode_inplace (dec, &len);
dec[len] = '\0';
return dec;
} | 1 | [] | cockpit | c51f6177576d7e12614c64d316cf0b67addd17c9 | 273,534,858,954,204,460,000,000,000,000,000,000,000 | 11 | 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 |
static void clear_subscriber_list(struct snd_seq_client *client,
struct snd_seq_client_port *port,
struct snd_seq_port_subs_info *grp,
int is_src)
{
struct list_head *p, *n;
list_for_each_safe(p, n, &grp->list_head) {
struct snd_seq_subscribers *subs;
struct snd_seq_client *c;
struct snd_seq_... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 71105998845fb012937332fe2e806d443c09e026 | 239,758,878,717,212,500,000,000,000,000,000,000,000 | 36 | ALSA: seq: Fix use-after-free at creating a port
There is a potential race window opened at creating and deleting a
port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates
a port object and returns its pointer, but it doesn't take the
refcount, thus it can be deleted immediately by another thread.
Meanwh... |
SecureElementStatus_t SecureElementComputeAesCmac( uint8_t* micBxBuffer, uint8_t* buffer, uint16_t size,
KeyIdentifier_t keyID, uint32_t* cmac )
{
if( keyID >= LORAMAC_CRYPTO_MULTICAST_KEYS )
{
// Never accept multicast key identifier for cmac computati... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 237,220,962,777,869,260,000,000,000,000,000,000,000 | 10 | Added received buffer size checks. |
vrend_resource_alloc_buffer(struct vrend_resource *gr, uint32_t flags)
{
const uint32_t bind = gr->base.bind;
const uint32_t size = gr->base.width0;
if (bind == VIRGL_BIND_CUSTOM) {
/* use iovec directly when attached */
gr->storage_bits |= VREND_STORAGE_HOST_SYSTEM_MEMORY;
gr->ptr = calloc(... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 316,706,643,189,554,740,000,000,000,000,000,000,000 | 57 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
static int ing_filter(struct sk_buff *skb)
{
struct Qdisc *q;
struct net_device *dev = skb->dev;
int result = TC_ACT_OK;
if (dev->qdisc_ingress) {
__u32 ttl = (__u32) G_TC_RTTL(skb->tc_verd);
if (MAX_RED_LOOP < ttl++) {
printk("Redir loop detected Dropping packet (%s->%s)\n",
skb->input_dev->name, skb... | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 319,876,174,648,257,800,000,000,000,000,000,000,000 | 27 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
gpu_data_for_centered_image(ImageRenderData *ans, unsigned int screen_width_px, unsigned int screen_height_px, unsigned int width, unsigned int height) {
static const ImageRef source_rect = { .src_rect = { .left=0, .top=0, .bottom=1, .right=1 }};
const ImageRef *ref = &source_rect;
float width_frac = 2 * MI... | 0 | [
"CWE-787"
] | kitty | 82c137878c2b99100a3cdc1c0f0efea069313901 | 108,651,783,320,714,670,000,000,000,000,000,000,000 | 9 | Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters
Fixes #3128 |
static WERROR dcesrv_dssetup_DsRoleDemoteDc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct dssetup_DsRoleDemoteDc *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 59,250,306,635,275,885,000,000,000,000,000,000,000 | 5 | 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... |
int MonClient::authenticate(double timeout)
{
std::lock_guard lock(monc_lock);
if (active_con) {
ldout(cct, 5) << "already authenticated" << dendl;
return 0;
}
sub.want("monmap", monmap.get_epoch() ? monmap.get_epoch() + 1 : 0, 0);
sub.want("config", 0, 0);
if (!_opened())
_reopen_session();
... | 0 | [
"CWE-294"
] | ceph | 2927fd91d41e505237cc73f9700e5c6a63e5cb4f | 187,773,702,045,180,780,000,000,000,000,000,000,000 | 44 | 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... |
static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_txq *txq,
struct ath_atx_tid *tid,
struct sk_buff *skb)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_frame_info *fi = get_frame_info(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)sk... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 57,244,717,207,161,490,000,000,000,000,000,000,000 | 51 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
{
int err;
u32 ptr32;
if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t)))
return -EFAULT;
err = __get_user(to->si_signo, &from->si_signo);
err |= __get_user(to->si_errno, &from->si_errno);
err |= __get_user(to->si_code, &from-... | 0 | [
"CWE-399"
] | linux-2.6 | e40cd10ccff3d9fbffd57b93780bee4b7b9bff51 | 252,412,625,442,733,600,000,000,000,000,000,000,000 | 19 | x86: clear DF before calling signal handler
The Linux kernel currently does not clear the direction flag before
calling a signal handler, whereas the x86/x86-64 ABI requires that.
Linux had this behavior/bug forever, but this becomes a real problem
with gcc version 4.3, which assumes that the direction flag is
correc... |
void open() { list.rewind(); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 123,521,548,973,830,350,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 struct nfs4_ff_layout_mirror *ff_layout_alloc_mirror(gfp_t gfp_flags)
{
struct nfs4_ff_layout_mirror *mirror;
mirror = kzalloc(sizeof(*mirror), gfp_flags);
if (mirror != NULL) {
spin_lock_init(&mirror->lock);
refcount_set(&mirror->ref, 1);
INIT_LIST_HEAD(&mirror->mirrors);
}
return mirror;
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 184,560,789,726,157,730,000,000,000,000,000,000,000 | 12 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
static int tipc_sk_insert(struct tipc_sock *tsk)
{
struct sock *sk = &tsk->sk;
struct net *net = sock_net(sk);
struct tipc_net *tn = net_generic(net, tipc_net_id);
u32 remaining = (TIPC_MAX_PORT - TIPC_MIN_PORT) + 1;
u32 portid = prandom_u32() % remaining + TIPC_MIN_PORT;
while (remaining--) {
portid++;
if (... | 0 | [
"CWE-703"
] | linux | 45e093ae2830cd1264677d47ff9a95a71f5d9f9c | 49,892,430,050,799,670,000,000,000,000,000,000,000 | 22 | tipc: check nl sock before parsing nested attributes
Make sure the socket for which the user is listing publication exists
before parsing the socket netlink attributes.
Prior to this patch a call without any socket caused a NULL pointer
dereference in tipc_nl_publ_dump().
Tested-and-reported-by: Baozeng Ding <splovi... |
void Inspect::operator()(Assignment_Ptr assn)
{
append_token(assn->variable(), assn);
append_colon_separator();
assn->value()->perform(this);
if (assn->is_default()) {
append_optional_space();
append_string("!default");
}
append_delimiter();
} | 0 | [
"CWE-476"
] | libsass | 38f4c3699d06b64128bebc7cf1e8b3125be74dc4 | 230,841,634,087,045,750,000,000,000,000,000,000,000 | 11 | Fix possible bug with handling empty reference combinators
Fixes #2665 |
static void dump_pagetable(unsigned long address)
{
pgd_t *base = __va(read_cr3());
pgd_t *pgd = &base[pgd_index(address)];
pmd_t *pmd;
pte_t *pte;
#ifdef CONFIG_X86_PAE
printk("*pdpt = %016Lx ", pgd_val(*pgd));
if (!low_pfn(pgd_val(*pgd) >> PAGE_SHIFT) || !pgd_present(*pgd))
goto out;
#endif
pmd = pmd_offset... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 186,573,364,097,277,500,000,000,000,000,000,000,000 | 29 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
static int tipc_ehdr_build(struct net *net, struct tipc_aead *aead,
u8 tx_key, struct sk_buff *skb,
struct tipc_crypto *__rx)
{
struct tipc_msg *hdr = buf_msg(skb);
struct tipc_ehdr *ehdr;
u32 user = msg_user(hdr);
u64 seqno;
int ehsz;
/* Make room for encryption header */
ehsz = (user != LINK_CONFI... | 0 | [
"CWE-20"
] | linux | fa40d9734a57bcbfa79a280189799f76c88f7bb0 | 90,022,925,516,424,000,000,000,000,000,000,000,000 | 59 | tipc: fix size validations for the MSG_CRYPTO type
The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages
to receive keys from other nodes in the cluster in order to decrypt any
further messages from them.
This patch verifies that any supplied sizes in the message body are
valid for the received message... |
static void build_guest_fsinfo_for_virtual_device(char const *syspath,
GuestFilesystemInfo *fs,
Error **errp)
{
DIR *dir;
char *dirpath;
struct dirent *entry;
dirpath = g_strdup_printf("%s/slaves", syspa... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 158,328,791,243,104,520,000,000,000,000,000,000,000 | 45 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
static inline char *
string_extract_single_quoted (string, sindex)
char *string;
int *sindex;
{
register int i;
size_t slen;
char *t;
DECLARE_MBSTATE;
/* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */
slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
i = *... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 233,935,451,620,095,700,000,000,000,000,000,000,000 | 23 | Bash-4.4 patch 7 |
void KrecipesView::editRecipe()
{
KrePanel vis_panel = panelMap[ rightPanel->visiblePanel() ];
switch ( vis_panel ) {
case RecipeView:
actionRecipe( viewPanel->currentRecipes() [ 0 ], 1 );
break;
case SelectP:
selectPanel->getActionsHandler()->edit();
break;
case MatcherP:
ingredientMatcherPanel->getAct... | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 21,274,183,578,996,853,000,000,000,000,000,000,000 | 17 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
static void urlParsePostBody(struct URL *url,
const struct HttpConnection *http,
const char *buf, int len) {
struct HashMap contentType;
initHashMap(&contentType, urlDestroyHashMapEntry, NULL);
const char *ctHeader = getFromHashMap(&http->header, "cont... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | shellinabox | 4f0ecc31ac6f985e0dd3f5a52cbfc0e9251f6361 | 285,165,302,624,117,740,000,000,000,000,000,000,000 | 71 | Rolling code for version 2.21 |
static int retrieve_ptr_limit(const struct bpf_reg_state *ptr_reg,
const struct bpf_reg_state *off_reg,
u32 *alu_limit, u8 opcode)
{
bool off_is_neg = off_reg->smin_value < 0;
bool mask_to_left = (opcode == BPF_ADD && off_is_neg) ||
(opcode == BPF_SUB && !off_is_neg);
u32 max = 0, ptr_limit... | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 197,233,882,200,896,700,000,000,000,000,000,000,000 | 38 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
static void preloadobjstms(fz_context *ctx, pdf_document *doc)
{
pdf_obj *obj;
int num;
int xref_len = pdf_xref_len(ctx, doc);
for (num = 0; num < xref_len; num++)
{
if (pdf_get_xref_entry(ctx, doc, num)->type == 'o')
{
obj = pdf_load_object(ctx, doc, num);
pdf_drop_obj(ctx, obj);
}
}
} | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 199,911,020,102,260,400,000,000,000,000,000,000,000 | 15 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
int streamParseStrictIDOrReply(client *c, robj *o, streamID *id, uint64_t missing_seq, int *seq_given) {
return streamGenericParseIDOrReply(c,o,id,missing_seq,1,seq_given);
} | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 146,731,482,412,628,700,000,000,000,000,000,000,000 | 3 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
GF_Err dims_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_DIMSSampleEntryBox *ptr = (GF_DIMSSampleEntryBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_DIMC:
BOX_FIELD_ASSIGN(config, GF_DIMSSceneConfigBox)
break;
case GF_ISOM_BOX_TYPE_DIST:
BOX_FIELD_ASSIGN(scripts, GF_DIMSScriptTypesBox)
break;
}... | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 195,695,596,086,208,930,000,000,000,000,000,000,000 | 13 | fixed #1768 |
ns_client_sendraw(ns_client_t *client, dns_message_t *message) {
isc_result_t result;
unsigned char *data;
isc_buffer_t buffer;
isc_region_t r;
isc_region_t *mr;
REQUIRE(NS_CLIENT_VALID(client));
CTRACE("sendraw");
mr = dns_message_getrawmessage(message);
if (mr == NULL) {
result = ISC_R_UNEXPECTEDEND;
... | 0 | [
"CWE-617"
] | bind9 | 15996f0cb15631b95a801e3e88928494a69ad6ee | 180,156,904,690,619,540,000,000,000,000,000,000,000 | 64 | ns_client_error() could assert if rcode was overridden to NOERROR
The client->rcode_override was originally created to force the server
to send SERVFAIL in some cases when it would normally have sent FORMERR.
More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2
commit (part of GL #2790) to force the... |
static int atusb_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{
struct atusb *atusb = hw->priv;
int ret;
ret = atusb_write_subreg(atusb, SR_CHANNEL, channel);
if (ret < 0)
return ret;
return 0;
} | 0 | [
"CWE-416"
] | linux | 7fd25e6fc035f4b04b75bca6d7e8daa069603a76 | 309,576,404,590,828,750,000,000,000,000,000,000,000 | 10 | ieee802154: atusb: fix use-after-free at disconnect
The disconnect callback was accessing the hardware-descriptor private
data after having having freed it.
Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver")
Cc: stable <stable@vger.kernel.org> # 4.2
Cc: Alexander Aring <alex.aring@gmail.com>
Re... |
do_add_recipient (ctrl_t ctrl, const char *name,
certlist_t *recplist, int is_encrypt_to, int recp_required)
{
int rc = gpgsm_add_to_certlist (ctrl, name, 0, recplist, is_encrypt_to);
if (rc)
{
if (recp_required)
{
log_error ("can't encrypt to '%s': %s\n", name, gpg_str... | 0 | [] | gnupg | abd5f6752d693b7f313c19604f0723ecec4d39a6 | 252,912,023,658,385,630,000,000,000,000,000,000,000 | 17 | dirmngr,gpgsm: Return NULL on fail
* dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
* sm/gpgsm.c (parse_keyserver_line): Ditto.
--
Reported-by: Joshua Rogers <git@internot.info>
"If something inside the ldapserver_parse_one function failed,
'server' would be freed, then returned, leading to a
... |
void _modinit(module_t *m)
{
service_named_bind_command("chanserv", &cs_flags);
} | 1 | [
"CWE-284"
] | atheme | c597156adc60a45b5f827793cd420945f47bc03b | 35,445,785,264,083,520,000,000,000,000,000,000,000 | 4 | chanserv/flags: make Anope FLAGS compatibility an option
Previously, ChanServ FLAGS behavior could be modified by registering or
dropping the keyword nicks "LIST", "CLEAR", and "MODIFY".
Now, a configuration option is available that when turned on (default),
disables registration of these keyword nicks and enables thi... |
static int FNAME(walk_addr_generic)(struct guest_walker *walker,
struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
gpa_t addr, u64 access)
{
int ret;
pt_element_t pte;
pt_element_t __user *ptep_user;
gfn_t table_gfn;
u64 pt_access, pte_access;
unsigned index, accessed_dirty, pte_pkey;
u64 nested_access... | 0 | [
"CWE-416"
] | linux | f122dfe4476890d60b8c679128cd2259ec96a24c | 313,159,861,811,772,040,000,000,000,000,000,000,000 | 208 | KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits
Use the recently introduced __try_cmpxchg_user() to update guest PTE A/D
bits instead of mapping the PTE into kernel address space. The VM_PFNMAP
path is broken as it assumes that vm_pgoff is the base pfn of the mapped
VMA range, which is conceptually wr... |
SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
{
struct socket *sock;
struct sockaddr_storage address;
int err, fput_needed;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (sock) {
err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address);
if (err >= 0) ... | 0 | [] | linux-2.6 | 644595f89620ba8446cc555be336d24a34464950 | 100,680,354,279,348,760,000,000,000,000,000,000,000 | 22 | compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c
Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct
timeval and struct timespec to userspace in net/socket.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> |
void create_length_to_internal_length_null()
{
DBUG_ASSERT(length == 0);
key_length= pack_length= 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 223,700,204,635,508,270,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
//! Convert pixel values from RGB to CMY color spaces.
CImg<T>& RGBtoCMY() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"RGBtoCMY(): Instance is not a RGB image.",
cimg_instance);
T *p1 = data(0,0,0,0)... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 266,396,579,249,694,450,000,000,000,000,000,000,000 | 23 | . |
set_sigint_handler ()
{
if (sigmodes[SIGINT] & SIG_HARD_IGNORE)
return ((SigHandler *)SIG_IGN);
else if (sigmodes[SIGINT] & SIG_IGNORED)
return ((SigHandler *)set_signal_handler (SIGINT, SIG_IGN)); /* XXX */
else if (sigmodes[SIGINT] & SIG_TRAPPED)
return ((SigHandler *)set_signal_handler (SIGINT, t... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 220,071,258,754,061,300,000,000,000,000,000,000,000 | 18 | bash-4.4-rc2 release |
RequestParser::RequestParser() : request_(nullptr) {
} | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 210,038,562,691,637,730,000,000,000,000,000,000,000 | 2 | fix static file serving security issue; fix url path encoding issue |
static int map_create(union bpf_attr *attr)
{
int numa_node = bpf_map_attr_numa_node(attr);
struct bpf_map *map;
int f_flags;
int err;
err = CHECK_ATTR(BPF_MAP_CREATE);
if (err)
return -EINVAL;
if (attr->btf_vmlinux_value_type_id) {
if (attr->map_type != BPF_MAP_TYPE_STRUCT_OPS ||
attr->btf_key_type_... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 39,824,529,893,475,023,000,000,000,000,000,000,000 | 114 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
static bool kbd_match(struct input_handler *handler, struct input_dev *dev)
{
int i;
if (test_bit(EV_SND, dev->evbit))
return true;
if (test_bit(EV_KEY, dev->evbit)) {
for (i = KEY_RESERVED; i < BTN_MISC; i++)
if (test_bit(i, dev->keybit))
return true;
for (i = KEY_BRL_DOT1; i <= KEY_BRL_DOT10; i++)
... | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 31,316,148,261,356,230,000,000,000,000,000,000,000 | 18 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
dissect_kafka_string_new(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int hf_item, int offset, int *p_string_offset, int *p_string_length)
{
gint64 val;
guint len;
proto_item *pi;
len = tvb_get_varint(tvb, offset, 5, &val, ENC_VARINT_ZIGZAG);
if (len == 0) {
pi = proto_tree_add... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 42,766,368,779,534,260,000,000,000,000,000,000,000 | 38 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
int cil_resolve_portcon(struct cil_tree_node *current, void *extra_args)
{
struct cil_portcon *portcon = current->data;
struct cil_symtab_datum *context_datum = NULL;
int rc = SEPOL_ERR;
if (portcon->context_str != NULL) {
rc = cil_resolve_name(current, portcon->context_str, CIL_SYM_CONTEXTS, extra_args, &contex... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 254,362,680,320,195,700,000,000,000,000,000,000,000 | 24 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static int tcp_sack_cache_ok(const struct tcp_sock *tp, const struct tcp_sack_block *cache)
{
return cache < tp->recv_sack_cache + ARRAY_SIZE(tp->recv_sack_cache);
} | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 10,458,078,271,409,826,000,000,000,000,000,000,000 | 4 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
static void sync_child_event(struct perf_event *child_event,
struct task_struct *child)
{
struct perf_event *parent_event = child_event->parent;
u64 child_val;
if (child_event->attr.inherit_stat)
perf_event_read_event(child_event, child);
child_val = perf_event_count(child_event);
/*
* Add back th... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 294,720,815,319,598,500,000,000,000,000,000,000,000 | 34 | 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... |
void usb_device_handle_attach(USBDevice *dev)
{
USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev);
if (klass->handle_attach) {
klass->handle_attach(dev);
}
} | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 244,323,472,503,348,300,000,000,000,000,000,000,000 | 7 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
static inline char *alloc_secdata(void)
{
return (char *)get_zeroed_page(GFP_KERNEL);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 235,608,650,024,836,700,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c)
{
struct RProc *p;
mrb_sym mid = mrb->c->ci->mid;
mrb_callinfo *ci;
mrb_value val;
mrb_int n;
check_block(mrb, b);
ci = mrb->c->ci;
n = mrb_ci_nregs(ci);
p = mrb_proc_ptr(b);
ci ... | 0 | [
"CWE-416",
"CWE-787"
] | mruby | aaa28a508903041dd7399d4159a8ace9766b022f | 312,833,174,662,784,700,000,000,000,000,000,000,000 | 43 | vm.c: stack may be reallocated in functions calls.
Probably due to recursive VM calls via `mrb_funcall()`. |
mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *ab, MonoString *fileName)
{
char *name;
MonoImage *image;
MonoImageOpenStatus status;
MonoDynamicAssembly *assembly;
guint32 module_count;
MonoImage **new_modules;
gboolean *new_modules_loaded;
name = mono_string_to_utf8 (fileName);
image = mono... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 251,125,416,184,071,060,000,000,000,000,000,000,000 | 53 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static noinline int init_first_rw_device(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info)
{
u64 chunk_offset;
u64 sys_chunk_offset;
u64 alloc_profile;
int ret;
chunk_offset = find_next_chunk(fs_info);
alloc_profile = btrfs_metadata_alloc_profile(fs_info);
ret = __btrfs_alloc_chunk(trans, c... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 247,313,597,408,530,600,000,000,000,000,000,000,000 | 19 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
zfont_global_glyph_code(const gs_memory_t *mem, gs_const_string *gstr, gs_glyph *pglyph)
{
ref v;
int code = name_ref(mem, gstr->data, gstr->size, &v, 0);
if (code < 0)
return code;
*pglyph = (gs_glyph)name_index(mem, &v);
return 0;
} | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 153,868,075,304,476,300,000,000,000,000,000,000,000 | 10 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
mysql_ping(MYSQL *mysql)
{
int res;
DBUG_ENTER("mysql_ping");
res= simple_command(mysql,COM_PING,0,0,0);
if (res == CR_SERVER_LOST && mysql->reconnect)
res= simple_command(mysql,COM_PING,0,0,0);
DBUG_RETURN(res);
} | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 123,930,945,900,362,860,000,000,000,000,000,000,000 | 9 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
{
/* This is only valid for single tasks */
if (pid <= 0 || tgid <= 0)
return -EINVAL;
/* Not even root can pretend to send signals from the kernel.
* Nor can they impersonate a kill()/tgkill(), which adds source info.
*/
if (info->si... | 1 | [] | linux-2.6 | 243b422af9ea9af4ead07a8ad54c90d4f9b6081a | 283,021,141,878,868,740,000,000,000,000,000,000,000 | 18 | Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo
Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo
from spoofing the signal code") made the check on si_code too strict.
There are several legitimate places where glibc wants to queue a
negative si_code different from SI_QUEUE:
- This was ... |
getUint8(uint8_t* buffer)
{
return buffer[0];
} | 0 | [
"CWE-122"
] | libiec61850 | 033ab5b6488250c8c3b838f25a7cbc3e099230bb | 334,908,515,751,420,370,000,000,000,000,000,000,000 | 4 | - COTP: fixed possible heap buffer overflow when handling message with invalid (zero) value in length field (#250) |
sasl_authxid_can_login(struct sasl_session *const restrict p, const char *const restrict authxid,
struct myuser **const restrict muo, char *const restrict val_name,
char *const restrict val_eid, const char *const restrict other_val_eid)
{
return_val_if_fail(p != NULL, fals... | 0 | [
"CWE-287",
"CWE-288"
] | atheme | 4e664c75d0b280a052eb8b5e81aa41944e593c52 | 230,184,601,148,723,400,000,000,000,000,000,000,000 | 53 | saslserv/main: Track EID we're pending login to
The existing model does not remember that we've sent a SVSLOGIN for a
given SASL session, and simply assumes that if a client is introduced
with a SASL session open, that session must have succeeded. The security
of this approach requires ircd to implicitly abort SASL se... |
void t_go_generator::generate_deserialize_container(ofstream& out,
t_type* orig_type,
bool pointer_field,
bool declare,
... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 16,221,944,225,506,617,000,000,000,000,000,000,000 | 74 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
static CURLcode ossl_connect_step3(struct Curl_easy *data,
struct connectdata *conn, int sockindex)
{
CURLcode result = CURLE_OK;
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
/*
* We check certificates ... | 0 | [] | curl | 139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08 | 126,271,105,218,148,050,000,000,000,000,000,000,000 | 23 | openssl: don't leak the SRP credentials in redirects either
Follow-up to 620ea21410030
Reported-by: Harry Sintonen
Closes #8751 |
static void migrate_dead(unsigned int dead_cpu, struct task_struct *p)
{
struct rq *rq = cpu_rq(dead_cpu);
/* Must be exiting, otherwise would be on tasklist. */
BUG_ON(!p->exit_state);
/* Cannot have done final schedule yet: would have vanished. */
BUG_ON(p->state == TASK_DEAD);
get_task_struct(p);
/*
* D... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 246,223,990,373,990,420,000,000,000,000,000,000,000 | 23 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static void naludmx_queue_param_set(GF_NALUDmxCtx *ctx, char *data, u32 size, u32 ps_type, s32 ps_id)
{
GF_List *list = NULL, *alt_list = NULL;
GF_NALUFFParam *sl;
u32 i, count, crc;
if (!size) return;
crc = gf_crc_32(data, size);
if (ctx->codecid==GF_CODECID_HEVC) {
switch (ps_type) {
case GF_HEVC_NALU_VID... | 0 | [
"CWE-476"
] | gpac | b43f9d1a4b4e33d08edaef6d313e6ce4bdf554d3 | 251,019,785,237,596,850,000,000,000,000,000,000,000 | 121 | fixed #2223 |
static size_t buffered_output(pn_transport_t *transport)
{
size_t count = 0;
pni_ssl_t *ssl = transport->ssl;
if (ssl) {
count += ssl->out_count;
if (ssl->bio_net_io) { // pick up any bytes waiting for network io
count += BIO_ctrl_pending(ssl->bio_net_io);
}
}
return count;
} | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 329,392,008,417,751,140,000,000,000,000,000,000,000 | 12 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
xmlDictCreateSub(xmlDictPtr sub) {
xmlDictPtr dict = xmlDictCreate();
if ((dict != NULL) && (sub != NULL)) {
#ifdef DICT_DEBUG_PATTERNS
fprintf(stderr, "R");
#endif
dict->subdict = sub;
xmlDictReference(dict->subdict);
}
return(dict);
} | 1 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 122,348,190,032,430,250,000,000,000,000,000,000,000 | 12 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
static Status Compute(OpKernelContext* context,
const typename TTypes<Tidx, 1>::ConstTensor& arr,
const typename TTypes<T, 1>::ConstTensor& weights,
typename TTypes<T, 1>::Tensor& output,
const Tidx num_bins) {
Tensor ... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | eebb96c2830d48597d055d247c0e9aebaea94cd5 | 243,152,964,418,099,170,000,000,000,000,000,000,000 | 41 | Fix an invalid address vulnerability in `tf.raw_ops.RaggedBincount`.
PiperOrigin-RevId: 368293153
Change-Id: I4b4e493d3fd05e7dc55a55de3a041a80a4f275c3 |
static int snd_ctl_dev_disconnect(struct snd_device *device)
{
struct snd_card *card = device->device_data;
struct snd_ctl_file *ctl;
int err, cardnum;
if (snd_BUG_ON(!card))
return -ENXIO;
cardnum = card->number;
if (snd_BUG_ON(cardnum < 0 || cardnum >= SNDRV_CARDS))
return -ENXIO;
read_lock(&card->ctl_fi... | 0 | [
"CWE-190",
"CWE-189"
] | linux | ac902c112d90a89e59916f751c2745f4dbdbb4bd | 33,369,253,287,297,530,000,000,000,000,000,000,000 | 24 | ALSA: control: Handle numid overflow
Each control gets automatically assigned its numids when the control is created.
The allocation is done by incrementing the numid by the amount of allocated
numids per allocation. This means that excessive creation and destruction of
controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMO... |
mime_application_hash (GAppInfo *app)
{
const char *id;
id = g_app_info_get_id (app);
if (id == NULL)
{
return GPOINTER_TO_UINT (app);
}
return g_str_hash (id);
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 289,658,580,841,261,770,000,000,000,000,000,000,000 | 13 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
void GrpcStreamClientHandler::onRemoteClose(Grpc::Status::GrpcStatus status,
const std::string& message) {
context->onGrpcClose(token, status, message);
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 26,611,688,597,433,670,000,000,000,000,000,000,000 | 4 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
TEST_F(QueryPlannerTest, CantExplodeWithEmptyBounds2) {
addIndex(BSON("a" << 1 << "b" << 1 << "c" << 1));
runQuerySortProj(fromjson("{a: {$gt: 3, $lt: 0}}"), BSON("b" << 1), BSONObj());
assertNumSolutions(2U);
assertSolutionExists(
"{sort: {pattern: {b:1}, limit: 0, node: {sortKeyGen: {node: "
... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 19,533,249,080,697,270,000,000,000,000,000,000,000 | 12 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
md_skip_unicode_whitespace(const CHAR* label, OFF off, SZ size)
{
SZ char_size;
unsigned codepoint;
while(off < size) {
codepoint = md_decode_unicode(label, off, size, &char_size);
if(!ISUNICODEWHITESPACE_(codepoint) && !ISNEWLINE_(label[off]))
break;
off += char_size;... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 200,878,028,662,726,400,000,000,000,000,000,000,000 | 14 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
qb_rb_chunk_peek(struct qb_ringbuffer_s * rb, void **data_out, int32_t timeout)
{
uint32_t read_pt;
uint32_t chunk_size;
uint32_t chunk_magic;
int32_t res = 0;
if (rb == NULL) {
return -EINVAL;
}
if (rb->notifier.timedwait_fn) {
res = rb->notifier.timedwait_fn(rb->notifier.instance, timeout);
}
if (res < ... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 26,898,046,077,076,614,000,000,000,000,000,000,000 | 38 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
MemoryRegion *address_space_translate(AddressSpace *as, hwaddr addr,
hwaddr *xlat, hwaddr *plen,
bool is_write)
{
IOMMUTLBEntry iotlb;
MemoryRegionSection *section;
MemoryRegion *mr;
rcu_read_lock();
for (;;) {
Addr... | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 129,442,289,371,245,500,000,000,000,000,000,000,000 | 39 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
const char* ExpressionCond::getOpName() const {
return "$cond";
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 158,598,152,899,594,500,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
void zfree_no_tcache(void *ptr) {
if (ptr == NULL) return;
update_zmalloc_stat_free(zmalloc_size(ptr));
dallocx(ptr, MALLOCX_TCACHE_NONE);
} | 0 | [
"CWE-190"
] | redis | d32f2e9999ce003bad0bd2c3bca29f64dcce4433 | 121,042,024,051,275,300,000,000,000,000,000,000,000 | 5 | Fix integer overflow (CVE-2021-21309). (#8522)
On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309).
This fix has two parts:
Set a reasonable limit to the config parameter.
A... |
WandExport void DrawSkewX(DrawingWand *wand,const double degrees)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
(void) MVGPrintf(wand,"skewX %.20g\n",degrees);
} | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 170,225,377,880,240,230,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/716 |
int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
const SSL_CIPHER *const *bp)
{
long l;
l = (*ap)->id - (*bp)->id;
if (l == 0L)
return (0);
else
return ((l > 0) ? 1 : -1);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 86,009,423,120,954,900,000,000,000,000,000,000,000 | 11 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
static void set_pixel_format(VncState *vs,
int bits_per_pixel, int depth,
int big_endian_flag, int true_color_flag,
int red_max, int green_max, int blue_max,
int red_shift, int green_shift, int blue_shift... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 324,496,784,351,134,270,000,000,000,000,000,000,000 | 33 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
std::string help() const override {
return "Revokes privileges from a role";
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 123,861,696,082,239,340,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
void CClient::Update()
{
if(State() == IClient::STATE_DEMOPLAYBACK)
{
m_DemoPlayer.Update();
if(m_DemoPlayer.IsPlaying())
{
// update timers
const CDemoPlayer::CPlaybackInfo *pInfo = m_DemoPlayer.Info();
m_CurGameTick = pInfo->m_Info.m_CurrentTick;
m_PrevGameTick = pInfo->m_PreviousTick;
m_GameIn... | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 269,614,721,713,107,000,000,000,000,000,000,000,000 | 140 | added some checks to snap handling |
void GetSizeSplitsVector(const TfLiteTensor* size_splits,
std::vector<int64_t>* size_splits_vector) {
const auto num_elements = NumElements(size_splits);
for (int i = 0; i < num_elements; ++i) {
size_splits_vector->push_back(GetTensorData<T>(size_splits)[i]);
}
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 137,991,284,238,334,580,000,000,000,000,000,000,000 | 7 | [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... |
void operator()(OpKernelContext* context, const Tensor& x,
const Tensor& scale, const Tensor& offset,
const Tensor& estimated_mean,
const Tensor& estimated_variance, const Tensor* side_input,
U epsilon, U exponential_avg_factor,
... | 0 | [
"CWE-125"
] | tensorflow | aab9998916c2ffbd8f0592059fad352622f89cda | 237,398,188,338,344,200,000,000,000,000,000,000,000 | 222 | Add shape checks to FusedBatchNorm kernels.
PiperOrigin-RevId: 399755576
Change-Id: If8049fde109cc33badb5509d174b9b95aee1ea5e |
int read_record_hdr(int ifd, void *buffer, struct record_header *record_hdr,
struct file_header *file_hdr, int arch_64, int endian_mismatch,
int oneof, size_t b_size, uint64_t flags)
{
int rc;
do {
if ((rc = sa_fread(ifd, buffer, (size_t) file_hdr->rec_size, SOFT_SIZE, oneof)) != 0)
/* End of sa dat... | 0 | [
"CWE-415"
] | sysstat | a5c8abd4a481ee6e27a3acf00e6d9b0f023e20ed | 241,691,196,470,695,950,000,000,000,000,000,000,000 | 43 | Fix #242: Double free in check_file_actlst()
Avoid freeing buffer() twice.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue",
test_lsi_do_dma_empty_queue);
qtest_add_func("fuzz/lsi53c895a/lsi_do_msgout_cancel_req",
test_lsi_do_msgout_cancel_req);
return g_test_run(... | 0 | [] | qemu | 4367a20cc442c56b05611b4224de9a61908f9eac | 107,235,085,817,723,560,000,000,000,000,000,000,000 | 12 | scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216)
Set current_req to NULL, not current_req->req, to prevent reusing a free'd
buffer in case of repeated SCSI cancel requests. Also apply the fix to
CLEAR QUEUE and BUS DEVICE RESET messages as well, since they also cancel
the request.
Thanks t... |
static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
{
uint64_t l = x * (mantissa & 0xffffffff);
uint64_t h = x * (mantissa >> 32);
h += l >> 32;
l &= 0xffffffff;
l += 1 << av_log2(h >> 21);
h += l >> 32;
return h >> 20;
} | 0 | [
"CWE-787"
] | FFmpeg | 4c3e1956ee35fdcc5ffdb28782050164b4623c0b | 272,664,741,241,978,270,000,000,000,000,000,000,000 | 10 | lagarith: reallocate rgb_planes when needed
Fixes invalid writes on pixel format changes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
BOOL license_write_new_license_request_packet(rdpLicense* license, wStream* s)
{
UINT32 PlatformId = PLATFORMID;
UINT32 PreferredKeyExchangeAlg = KEY_EXCHANGE_ALG_RSA;
Stream_Write_UINT32(s, PreferredKeyExchangeAlg); /* PreferredKeyExchangeAlg (4 bytes) */
Stream_Write_UINT32(s, PlatformId); /* Platfo... | 0 | [
"CWE-125"
] | FreeRDP | 6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a | 213,071,577,410,407,560,000,000,000,000,000,000,000 | 34 | Fixed OOB Read in license_read_new_or_upgrade_license_packet
CVE-2020-11099 thanks to @antonio-morales for finding this. |
gx_default_create_compositor(gx_device * dev, gx_device ** pcdev,
const gs_composite_t * pcte,
gs_gstate * pgs, gs_memory_t * memory,
gx_device *cdev)
{
return pcte->type->procs.create_default_compositor
(pcte, pcdev, dev... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 51,776,582,757,893,030,000,000,000,000,000,000,000 | 8 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
static void ipip_tunnel_bind_dev(struct net_device *dev)
{
struct net_device *tdev = NULL;
struct ip_tunnel *tunnel;
struct iphdr *iph;
tunnel = netdev_priv(dev);
iph = &tunnel->parms.iph;
if (iph->daddr) {
struct flowi fl = { .oif = tunnel->parms.link,
.nl_u = { .ip4_u =
{ .daddr = iph->da... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 238,331,087,350,966,200,000,000,000,000,000,000,000 | 33 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int mode){
return ssh_scp_push_file64(scp, filename, (uint64_t) size, mode);
} | 1 | [] | libssh | 4aea835974996b2deb011024c53f4ff4329a95b5 | 65,560,746,232,969,330,000,000,000,000,000,000,000 | 3 | CVE-2019-14889: scp: Reformat scp.c
Fixes T181
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 42c727d0c186a1e2fa84a31ab40e16e58b404ab3) |
static int forgive(int n,int& err)
{
err = WSAGetLastError() ;
if ( !n && !err ) return FINISH ;
#ifndef WIN32
if ( n == 0 ) return FINISH ; // server hungup
#endif
bool bForgive = err == WSAEWOULDBLOCK || err == WSAENOTCONN ;
bool bError = n == SOCKET_ERROR ;
if ( bError && bForgive ) return... | 0 | [
"CWE-476"
] | exiv2 | ae20c30805b330275b2aa0303a42e1f2bbd53661 | 45,267,609,222,989,980,000,000,000,000,000,000,000 | 12 | Avoid null pointer exception due to NULL return value from strchr.
This fixes #793. |
PJ_DEF(pj_status_t) pjmedia_wav_player_port_create( pj_pool_t *pool,
const char *filename,
unsigned ptime,
unsigned options,
pj_ssize_t buff_size,
pjmedia_port **p_port )
{
pjmedia_wave_hdr wave_hdr;
pj_ssize_t size_to_read, size_read;
struct file_reade... | 1 | [
"CWE-703",
"CWE-835"
] | pjproject | 947bc1ee6d05be10204b918df75a503415fd3213 | 7,827,034,508,051,481,000,000,000,000,000,000,000 | 249 | Merge pull request from GHSA-rwgw-vwxg-q799
* Prevent potential infinite loop when parsing WAV format file
* Check if subchunk is negative.
* Fix and add checks
* Change data type from pj_ssize_t to long.
* Modify check
* Fix leak file descriptor and modify check on wav_playlist
* Move overflow/underflow check t... |
static void tag_free(DOS_FS * fs, DOS_FILE * owner, uint32_t *num_refs,
uint32_t start_cluster)
{
int prev;
uint32_t i, walk;
if (start_cluster == 0)
start_cluster = 2;
for (i = start_cluster; i < fs->clusters + 2; i++) {
FAT_ENTRY curEntry;
get_fat(&curEntry, fs->fat, i, fs);
/* If the cu... | 0 | [
"CWE-703",
"CWE-189"
] | dosfstools | 07908124838afcc99c577d1d3e84cef2dbd39cb7 | 19,692,885,943,177,140,000,000,000,000,000,000,000 | 42 | set_fat(): Fix off-by-2 error leading to corruption in FAT12
In FAT12 two 12 bit entries are combined to a 24 bit value (three
bytes). Therefore, when an even numbered FAT entry is set in FAT12, it
must be be combined with the following entry. To prevent accessing
beyond the end of the FAT array, it must be checked th... |
ResetCharsets(p)
struct win *p;
{
p->w_gr = nwin_default.gr;
p->w_c1 = nwin_default.c1;
SetCharsets(p, "BBBB02");
if (nwin_default.charset)
SetCharsets(p, nwin_default.charset);
#ifdef ENCODINGS
ResetEncoding(p);
#endif
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 134,070,153,311,797,330,000,000,000,000,000,000,000 | 12 | 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.