func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void ima_adpcm_reset1 (_AFmoduleinst *i)
{
ima_adpcm_data *d = (ima_adpcm_data *) i->modspec;
int framesPerBlock = d->framesPerBlock;
AFframecount nextTrackFrame = d->track->nextfframe;
d->track->nextfframe = (nextTrackFrame / framesPerBlock) *
framesPerBlock;
d->framesToIgnore = nextTrackFrame - d->tra... | 0 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 162,214,745,196,181,220,000,000,000,000,000,000,000 | 12 | Fix decoding of multi-channel ADPCM audio files. |
struct sk_buff *rtmsg_ifinfo_build_skb(int type, struct net_device *dev,
unsigned int change,
u32 event, gfp_t flags, int *new_nsid)
{
struct net *net = dev_net(dev);
struct sk_buff *skb;
int err = -ENOBUFS;
size_t if_info_size;
skb = nlmsg_new((if_info_size = if_nlmsg_size(dev, 0)), flags);... | 0 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 26,973,825,317,059,587,000,000,000,000,000,000,000 | 28 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
ip_print(netdissect_options *ndo,
const u_char *bp,
u_int length)
{
struct ip_print_demux_state ipd;
struct ip_print_demux_state *ipds=&ipd;
const u_char *ipend;
u_int hlen;
struct cksum_vec vec[1];
uint16_t sum, ip_sum;
const char *p_name;
ipds->ip = (const struct ip *)bp;
ND_TCHECK(ipds->ip->ip_vhl);
... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | eee0b04bcfdae319c242b0b8fc3d07029ee65b8c | 213,456,081,405,728,800,000,000,000,000,000,000,000 | 166 | CVE-2017-13022/IP: Add bounds checks to ip_printroute().
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't be rejected as an invalid capture. |
static void init_qxl_surface(QXLSurfaceCmd *qxl)
{
void *surface_mem;
memset(qxl, 0, sizeof(*qxl));
qxl->surface_id = 123;
qxl->u.surface_create.format = SPICE_SURFACE_FMT_32_xRGB;
qxl->u.surface_create.width = 128;
qxl->u.surface_create.stride = 512;
qxl->u.surface_create.height = 128;
... | 0 | [
"CWE-193"
] | spice | a4a16ac42d2f19a17e36556546aa94d5cd83745f | 237,863,734,082,424,640,000,000,000,000,000,000,000 | 15 | memslot: Fix off-by-one error in group/slot boundary check
RedMemSlotInfo keeps an array of groups, and each group contains an
array of slots. Unfortunately, these checks are off by 1, they check
that the index is greater or equal to the number of elements in the
array, while these arrays are 0 based. The check should... |
void tref_del(GF_Box *s)
{
GF_TrackReferenceBox *ptr = (GF_TrackReferenceBox *)s;
if (ptr == NULL) return;
gf_free(ptr);
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 167,561,681,560,871,210,000,000,000,000,000,000,000 | 6 | fixed 2 possible heap overflows (inc. #1088) |
cleanup_backslash_2(wchar_t *p)
{
/* Convert a path-separator from '\' to '/' */
while (*p != L'\0') {
if (*p == L'\\')
*p = L'/';
p++;
}
} | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 113,066,107,763,285,030,000,000,000,000,000,000,000 | 10 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
auto createZeroedBuffer(size_t size) {
auto ret = IOBuf::create(size);
ret->append(size);
std::memset(ret->writableData(), 0x00, size);
return ret;
} | 0 | [
"CWE-119",
"CWE-787"
] | wangle | 5b3bceca875e4ea4ed9d14c20b20ce46c92c13c6 | 22,988,446,032,392,322,000,000,000,000,000,000,000 | 6 | Peek for \n in LineBasedFrameDecoder.
Summary:
Previously this could underflow if there was not a following \n.
CVE-2019-3563
Reviewed By: siyengar
Differential Revision: D14935715
fbshipit-source-id: 25c3eecf373f89efa1232456aeeb092f13b7fa06 |
sraSpanListDup(const sraSpanList *src) {
sraSpanList *newlist;
sraSpan *newspan, *curr;
if (!src) return NULL;
newlist = sraSpanListCreate();
curr = src->front._next;
while (curr != &(src->back)) {
newspan = sraSpanDup(curr);
sraSpanInsertBefore(newspan, &(newlist->back));
curr = curr->_next;
... | 0 | [
"CWE-476"
] | libvncserver | 38e98ee61d74f5f5ab4aa4c77146faad1962d6d0 | 50,386,749,012,619,190,000,000,000,000,000,000,000 | 15 | libvncserver: add missing NULL pointer checks |
__ip_vs_unbind_svc(struct ip_vs_dest *dest)
{
struct ip_vs_service *svc = dest->svc;
dest->svc = NULL;
if (atomic_dec_and_test(&svc->refcnt))
kfree(svc);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 04bcef2a83f40c6db24222b27a52892cba39dffb | 251,032,037,988,672,460,000,000,000,000,000,000,000 | 8 | ipvs: Add boundary check on ioctl arguments
The ipvs code has a nifty system for doing the size of ioctl command
copies; it defines an array with values into which it indexes the cmd
to find the right length.
Unfortunately, the ipvs code forgot to check if the cmd was in the
range that the array provides, allowing fo... |
static inline int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 149,654,972,531,130,000,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... |
_signal_jobstep(uint32_t jobid, uint32_t stepid, uid_t req_uid,
uint32_t signal)
{
int fd, rc = SLURM_SUCCESS;
uid_t uid;
uint16_t protocol_version;
/* There will be no stepd if the prolog is still running
* Return failure so caller can retry.
*/
if (_prolog_is_running (jobid)) {
info ("s... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 135,197,905,036,320,580,000,000,000,000,000,000,000 | 61 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
static int get_password_from_file(int file_descript, char * filename)
{
int rc = 0;
int i;
char c;
if(mountpassword == NULL)
mountpassword = (char *)calloc(MOUNT_PASSWD_SIZE+1,1);
else
memset(mountpassword, 0, MOUNT_PASSWD_SIZE);
if (mountpassword == NULL) {
fprintf(stderr, "malloc failed\n");
exit(EX_... | 0 | [
"CWE-59"
] | samba | 3ae5dac462c4ed0fb2cd94553583c56fce2f9d80 | 251,413,992,569,313,430,000,000,000,000,000,000,000 | 64 | mount.cifs: take extra care that mountpoint isn't changed during mount
It's possible to trick mount.cifs into mounting onto the wrong directory
by replacing the mountpoint with a symlink to a directory. mount.cifs
attempts to check the validity of the mountpoint, but there's still a
possible race between those checks ... |
cmp_addr_policies(smartlist_t *a, smartlist_t *b)
{
int r, i;
int len_a = a ? smartlist_len(a) : 0;
int len_b = b ? smartlist_len(b) : 0;
for (i = 0; i < len_a && i < len_b; ++i) {
if ((r = cmp_single_addr_policy(smartlist_get(a, i), smartlist_get(b, i))))
return r;
}
if (i == len_a && i == len_b... | 1 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 224,323,832,711,172,140,000,000,000,000,000,000,000 | 17 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
_libssh2_packet_burn(LIBSSH2_SESSION * session,
libssh2_nonblocking_states * state)
{
unsigned char *data;
size_t data_len;
unsigned char i, all_packets[255];
int ret;
if(*state == libssh2_NB_state_idle) {
for(i = 1; i < 255; i++) {
all_packets[i - 1] = i;
... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 62,983,261,485,563,560,000,000,000,000,000,000,000 | 55 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct unix_iter_state *iter = seq->private;
struct sock *sk = v;
++*pos;
if (v == SEQ_START_TOKEN)
sk = first_unix_socket(&iter->i);
else
sk = next_unix_socket(&iter->i, sk);
while (sk && (sock_net(sk) != seq_file_net(seq)))
sk = nex... | 0 | [] | linux-2.6 | 6209344f5a3795d34b7f2c0061f49802283b6bdd | 229,350,608,664,477,500,000,000,000,000,000,000,000 | 14 | net: unix: fix inflight counting bug in garbage collector
Previously I assumed that the receive queues of candidates don't
change during the GC. This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may s... |
delete_item_response_cb (ESoapResponse *response,
GSimpleAsyncResult *simple)
{
ESoapParameter *param;
ESoapParameter *subparam;
GError *error = NULL;
param = e_soap_response_get_first_parameter_by_name (
response, "ResponseMessages", &error);
/* Sanity check */
g_return_if_fail (
(... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 155,306,337,501,396,660,000,000,000,000,000,000,000 | 31 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
lldp_decode(struct lldpd *cfg OVS_UNUSED, char *frame, int s,
struct lldpd_hardware *hardware, struct lldpd_chassis **newchassis,
struct lldpd_port **newport)
{
struct lldpd_chassis *chassis;
struct lldpd_port *port;
const struct eth_addr lldpaddr = LLDP_MULTICAST_ADDR;
const cha... | 1 | [
"CWE-400"
] | ovs | 78e712c0b1dacc2f12d2a03d98f083d8672867f0 | 226,724,193,427,354,530,000,000,000,000,000,000,000 | 356 | lldp: do not leak memory on multiple instances of TLVs
Upstream commit:
commit a8d3c90feca548fc0656d95b5d278713db86ff61
Date: Tue, 17 Nov 2020 09:28:17 -0500
lldp: avoid memory leak from bad packets
A packet that contains multiple instances of certain TLVs will cause
lldpd to continually allocate... |
load_list(UnpicklerObject *self)
{
PyObject *list;
Py_ssize_t i;
if ((i = marker(self)) < 0)
return -1;
list = Pdata_poplist(self->stack, i);
if (list == NULL)
return -1;
PDATA_PUSH(self->stack, list, -1);
return 0;
} | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 1,958,905,795,696,336,500,000,000,000,000,000,000 | 14 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
GF_Err gf_avc_get_pps_info(char *pps_data, u32 pps_size, u32 *pps_id, u32 *sps_id)
{
GF_BitStream *bs;
char *pps_data_without_emulation_bytes = NULL;
u32 pps_data_without_emulation_bytes_size = 0;
GF_Err e = GF_OK;
/*PPS still contains emulation bytes*/
pps_data_without_emulation_bytes = gf_malloc(pps_size*sizeo... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 47,471,420,837,845,180,000,000,000,000,000,000,000 | 25 | fix some exploitable overflows (#994, #997) |
sd_markdown_render(struct buf *ob, const uint8_t *document, size_t doc_size, struct sd_markdown *md)
{
#define MARKDOWN_GROW(x) ((x) + ((x) >> 1))
static const char UTF8_BOM[] = {0xEF, 0xBB, 0xBF};
struct buf *text;
size_t beg, end;
text = bufnew(64);
if (!text)
return;
/* Preallocate enough space for our bu... | 0 | [] | redcarpet | e5a10516d07114d582d13b9125b733008c61c242 | 95,804,911,723,920,380,000,000,000,000,000,000,000 | 91 | Avoid rewinding previous inline when auto-linking
When a bit like "_foo_1@bar.com" is processed, first the emphasis is
rendered, then the 1 is output verbatim. When the `@` is encountered,
Redcarpet tries to find the "local part" of the address and stops when
it encounters an invalid char (i.e. here the `!`).
The pro... |
hb_ot_layout_get_glyph_class (hb_face_t *face,
hb_codepoint_t glyph)
{
return (hb_ot_layout_glyph_class_t) (_hb_ot_layout_get_glyph_property (face, glyph) & 0xff);
} | 0 | [
"CWE-119"
] | pango | 797d46714d27f147277fdd5346648d838c68fb8c | 233,973,495,093,273,450,000,000,000,000,000,000,000 | 5 | [HB/GDEF] Fix bug in building synthetic GDEF table |
static int selinux_task_kill(struct task_struct *p, struct kernel_siginfo *info,
int sig, const struct cred *cred)
{
u32 secid;
u32 perm;
if (!sig)
perm = PROCESS__SIGNULL; /* null signal; existence test */
else
perm = signal_to_av(sig);
if (!cred)
secid = current_sid();
else
secid = cred_sid(cred);
... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 84,545,814,577,582,750,000,000,000,000,000,000,000 | 17 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
int modbus_mask_write_register(modbus_t *ctx, int addr, uint16_t and_mask, uint16_t or_mask)
{
int rc;
int req_length;
/* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to
* store the masks. The ugly subtraction is there to remove the 'nb' value
* (2 bytes) which is not used. */... | 0 | [
"CWE-787"
] | libmodbus | b4ef4c17d618eba0adccc4c7d9e9a1ef809fc9b6 | 318,542,812,144,404,340,000,000,000,000,000,000,000 | 35 | modbus_reply: fix copy & paste error in sanity check (fixes #614)
While handling MODBUS_FC_WRITE_AND_READ_REGISTERS, both address offsets
must be checked, i.e. the read and the write address must be within the
mapping range.
At the moment, only the read address was considered, it looks like a
simple copy and paste er... |
static const char *wsgi_set_verbose_debugging(cmd_parms *cmd, void *mconfig,
const char *f)
{
const char *error = NULL;
WSGIServerConfig *sconfig = NULL;
error = ap_check_cmd_context(cmd, GLOBAL_ONLY);
if (error != NULL)
return error;
sconfig =... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 171,644,025,589,439,840,000,000,000,000,000,000,000 | 21 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
funcdepth_increment(void)
{
if (funcdepth >= p_mfd)
{
emsg(_("E132: Function call depth is higher than 'maxfuncdepth'"));
return FAIL;
}
++funcdepth;
return OK;
} | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 101,997,863,080,254,280,000,000,000,000,000,000,000 | 10 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
Word getRequestBodyBufferBytesHandler(void* raw_context, Word start, Word length, Word ptr_ptr,
Word size_ptr) {
auto context = WASM_CONTEXT(raw_context);
auto result = context->getRequestBodyBufferBytes(start.u64_, length.u64_);
context->wasm()->copyToPointerSize(result, ptr... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 317,567,031,785,351,600,000,000,000,000,000,000,000 | 7 | 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... |
dns_zone_settype(dns_zone_t *zone, dns_zonetype_t type) {
char namebuf[1024];
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(type != dns_zone_none);
/*
* Test and set.
*/
LOCK_ZONE(zone);
REQUIRE(zone->type == dns_zone_none || zone->type == type);
zone->type = type;
if (zone->strnamerd != NULL)
isc_mem_free(zo... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 21,007,461,177,718,304,000,000,000,000,000,000,000 | 20 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void ahci_reset_port(AHCIState *s, int port)
{
AHCIDevice *d = &s->dev[port];
AHCIPortRegs *pr = &d->port_regs;
IDEState *ide_state = &d->port.ifs[0];
int i;
DPRINTF(port, "reset port\n");
ide_bus_reset(&d->port);
ide_state->ncq_queues = AHCI_MAX_CMDS;
pr->scr_stat = 0;
pr-... | 0 | [
"CWE-399"
] | qemu | 3251bdcf1c67427d964517053c3d185b46e618e8 | 230,447,005,233,681,420,000,000,000,000,000,000,000 | 64 | ide: Correct handling of malformed/short PRDTs
This impacts both BMDMA and AHCI HBA interfaces for IDE.
Currently, we confuse the difference between a PRDT having
"0 bytes" and a PRDT having "0 complete sectors."
When we receive an incomplete sector, inconsistent error checking
leads to an infinite loop wherein the c... |
lshift (char *d, int count, int n)
{
char out[64];
for (int i = 0; i < n; i++)
out[i] = d[(i + count) % n];
for (int i = 0; i < n; i++)
d[i] = out[i];
} | 0 | [
"CWE-125"
] | exim | 57aa14b216432be381b6295c312065b2fd034f86 | 80,921,032,664,627,640,000,000,000,000,000,000,000 | 8 | Fix SPA authenticator, checking client-supplied data before using it. Bug 2571 |
const u8 *gf_isom_get_mpegh_compatible_profiles(GF_ISOFile *movie, u32 trackNumber, u32 sampleDescIndex, u32 *nb_compat_profiles)
{
GF_SampleEntryBox *ent;
GF_MHACompatibleProfilesBox *mhap;
GF_TrackBox *trak;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak || !trak->Media || !nb_compat_profiles... | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 246,060,844,929,558,720,000,000,000,000,000,000,000 | 16 | fixed #2120 |
static int vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid,
struct scatterlist *sgl, unsigned int sgc)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
const struct net_device_ops *ops = real_dev->netdev_ops;
int rc = 0;
if (ops->ndo_fcoe_ddp_target)
rc = ops->ndo_fcoe_ddp_target(re... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 313,902,985,785,679,930,000,000,000,000,000,000,000 | 12 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *)skb->data;
struct ieee80211_if_managed *ifmgd;
struct ieee80211_rx_status *rx_status = (void *) skb->cb;
size_t baselen, len = skb->len;
ifmgd = &sdata->u.mgd;
sdata_a... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 11,627,355,649,723,910,000,000,000,000,000,000,000 | 25 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
GF_Err gf_isom_set_extraction_slc(GF_ISOFile *the_file, u32 trackNumber, u32 StreamDescriptionIndex, const GF_SLConfig *slConfig)
{
GF_TrackBox *trak;
GF_SampleEntryBox *entry;
GF_Err e;
GF_SLConfig **slc;
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak) return GF_BAD_PARAM;
e = Media_GetS... | 1 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 24,076,123,659,296,710,000,000,000,000,000,000,000 | 39 | fixed #1706 |
xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri) {
xmlXPathFunction ret;
if (ctxt == NULL)
return(NULL);
if (name == NULL)
return(NULL);
if (ctxt->funcLookupFunc != NULL) {
xmlXPathFuncLookupFunc f;
f = ctxt->funcLookupFunc;
ret = f(ctxt->funcLook... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 39,285,029,002,739,600,000,000,000,000,000,000,000 | 24 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
ext4_lblk_t iblock, unsigned int max_blocks,
struct ext4_ext_path *path, int flags,
unsigned int allocated, struct buffer_head *bh_result,
ext4_fsblk_t newblock)
{
int ret = 0;
int err = 0;
ext4_io_end_t *io = EXT4_I(inode)->cur... | 1 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 54,737,810,559,118,980,000,000,000,000,000,000,000 | 113 | 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... |
static ssize_t supported_features_show(struct bus_type *bus, char *buf)
{
return sprintf(buf, "0x%llx\n", RBD_FEATURES_SUPPORTED);
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 104,073,796,126,996,300,000,000,000,000,000,000,000 | 4 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
int dtls1_enc(SSL *s, int send)
{
SSL3_RECORD *rec;
EVP_CIPHER_CTX *ds;
unsigned long l;
int bs,i,j,k,mac_size=0;
const EVP_CIPHER *enc;
if (send)
{
if (EVP_MD_CTX_md(s->write_hash))
{
mac_size=EVP_MD_CTX_size(s->write_hash);
if (mac_size < 0)
return -1;
}
ds=s->enc_write_ctx;
rec= &(s->... | 1 | [
"CWE-310"
] | openssl | 2928cb4c82d6516d9e65ede4901a5957d8c39c32 | 299,183,566,483,514,270,000,000,000,000,000,000,000 | 126 | Fixups. |
static pyc_object *get_ascii_interned_object(RBuffer *buffer) {
bool error = false;
ut32 n;
n = get_ut32 (buffer, &error);
if (error) {
return NULL;
}
return get_ascii_object_generic (buffer, n, true);
} | 0 | [
"CWE-415"
] | radare2 | 049de62730f4954ef9a642f2eeebbca30a8eccdc | 256,986,378,206,141,370,000,000,000,000,000,000,000 | 10 | Fix #18679 - UAF when parsing corrupted pyc files ##bin |
explicit CudnnAccess(cudnnHandle_t handle) : handle_(handle) {} | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 244,744,866,560,965,620,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *fl4,
struct fib_result *res,
const struct sk_buff *skb)
{
struct net_device *dev_out = NULL;
int orig_oif = fl4->flowi4_oif;
unsigned int flags = 0;
struct rtable *rth;
int err;
if (fl4->saddr) {
if (ipv4_is_multicast... | 0 | [
"CWE-327"
] | linux | aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba | 291,184,686,182,356,760,000,000,000,000,000,000,000 | 170 | inet: use bigger hash table for IP ID generation
In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
I used a very small hash table that could be abused
by patient attackers to reveal sensitive information.
Switch to a dynamic sizing, depending on RAM size.
Typical big hosts will now use 128x more storage (2... |
static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)
{
loff_t res = EXT4_NDIR_BLOCKS;
int meta_blocks;
loff_t upper_limit;
/* This is calculated to be the largest file size for a dense, block
* mapped file such that the file's total number of 512-byte sectors,
* including data and all indirect block... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 33,951,303,903,552,680,000,000,000,000,000,000,000 | 57 | 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... |
storagePoolGetInfo(virStoragePoolPtr pool,
virStoragePoolInfoPtr info)
{
virStoragePoolObj *obj;
virStoragePoolDef *def;
int ret = -1;
if (!(obj = virStoragePoolObjFromStoragePool(pool)))
return -1;
def = virStoragePoolObjGetDef(obj);
if (virStoragePoolGetInfoEnsureA... | 0 | [] | libvirt | 447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87 | 125,945,204,271,691,120,000,000,000,000,000,000,000 | 31 | storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.
Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.co... |
int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a)
{
return ASN1_i2d_fp(i2d_TS_TST_INFO, fp, (unsigned char *) a);
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 264,106,766,693,902,620,000,000,000,000,000,000,000 | 4 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
static gg_action_t gg_handle_connecting_gg(struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
{
int res;
sess->soft_timeout = 0;
/* jeśli wystąpił błąd podczas łączenia się... */
if (gg_async_connect_failed(sess, &res)) {
gg_debug_sess... | 0 | [
"CWE-310"
] | libgadu | 035e3cf6227995bdbe95f663a938a3838131e022 | 70,865,424,445,059,700,000,000,000,000,000,000,000 | 40 | Dla GG_SSL_REQUIRED sprawdzamy certyfikat serwera z certyfikatami zainstalowanymi w systemie (Radhesh Krishnan K., Bartosz Brachaczek) |
static void detect_quiet(int argc, char **argv) {
int i;
// detect --quiet
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "--quiet") == 0) {
arg_quiet = 1;
break;
}
// detect end of firejail params
if (strcmp(argv[i], "--") == 0)
break;
if (strncmp(argv[i], "--", 2) != 0)
break;
}
} | 0 | [
"CWE-703"
] | firejail | 6b8dba29d73257311564ee7f27b9b14758cc693e | 244,065,218,487,955,500,000,000,000,000,000,000,000 | 17 | security fix |
static void arm_dma_sync_single_for_device(struct device *dev,
dma_addr_t handle, size_t size, enum dma_data_direction dir)
{
unsigned int offset = handle & (PAGE_SIZE - 1);
struct page *page = pfn_to_page(dma_to_pfn(dev, handle-offset));
__dma_page_cpu_to_dev(page, offset, size, dir);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0ea1ec713f04bdfac343c9702b21cd3a7c711826 | 129,137,087,970,106,550,000,000,000,000,000,000,000 | 7 | ARM: dma-mapping: don't allow DMA mappings to be marked executable
DMA mapping permissions were being derived from pgprot_kernel directly
without using PAGE_KERNEL. This causes them to be marked with executable
permission, which is not what we want. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk... |
static NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
{
struct ldapsrv_reply *reply;
struct ldap_ExtendedResponse *r;
DEBUG(10,("Unwilling type[%d] id[%d]\n", call->request->type, call->request->messageid));
reply = ldapsrv_init_reply(call, LDAP_TAG_ExtendedResponse);
if (!reply) {
return NT_... | 0 | [] | samba | 86fe9d48883f87c928bf31ccbd275db420386803 | 54,818,691,129,302,360,000,000,000,000,000,000,000 | 23 | CVE-2021-3670 ldap_server: Set timeout on requests based on MaxQueryDuration
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> |
inline double fibonacci(const int n) {
if (n<0) return cimg::type<double>::nan();
if (n<3) return 1;
if (n<11) {
cimg_uint64 fn1 = 1, fn2 = 1, fn = 0;
for (int i = 3; i<=n; ++i) { fn = fn1 + fn2; fn2 = fn1; fn1 = fn; }
return (double)fn;
}
if (n<75) // precise u... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 261,908,934,840,589,360,000,000,000,000,000,000,000 | 21 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int devid_cmp(void *priv, const struct list_head *a,
const struct list_head *b)
{
const struct btrfs_device *dev1, *dev2;
dev1 = list_entry(a, struct btrfs_device, dev_list);
dev2 = list_entry(b, struct btrfs_device, dev_list);
if (dev1->devid < dev2->devid)
return -1;
else if (dev1->devid > dev2... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 143,190,189,437,860,500,000,000,000,000,000,000,000 | 14 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
TEST_F(HttpConnectionManagerImplTest, 100ContinueResponseWithEncoderFilters) {
proxy_100_continue_ = true;
setup(false, "envoy-custom-server", false);
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
EXPECT_CALL(*encoder_filters_[0], encode100ContinueHeaders(_))
.WillOnce(Return(Filte... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 109,667,091,759,888,470,000,000,000,000,000,000,000 | 22 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
bool PostgreSqlMigrationWriter::prepareQuery(MigrationObject mo)
{
QString query;
switch (mo) {
case QuasselUser:
query = queryString("migrate_write_quasseluser");
break;
case Sender:
query = queryString("migrate_write_sender");
break;
case Identity:
_validIde... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 68,942,935,217,463,330,000,000,000,000,000,000,000 | 36 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
httpPut(http_t *http, /* I - HTTP connection */
const char *uri) /* I - URI to put */
{
DEBUG_printf(("httpPut(http=%p, uri=\"%s\")", (void *)http, uri));
return (http_send(http, HTTP_STATE_PUT, uri));
} | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 1,868,919,421,263,273,400,000,000,000,000,000,000 | 6 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
static GF_Err do_itunes_tag()
{
GF_Err e;
char *itunes_data = NULL;
char *tags = itunes_tags;
if (gf_file_exists(itunes_tags)) {
u32 len;
e = gf_file_load_data(itunes_tags, (u8 **) &itunes_data, &len);
if (e) return e;;
tags = itunes_data;
}
while (tags) {
char *val;
Bool clear = GF_FALSE;
Bool is... | 0 | [
"CWE-401",
"CWE-787"
] | gpac | a51f951b878c2b73c1d8e2f1518c7cdc5fb82c3f | 167,190,761,813,457,700,000,000,000,000,000,000,000 | 106 | fixed #1782 (fuzz) |
asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
compat_ulong_t __user *outp, compat_ulong_t __user *exp,
struct compat_timespec __user *tsp, void __user *sig)
{
compat_size_t sigsetsize = 0;
compat_uptr_t up = 0;
if (sig) {
if (!access_ok(VERIFY_READ, sig,
sizeof(compat_uptr_t)+sizeof... | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 226,579,664,768,182,400,000,000,000,000,000,000,000 | 18 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
{
const char *regexp = NULL;
int idx = 0;
if (ctxt != NULL) {
regexp = (const char *) ctxt->string;
idx = ctxt->cur - ctxt->string;
ctxt->error = XML_REGEXP_COMPILE_ERROR;
}
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 175,270,531,566,617,540,000,000,000,000,000,000,000 | 15 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
static void arcmsr_hbaD_request_device_map(struct AdapterControlBlock *acb)
{
struct MessageUnit_D *reg = acb->pmuD;
if (unlikely(atomic_read(&acb->rq_map_token) == 0) ||
((acb->acb_flags & ACB_F_BUS_RESET) != 0) ||
((acb->acb_flags & ACB_F_ABORT) != 0)) {
mod_timer(&acb->eternal_timer,
jiffies + msecs_to_j... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 295,136,378,311,009,830,000,000,000,000,000,000,000 | 28 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
__be16 cause_code, const void *payload,
size_t paylen, size_t reserve_tail)
{
struct sctp_chunk *retval;
retval = sctp_make_op_error_space(asoc, chunk, paylen + reserve_tail);
if ... | 0 | [
"CWE-20"
] | linux | 07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c | 314,067,031,570,629,400,000,000,000,000,000,000,000 | 19 | sctp: verify size of a new chunk in _sctp_make_chunk()
When SCTP makes INIT or INIT_ACK packet the total chunk length
can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when
transmitting these packets, e.g. the crash on sending INIT_ACK:
[ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168
... |
tiffSeekCallback(thandle_t handle,
toff_t offset,
l_int32 whence)
{
L_MEMSTREAM *mstream;
PROCNAME("tiffSeekCallback");
mstream = (L_MEMSTREAM *)handle;
switch (whence) {
case SEEK_SET:
/* lept_stderr("seek_set: offset = %d\n", offset); */
... | 0 | [
"CWE-125"
] | leptonica | 5ba34b1fe741d69d43a6c8cf767756997eadd87c | 2,210,498,943,431,417,800,000,000,000,000,000,000 | 32 | Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream
* Increase scanline buffer for reading gray+alpha and converting to RGBA |
free_Digest(struct _7z_digests *d)
{
free(d->defineds);
free(d->digests);
} | 0 | [
"CWE-190",
"CWE-125"
] | libarchive | e79ef306afe332faf22e9b442a2c6b59cb175573 | 224,227,391,535,243,600,000,000,000,000,000,000,000 | 5 | Issue #718: Fix TALOS-CAN-152
If a 7-Zip archive declares a rediculously large number of substreams,
it can overflow an internal counter, leading a subsequent memory
allocation to be too small for the substream data.
Thanks to the Open Source and Threat Intelligence project at Cisco
for reporting this issue. |
PHP_FUNCTION( locale_get_keywords )
{
UEnumeration* e = NULL;
UErrorCode status = U_ZERO_ERROR;
const char* kw_key = NULL;
int32_t kw_key_len = 0;
const char* loc_name = NULL;
int loc_name_len = 0;
/*
ICU expects the buffer to be... | 0 | [
"CWE-125"
] | php-src | 97eff7eb57fc2320c267a949cffd622c38712484 | 237,804,115,459,595,500,000,000,000,000,000,000,000 | 70 | Fix bug #72241: get_icu_value_internal out-of-bounds read |
static void _gt_cursor_pos(GTextField *gt, int sel_start, int *x, int *y) {
int l, sel;
*x = -1; *y= -1;
GDrawSetFont(gt->g.base,gt->font);
l = GTextFieldFindLine(gt,sel_start);
if ( l<gt->loff_top || l>=gt->loff_top + ((gt->g.inner.height+gt->fh/2)/gt->fh))
return;
*y = (l-gt->loff_top)*gt->fh... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 77,860,917,313,811,080,000,000,000,000,000,000,000 | 16 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
bool WebContents::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
blink::mojom::MediaStreamType type) {
auto* web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
auto* permission_helper =
WebContentsPermissionHelp... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 228,821,463,617,736,300,000,000,000,000,000,000,000 | 10 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
virDomainMemtuneCheckABIStability(const virDomainDef *src,
const virDomainDef *dst,
unsigned int flags)
{
if (virDomainDefGetMemoryInitial(src) != virDomainDefGetMemoryInitial(dst)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 324,563,690,793,650,040,000,000,000,000,000,000,000 | 43 | 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... |
flatpak_dir_read_latest_commit (FlatpakDir *self,
const char *remote,
FlatpakDecomposed *ref,
char **out_checksum,
GCancellable *cancellable,
... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 167,006,287,316,206,950,000,000,000,000,000,000,000 | 22 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
int ret = 0, size = 0;
const char *name = NULL;
char *value = NULL;
struct iattr newattrs;
umode_t new_mode = inode->i_mode, old_mode = inode->i_mode;
switch (type) {
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
if (acl) {... | 1 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 289,936,425,178,769,200,000,000,000,000,000,000,000 | 69 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
struct avdtp_remote_sep *avdtp_register_remote_sep(struct avdtp *session,
uint8_t seid,
uint8_t type,
GSList *caps,
bool delay_reporting)
{
struct avdtp_remote_sep *sep;
GSList *l;
sep = find_remote_sep(session->seps, seid);
if (sep)
return sep;
sep = g_new0(struct avdtp_remote_sep,... | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 247,309,014,063,292,420,000,000,000,000,000,000,000 | 34 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
static inline int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen, __be32 **savep)
{
__be32 *p;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
*attrlen = be32_to_cpup(p);
*savep = xdr->p;
return 0;
out_overflow:
print_overflow_msg(__func__, xdr);
return -EIO;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 142,869,378,101,191,970,000,000,000,000,000,000,000 | 14 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
int u_add_mime_types_compressed(struct _u_compressed_inmemory_website_config * config, const char * mime_type) {
int ret;
if (config != NULL && !o_strnullempty(mime_type)) {
if ((config->mime_types_compressed = o_realloc(config->mime_types_compressed, (config->mime_types_compressed_size+2)*sizeof(char*))) != NU... | 0 | [
"CWE-269",
"CWE-22"
] | glewlwyd | e3f7245c33897bf9b3a75acfcdb8b7b93974bf11 | 152,006,419,331,165,620,000,000,000,000,000,000,000 | 17 | Fix file access check for directory traversal, and fix call for callback_static_file_uncompressed if header not set |
static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *ptep, pte_t pte,
struct page *pagecache_page)
{
struct hstate *h = hstate_vma(vma);
struct page *old_page, *new_page;
int avoidcopy;
int outside_reserve = 0;
old_page = pte_page(pte);
retry_avoidcopy:
/*... | 0 | [
"CWE-399"
] | linux | c50ac050811d6485616a193eb0f37bfbd191cc89 | 105,967,333,851,804,360,000,000,000,000,000,000,000 | 116 | hugetlb: fix resv_map leak in error path
When called for anonymous (non-shared) mappings, hugetlb_reserve_pages()
does a resv_map_alloc(). It depends on code in hugetlbfs's
vm_ops->close() to release that allocation.
However, in the mmap() failure path, we do a plain unmap_region() without
the remove_vma() which act... |
int restore_rand(void)
{
if (!RAND_set_rand_method(old_rand))
return 0;
else
return 1;
} | 0 | [
"CWE-203"
] | openssl | 949ff36623eafc3523a9f91784992965018ffb05 | 38,814,081,074,181,190,000,000,000,000,000,000,000 | 7 | Add blinding to an ECDSA signature
Keegan Ryan (NCC Group) has demonstrated a side channel attack on an
ECDSA signature operation. During signing the signer calculates:
s:= k^-1 * (m + r * priv_key) mod order
The addition operation above provides a sufficient signal for a
flush+reload attack to derive the private ke... |
rsa_sec_decrypt(const struct rsa_public_key *pub,
const struct rsa_private_key *key,
void *random_ctx, nettle_random_func *random,
size_t length, uint8_t *message,
const mpz_t gibberish)
{
TMP_GMP_DECL (m, mp_limb_t);
TMP_GMP_DECL (em, uint8_t);
int res;
TMP_GMP_ALLOC (m, mp... | 1 | [
"CWE-20"
] | nettle | 485b5e2820a057e873b1ba812fdb39cae4adf98c | 19,057,408,854,420,092,000,000,000,000,000,000,000 | 25 | Change _rsa_sec_compute_root_tr to take a fix input size.
Improves consistency with _rsa_sec_compute_root, and fixes zero-input bug. |
double val_real_from_item(Item *item)
{
DBUG_ASSERT(is_fixed());
double value= item->val_real();
null_value= item->null_value;
return value;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 326,112,035,845,389,930,000,000,000,000,000,000,000 | 7 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
nautilus_link_get_link_icon_from_desktop (GKeyFile *key_file)
{
char *icon_uri, *icon, *p, *type;
icon_uri = g_key_file_get_string (key_file, MAIN_GROUP, "X-Nautilus-Icon", NULL);
if (icon_uri != NULL) {
return icon_uri;
}
icon = g_key_file_get_string (key_file, MAIN_GROUP, "Icon", NULL);
if (icon != NULL) {
... | 0 | [] | nautilus | 6d1d33567cea0590ed1ad00506718f6d591ba95f | 232,351,598,589,165,800,000,000,000,000,000,000,000 | 47 | Bug 573991 – Nautilus does not recognize some .desktop files as
2009-03-04 Alexander Larsson <alexl@redhat.com>
Bug 573991 – Nautilus does not recognize some .desktop files as launchers
* libnautilus-private/nautilus-link.c:
(nautilus_link_get_link_info_given_file_contents):
Don't try to sniff th... |
static void cirrus_get_offsets(VGAState *s1,
uint32_t *pline_offset,
uint32_t *pstart_addr,
uint32_t *pline_compare)
{
CirrusVGAState * s = (CirrusVGAState *)s1;
uint32_t start_addr, line_offset, line_compare;
line... | 0 | [
"CWE-787"
] | qemu | b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | 298,069,559,385,950,350,000,000,000,000,000,000,000 | 25 | CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow
I have just noticed that patch for CVE-2007-1320 has never been applied
to the QEMU CVS. Please find it below.
| Multiple heap-based buffer overflows in the cirrus_invalidate_region
| function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and
| possib... |
static void sapi_cli_server_flush(void *server_context) /* {{{ */
{
php_cli_server_client *client = server_context;
TSRMLS_FETCH();
if (!client) {
return;
}
if (client->sock < 0) {
php_handle_aborted_connection();
return;
}
if (!SG(headers_sent)) {
sapi_send_headers(TSRMLS_C);
SG(headers_sent) = 1;
... | 0 | [] | php-src | 2438490addfbfba51e12246a74588b2382caa08a | 106,448,868,953,266,950,000,000,000,000,000,000,000 | 19 | slim post data |
static inline struct sigqueue *get_task_cache(struct task_struct *t)
{
return NULL;
} | 0 | [
"CWE-400"
] | linux-stable-rt | bcf6b1d78c0bde228929c388978ed3af9a623463 | 266,309,423,462,434,960,000,000,000,000,000,000,000 | 4 | signal/x86: Delay calling signals in atomic
On x86_64 we must disable preemption before we enable interrupts
for stack faults, int3 and debugging, because the current task is using
a per CPU debug stack defined by the IST. If we schedule out, another task
can come in and use the same stack and cause the stack to be co... |
static int spk_ttyio_ldisc_open(struct tty_struct *tty)
{
struct spk_ldisc_data *ldisc_data;
if (!tty->ops->write)
return -EOPNOTSUPP;
speakup_tty = tty;
ldisc_data = kmalloc(sizeof(*ldisc_data), GFP_KERNEL);
if (!ldisc_data)
return -ENOMEM;
init_completion(&ldisc_data->completion);
ldisc_data->buf_free =... | 1 | [
"CWE-362",
"CWE-763"
] | linux | d4122754442799187d5d537a9c039a49a67e57f1 | 228,834,818,673,178,240,000,000,000,000,000,000,000 | 18 | speakup: Do not let the line discipline be used several times
Speakup has only one speakup_tty variable to store the tty it is managing. This
makes sense since its codebase currently assumes that there is only one user who
controls the screen reading.
That however means that we have to forbid using the line disciplin... |
static void smp_task_timedout(struct timer_list *t)
{
struct sas_task_slow *slow = from_timer(slow, t, timer);
struct sas_task *task = slow->task;
unsigned long flags;
spin_lock_irqsave(&task->task_state_lock, flags);
if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
task->task_state_flags |= SAS_TASK_STAT... | 0 | [
"CWE-416",
"CWE-362",
"CWE-703"
] | linux | b90cd6f2b905905fb42671009dc0e27c310a16ae | 80,208,490,405,939,490,000,000,000,000,000,000,000 | 13 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or n... |
struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog)
{
if (atomic_inc_return(&prog->aux->refcnt) > BPF_MAX_REFCNT) {
atomic_dec(&prog->aux->refcnt);
return ERR_PTR(-EBUSY);
}
return prog;
} | 0 | [
"CWE-703"
] | linux | 92117d8443bc5afacc8d5ba82e541946310f106e | 70,737,581,354,358,980,000,000,000,000,000,000,000 | 8 | bpf: fix refcnt overflow
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK,
the malicious application may overflow 32-bit bpf program refcnt.
It's also possible to overflow map refcnt on 1Tb system.
Impose 32k hard limit which means that the same bpf program or
map cannot be shared by more than ... |
ews_client_create_autodiscover_xml (const gchar *email)
{
xmlDoc *doc;
xmlNode *node;
xmlNs *ns;
doc = xmlNewDoc ((xmlChar *) "1.0");
node = xmlNewDocNode (doc, NULL, (xmlChar *) "Autodiscover", NULL);
xmlDocSetRootElement (doc, node);
ns = xmlNewNs (node,
(xmlChar *) "http://schemas.mi... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 267,254,838,551,977,560,000,000,000,000,000,000,000 | 23 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
static int tcp_time_to_recover(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
__u32 packets_out;
/* Do not perform any recovery during F-RTO algorithm */
if (tp->frto_counter)
return 0;
/* Trick#1: The loss is proven. */
if (tp->lost_out)
return 1;
/* Not-A-Trick#2 : Classic rule... */
if (tcp_dupa... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 64,088,465,458,662,720,000,000,000,000,000,000,000 | 48 | 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... |
dse_delete_entry(struct dse *pdse, Slapi_PBlock *pb, const Slapi_Entry *e)
{
int dont_write_file = 0;
struct dse_node *n = dse_node_new(e);
struct dse_node *deleted_node = NULL;
slapi_pblock_get(pb, SLAPI_DSE_DONT_WRITE_WHEN_ADDING, &dont_write_file);
/* keep write lock for both tree deleting and ... | 0 | [
"CWE-200",
"CWE-203"
] | 389-ds-base | b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32 | 65,357,320,802,684,310,000,000,000,000,000,000,000 | 27 | Issue 4609 - CVE - info disclosure when authenticating
Description: If you bind as a user that does not exist. Error 49 is returned
instead of error 32. As error 32 discloses that the entry does
not exist. When you bind as an entry that does not have userpassword
set then ... |
void sock_wfree(struct sk_buff *skb)
{
struct sock *sk = skb->sk;
unsigned int len = skb->truesize;
if (!sock_flag(sk, SOCK_USE_WRITE_QUEUE)) {
/*
* Keep a reference on sk_wmem_alloc, this will be released
* after sk_write_space() call
*/
atomic_sub(len - 1, &sk->sk_wmem_alloc);
sk->sk_write_space(sk... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 231,601,219,319,476,800,000,000,000,000,000,000,000 | 21 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
int epo_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id,
const gx_color_index *scolors,
const gx_strip_bitmap *textures, const gx_color_index *tcolors,
int x, int y, int width, int height,
int phase_x, int phase_y, gs_logical_operation_t lop)
{
int code =... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 121,067,292,095,109,970,000,000,000,000,000,000,000 | 12 | 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 size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
ZSTD_CCtx_params params,
U64 pledgedSrcSize,
ZSTD_compResetPolicy_e const crp,
ZSTD_buffered_policy_e const zbuff)
... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 5,268,814,898,549,583,300,000,000,000,000,000,000 | 160 | fixed T36302429 |
has_mail (KEYBOXBLOB blob, const char *name, int substr)
{
size_t namelen;
int btype;
return_val_if_fail (name, 0);
btype = blob_get_type (blob);
if (btype != KEYBOX_BLOBTYPE_PGP && btype != KEYBOX_BLOBTYPE_X509)
return 0;
if (btype == KEYBOX_BLOBTYPE_PGP && *name == '<')
name++; /* Hack to remov... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 3,266,097,341,187,694,000,000,000,000,000,000,000 | 20 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static int vmx_deliver_nested_posted_interrupt(struct kvm_vcpu *vcpu,
int vector)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (is_guest_mode(vcpu) &&
vector == vmx->nested.posted_intr_nv) {
/* the PIR and ON have been set by L1. */
kvm_vcpu_trigger_posted_interrupt(vcpu, true);
/*
* If a posted int... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 336,894,987,583,772,470,000,000,000,000,000,000,000 | 19 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
bool RequestParser::IsBoundary(const std::string& str, std::size_t off,
std::size_t count, bool* end) const {
const std::string& boundary = content_type_.boundary();
if (count != boundary.size() + 2 && count != boundary.size() + 4) {
return false;
}
if (str[off] != '-' || st... | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 144,492,543,932,846,260,000,000,000,000,000,000,000 | 23 | fix static file serving security issue; fix url path encoding issue |
static void hci_cc_le_add_to_resolv_list(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_cp_le_add_to_resolv_list *sent;
__u8 status = *((__u8 *) skb->data);
BT_DBG("%s status 0x%2.2x", hdev->name, status);
if (status)
return;
sent = hci_sent_cmd_data(hdev, HCI_OP_LE_ADD_TO_RESOLV_LIST);
if (!s... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 198,772,705,639,231,630,000,000,000,000,000,000,000 | 19 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
PyImaging_XbmDecoderNew(PyObject* self, PyObject* args)
{
ImagingDecoderObject* decoder;
decoder = PyImaging_DecoderNew(0);
if (decoder == NULL)
return NULL;
if (get_unpacker(decoder, "1", "1;R") < 0)
return NULL;
decoder->decode = ImagingXbmDecode;
return (PyObject*) decoder... | 0 | [
"CWE-119"
] | Pillow | a130c45990578a1bb0a6a000ed1b110e27324910 | 18,650,925,917,125,287,000,000,000,000,000,000,000 | 15 | add several TIFF decoders and encoders |
void Http2Session::OnStreamAfterWrite(WriteWrap* w, int status) {
Debug(this, "write finished with status %d", status);
CHECK(is_write_in_progress());
set_write_in_progress(false);
// Inform all pending writes about their completion.
ClearOutgoing(status);
if (is_reading_stopped() &&
!is_write_in_p... | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 52,395,879,926,334,890,000,000,000,000,000,000,000 | 32 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... |
GError *list(char *ref_label, char *** paths, char *** accts, unsigned int *list_l) {
GList *items;
GError *err = NULL;
SecretService *service;
SecretSearchFlags flags = SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_ALL | SECRET_SEARCH_UNLOCK;
GHashTable *attributes = g_hash_table_new_full(g_str_hash, g_str_equal, g_... | 0 | [
"CWE-415"
] | docker-credential-helpers | 87c80bfba583eadc087810d17aa631ef4e405efc | 24,249,847,800,915,725,000,000,000,000,000,000,000 | 52 | Fix a double free in the List functions
The code was set up so that it would free the individual items and the data
in `freeListData`, but there was already a Go `defer` to free the data item,
resulting in a double free.
Remove the `free` in `freeListData` and leave the original one.
In addition, move the `defer` fo... |
chrand_principal_2_svc(chrand_arg *arg, struct svc_req *rqstp)
{
static chrand_ret ret;
krb5_keyblock *k;
int nkeys;
char *prime_arg, *funcname;
gss_buffer_desc client_name,
service_name;
OM_uint32 ... | 1 | [
"CWE-119",
"CWE-772",
"CWE-401"
] | krb5 | 83ed75feba32e46f736fcce0d96a0445f29b96c2 | 237,962,686,836,981,240,000,000,000,000,000,000,000 | 70 | Fix leaks in kadmin server stubs [CVE-2015-8631]
In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler. Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails. Also make sure to free the prime_arg
variables in... |
static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
struct page *page = buf->page;
struct address_space *mapping;
lock_page(page);
mapping = page_mapping(page);
if (mapping) {
WARN_ON(!PageUptodate(page));
/*
* At least for ext2 with nobh option, we need... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 69,585,238,289,754,010,000,000,000,000,000,000,000 | 44 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
decode_set_vlan_pcp(uint8_t pcp, bool push_vlan_if_needed, struct ofpbuf *out)
{
if (pcp & ~7) {
return OFPERR_OFPBAC_BAD_ARGUMENT;
} else {
struct ofpact_vlan_pcp *vlan_pcp = ofpact_put_SET_VLAN_PCP(out);
vlan_pcp->vlan_pcp = pcp;
vlan_pcp->push_vlan_if_needed = push_vlan_if_nee... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 283,353,667,367,452,100,000,000,000,000,000,000,000 | 11 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
GF_Err pdin_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_ProgressiveDownloadBox *ptr = (GF_ProgressiveDownloadBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
for (i=0; i<ptr->count; i++) {
gf_bs_write_u32(bs, ptr->rates[i]);
gf_bs_write_u32(bs, ptr->times[i]);
}
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 119,374,201,000,348,930,000,000,000,000,000,000,000 | 13 | fixed #2255 |
static int aiptek_open(struct input_dev *inputdev)
{
struct aiptek *aiptek = input_get_drvdata(inputdev);
aiptek->urb->dev = aiptek->usbdev;
if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
return -EIO;
return 0;
} | 0 | [
"CWE-476",
"CWE-401"
] | linux | 8e20cf2bce122ce9262d6034ee5d5b76fbb92f96 | 193,861,971,144,977,900,000,000,000,000,000,000,000 | 10 | Input: aiptek - fix crash on detecting device without endpoints
The aiptek driver crashes in aiptek_probe() when a specially crafted USB
device without endpoints is detected. This fix adds a check that the device
has proper configuration expected by the driver. Also an error return value
is changed to more matching on... |
static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id)
{
struct srpt_rdma_ch *ch;
int ret;
ch = srpt_find_channel(cm_id->context, cm_id);
BUG_ON(!ch);
if (srpt_test_and_set_ch_state(ch, CH_CONNECTING, CH_LIVE)) {
struct srpt_recv_ioctx *ioctx, *ioctx_tmp;
ret = srpt_ch_qp_rts(ch, ch->qp);
list_for_each_ent... | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 219,356,292,181,678,780,000,000,000,000,000,000,000 | 22 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
{
JDIMENSION n;
my_master_ptr master = (my_master_ptr)cinfo->master;
JSAMPLE dummy_sample[1] = { 0 };
JSAMPROW dummy_row = dummy_sample;
JSAMPARRAY scanlines = NULL;
void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
... | 0 | [] | libjpeg-turbo | 6d2e8837b440ce4d8befd805a5abc0d351028d70 | 83,983,514,538,588,630,000,000,000,000,000,000,000 | 41 | jpeg_skip_scanlines(): Avoid NULL + 0 UBSan error
This error occurs at the call to (*cinfo->cconvert->color_convert)() in
sep_upsample() whenever cinfo->upsample->need_context_rows == TRUE
(i.e. whenever h2v2 or h1v2 fancy upsampling is used.) The error is
innocuous, since (*cinfo->cconvert->color_convert)() points t... |
inline WriteWrap* StreamBase::CreateWriteWrap(
v8::Local<v8::Object> object) {
return new SimpleWriteWrap<AsyncWrap>(this, object);
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 282,948,416,272,484,750,000,000,000,000,000,000,000 | 4 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.