func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void virtio_update_irq(VirtIODevice *vdev)
{
virtio_notify_vector(vdev, VIRTIO_NO_VECTOR);
} | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 64,943,418,674,247,310,000,000,000,000,000,000,000 | 4 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
SCTP_STATIC int sctp_setsockopt_connectx(struct sock* sk,
struct sockaddr __user *addrs,
int addrs_size)
{
int err = 0;
struct sockaddr *kaddrs;
SCTP_DEBUG_PRINTK("%s - sk %p addrs %p addrs_size %d\n",
__FUNCTION__, sk, addrs, addrs_size);
if (unlikely(addrs_size <= 0))
return -EINVAL;
... | 0 | [
"CWE-476"
] | linux | ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d | 268,296,914,657,708,020,000,000,000,000,000,000,000 | 31 | [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
In current implementation, LKSCTP does receive buffer accounting for
data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do
accounting for data in frag_list when data is fragmented. In addition,
LKSCTP doesn't do accounting for data in ... |
hex (unsigned char c)
{
buffer_put (buffer_2, "0123456789abcdef" + (c >> 4), 1);
buffer_put (buffer_2, "0123456789abcdef" + (c & 15), 1);
} | 0 | [
"CWE-362"
] | ndjbdns | 847523271f3966cf4618c5689b905703c41dec1c | 136,912,993,705,772,030,000,000,000,000,000,000,000 | 5 | Merge identical outgoing requests.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. This fixes one of the cache poisoning vulnerability
reported by Mr Mark Johnson
-> https://bugzilla.redhat.com/show_bug.cgi?id... |
get_override_session_key (DEK *dek, const char *string)
{
const char *s;
int i;
if (!string)
return GPG_ERR_BAD_KEY;
dek->algo = atoi (string);
if (dek->algo < 1)
return GPG_ERR_BAD_KEY;
if (!(s = strchr (string, ':')))
return GPG_ERR_BAD_KEY;
s++;
for (i = 0; i < DIM (dek->key) && *s; i++,... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 260,830,938,982,063,970,000,000,000,000,000,000,000 | 25 | 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 ... |
ec_addm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx)
{
mpi_ptr_t wp, up, vp;
mpi_size_t wsize = LIMB_SIZE_25519;
mpi_limb_t n[LIMB_SIZE_25519];
mpi_limb_t borrow;
if (w->nlimbs != wsize || u->nlimbs != wsize || v->nlimbs != wsize)
log_bug ("addm_25519: different sizes\n");
memset (n,... | 0 | [
"CWE-203"
] | libgcrypt | b9577f7c89b4327edc09f2231bc8b31521102c79 | 305,331,547,115,335,760,000,000,000,000,000,000,000 | 21 | ecc: Add mitigation against timing attack.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Add the order N to K.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Compute with NBITS of P or larger.
CVE-id: CVE-2019-13627
GnuPG-bug-id: 4626
Co-authored-by: Ján Jančár <johny@neuromancer.sk>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org... |
static void skip_address_key(const char **p) {
assert(p);
assert(*p);
*p += strcspn(*p, ",");
if (**p == ',')
(*p)++;
} | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 198,207,619,901,337,760,000,000,000,000,000,000,000 | 9 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... |
ofputil_parse_key_value(char **stringp, char **keyp, char **valuep)
{
/* Skip white space and delimiters. If that brings us to the end of the
* input string, we are done and there are no more key-value pairs. */
*stringp += strspn(*stringp, ", \t\r\n");
if (**stringp == '\0') {
*keyp = *valuep... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 193,306,741,481,793,240,000,000,000,000,000,000,000 | 49 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
clearcontentssize(struct table *t, struct table_mode *mode)
{
table_close_anchor0(t, mode);
mode->nobr_offset = 0;
t->linfo.prev_spaces = -1;
set_space_to_prevchar(t->linfo.prevchar);
t->linfo.prev_ctype = PC_ASCII;
t->linfo.length = 0;
t->tabcontentssize = 0;
} | 0 | [
"CWE-119"
] | w3m | 67a3db378f5ee3047c158eae4342f7e3245a2ab1 | 279,985,579,578,740,100,000,000,000,000,000,000,000 | 10 | Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19
Bug-Debian: https://github.com/tats/w3m/issues/8 |
static int is_git_directory(const char *suspect)
{
char path[PATH_MAX];
size_t len = strlen(suspect);
if (PATH_MAX <= len + strlen("/objects"))
die("Too long path: %.*s", 60, suspect);
strcpy(path, suspect);
if (getenv(DB_ENVIRONMENT)) {
if (access(getenv(DB_ENVIRONMENT), X_OK))
return 0;
}
else {
strc... | 0 | [
"CWE-787"
] | git | 3c9d0414ed2db0167e6c828b547be8fc9f88fccc | 185,263,428,208,972,740,000,000,000,000,000,000,000 | 28 | Check size of path buffer before writing into it
This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents
gitdir: (something really long)
Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static ssize_t bm_status_write(struct file * file, const char __user * buffer,
size_t count, loff_t *ppos)
{
int res = parse_command(buffer, count);
struct dentry *root;
switch (res) {
case 1: enabled = 0; break;
case 2: enabled = 1; break;
case 3: root = dget(file->f_path.dentry->d_sb->s_root);
mutex_lo... | 0 | [
"CWE-200"
] | linux-2.6 | b66c5984017533316fd1951770302649baf1aa33 | 241,105,909,539,090,800,000,000,000,000,000,000,000 | 21 | exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and... |
get_undolevel(void)
{
if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL)
return p_ul;
return curbuf->b_p_ul;
} | 0 | [
"CWE-190"
] | vim | 3eb1637b1bba19519885dd6d377bd5596e91d22c | 10,737,027,048,349,564,000,000,000,000,000,000,000 | 6 | patch 8.0.0377: possible overflow when reading corrupted undo file
Problem: Possible overflow when reading corrupted undo file.
Solution: Check if allocated size is not too big. (King) |
static inline MagickBooleanType IsColorEqual(const Image *image,
const Quantum *p, const PixelInfo *q)
{
MagickRealType
blue,
green,
red;
red=(MagickRealType) GetPixelRed(image,p);
green=(MagickRealType) GetPixelGreen(image,p);
blue=(MagickRealType) GetPixelBlue(image,p);
if ((AbsolutePixelVa... | 0 | [
"CWE-399",
"CWE-772"
] | ImageMagick | 76efa969342568841ecf320b5a041685a6d24e0b | 316,622,372,195,333,900,000,000,000,000,000,000,000 | 17 | https://github.com/ImageMagick/ImageMagick/issues/1201 |
static int tun_set_queue(struct file *file, struct ifreq *ifr)
{
struct tun_file *tfile = file->private_data;
struct tun_struct *tun;
int ret = 0;
rtnl_lock();
if (ifr->ifr_flags & IFF_ATTACH_QUEUE) {
tun = tfile->detached;
if (!tun) {
ret = -EINVAL;
goto unlock;
}
ret = security_tun_dev_attach_que... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 338,163,164,955,344,430,000,000,000,000,000,000,000 | 31 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
static struct socket *vhost_net_stop_vq(struct vhost_net *n,
struct vhost_virtqueue *vq)
{
struct socket *sock;
mutex_lock(&vq->mutex);
sock = vq->private_data;
vhost_net_disable_vq(n, vq);
vq->private_data = NULL;
mutex_unlock(&vq->mutex);
return sock;
} | 0 | [
"CWE-20",
"CWE-787"
] | linux | d8316f3991d207fe32881a9ac20241be8fa2bad0 | 286,248,391,486,177,660,000,000,000,000,000,000,000 | 12 | vhost: fix total length when packets are too short
When mergeable buffers are disabled, and the
incoming packet is too large for the rx buffer,
get_rx_bufs returns success.
This was intentional in order for make recvmsg
truncate the packet and then handle_rx would
detect err != sock_len and drop it.
Unfortunately we... |
static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval, int valueretrieval)
{
zval val;
char sbuf[512];
char *buf = &(sbuf[0]);
char *dbuf = (char *)NULL;
int buflen = sizeof(sbuf) - 1;
int val_len = vars->val_len;
/* use emalloc() for large values, use static array otherwize */
/* There is n... | 0 | [
"CWE-20"
] | php-src | 6e25966544fb1d2f3d7596e060ce9c9269bbdcf8 | 234,021,522,953,008,470,000,000,000,000,000,000,000 | 144 | Fixed bug #71704 php_snmp_error() Format String Vulnerability |
int user_auth_scheme_module_validate(struct config_module * config, const struct _u_request * http_request, const char * username, json_t * j_scheme_data, void * cls) {
UNUSED(http_request);
int ret, res;
json_t * j_user_id, * j_assertion;
j_user_id = get_user_id_from_username(config, (json_t *)cls, username, ... | 0 | [
"CWE-120",
"CWE-787"
] | glewlwyd | 0efd112bb62f566877750ad62ee828bff579b4e2 | 141,093,355,314,651,500,000,000,000,000,000,000,000 | 34 | Fix fido2 signature validation bug |
ip_mainloop_watchdog(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
struct tcltkip *ptr = get_ip(self);
/* ip is deleted? */
if (deleted_ip(ptr)) {
return Qnil;
}
if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
/* slave IP */
return Qnil;
}
... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 298,375,012,828,992,260,000,000,000,000,000,000,000 | 18 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void CursorDown(int n)
{
if (curr->w_y > curr->w_bot) { /* if below scrolling rgn, */
if ((curr->w_y += n) > rows - 1) /* ignore its limits */
curr->w_y = rows - 1;
} else if ((curr->w_y += n) > curr->w_bot)
curr->w_y = curr->w_bot;
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
} | 0 | [
"CWE-119"
] | screen | c336a32a1dcd445e6b83827f83531d4c6414e2cd | 181,540,371,359,460,500,000,000,000,000,000,000,000 | 9 | Fix stack overflow due to too deep recursion
Bug: 45713
How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'
screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge. |
TEST_F(HttpConnectionManagerImplTest, FilterContinueAndEndStreamData) {
InSequence s;
setup(false, "");
EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status {
RequestDecoder* decoder = &conn_manager_->newStream(response_encoder_);
auto headers = makeHeaderMap<TestReque... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 302,570,295,302,943,100,000,000,000,000,000,000,000 | 42 | 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... |
TEST(RegexMatchExpression, MatchesElementRegexType) {
BSONObj match = BSONObjBuilder().appendRegex("x", "yz", "i").obj();
BSONObj notMatchPattern = BSONObjBuilder().appendRegex("x", "r", "i").obj();
BSONObj notMatchFlags = BSONObjBuilder().appendRegex("x", "yz", "s").obj();
RegexMatchExpression regex(""... | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 41,068,840,303,974,330,000,000,000,000,000,000,000 | 9 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
static struct sctp_association *__sctp_endpoint_lookup_assoc(
const struct sctp_endpoint *ep,
const union sctp_addr *paddr,
struct sctp_transport **transport)
{
struct sctp_association *asoc = NULL;
struct sctp_association *tmp;
struct sctp_transport *t = NULL;
struct sctp_hashbucket *head;
struct sctp_ep_commo... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 39,506,211,905,294,995,000,000,000,000,000,000,000 | 44 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
int size;
xmlChar *ret;
if ((add == NULL) || (len == 0))
return(cur);
if (len < 0)
return(NULL);
if (cur == NULL)
return(xmlStrndup(add, len));
size = xmlStrlen(cur);
ret = (xmlChar *) xmlRealloc(cur, (size + len + 1)... | 1 | [
"CWE-119"
] | libxml2 | 8fbbf5513d609c1770b391b99e33314cd0742704 | 317,699,768,730,093,200,000,000,000,000,000,000,000 | 21 | Bug 763071: heap-buffer-overflow in xmlStrncat <https://bugzilla.gnome.org/show_bug.cgi?id=763071>
* xmlstring.c:
(xmlStrncat): Return NULL if xmlStrlen returns a negative length.
(xmlStrncatNew): Ditto. |
DEFUN (show_bgp_instance_summary,
show_bgp_instance_summary_cmd,
"show bgp view WORD summary",
SHOW_STR
BGP_STR
"BGP view\n"
"View name\n"
"Summary of BGP neighbor status\n")
{
return bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST);
} | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 242,487,249,874,615,200,000,000,000,000,000,000,000 | 11 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
TEST(GatherNdOpTest, ErrorOnOutOfBoundsNegative) {
GatherNdOpModel m({TensorType_FLOAT32, {2, 2}}, {TensorType_INT32, {2, 2}});
m.SetInput<float>({1.1, 1.2, 2.1, 2.2});
m.SetPositions<int32_t>({1, -1, 1, 1});
EXPECT_EQ(m.Invoke(), kTfLiteError);
} | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 35,713,033,211,381,430,000,000,000,000,000,000,000 | 6 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 |
intrusive_ptr<Expression> ExpressionDateToString::parse(ExpressionContext* const expCtx,
BSONElement expr,
const VariablesParseState& vps) {
verify(expr.fieldNameStringData() == "$dateToString");
uas... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 336,623,500,992,453,840,000,000,000,000,000,000,000 | 37 | SERVER-49404 Enforce additional checks in $arrayToObject |
static int vxlan_stop(struct net_device *dev)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id);
int ret = 0;
if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip) &&
!vxlan_group_used(vn, vxlan))
ret = vxlan_igmp_leave(vxlan);
del_timer_sync(&vxl... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 76,291,512,497,967,570,000,000,000,000,000,000,000 | 17 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
int xt_compat_target_to_user(const struct xt_entry_target *t,
void __user **dstptr, unsigned int *size)
{
const struct xt_target *target = t->u.kernel.target;
struct compat_xt_entry_target __user *ct = *dstptr;
int off = xt_compat_target_offset(target);
u_int16_t tsize = t->u.user.target_size - off;
if (X... | 0 | [] | linux | 175e476b8cdf2a4de7432583b49c871345e4f8a1 | 53,554,764,139,482,120,000,000,000,000,000,000,000 | 23 | netfilter: x_tables: Use correct memory barriers.
When a new table value was assigned, it was followed by a write memory
barrier. This ensured that all writes before this point would complete
before any writes after this point. However, to determine whether the
rules are unused, the sequence counter is read. To ensure... |
static void vmx_flush_log_dirty(struct kvm *kvm)
{
kvm_flush_pml_buffers(kvm);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 102,931,651,290,041,010,000,000,000,000,000,000,000 | 4 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
static void delete_mapping(void *data)
{
soapMappingPtr map = (soapMappingPtr)data;
if (map->to_xml) {
zval_ptr_dtor(&map->to_xml);
}
if (map->to_zval) {
zval_ptr_dtor(&map->to_zval);
}
efree(map);
} | 0 | [
"CWE-19"
] | php-src | c8eaca013a3922e8383def6158ece2b63f6ec483 | 29,844,186,212,215,163,000,000,000,000,000,000,000 | 12 | Added type checks |
int idr_for_each(struct idr *idp,
int (*fn)(int id, void *p, void *data), void *data)
{
int n, id, max, error = 0;
struct idr_layer *p;
struct idr_layer *pa[MAX_IDR_LEVEL + 1];
struct idr_layer **paa = &pa[0];
n = idp->layers * IDR_BITS;
p = rcu_dereference_raw(idp->top);
max = idr_max(idp->layers);
id = 0... | 0 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 44,271,448,147,366,310,000,000,000,000,000,000,000 | 35 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
PHP_FUNCTION(mb_ereg_match)
{
char *arg_pattern;
size_t arg_pattern_len;
char *string;
size_t string_len;
php_mb_regex_t *re;
OnigSyntaxType *syntax;
OnigOptionType option = 0;
int err;
{
char *option_str = NULL;
size_t option_str_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|s",
... | 0 | [
"CWE-125"
] | php-src | e617f03066ce81d26f56c06d6bd7787c7de08703 | 53,956,359,436,574,930,000,000,000,000,000,000,000 | 43 | Fix #77367: Negative size parameter in mb_split
When adding the last element to the result value of `mb_split`, the
`chunk_pos` may point beyond the end of the string, in which case the
unsigned `n` would underflow. Therefore, we check whether this is the
case in the first place, and only calculate `n` otherwise. Si... |
static void mntput_no_expire(struct mount *mnt)
{
put_again:
rcu_read_lock();
mnt_add_count(mnt, -1);
if (likely(mnt->mnt_ns)) { /* shouldn't be the last one */
rcu_read_unlock();
return;
}
lock_mount_hash();
if (mnt_get_count(mnt)) {
rcu_read_unlock();
unlock_mount_hash();
return;
}
if (unlikely(mnt-... | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 313,805,675,684,912,830,000,000,000,000,000,000,000 | 51 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
static SMacro *define_smacro(const char *mname, bool casesense,
Token *expansion, SMacro *tmpl)
{
SMacro *smac, **smhead;
struct hash_table *smtbl;
Context *ctx;
bool defining_alias = false;
int nparam = 0;
bool defined;
if (tmpl) {
defining_alias = tmpl... | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 271,419,644,237,139,900,000,000,000,000,000,000,000 | 136 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
static void stream_unget(stream_t *stream, int c)
{
if(c == STREAM_STATE_EOF || c == STREAM_STATE_ERROR)
return;
stream->position--;
if(c == '\n') {
stream->line--;
stream->column = stream->last_column;
}
else if(utf8_check_first(c))
stream->column--;
assert(str... | 0 | [
"CWE-20"
] | jansson | 64ce0ad3731ebd77e02897b07920eadd0e2cc318 | 165,454,511,779,272,000,000,000,000,000,000,000,000 | 17 | Fix for issue #282
The fix limits recursion depths when parsing arrays and objects.
The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting
within `jansson_config.h` and is set by default to 2048.
Update the RFC conformance document to note the limit; the RFC
allows limits to be set by the implementation so... |
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
{
return (read((int) fd, buf, size));
} | 0 | [
"CWE-369"
] | libtiff | 3c5eb8b1be544e41d2c336191bc4936300ad7543 | 279,425,558,800,351,360,000,000,000,000,000,000,000 | 4 | * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
require malloc() to return NULL pointer if requested allocation
size is zero. Assure that _TIFFmalloc does. |
static inline bool subpool_is_free(struct hugepage_subpool *spool)
{
if (spool->count)
return false;
if (spool->max_hpages != -1)
return spool->used_hpages == 0;
if (spool->min_hpages != -1)
return spool->rsv_hpages == spool->min_hpages;
return true;
} | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 141,356,046,880,323,660,000,000,000,000,000,000,000 | 11 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
static int TS_check_signing_certs(PKCS7_SIGNER_INFO *si, STACK_OF(X509) *chain)
{
ESS_SIGNING_CERT *ss = ESS_get_signing_cert(si);
STACK_OF(ESS_CERT_ID) *cert_ids = NULL;
X509 *cert;
int i = 0;
int ret = 0;
if (!ss) goto err;
cert_ids = ss->cert_ids;
/* The signer certificate must be the first in cert_ids. */... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 283,989,875,191,453,300,000,000,000,000,000,000,000 | 33 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
absl::optional<std::string> HeaderValueSelector::extract(Http::HeaderMap& map) const {
const Http::HeaderEntry* header_entry = map.get(header_);
if (header_entry == nullptr) {
return absl::nullopt;
}
// Catch the value in the header before removing.
absl::optional<std::string> value = std::string(header_e... | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 327,755,759,972,066,750,000,000,000,000,000,000,000 | 12 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
CImg<T>& draw_triangle(CImg<tz>& zbuffer,
int x0, int y0, const float z0,
int x1, int y1, const float z1,
int x2, int y2, const float z2,
const CImg<tc>& texture,
int tx0, int ty0,
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 204,029,106,137,180,450,000,000,000,000,000,000,000 | 94 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int decode_attr_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid)
{
__be32 *p;
int ret = 0;
*fileid = 0;
if (unlikely(bitmap[0] & (FATTR4_WORD0_FILEID - 1U)))
return -EIO;
if (likely(bitmap[0] & FATTR4_WORD0_FILEID)) {
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
return -EIO;
... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 314,213,392,002,580,140,000,000,000,000,000,000,000 | 19 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
Item_subselect::select_transformer(JOIN *join)
{
DBUG_ENTER("Item_subselect::select_transformer");
DBUG_ASSERT(thd == join->thd);
DBUG_RETURN(false);
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 251,968,279,943,107,940,000,000,000,000,000,000,000 | 6 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
long expires, u32 error)
{
struct rta_cacheinfo ci = {
.rta_lastuse = jiffies_delta_to_clock_t(jiffies - dst->lastuse),
.rta_used = dst->__use,
.rta_clntref = atomic_read(&(dst->__refcnt)),
.rta_error = error,
.rta_id = id,
... | 0 | [
"CWE-399"
] | linux-2.6 | 84d73cd3fb142bf1298a8c13fd4ca50fd2432372 | 166,639,968,376,796,380,000,000,000,000,000,000,000 | 20 | rtnl: fix info leak on RTM_GETLINK request for VF devices
Initialize the mac address buffer with 0 as the driver specific function
will probably not fill the whole buffer. In fact, all in-kernel drivers
fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible
bytes. Therefore we currently leak 26 bytes ... |
static struct bc_inflate *get_inflate(struct cli_bc_ctx *ctx, int32_t id)
{
if (id < 0 || id >= ctx->ninflates || !ctx->inflates)
return NULL;
return &ctx->inflates[id];
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 42,702,113,809,481,800,000,000,000,000,000,000,000 | 6 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
EVP_PKEY *SSL_get_privatekey(const SSL *s)
{
if (s->cert != NULL)
return(s->cert->key->privatekey);
else
return(NULL);
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 168,579,887,674,370,730,000,000,000,000,000,000,000 | 7 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
void CLASS ppm16_thumb()
{
int i;
char *thumb;
thumb_length = thumb_width*thumb_height*3;
thumb = (char *) calloc (thumb_length, 2);
merror (thumb, "ppm16_thumb()");
read_shorts ((ushort *) thumb, thumb_length);
for (i=0; i < thumb_length; i++)
thumb[i] = ((ushort *) thumb)[i] >> 8;
fprintf (ofp, "P... | 0 | [] | LibRaw | 9ae25d8c3a6bfb40c582538193264f74c9b93bc0 | 62,776,940,725,038,760,000,000,000,000,000,000,000 | 14 | backported 0.15.4 datachecks |
static int am_probe_url(request_rec *r, const char *url, int timeout)
{
void *dontcare;
apr_size_t len;
long status;
int error;
status = 0;
if ((error = am_httpclient_get(r, url, &dontcare, &len,
timeout, &status)) != OK)
return error;
if (status... | 0 | [] | mod_auth_mellon | 6bdda9170a8f1757dabc5b109958657417728018 | 48,062,301,353,966,000,000,000,000,000,000,000,000 | 21 | Fix segmentation fault when receiving badly formed logout message.
If the logout message is badly formed, we won't get the entityID in
`logout->parent.remote_providerID`. If we call `apr_hash_get()` with a
null pointer, it will cause a segmentation fault.
Add a check to validate that the entityID is correctly set. |
Inspect::~Inspect() { } | 0 | [
"CWE-476"
] | libsass | 38f4c3699d06b64128bebc7cf1e8b3125be74dc4 | 262,184,886,217,210,000,000,000,000,000,000,000,000 | 1 | Fix possible bug with handling empty reference combinators
Fixes #2665 |
BPF_CALL_3(bpf_skb_change_head, struct sk_buff *, skb, u32, head_room,
u64, flags)
{
u32 max_len = __bpf_skb_max_len(skb);
u32 new_len = skb->len + head_room;
int ret;
if (unlikely(flags || (!skb_is_gso(skb) && new_len > max_len) ||
new_len < skb->len))
return -EINVAL;
ret = skb_cow(skb, head_room);... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 244,818,030,384,141,420,000,000,000,000,000,000,000 | 30 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{
struct gs_can *dev = netdev_priv(netdev);
struct net_device_stats *stats = &dev->netdev->stats;
struct urb *urb;
struct gs_host_frame *hf;
struct can_frame *cf;
int rc;
unsigned int idx;
struct gs_tx_context *txc;
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | fb5be6a7b4863ecc44963bb80ca614584b6c7817 | 63,075,497,230,117,660,000,000,000,000,000,000,000 | 106 | can: gs_usb: gs_can_open(): prevent memory leak
In gs_can_open() if usb_submit_urb() fails the allocated urb should be
released.
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off... |
void OPENSSL_cleanup(void)
{
OPENSSL_INIT_STOP *currhandler, *lasthandler;
CRYPTO_THREAD_LOCAL key;
/* If we've not been inited then no need to deinit */
if (!base_inited)
return;
/* Might be explicitly called and also by atexit */
if (stopped)
return;
stopped = 1;
/*
... | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 251,692,031,435,603,280,000,000,000,000,000,000,000 | 117 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
read_rsrc_char (const SD2_RSRC *prsrc, int offset)
{ const unsigned char * data = prsrc->rsrc_data ;
if (offset < 0 || offset >= prsrc->rsrc_len)
return 0 ;
return data [offset] ;
} /* read_rsrc_char */ | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | dbe14f00030af5d3577f4cabbf9861db59e9c378 | 198,796,405,395,864,470,000,000,000,000,000,000,000 | 6 | src/sd2.c : Fix two potential buffer read overflows.
Closes: https://github.com/erikd/libsndfile/issues/93 |
static void test_sqlmode()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[2];
char c1[5], c2[5];
int rc;
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_sqlmode");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_piping");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_piping(name v... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 128,512,613,654,728,060,000,000,000,000,000,000,000 | 137 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent)
{
VirtIOSerialPort *port = DO_UPCAST(VirtIOSerialPort, dev, qdev);
monitor_printf(mon, "%*sport %d, guest %s, host %s, throttle %s\n",
indent, "", port->id,
port->guest_connected ? "on" : "off",... | 0 | [
"CWE-120",
"CWE-787"
] | qemu | 7882080388be5088e72c425b02223c02e6cb4295 | 214,426,946,509,821,220,000,000,000,000,000,000,000 | 10 | virtio-serial: fix ANY_LAYOUT
Don't assume a specific layout for control messages.
Required by virtio 1.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com> |
Tool::Tool( string name , DBAccess access , string defaultDB ,
string defaultCollection , bool usesstdout ) :
_name( name ) , _db( defaultDB ) , _coll( defaultCollection ) ,
_usesstdout(usesstdout), _noconnection(false), _autoreconnect(false), _conn(0), _slaveConn(0), _paired(false) ... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 5,756,995,212,694,945,000,000,000,000,000,000,000 | 48 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
PHP_FUNCTION(curl_setopt_array)
{
zval *zid, *arr, *entry;
php_curl *ch;
zend_ulong option;
zend_string *string_key;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "za", &zid, &arr) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_... | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 150,090,282,006,097,680,000,000,000,000,000,000,000 | 26 | Fixed bug #68739 #68740 #68741 |
const char* what() const throw () override {
return "bad cql binary frame";
} | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 216,792,057,199,950,500,000,000,000,000,000,000,000 | 3 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 |
brcmf_find_wpsie(const u8 *parse, u32 len)
{
const struct brcmf_tlv *ie;
while ((ie = brcmf_parse_tlvs(parse, len, WLAN_EID_VENDOR_SPECIFIC))) {
if (brcmf_tlv_has_ie((u8 *)ie, &parse, &len,
WPA_OUI, TLV_OUI_LEN, WPS_OUI_TYPE))
return (struct brcmf_vs_tlv *)ie;
}
return NULL;
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 328,851,479,270,216,840,000,000,000,000,000,000,000 | 11 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
CIFSSMBQFSAttributeInfo(const int xid, struct cifs_tcon *tcon)
{
/* level 0x105 SMB_QUERY_FILE_SYSTEM_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL;
TRANSACTION2_QFSI_RSP *pSMBr = NULL;
FILE_SYSTEM_ATTRIBUTE_INFO *response_data;
int rc = 0;
int bytes_returned = 0;
__u16 params, byte_count;
cFYI(1, "In QFSAttribut... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 74,300,783,202,424,960,000,000,000,000,000,000,000 | 68 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
static void udf_put_super(struct super_block *sb)
{
struct udf_sb_info *sbi;
sbi = UDF_SB(sb);
if (sbi->s_vat_inode)
iput(sbi->s_vat_inode);
#ifdef CONFIG_UDF_NLS
if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
unload_nls(sbi->s_nls_map);
#endif
if (!(sb->s_flags & MS_RDONLY))
udf_close_lvid(sb);
brelse(sbi->s_... | 0 | [] | linux-2.6 | 57b9655d01ef057a523e810d29c37ac09b80eead | 233,340,296,174,140,650,000,000,000,000,000,000,000 | 19 | udf: Improve table length check to avoid possible overflow
When a partition table length is corrupted to be close to 1 << 32, the
check for its length may overflow on 32-bit systems and we will think
the length is valid. Later on the kernel can crash trying to read beyond
end of buffer. Fix the check to avoid possible... |
static void *create_core_dir_config(apr_pool_t *a, char *dir)
{
core_dir_config *conf;
conf = (core_dir_config *)apr_pcalloc(a, sizeof(core_dir_config));
/* conf->r and conf->d[_*] are initialized by dirsection() or left NULL */
conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_SYM_LINKS;
conf->opts_a... | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 70,632,820,412,706,900,000,000,000,000,000,000,000 | 67 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
match_issuer_and_serial(CERTCertificate *cert, void *cbdatap)
{
CERTIssuerAndSN *ias = cbdatap;
bool found = false;
if (ias->derIssuer.len == cert->derIssuer.len &&
ias->derIssuer.len != 0) {
if (memcmp(ias->derIssuer.data, cert->derIssuer.data,
ias->derIssuer.len))
return 0;
found = true;
}
if... | 0 | [
"CWE-787"
] | pesign | b879dda52f8122de697d145977c285fb0a022d76 | 41,253,618,322,140,226,000,000,000,000,000,000,000 | 30 | Handle NULL pwdata in cms_set_pw_data()
When 12f16710ee44ef64ddb044a3523c3c4c4d90039a rewrote this function, it
didn't handle the NULL pwdata invocation from daemon.c. This leads to a
explicit NULL dereference and crash on all attempts to daemonize pesign.
Signed-off-by: Robbie Harwood <rharwood@redhat.com> |
void line6_start_timer(struct timer_list *timer, unsigned long msecs,
void (*function)(struct timer_list *t))
{
timer->function = function;
mod_timer(timer, jiffies + msecs_to_jiffies(msecs));
} | 0 | [
"CWE-476"
] | linux | 0b074ab7fc0d575247b9cc9f93bb7e007ca38840 | 304,836,385,466,997,450,000,000,000,000,000,000,000 | 6 | ALSA: line6: Assure canceling delayed work at disconnection
The current code performs the cancel of a delayed work at the late
stage of disconnection procedure, which may lead to the access to the
already cleared state.
This patch assures to call cancel_delayed_work_sync() at the beginning
of the disconnection proced... |
static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
{
#ifdef CONFIG_X86_64
unsigned long a;
#endif
int i;
/* I/O */
vmcs_write64(IO_BITMAP_A, __pa(vmx_io_bitmap_a));
vmcs_write64(IO_BITMAP_B, __pa(vmx_io_bitmap_b));
if (enable_shadow_vmcs) {
vmcs_write64(VMREAD_BITMAP, __pa(vmx_vmread_bitmap));
vmcs_write64(VMW... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 108,516,665,846,796,600,000,000,000,000,000,000,000 | 106 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
xps_setlinewidth(gx_device_vector *vdev, double width)
{
gx_device_xps *xps = (gx_device_xps *)vdev;
if_debug1m('_', xps->memory, "xps_setlinewidth(%lf)\n", width);
xps->linewidth = width;
return 0;
} | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 152,071,977,958,316,800,000,000,000,000,000,000,000 | 10 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
static uint64_t virtio_net_bad_features(VirtIODevice *vdev)
{
uint64_t features = 0;
/* Linux kernel 2.6.25. It understood MAC (as everyone must),
* but also these: */
virtio_add_feature(&features, VIRTIO_NET_F_MAC);
virtio_add_feature(&features, VIRTIO_NET_F_CSUM);
virtio_add_feature(&featur... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 138,240,400,637,022,920,000,000,000,000,000,000,000 | 14 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
sonmp_decode(struct lldpd *cfg, char *frame, int s,
struct lldpd_hardware *hardware,
struct lldpd_chassis **newchassis, struct lldpd_port **newport)
{
const u_int8_t mcastaddr[] = SONMP_MULTICAST_ADDR;
struct lldpd_chassis *chassis;
struct lldpd_port *port;
struct lldpd_mgmt *mgmt;
int length, i;
u_int8_t... | 0 | [
"CWE-617",
"CWE-703"
] | lldpd | 793526f8884455f43daecd0a2c46772388417a00 | 222,155,917,663,061,800,000,000,000,000,000,000,000 | 131 | protocols: don't use assert on paths that can be reached
Malformed packets should not make lldpd crash. Ensure we can handle them
by not using assert() in this part. |
static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
switch (hdev->product) {
case USB_DEVICE_ID_KYE_ERGO_525V:
/* the fixups that need to be done:
* - change led usage page to button for extra buttons
* - report size 8 count 1 must be size 1 count 8 for button
*... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | 72,851,431,633,356,560,000,000,000,000,000,000,000 | 61 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... |
bool ms_can_fast_dispatch(const Message *m) const override {
switch (m->get_type()) {
case CEPH_MSG_PING:
return true;
default:
return false;
}
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 191,627,022,081,347,060,000,000,000,000,000,000,000 | 8 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
TEST(BitTestMatchExpression, DoesNotMatchInteger) {
BSONArray bas = BSON_ARRAY(1 << 2 << 4 << 5 << 6);
BSONArray bac = BSON_ARRAY(0 << 3 << 1);
std::vector<uint32_t> bitPositionsSet = bsonArrayToBitPositions(bas);
std::vector<uint32_t> bitPositionsClear = bsonArrayToBitPositions(bac);
BSONObj match... | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 315,215,498,906,311,230,000,000,000,000,000,000,000 | 32 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
system_locations_from_configuration (GCancellable *cancellable,
GError **error)
{
g_autoptr(GPtrArray) locations = NULL;
g_autoptr(GFile) conf_dir = NULL;
g_autoptr(GFileEnumerator) dir_enum = NULL;
g_autoptr(GError) my_error = NULL;
g_autofree char *config_dir = NULL... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 123,360,526,374,754,830,000,000,000,000,000,000,000 | 66 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no,
J2K_T2_MODE p_t2_mode )
{
/* loop*/
OPJ_UINT32 pino;
OPJ_UINT32 compno, res... | 0 | [
"CWE-190",
"CWE-125",
"CWE-787"
] | openjpeg | c16bc057ba3f125051c9966cf1f5b68a05681de4 | 337,686,343,970,554,700,000,000,000,000,000,000,000 | 184 | Fix an integer overflow issue (#809)
Prevent an integer overflow issue in function opj_pi_create_decode of
pi.c. |
int regs_query_register_offset(const char *name)
{
const struct pt_regs_offset *roff;
for (roff = regoffset_table; roff->name != NULL; roff++)
if (!strcmp(roff->name, name))
return roff->offset;
return -EINVAL;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 48,411,441,244,979,900,000,000,000,000,000,000,000 | 8 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func,
CRYPTO_EX_free *free_func)
{
/*
* This function is (usually) called only once, by
* SSL_g... | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 247,966,510,028,215,240,000,000,000,000,000,000,000 | 12 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
static int check_func_enum(THD *thd, struct st_mysql_sys_var *var,
void *save, st_mysql_value *value)
{
char buff[STRING_BUFFER_USUAL_SIZE];
const char *str;
TYPELIB *typelib;
long long tmp;
long result;
int length;
if (var->flags & PLUGIN_VAR_THDLOCAL)
typelib= ((thdvar_en... | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 332,943,367,426,757,840,000,000,000,000,000,000,000 | 36 | MDEV-26323 use-after-poison issue of MariaDB server |
template<typename t>
CImg<Tfloat> get_blur_bilateral(const CImg<t>& guide,
const float sigma_x, const float sigma_y,
const float sigma_z, const float sigma_r,
const float sampling_x, const float sampling_... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 60,850,791,375,022,830,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u64 msr;
int ret;
vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP));
if (!init_rmode(vmx->vcpu.kvm)) {
ret = -ENOMEM;
goto out;
}
vmx->rmode.vm86_active = 0;
vmx->soft_vnmi_blocked = 0;
vmx->vcp... | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 204,209,284,985,961,920,000,000,000,000,000,000,000 | 118 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
finish_write_reg(
int name,
yankreg_T *old_y_previous,
yankreg_T *old_y_current)
{
# ifdef FEAT_CLIPBOARD
// Send text of clipboard register to the clipboard.
may_set_selection();
# endif
// ':let @" = "val"' should change the meaning of the "" register
if (name != '"')
y_previous = old_y... | 0 | [
"CWE-122",
"CWE-787"
] | vim | d25f003342aca9889067f2e839963dfeccf1fe05 | 3,999,804,247,198,321,000,000,000,000,000,000,000 | 15 | patch 9.0.0011: reading beyond the end of the line with put command
Problem: Reading beyond the end of the line with put command.
Solution: Adjust the end mark position. |
spell_read_tree(
FILE *fd,
char_u **bytsp,
long *bytsp_len,
idx_T **idxsp,
int prefixtree, // TRUE for the prefix tree
int prefixcnt) // when "prefixtree" is TRUE: prefix count
{
long len;
int idx;
char_u *bp;
idx_T *ip;
// The tree size was computed when writing the file... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 120,812,719,694,379,930,000,000,000,000,000,000,000 | 44 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
msg_fifo_free (struct msg_fifo *fifo)
{
msg_fifo_flush (fifo);
XFREE (MTYPE_OSPF_API_FIFO, fifo);
} | 0 | [
"CWE-119"
] | quagga | 3f872fe60463a931c5c766dbf8c36870c0023e88 | 109,905,319,670,403,970,000,000,000,000,000,000,000 | 6 | ospfd: CVE-2013-2236, stack overrun in apiserver
the OSPF API-server (exporting the LSDB and allowing announcement of
Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads
to an exploitable stack overflow.
For this condition to occur, the following two conditions must be true:
- Quagga is configured... |
tensorflow::EagerContextThreadLocalData* GetData() const {
auto* result =
tensorflow::GetEagerContextThreadLocalData(py_eager_context_);
if (!result) {
throw py::error_already_set();
}
return result;
} | 0 | [
"CWE-20",
"CWE-476",
"CWE-908"
] | tensorflow | 22e07fb204386768e5bcbea563641ea11f96ceb8 | 104,577,313,895,139,000,000,000,000,000,000,000,000 | 8 | Fix multiple vulnerabilities in `tf.experimental.dlpack.to_dlpack`.
We have a use after free caused by memory coruption, a segmentation fault caused by memory corruption, several memory leaks and an undefined behavior when taking the reference of a nullptr.
PiperOrigin-RevId: 332568894
Change-Id: Ife0fc05e103b3532509... |
void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting)
{
const struct k_clock *kc = timr->kclock;
ktime_t now, remaining, iv;
struct timespec64 ts64;
bool sig_none;
sig_none = (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE;
iv = timr->it_interval;
/* interval timer ? */
if (i... | 1 | [
"CWE-125"
] | linux | cef31d9af908243421258f1df35a4a644604efbe | 101,081,241,062,199,030,000,000,000,000,000,000,000 | 49 | posix-timer: Properly check sigevent->sigev_notify
timer_create() specifies via sigevent->sigev_notify the signal delivery for
the new timer. The valid modes are SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD
and (SIGEV_SIGNAL | SIGEV_THREAD_ID).
The sanity check in good_sigevent() is only checking the valid combination
for ... |
static pvc_device* add_pvc(struct net_device *dev, u16 dlci)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
pvc_device *pvc, **pvc_p = &state(hdlc)->first_pvc;
while (*pvc_p) {
if ((*pvc_p)->dlci == dlci)
return *pvc_p;
if ((*pvc_p)->dlci > dlci)
break; /* the list is sorted */
pvc_p = &(*pvc_p)->next;
}
pv... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 125,344,438,433,672,520,000,000,000,000,000,000,000 | 26 | 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... |
void nci_unregister_device(struct nci_dev *ndev)
{
struct nci_conn_info *conn_info, *n;
/* This set_bit is not protected with specialized barrier,
* However, it is fine because the mutex_lock(&ndev->req_lock);
* in nci_close_device() will help to emit one.
*/
set_bit(NCI_UNREG, &ndev->flags);
nci_close_devi... | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 80,769,015,540,920,570,000,000,000,000,000,000,000 | 23 | NFC: add NCI_UNREG flag to eliminate the race
There are two sites that calls queue_work() after the
destroy_workqueue() and lead to possible UAF.
The first site is nci_send_cmd(), which can happen after the
nci_close_device as below
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
f... |
static void cfunbody(JF, js_Ast *name, js_Ast *params, js_Ast *body)
{
F->lightweight = 1;
F->arguments = 0;
if (F->script)
F->lightweight = 0;
if (body)
analyze(J, F, body);
cparams(J, F, params);
if (name) {
emit(J, F, OP_CURRENT);
if (F->lightweight) {
addlocal(J, F, name, 0);
emit(J, F, OP_I... | 0 | [
"CWE-476"
] | mujs | 5008105780c0b0182ea6eda83ad5598f225be3ee | 32,777,234,616,424,655,000,000,000,000,000,000,000 | 39 | Fix 697172: degenerate labeled break/continue statement.
A labeled break statement will look for a matching label through
its chain of parent statements. We start looking at the break statement
though, so if the label is attached to the break, we'll return the break
statement itself as a break target.
Start looking f... |
db_dict_field_find(const char *data, void *context,
const char **value_r,
const char **error_r ATTR_UNUSED)
{
struct db_dict_value_iter *iter = context;
struct db_dict_iter_key *key;
const char *name, *value, *dotname = strchr(data, '.');
string_t *tmpstr;
*value_r = NULL;
if (dotname != NULL)
data ... | 0 | [] | core | 000030feb7a30f193197f1aab8a7b04a26b42735 | 198,214,548,688,648,380,000,000,000,000,000,000,000 | 39 | auth: Do not double-expand key in passdb dict when authenticating
Broken by 79042f8c |
virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) {
CSmartPtr<CWebSession> spSession = WebSock.GetSession();
if (sPageName == "settings") {
// Admin Check
if (!spSession->IsAdmin()) {
return false;
}
return SettingsPage(WebSock, Tmpl);
} else if (sPageName ... | 0 | [
"CWE-703"
] | znc | 2bd410ee5570cea127233f1133ea22f25174eb28 | 314,316,039,265,839,600,000,000,000,000,000,000,000 | 194 | Fix NULL pointer dereference in webadmin.
Triggerable by any non-admin, if webadmin is loaded.
The only affected version is 1.0
Thanks to ChauffeR (Simone Esposito) for reporting this. |
unsigned int CModule::PutModule(const CTable& table) {
if (!m_pUser) return 0;
unsigned int idx = 0;
CString sLine;
while (table.GetLine(idx++, sLine)) PutModule(sLine);
return idx - 1;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 24,355,699,296,638,500,000,000,000,000,000,000,000 | 8 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
bitset_invert_to(BitSetRef from, BitSetRef to)
{
int i;
for (i = 0; i < BITSET_SIZE; i++) { to[i] = ~(from[i]); }
} | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 288,275,408,501,645,730,000,000,000,000,000,000,000 | 5 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
UINT rdpgfx_write_point16(wStream* s, const RDPGFX_POINT16* point16)
{
Stream_Write_UINT16(s, point16->x); /* x (2 bytes) */
Stream_Write_UINT16(s, point16->y); /* y (2 bytes) */
return CHANNEL_RC_OK;
} | 0 | [
"CWE-190"
] | FreeRDP | 40393700642ad38437982e8a3afc34ff33ccf28e | 33,673,851,680,676,653,000,000,000,000,000,000,000 | 6 | Fixed input sanitation in rdpgfx_recv_solid_fill_pdu
The input rectangle must be checked for plausibility.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen |
int con_debug_leave(void)
{
struct vc_data *vc;
int ret = 0;
fg_console = saved_fg_console;
last_console = saved_last_console;
want_console = saved_want_console;
console_blanked = saved_console_blanked;
vc_cons[fg_console].d->vc_mode = saved_vc_mode;
vc = vc_cons[fg_console].d;
if (vc->vc_sw->con_debug_leave... | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 24,847,182,335,437,265,000,000,000,000,000,000,000 | 16 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
ModuleExport size_t RegisterCINImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("CIN");
entry->decoder=(DecodeImageHandler *) ReadCINImage;
entry->encoder=(EncodeImageHandler *) WriteCINImage;
entry->magick=(IsImageFormatHandler *) IsCIN;
entry->adjoin=MagickFalse;
entry->seekable_stream=MagickTr... | 0 | [
"CWE-120",
"CWE-787"
] | ImageMagick6 | e6ea5876e0228165ee3abc6e959aa174cee06680 | 17,212,879,196,318,557,000,000,000,000,000,000,000 | 16 | https://github.com/ImageMagick/ImageMagick/issues/4988 |
Item_case_expr::Item_case_expr(THD *thd, uint case_expr_id):
Item_sp_variable(thd, &str_case_expr),
m_case_expr_id(case_expr_id)
{
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 44,203,537,338,450,480,000,000,000,000,000,000,000 | 5 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
void prft_del(GF_Box *s)
{
gf_free(s); | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 47,483,217,551,940,320,000,000,000,000,000,000,000 | 4 | prevent dref memleak on invalid input (#1183) |
static int vhost_copy_to_user(struct vhost_virtqueue *vq, void __user *to,
const void *from, unsigned size)
{
int ret;
if (!vq->iotlb)
return __copy_to_user(to, from, size);
else {
/* This function should be called after iotlb
* prefetch, which means we're sure that all vq
* could be access throu... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 215,203,359,286,840,360,000,000,000,000,000,000,000 | 34 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
iperf_catch_sigend(void (*handler)(int))
{
signal(SIGINT, handler);
signal(SIGTERM, handler);
signal(SIGHUP, handler);
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 265,565,489,145,673,160,000,000,000,000,000,000,000 | 6 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
ModuleExport size_t RegisterSUNImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("SUN","RAS","SUN Rasterfile");
entry->decoder=(DecodeImageHandler *) ReadSUNImage;
entry->encoder=(EncodeImageHandler *) WriteSUNImage;
entry->magick=(IsImageFormatHandler *) IsSUN;
(void) RegisterMagickInfo(entry);... | 0 | [
"CWE-125"
] | ImageMagick | 2174484dfa68a594e2f9ad17f46217b6120db18d | 119,802,766,131,497,950,000,000,000,000,000,000,000 | 16 | https://github.com/ImageMagick/ImageMagick/issues/82
https://github.com/ImageMagick/ImageMagick/issues/81
https://github.com/ImageMagick/ImageMagick/issues/80
https://github.com/ImageMagick/ImageMagick/issues/77 |
static int automount_load(Unit *u) {
Automount *a = AUTOMOUNT(u);
int r;
assert(u);
assert(u->load_state == UNIT_STUB);
/* Load a .automount file */
r = unit_load_fragment_and_dropin_optional(u);
if (r < 0)
return r;
if (u->load_state ==... | 0 | [
"CWE-362"
] | systemd | e7d54bf58789545a9eb0b3964233defa0b007318 | 248,272,179,554,405,800,000,000,000,000,000,000,000 | 38 | automount: ack automount requests even when already mounted (#5916)
If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started... |
static u8 ieee80211_wmm_ecw(u16 cw_min, u16 cw_max)
{
return ((ilog2(cw_min + 1) << 0x0) & 0x0f) |
((ilog2(cw_max + 1) << 0x4) & 0xf0);
} | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 56,269,409,589,078,110,000,000,000,000,000,000,000 | 5 | 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... |
static void mdesc_notify_clients(struct mdesc_handle *old_hp,
struct mdesc_handle *new_hp)
{
struct mdesc_notifier_client *p = client_list;
while (p) {
notify_one(p, old_hp, new_hp);
p = p->next;
}
} | 0 | [
"CWE-476"
] | sparc | 80caf43549e7e41a695c6d1e11066286538b336f | 174,617,502,041,883,870,000,000,000,000,000,000,000 | 10 | mdesc: fix a missing-check bug in get_vdev_port_node_info()
In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated
by kstrdup_const(), and it returns NULL when fails. So
'node_info->vdev_port.name' should be checked.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: David S. Miller <d... |
static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
if (i_zend_is_true(value)) {
EX_T(opline->result.u.var).tmp_var = *value;
zendi_zval_copy_ctor(EX_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 76,991,845,471,560,270,000,000,000,000,000,000,000 | 19 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.