func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
createForeignKeyTriggers(Relation rel, Oid refRelOid, Constraint *fkconstraint,
Oid constraintOid, Oid indexOid)
{
Oid myRelOid;
CreateTrigStmt *fk_trigger;
myRelOid = RelationGetRelid(rel);
/* Make changes-so-far visible */
CommandCounterIncrement();
/*
* Build and execute a CREATE CONSTRAINT TRIGG... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 23,384,766,749,509,200,000,000,000,000,000,000,000 | 128 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static bool ion_handle_validate(struct ion_client *client,
struct ion_handle *handle)
{
WARN_ON(!mutex_is_locked(&client->lock));
return idr_find(&client->idr, handle->id) == handle;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 5,306,506,760,347,499,000,000,000,000,000,000,000 | 6 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
{
Bitmapset *parmset;
/*
* The plan node only depends on params listed in its allParam set. Don't
* include anything else into its chgParam set.
*/
parmset = bms_intersect(node->plan->allParam, newchg);
/*
* Keep node->chgParam == NULL if there's ... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 107,222,919,299,807,280,000,000,000,000,000,000,000 | 19 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
set_arg(void __user *b, void *val, int len)
{
if (len <= 0)
len = sizeof(void *);
if (copy_to_user(b, val, len))
return -EFAULT;
return 0;
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 33,643,268,747,134,100,000,000,000,000,000,000,000 | 8 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
root_type(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
gqlValue na = gql_extract_arg(err, field, sel, "name");
const char *name = NULL;
const char *key = sel->name;
int d2 = depth + 1;
gqlType type;
gqlValue co;
struct _gqlCobj child ... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 199,501,371,199,030,460,000,000,000,000,000,000,000 | 31 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
static void send_packet_to_relay(struct dhcp_packet *dhcp_pkt)
{
log1("forwarding packet to relay");
udhcp_send_kernel_packet(dhcp_pkt,
server_config.server_nip, SERVER_PORT,
dhcp_pkt->gateway_nip, SERVER_PORT);
} | 0 | [
"CWE-125"
] | busybox | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c | 158,233,362,620,298,660,000,000,000,000,000,000,000 | 8 | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... |
schedule_idle_callback (void)
{
G_LOCK (idle);
if (!no_idle_exit)
{
if (idle_timeout_id != 0)
g_source_remove (idle_timeout_id);
idle_timeout_id = g_timeout_add_seconds (IDLE_TIMEOUT_SECS, idle_timeout_cb, NULL);
}
G_UNLOCK (idle);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 179,295,259,381,067,660,000,000,000,000,000,000,000 | 14 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static inline int security_socket_shutdown(struct socket *sock, int how)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 23,845,564,375,059,225,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... |
struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
unsigned long *flags)
{
struct sighand_struct *sighand;
for (;;) {
/*
* Disable interrupts early to avoid deadlocks.
* See rcu_read_unlock() comment header for details.
*/
local_irq_save(*flags);
rcu_read_lock();
sighand = r... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 37,350,554,703,980,965,000,000,000,000,000,000,000 | 41 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
char ByteVector::at(uint index) const
{
return index < size() ? d->data[index] : 0;
} | 0 | [
"CWE-189"
] | taglib | dcdf4fd954e3213c355746fa15b7480461972308 | 64,576,163,070,068,090,000,000,000,000,000,000,000 | 4 | Avoid uint overflow in case the length + index is over UINT_MAX |
get_input_file (char const *filename, char const *outname, mode_t file_type)
{
bool elsewhere = strcmp (filename, outname) != 0;
char const *cs;
char *diffbuf;
char *getbuf;
if (inerrno == -1)
inerrno = stat_file (filename, &instat);
/* Perhaps look for RCS or SCCS versions. */
if (... | 0 | [
"CWE-59"
] | patch | dce4683cbbe107a95f1f0d45fabc304acfb5d71a | 87,198,378,233,744,010,000,000,000,000,000,000,000 | 75 | Don't follow symlinks unless --follow-symlinks is given
* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
append_to_file): Unless the --follow-symlinks option is given, open files with
the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
that consistently for input files.
* src/u... |
DEFUN (clear_ip_bgp_all_soft_out,
clear_ip_bgp_all_soft_out_cmd,
"clear ip bgp * soft out",
CLEAR_STR
IP_STR
BGP_STR
"Clear all peers\n"
"Soft reconfig\n"
"Soft reconfig outbound update\n")
{
if (argc == 1)
return bgp_clear_vty (vty, argv[0], AFI_IP, SAFI_UN... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 176,171,262,169,152,230,000,000,000,000,000,000,000 | 17 | [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... |
static av_cold int init(AVFilterContext *ctx)
{
VignetteContext *s = ctx->priv;
#define PARSE_EXPR(name) do { \
int ret = av_expr_parse(&s->name##_pexpr, s->name##_expr, var_names, \
NULL, NULL, NULL, NULL, 0, ctx); \
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 294,666,913,890,815,620,000,000,000,000,000,000,000 | 19 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
TEST_F(NgramKernelTest, TestSinglyPaddedTrigrams) {
MakeOp("|", {3}, "LP", "RP", 1, false);
// Batch items are:
// 0: "a", "b", "c", "d"
// 1: "e", "f"
AddInputFromArray<tstring>(TensorShape({6}), {"a", "b", "c", "d", "e", "f"});
AddInputFromArray<int64>(TensorShape({3}), {0, 4, 6});
TF_ASSERT_OK(RunOpKer... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | ba424dd8f16f7110eea526a8086f1a155f14f22b | 306,915,042,901,007,730,000,000,000,000,000,000,000 | 17 | Enhance validation of ngram op and handle case of 0 tokens.
PiperOrigin-RevId: 369940178
Change-Id: Ia82f42c09d14efe76e7dc013505b832a42282f0b |
static void credential_apply_config(struct credential *c)
{
if (!c->host)
die(_("refusing to work with credential missing host field"));
if (!c->protocol)
die(_("refusing to work with credential missing protocol field"));
if (c->configured)
return;
git_config(credential_config_callback, c);
c->configured = ... | 0 | [
"CWE-522"
] | git | c44088ecc4b0722636e0a305f9608d3047197282 | 337,065,343,674,122,570,000,000,000,000,000,000,000 | 16 | credential: treat URL without scheme as invalid
libcurl permits making requests without a URL scheme specified. In
this case, it guesses the URL from the hostname, so I can run
git ls-remote http::ftp.example.com/path/to/repo
and it would make an FTP request.
Any user intentionally using such a URL is likely to h... |
NOEXPORT int change_root(void) {
if(!global_options.chroot_dir)
return 0;
if(chroot(global_options.chroot_dir)) {
sockerror("chroot");
return 1;
}
if(chdir("/")) {
sockerror("chdir");
return 1;
}
s_log(LOG_NOTICE, "Switched to chroot directory: %s", global... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 181,562,049,663,720,900,000,000,000,000,000,000,000 | 14 | stunnel-5.57 |
bool typeMatch(const BSONObj& obj) {
BSONObjIterator it(obj);
verify(it.more());
BSONElement first = it.next();
verify(it.more());
BSONElement second = it.next();
return first.canonicalType() == second.canonicalType();
} | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 23,090,306,498,379,020,000,000,000,000,000,000,000 | 8 | SERVER-44377 generate correct plan for indexed inequalities to null |
PyRun_SimpleFile(FILE *f, const char *p)
{
return PyRun_SimpleFileExFlags(f, p, 0, NULL);
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 26,974,344,017,915,080,000,000,000,000,000,000,000 | 4 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
ssh_local_cmd(const char *args)
{
char *shell;
pid_t pid;
int status;
void (*osighand)(int);
if (!options.permit_local_command ||
args == NULL || !*args)
return (1);
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
osighand = signal(SIGCHLD, SIG_DFL);
pid = fork();
if ... | 0 | [
"CWE-20"
] | openssh-portable | 7d6a9fb660c808882d064e152d6070ffc3844c3f | 210,665,681,999,963,480,000,000,000,000,000,000,000 | 35 | - djm@cvs.openbsd.org 2014/04/01 03:34:10
[sshconnect.c]
When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
certificate keys to plain keys and attempt SSHFP resolution.
Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
dialog by offering only certificate ... |
Item *Item_func_isnotnull::neg_transformer(THD *thd)
{
Item *item= new (thd->mem_root) Item_func_isnull(thd, args[0]);
return item;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 333,260,914,244,226,300,000,000,000,000,000,000,000 | 5 | 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 ... |
static void stbi__refill_buffer(stbi__context *s)
{
int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original);
if (n == 0) {
// at end of file, treat same as if from memory, but need to handle case
// where s->... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 120,034,583,323,534,980,000,000,000,000,000,000,000 | 16 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
TRIO_PRIVATE int TrioParseSpecifier TRIO_ARGS4((type, format, offset, parameter), int type,
TRIO_CONST char* format, int offset,
trio_parameter_t* parameter)
{
parameter->baseSpecifier = NO_BASE;
switch (format[offset++])
... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 200,462,764,568,486,040,000,000,000,000,000,000,000 | 237 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static const char *get_top_domain(const char * const domain, size_t *outlen)
{
size_t len = 0;
const char *first = NULL, *last;
if(domain) {
len = strlen(domain);
last = memrchr(domain, '.', len);
if(last) {
first = memrchr(domain, '.', (last - domain));
if(first)
len -= (++first ... | 0 | [] | curl | 48d7064a49148f03942380967da739dcde1cdc24 | 14,203,311,955,044,302,000,000,000,000,000,000,000 | 20 | cookie: apply limits
- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50
Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048 |
static void acm_tty_hangup(struct tty_struct *tty)
{
struct acm *acm = tty->driver_data;
tty_port_hangup(&acm->port);
} | 0 | [
"CWE-416"
] | linux | c52873e5a1ef72f845526d9f6a50704433f9c625 | 298,995,123,878,121,730,000,000,000,000,000,000,000 | 6 | usb: cdc-acm: make sure a refcount is taken early enough
destroy() will decrement the refcount on the interface, so that
it needs to be taken so early that it never undercounts.
Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: ... |
static void ext4_put_super(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int i, err;
ext4_unregister_li_request(sb);
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
flush_workqueue(sbi->dio_unwritten_wq);
destroy_workqueue(sbi->dio... | 0 | [
"CWE-703",
"CWE-189"
] | linux | d50f2ab6f050311dbf7b8f5501b25f0bf64a439b | 62,619,642,844,327,010,000,000,000,000,000,000,000 | 85 | ext4: fix undefined behavior in ext4_fill_flex_info()
Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by
zero when trying to mount a corrupted file system") fixes CVE-2009-4307
by performing a sanity check on s_log_groups_per_flex, since it can be
set to a bogus value by an attacker.
sbi->s_log_... |
pk_transaction_method_call (GDBusConnection *connection_, const gchar *sender,
const gchar *object_path, const gchar *interface_name,
const gchar *method_name, GVariant *parameters,
GDBusMethodInvocation *invocation, gpointer user_data)
{
PkTransaction *transaction = PK_TRANSACTION (user_data);
... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 251,548,631,144,783,700,000,000,000,000,000,000,000 | 159 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
{
#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
bool eligible;
eligible = !vcpu->spin_loop.in_spin_loop ||
vcpu->spin_loop.dy_eligible;
if (vcpu->spin_loop.in_spin_loop)
kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible);
retu... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 252,657,305,145,266,400,000,000,000,000,000,000,000 | 16 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int i740fb_ddc_getsda(void *data)
{
struct i740fb_par *par = data;
i740outreg_mask(par, XRX, REG_DDC_DRIVE, 0, DDC_SDA);
return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SDA);
} | 0 | [
"CWE-369"
] | linux-fbdev | 15cf0b82271b1823fb02ab8c377badba614d95d5 | 4,189,804,326,818,315,400,000,000,000,000,000,000 | 8 | video: fbdev: i740fb: Error out if 'pixclock' equals zero
The userspace program could pass any values to the driver through
ioctl() interface. If the driver doesn't check the value of 'pixclock',
it may cause divide error.
Fix this by checking whether 'pixclock' is zero in the function
i740fb_check_var().
The follow... |
static int vxlan_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff)
{
/* Sets 'skb->inner_mac_header' since we are always called with
* 'skb->encapsulation' set.
*/
return eth_gro_complete(skb, nhoff + sizeof(struct vxlanhdr));
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 15,484,497,451,524,283,000,000,000,000,000,000,000 | 7 | 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... |
static int ucma_open(struct inode *inode, struct file *filp)
{
struct ucma_file *file;
file = kmalloc(sizeof *file, GFP_KERNEL);
if (!file)
return -ENOMEM;
file->close_wq = create_singlethread_workqueue("ucma_close_id");
if (!file->close_wq) {
kfree(file);
return -ENOMEM;
}
INIT_LIST_HEAD(&file->event_l... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 160,034,941,059,358,670,000,000,000,000,000,000,000 | 24 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... |
static void ipa_draw_polypolygon(wmfAPI * API, wmfPolyPoly_t* polypolygon)
{
if (TO_FILL(polypolygon) || TO_DRAW(polypolygon))
{
int
polygon,
point;
wmfPolyLine_t
polyline;
/* Save graphic wand */
(void) PushDrawingWand(WmfDrawingWand);
util_set_pen(API, po... | 0 | [
"CWE-772"
] | ImageMagick | b2b48d50300a9fbcd0aa0d9230fd6d7a08f7671e | 266,306,601,309,351,030,000,000,000,000,000,000,000 | 43 | https://github.com/ImageMagick/ImageMagick/issues/544 |
static void ppp_finished(struct ap_session *ses)
{
struct ppp_t *ppp = container_of(ses, typeof(*ppp), ses);
struct pptp_conn_t *conn = container_of(ppp, typeof(*conn), ppp);
if (conn->state != STATE_CLOSE) {
log_ppp_debug("pptp: ppp finished\n");
conn->state = STATE_CLOSE;
__sync_sub_and_fetch(&stat_active, ... | 0 | [
"CWE-787"
] | accel-ppp | a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f | 254,130,578,446,086,740,000,000,000,000,000,000,000 | 22 | Fix post_msg implementation bug
I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`:
https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5... |
static void virtio_vmstate_change(void *opaque, int running, RunState state)
{
VirtIODevice *vdev = opaque;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
bool backend_run = running && (vdev->status & VIRTIO_CONFIG_S_DRIVER_OK);
vdev->vm_running =... | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 16,392,000,521,233,980,000,000,000,000,000,000,000 | 20 | 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 ... |
void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
{
/* validates an ipv4 or ipv6 IP, based on the flag (4, 6, or both) add a
* flag to throw out reserved ranges; multicast ranges... etc. If both
* allow_ipv4 and allow_ipv6 flags flag are used, then the first dot or
* colon determine the format *... | 0 | [
"CWE-20"
] | php-src | 4a89e726bd4d0571991dc22a9a1ad4509e8fe347 | 70,844,641,479,621,720,000,000,000,000,000,000,000 | 107 | Alternative fix for bug 77423
That bug report originally was about `parse_url()` misbehaving, but the
security aspect was actually only regarding `FILTER_VALIDATE_URL`.
Since the changes to `parse_url_ex()` apparently affect userland code
which is relying on the sloppy URL parsing[1], this alternative
restores the old... |
__i915_gem_context_reconfigure_sseu(struct i915_gem_context *ctx,
struct intel_engine_cs *engine,
struct intel_sseu sseu)
{
struct intel_context *ce;
int ret = 0;
GEM_BUG_ON(INTEL_GEN(ctx->i915) < 8);
GEM_BUG_ON(engine->id != RCS0);
ce = intel_context_pin_lock(ctx, engine);
if (IS_ERR(ce))
ret... | 0 | [
"CWE-416"
] | linux | 7dc40713618c884bf07c030d1ab1f47a9dc1f310 | 260,505,971,486,477,900,000,000,000,000,000,000,000 | 26 | drm/i915: Introduce a mutex for file_priv->context_idr
Define a mutex for the exclusive use of interacting with the per-file
context-idr, that was previously guarded by struct_mutex. This allows us
to reduce the coverage of struct_mutex, with a view to removing the last
bits coordinating GEM context later. (In the sho... |
ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
struct ext4_xattr_block_find *bs)
{
struct super_block *sb = inode->i_sb;
int error;
ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
i->name_index, i->name, i->value, (long)i->value_len);
if (EXT4_I(inode)->i_file_acl) {
/... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | 29,341,660,959,339,170,000,000,000,000,000,000,000 | 40 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@sus... |
smb_tcp_print(netdissect_options *ndo,
const u_char * data, int length)
{
int caplen;
u_int smb_len;
const u_char *maxbuf;
if (length < 4)
goto trunc;
if (ndo->ndo_snapend < data)
goto trunc;
caplen = ndo->ndo_snapend - data;
if (caplen < 4)
goto trunc;
maxbuf = data + ... | 0 | [
"CWE-125"
] | tcpdump | 96480ab95308cd9234b4f09b175ebf60e17792c6 | 133,629,945,920,515,570,000,000,000,000,000,000,000 | 38 | (for 4.9.3) SMB: Add two missing bounds checks |
static int check_cert_usable(SSL *s, const SIGALG_LOOKUP *sig, X509 *x,
EVP_PKEY *pkey)
{
const SIGALG_LOOKUP *lu;
int mdnid, pknid, supported;
size_t i;
if (s->s3.tmp.peer_cert_sigalgs != NULL) {
for (i = 0; i < s->s3.tmp.peer_cert_sigalgslen; i++) {
lu... | 0 | [
"CWE-476"
] | openssl | 5235ef44b93306a14d0b6c695b13c64b16e1fdec | 225,381,989,844,227,900,000,000,000,000,000,000,000 | 49 | Fix SSL_check_chain()
The function SSL_check_chain() can be used by applications to check that
a cert and chain is compatible with the negotiated parameters. This could
be useful (for example) from the certificate callback. Unfortunately this
function was applying TLSv1.2 sig algs rules and did not work correctly if
T... |
Http::Stream::writeComplete(size_t size)
{
const StoreEntry *entry = http->storeEntry();
debugs(33, 5, clientConnection << ", sz " << size <<
", off " << (http->out.size + size) << ", len " <<
(entry ? entry->objectLen() : 0));
http->out.size += size;
if (clientHttpRequestStatus(... | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 204,025,924,606,939,700,000,000,000,000,000,000,000 | 46 | Handle more partial responses (#791) |
void ModularFrameDecoder::MaybeDropFullImage() {
if (full_image.transform.empty() && !have_something) {
use_full_image = false;
for (auto& ch : full_image.channel) {
// keep metadata on channels around, but dealloc their planes
ch.plane = Plane<pixel_type>();
}
}
} | 0 | [
"CWE-787"
] | libjxl | 1c05e110d69b457696366fb4e762057b6855349b | 306,909,378,713,262,760,000,000,000,000,000,000,000 | 9 | fix use_full_image==false case (#365)
Some fixes to the case where the full modular image is skipped:
- don't assume that everything happens at the modular AC group level (minShift==0), there can also be upsampling causing channels to have nonzero shift even when there's no Squeeze
- for partial decodes (when zero... |
exif_data_get_mnote_data (ExifData *d)
{
return (d && d->priv) ? d->priv->md : NULL;
} | 0 | [
"CWE-400",
"CWE-703"
] | libexif | 6aa11df549114ebda520dde4cdaea2f9357b2c89 | 101,538,892,202,484,590,000,000,000,000,000,000,000 | 4 | Improve deep recursion detection in exif_data_load_data_content.
The existing detection was still vulnerable to pathological cases
causing DoS by wasting CPU. The new algorithm takes the number of tags
into account to make it harder to abuse by cases using shallow recursion
but with a very large number of tags. This ... |
int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data [16])
{
return add_to_metadata (wpc, data, 16, (wpc->config.qmode & 0xff) ? ID_ALT_MD5_CHECKSUM : ID_MD5_CHECKSUM);
} | 0 | [
"CWE-703",
"CWE-835"
] | WavPack | 070ef6f138956d9ea9612e69586152339dbefe51 | 102,657,101,749,032,040,000,000,000,000,000,000,000 | 4 | issue #53: error out on zero sample rate |
CImgDisplay(const CImgDisplay& disp):
_width(0),_height(0),_normalization(0),
_min(0),_max(0),
_is_fullscreen(false),
_title(0),
_window_width(0),_window_height(0),_button(0),
_keys(new unsigned int[128]),_released_keys(new unsigned int[128]),
_window_x(cimg::type<int>::min... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 189,459,803,200,294,550,000,000,000,000,000,000,000 | 12 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
ssize_t proc_projid_map_write(struct file *file, const char __user *buf,
size_t size, loff_t *ppos)
{
struct seq_file *seq = file->private_data;
struct user_namespace *ns = seq->private;
struct user_namespace *seq_ns = seq_user_ns(seq);
if (!ns->parent)
return -EPERM;
if ((seq_ns != ns) && (seq_ns != ... | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 202,069,416,197,593,660,000,000,000,000,000,000,000 | 17 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
static int socket_sockcreate_sid(const struct task_security_struct *tsec,
u16 secclass, u32 *socksid)
{
if (tsec->sockcreate_sid > SECSID_NULL) {
*socksid = tsec->sockcreate_sid;
return 0;
}
return security_transition_sid(&selinux_state, tsec->sid, tsec->sid,
secclass, NULL, socksid);
} | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 13,401,872,730,069,650,000,000,000,000,000,000,000 | 11 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
static int __init set_cmdline_ftrace(char *str)
{
strlcpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
default_bootup_tracer = bootup_tracer_buf;
/* We are using ftrace early, expand it */
ring_buffer_expanded = true;
return 1;
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 87,607,723,712,701,570,000,000,000,000,000,000,000 | 8 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static int check_stack_boundary(struct bpf_verifier_env *env, int regno,
int access_size, bool zero_size_allowed,
struct bpf_call_arg_meta *meta)
{
struct bpf_verifier_state *state = &env->cur_state;
struct bpf_reg_state *regs = state->regs;
int off, i;
if (regs[regno].type != PTR_TO_STACK) {
if (zero_si... | 0 | [
"CWE-200"
] | linux | 0d0e57697f162da4aa218b5feafe614fb666db07 | 60,807,289,876,474,370,000,000,000,000,000,000,000 | 43 | bpf: don't let ldimm64 leak map addresses on unprivileged
The patch fixes two things at once:
1) It checks the env->allow_ptr_leaks and only prints the map address to
the log if we have the privileges to do so, otherwise it just dumps 0
as we would when kptr_restrict is enabled on %pK. Given the latter is
of... |
transformIndexConstraints(CreateStmtContext *cxt)
{
IndexStmt *index;
List *indexlist = NIL;
ListCell *lc;
/*
* Run through the constraints that need to generate an index. For PRIMARY
* KEY, mark each column as NOT NULL and create an index. For UNIQUE or
* EXCLUDE, create an index as for PRIMARY KEY, b... | 0 | [
"CWE-94"
] | postgres | 5919bb5a5989cda232ac3d1f8b9d90f337be2077 | 333,248,783,821,695,480,000,000,000,000,000,000,000 | 82 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
CmdGrantRolesToUser() : Command("grantRolesToUser") {} | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 31,105,997,416,197,080,000,000,000,000,000,000,000 | 1 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static int kvm_guest_time_update(struct kvm_vcpu *v)
{
unsigned long flags, tgt_tsc_khz;
unsigned seq;
struct kvm_vcpu_arch *vcpu = &v->arch;
struct kvm_arch *ka = &v->kvm->arch;
s64 kernel_ns;
u64 tsc_timestamp, host_tsc;
u8 pvclock_flags;
bool use_master_clock;
kernel_ns = 0;
host_tsc = 0;
/*
* If the ... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 4,914,938,187,746,327,500,000,000,000,000,000,000 | 97 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
QByteArray CoreNetwork::userEncode(const QString &userNick, const QString &string) const
{
IrcUser *user = ircUser(userNick);
if (user)
return user->encodeString(string);
return encodeString(string);
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 139,496,489,760,388,700,000,000,000,000,000,000,000 | 7 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
int commonio_close (struct commonio_db *db)
/*@requires notnull db->fp@*/
{
char buf[1024];
int errors = 0;
struct stat sb;
if (!db->isopen) {
errno = EINVAL;
return 0;
}
db->isopen = false;
if (!db->changed || db->readonly) {
(void) fclose (db->fp);
db->fp = NULL;
goto success;
}
if ((NULL != db... | 0 | [
"CWE-119",
"CWE-787"
] | shadow | 954e3d2e7113e9ac06632aee3c69b8d818cc8952 | 274,621,887,655,938,440,000,000,000,000,000,000,000 | 124 | Fix buffer overflow if NULL line is present in db.
If ptr->line == NULL for an entry, the first cycle will exit,
but the second one will happily write past entries buffer.
We actually do not want to exit the first cycle prematurely
on ptr->line == NULL.
Signed-off-by: Tomas Mraz <tmraz@fedoraproject.org> |
_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
xkbSetDeviceInfoReq * stuff)
{
char *wire;
xkbExtensionDeviceNotify ed;
memset((char *) &ed, 0, SIZEOF(xkbExtensionDeviceNotify));
ed.deviceID = dev->id;
wire = (char *) &stuff[1];
if (stuff->change & XkbXI_Button... | 1 | [
"CWE-94",
"CWE-787"
] | xorg-xserver | dd8caf39e9e15d8f302e54045dd08d8ebf1025dc | 218,861,214,401,603,650,000,000,000,000,000,000,000 | 56 | xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck
XKB often uses a FooCheck and Foo function pair, the former is supposed
to check all values in the request and error out on BadLength,
BadValue, etc. The latter is then called once we're confident the values
are good (they may still fail on an individual device, but... |
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(fr... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 190,335,554,883,996,860,000,000,000,000,000,000,000 | 12 | - 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 |
PHP_FUNCTION(openssl_pkey_export)
{
struct php_x509_request req;
zval ** zpkey, * args = NULL, *out;
char * passphrase = NULL; int passphrase_len = 0;
long key_resource = -1;
EVP_PKEY * key;
BIO * bio_out = NULL;
const EVP_CIPHER * cipher;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zz|s!a!", &zpkey,... | 0 | [
"CWE-20"
] | php-src | 2874696a5a8d46639d261571f915c493cd875897 | 162,547,312,212,421,660,000,000,000,000,000,000,000 | 58 | Fix CVE-2013-4073 - handling of certs with null bytes |
static int bmp_dec_parseopts(char *optstr, bmp_dec_importopts_t *opts)
{
jas_tvparser_t *tvp;
opts->max_samples = 128 * JAS_MEBI;
if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) {
return -1;
}
while (!jas_tvparser_next(tvp)) {
switch (jas_taginfo_nonull(jas_taginfos_lookup(decopts,
jas_tvparser_... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 42,228,332,330,242,200,000,000,000,000,000,000,000 | 27 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string)
{
return get_object_item(object, string, false);
} | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 135,112,198,234,304,320,000,000,000,000,000,000,000 | 4 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
mysql_select(THD *thd,
TABLE_LIST *tables, uint wild_num, List<Item> &fields,
COND *conds, uint og_num, ORDER *order, ORDER *group,
Item *having, ORDER *proc_param, ulonglong select_options,
select_result *result, SELECT_LEX_UNIT *unit,
SELECT_LEX *select_lex)
{
int err= 0;
bool free_... | 1 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 228,957,657,691,958,000,000,000,000,000,000,000,000 | 101 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
bool isValidIdentifier(const std::string& s) {
if (s.size() == 0 || !isLcAlpha(s[0])) {
return false;
}
for (char c : s) {
if (!isValidIdentifierChar(c)) {
return false;
}
}
return true;
} | 0 | [
"CWE-787"
] | proxygen | 2f07985bef9fbae124cc63e5c0272e32da4fdaec | 29,903,037,181,008,220,000,000,000,000,000,000,000 | 13 | Fix SEGV in StructuredHeaders::decodeBase64
Summary:
The existing code can potentially cause a SEGV due to an out of bounds write.
This fixes CVE-2019-11921.
Reviewed By: knekritz
Differential Revision: D12983120
fbshipit-source-id: 1d48063595c8d518fd8afcbc941de260af7e37fd |
static int hwahc_probe(struct usb_interface *usb_iface,
const struct usb_device_id *id)
{
int result;
struct usb_hcd *usb_hcd;
struct wusbhc *wusbhc;
struct hwahc *hwahc;
struct device *dev = &usb_iface->dev;
result = -ENOMEM;
usb_hcd = usb_create_hcd(&hwahc_hc_driver, &usb_iface->dev, "wusb-hwa");
if... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 222,206,076,422,513,080,000,000,000,000,000,000,000 | 47 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
_zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_error_t *error)
{
zip_cdir_t *cd;
zip_uint16_t comment_len;
zip_uint64_t i, left;
zip_uint64_t eocd_offset = _zip_buffer_offset(buffer);
zip_buffer_t *cd_buffer;
if (_zip_buffer_left(buffer) < EOCDLEN) {
/* not enough... | 0 | [
"CWE-119",
"CWE-770",
"CWE-787"
] | libzip | 9b46957ec98d85a572e9ef98301247f39338a3b5 | 237,956,316,008,705,650,000,000,000,000,000,000,000 | 164 | Make eocd checks more consistent between zip and zip64 cases. |
static void virgl_cmd_create_resource_2d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_resource_create_2d c2d;
struct virgl_renderer_resource_create_args args;
VIRTIO_GPU_FILL_CMD(c2d);
trace_virtio_gpu_cmd_res_create_2d(c2d.resource_id,... | 0 | [] | qemu | 2fe760554eb3769d70f608a158474f728ba45ba6 | 207,054,332,107,912,850,000,000,000,000,000,000,000 | 23 | virtio-gpu: check max_outputs only
The scanout id should not be above the configured num_scanouts.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
static void tipc_udp_disable(struct tipc_bearer *b)
{
struct udp_bearer *ub;
ub = rtnl_dereference(b->media_ptr);
if (!ub) {
pr_err("UDP bearer instance not found\n");
return;
}
sock_set_flag(ub->ubsock->sk, SOCK_DEAD);
RCU_INIT_POINTER(ub->bearer, NULL);
/* sock_release need to be done outside of rtnl loc... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 130,834,858,635,497,540,000,000,000,000,000,000,000 | 16 | 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... |
static hdr * alloc_hdr(void)
{
register hdr * result;
if (hdr_free_list == 0) {
result = (hdr *) GC_scratch_alloc((word)(sizeof(hdr)));
} else {
result = hdr_free_list;
hdr_free_list = (hdr *) (result -> hb_next);
}
return(result);
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 294,738,942,913,432,260,000,000,000,000,000,000,000 | 12 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
{
struct sockaddr_rc *sa = (struct sockaddr_rc *) addr;
struct sock *sk = sock->sk;
int err = 0;
BT_DBG("sk %p %s", sk, batostr(&sa->rc_bdaddr));
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
lock_sock(sk);
... | 0 | [
"CWE-200"
] | linux | 9344a972961d1a6d2c04d9008b13617bcb6ec2ef | 225,578,100,480,583,480,000,000,000,000,000,000,000 | 40 | Bluetooth: RFCOMM - Fix info leak via getsockname()
The RFCOMM code fails to initialize the trailing padding byte of struct
sockaddr_rc added for alignment. It that for leaks one byte kernel stack
via the getsockname() syscall. Add an explicit memset(0) before filling
the structure to avoid the info leak.
Signed-off-... |
static void hns_gmac_autoneg_stat(void *mac_drv, u32 *enable)
{
struct mac_driver *drv = (struct mac_driver *)mac_drv;
*enable = dsaf_get_dev_bit(drv, GMAC_TRANSMIT_CONTROL_REG,
GMAC_TX_AN_EN_B);
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 249,348,325,762,211,840,000,000,000,000,000,000,000 | 7 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
int netlbl_cipsov4_genl_init(void)
{
int ret_val;
ret_val = genl_register_family(&netlbl_cipsov4_gnl_family);
if (ret_val != 0)
return ret_val;
ret_val = genl_register_ops(&netlbl_cipsov4_gnl_family,
&netlbl_cipsov4_genl_c_add);
if (ret_val != 0)
return ret_val;
ret_val = genl_register_ops(&netlbl_c... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2a2f11c227bdf292b3a2900ad04139d301b56ac4 | 239,843,437,447,349,470,000,000,000,000,000,000,000 | 27 | NetLabel: correct CIPSO tag handling when adding new DOI definitions
The current netlbl_cipsov4_add_common() function has two problems which are
fixed with this patch. The first is an off-by-one bug where it is possibile to
overflow the doi_def->tags[] array. The second is a bug where the same
doi_def->tags[] array ... |
TEST_F(HttpHealthCheckerImplTest, ServiceNameMismatch) {
setupServiceNameValidationHC("locations");
EXPECT_CALL(event_logger_, logUnhealthy(_, _, _, true));
EXPECT_CALL(runtime_.snapshot_, featureEnabled("health_check.verify_cluster", 100))
.WillOnce(Return(true));
EXPECT_CALL(*this, onHostStatus(_, Heal... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 88,297,825,197,112,110,000,000,000,000,000,000,000 | 30 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
gnutls_pcert_deinit (gnutls_pcert_st *pcert)
{
gnutls_pubkey_deinit(pcert->pubkey);
pcert->pubkey = NULL;
gnutls_free(pcert->cert.data);
pcert->cert.data = NULL;
} | 1 | [
"CWE-399"
] | gnutls | 9c62f4feb2bdd6fbbb06eb0c60bfdea80d21bbb8 | 223,206,087,323,995,960,000,000,000,000,000,000,000 | 7 | Deinitialize the correct number of certificates. Reported by Remi Gacogne. |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const bool is_soft_nms = NumInputs(node) == 6;
const TfLiteTensor* input_boxes = GetInput(context, node, kInputTensorBoxes);
const int num_boxes = SizeOfDimension(input_boxes, 0);
const TfLiteTensor* input_scores =
GetInput(context, node, kInp... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 57,029,354,716,517,200,000,000,000,000,000,000,000 | 71 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
sparse_member_p (struct tar_stat_info *st)
{
struct tar_sparse_file file;
if (!tar_sparse_init (&file))
return false;
file.stat_info = st;
return tar_sparse_member_p (&file);
} | 0 | [] | tar | c15c42ccd1e2377945fd0414eca1a49294bff454 | 220,204,144,372,007,500,000,000,000,000,000,000,000 | 9 | Fix CVE-2018-20482
* NEWS: Update.
* src/sparse.c (sparse_dump_region): Handle short read condition.
(sparse_extract_region,check_data_region): Fix dumped_size calculation.
Handle short read condition.
(pax_decode_header): Fix dumped_size calculation.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likew... |
static struct cgroup_subsys_state *cpuacct_create(
struct cgroup_subsys *ss, struct cgroup *cgrp)
{
struct cpuacct *ca = kzalloc(sizeof(*ca), GFP_KERNEL);
int i;
if (!ca)
goto out;
ca->cpuusage = alloc_percpu(u64);
if (!ca->cpuusage)
goto out_free_ca;
for (i = 0; i < CPUACCT_STAT_NSTATS; i++)
if (percpu... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 261,393,562,694,735,900,000,000,000,000,000,000,000 | 31 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
build_cmyk_raster_line_fromplanar_1bpc(gs_get_bits_params_t *params, byte * dest,
int width, int num_comp,
cmyk_composite_map * cmyk_map, int num_order,
tiffsep_device * const tfdev)
{
int pixel, com... | 0 | [
"CWE-476"
] | ghostpdl | aadb53eb834b3def3ef68d78865ff87a68901804 | 73,871,012,468,645,060,000,000,000,000,000,000,000 | 46 | Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile
Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField"
The tiffsep and tiffsep1 only set 'code' to an error when an attempt is
made to write a second output file without using %d in the OutputFile
specification.
Thi... |
ncp_negotiate_buffersize(struct ncp_server *server, int size, int *target)
{
int result;
ncp_init_request(server);
ncp_add_be16(server, size);
if ((result = ncp_request(server, 33)) != 0) {
ncp_unlock_server(server);
return result;
}
*target = min_t(unsigned int, ncp_reply_be16(server, 0), size);
ncp_unlo... | 0 | [
"CWE-119"
] | staging | 4c41aa24baa4ed338241d05494f2c595c885af8f | 112,172,861,114,725,770,000,000,000,000,000,000,000 | 16 | staging: ncpfs: memory corruption in ncp_read_kernel()
If the server is malicious then *bytes_read could be larger than the
size of the "target" buffer. It would lead to memory corruption when we
do the memcpy().
Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Dan Ca... |
static ssize_t gtls_recv(struct Curl_easy *data, /* connection data */
int num, /* socketindex */
char *buf, /* store read data here */
size_t buffersize, /* max amount to read */
C... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 812,682,191,309,618,000,000,000,000,000,000,000 | 39 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
static int pfkey_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *xp)
{
struct sk_buff *skb;
struct sadb_msg *hdr;
struct sadb_address *addr;
struct sadb_x_policy *pol;
int sockaddr_size;
int size;
struct sadb_x_sec_ctx *sec_ctx;
struct xfrm_sec_ctx *xfrm_ctx;
int ctx_size = 0;
soc... | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 200,588,795,851,925,140,000,000,000,000,000,000,000 | 108 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
void close_all(int *keep_list, size_t sz) {
DIR *dir;
if (!(dir = opendir("/proc/self/fd"))) {
// sleep 2 seconds and try again
sleep(2);
if (!(dir = opendir("/proc/self/fd"))) {
fprintf(stderr, "Error: cannot open /proc/self/fd directory\n");
exit(1);
}
}
struct dirent *entry;
while ((entry = readdi... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 154,298,742,747,455,750,000,000,000,000,000,000,000 | 45 | fixing CVE-2022-31214 |
void imap_qualify_path(char *dest, size_t len, struct ImapMbox *mx, char *path)
{
struct Url url;
mutt_account_tourl(&mx->account, &url);
url.path = path;
url_tostring(&url, dest, len, 0);
} | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | e52393740334443ae0206cab2d7caef381646725 | 313,797,483,402,099,900,000,000,000,000,000,000,000 | 9 | quote imap strings more carefully
Co-authored-by: JerikoOne <jeriko.one@gmx.us> |
ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
{
MonoDomain *domain = mono_domain_get ();
MonoClass *class;
MONO_ARCH_SAVE_REGS;
if (type->type->byref)
return NULL;
if (type->type->type == MONO_TYPE_VAR)
class = mono_type_get_generic_param_owner (type->type)->owner.klass;
else if (type->typ... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 161,062,773,088,551,460,000,000,000,000,000,000,000 | 18 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
handle_client_data_cookie_sha1_mech (DBusAuth *auth,
const DBusString *data)
{
/* The data we get from the server should be the cookie context
* name, the cookie ID, and the server challenge, separated by
* spaces. We send back our challenge string and the correct ha... | 0 | [
"CWE-59"
] | dbus | 47b1a4c41004bf494b87370987b222c934b19016 | 135,132,452,743,396,880,000,000,000,000,000,000,000 | 200 | auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner
The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership
of a shared home directory by having the server write a secret "cookie"
into a .dbus-keyrings subdirectory of the desired identity's home
directory with 0700 permissions, and having... |
calc_crc32( u32 crc, u8 *p, u32 len )
{
register u32 _crc;
_crc = crc;
__asm__ __volatile__ (
"xorl %%ebx, %%ebx\n"
"movl %2, %%esi\n"
"movl %3, %%ecx\n"
"movl $crc32tab, %%edi\n"
"shrl $2, %%ecx\n"
"jz 1f\n"
".align 4\n"
"0:\n"
"movb %%al, %%bl\n"
"movl (%%esi), %%edx\n"
"shrl $8, %%... | 0 | [
"CWE-264"
] | linux-2.6 | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e | 77,650,926,580,207,900,000,000,000,000,000,000,000 | 76 | wan: Missing capability checks in sbni_ioctl()
There are missing capability checks in the following code:
1300 static int
1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd)
1302 {
[...]
1319 case SIOCDEVRESINSTATS :
1320 if( current->euid != 0 ) /* root only */
1321 ... |
static int wddx_stack_top(wddx_stack *stack, void **element)
{
if (stack->top > 0) {
*element = stack->elements[stack->top - 1];
return SUCCESS;
} else {
*element = NULL;
return FAILURE;
}
} | 0 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 91,545,042,090,805,060,000,000,000,000,000,000,000 | 10 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
rb_fiddle_new_function(VALUE address, VALUE arg_types, VALUE ret_type)
{
VALUE argv[3];
argv[0] = address;
argv[1] = arg_types;
argv[2] = ret_type;
return rb_class_new_instance(3, argv, cFiddleFunction);
} | 0 | [
"CWE-264"
] | ruby | c7d7ff45f1e0d6fad28e53c02108d4b067e843c3 | 316,085,389,222,566,750,000,000,000,000,000,000,000 | 10 | * ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
$SAFE > 0.
* ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.
* test/fiddle/test_func.rb (module Fiddle): add test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
gst_riff_create_video_template_caps (void)
{
static const guint32 tags[] = {
GST_MAKE_FOURCC ('3', 'I', 'V', '1'),
GST_MAKE_FOURCC ('A', 'S', 'V', '1'),
GST_MAKE_FOURCC ('A', 'S', 'V', '2'),
GST_MAKE_FOURCC ('C', 'L', 'J', 'R'),
GST_MAKE_FOURCC ('C', 'S', 'C', 'D'),
GST_MAKE_FOURCC ('C', 'Y', ... | 0 | [
"CWE-369"
] | gst-plugins-base | 81d3ba3fa212bb25fe2ac661993887c4b69af6f1 | 185,084,097,715,988,330,000,000,000,000,000,000,000 | 98 | riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.
https://bugzilla.gnome.org/show_bug.cgi?id=777262 |
xfs_create_tmpfile(
struct xfs_inode *dp,
struct dentry *dentry,
umode_t mode,
struct xfs_inode **ipp)
{
struct xfs_mount *mp = dp->i_mount;
struct xfs_inode *ip = NULL;
struct xfs_trans *tp = NULL;
int error;
prid_t prid;
struct xfs_dquot *udqp = NULL;
struct xfs_dquot *gdqp = NULL;
s... | 0 | [
"CWE-19"
] | linux | fc0561cefc04e7803c0f6501ca4f310a502f65b8 | 96,218,579,291,167,090,000,000,000,000,000,000,000 | 100 | xfs: optimise away log forces on timestamp updates for fdatasync
xfs: timestamp updates cause excessive fdatasync log traffic
Sage Weil reported that a ceph test workload was writing to the
log on every fdatasync during an overwrite workload. Event tracing
showed that the only metadata modification being made was the... |
_xfs_dic2xflags(
uint16_t di_flags,
uint64_t di_flags2,
bool has_attr)
{
uint flags = 0;
if (di_flags & XFS_DIFLAG_ANY) {
if (di_flags & XFS_DIFLAG_REALTIME)
flags |= FS_XFLAG_REALTIME;
if (di_flags & XFS_DIFLAG_PREALLOC)
flags |= FS_XFLAG_PREALLOC;
if (di_flags & XFS_DIFLAG_IMMUTABLE)
flags ... | 0 | [] | linux | 01ea173e103edd5ec41acec65b9261b87e123fc2 | 130,790,250,743,583,940,000,000,000,000,000,000,000 | 50 | xfs: fix up non-directory creation in SGID directories
XFS always inherits the SGID bit if it is set on the parent inode, while
the generic inode_init_owner does not do this in a few cases where it can
create a possible security problem, see commit 0fa3ecd87848
("Fix up non-directory creation in SGID directories") for... |
static ssize_t WriteCALSRecord(Image *image,const char *data)
{
char
pad[128];
register const char
*p;
register ssize_t
i;
ssize_t
count;
i=0;
count=0;
if (data != (const char *) NULL)
{
p=data;
for (i=0; (i < 128) && (p[i] != '\0'); i++);
count=WriteBlob(image,(s... | 0 | [
"CWE-772",
"CWE-401"
] | ImageMagick | 73b6c35cede48ccb2e29dbe62c2d77488e5e70b7 | 260,323,205,949,196,770,000,000,000,000,000,000,000 | 30 | https://github.com/ImageMagick/ImageMagick/issues/571 |
size_t olm_pickle_pk_decryption(
OlmPkDecryption * decryption,
void const * key, size_t key_length,
void *pickled, size_t pickled_length
) {
OlmPkDecryption & object = *decryption;
std::size_t raw_length = pickle_length(object);
if (pickled_length < _olm_enc_output_length(raw_length)) {
... | 0 | [
"CWE-787"
] | olm | ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b | 55,364,293,161,890,560,000,000,000,000,000,000,000 | 17 | olm_pk_decrypt: Ensure inputs are of correct length. |
int btrfs_add_link(struct btrfs_trans_handle *trans,
struct inode *parent_inode, struct inode *inode,
const char *name, int name_len, int add_backref, u64 index)
{
int ret = 0;
struct btrfs_key key;
struct btrfs_root *root = BTRFS_I(parent_inode)->root;
u64 ino = btrfs_ino(inode);
u64 parent_ino = btrfs_... | 1 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 24,303,303,801,733,287,000,000,000,000,000,000,000 | 67 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
int generic_map_delete_batch(struct bpf_map *map,
const union bpf_attr *attr,
union bpf_attr __user *uattr)
{
void __user *keys = u64_to_user_ptr(attr->batch.keys);
u32 cp, max_count;
int err = 0;
void *key;
if (attr->batch.elem_flags & ~BPF_F_LOCK)
return -EINVAL;
if ((attr->batch.elem_flags ... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 259,541,848,592,076,700,000,000,000,000,000,000,000 | 51 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
irc_server_autojoin_create_buffers (struct t_irc_server *server)
{
const char *pos_space;
char *autojoin, *autojoin2, **channels;
int num_channels, i;
/* buffers are opened only if no channels are currently opened */
if (server->channels)
return;
/* evaluate server option "autojoin" */... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 307,660,202,880,434,400,000,000,000,000,000,000,000 | 50 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
static int multipart_buffer_read(multipart_buffer *self, char *buf, int bytes, int *end TSRMLS_DC)
{
int len, max;
char *bound;
/* fill buffer if needed */
if (bytes > self->bytes_in_buffer) {
fill_buffer(self TSRMLS_CC);
}
/* look for a potential boundary match, only read data up to that point */
if ((bound... | 0 | [
"CWE-399"
] | php-src | 4605d536d23b00813d11cc906bb48d39bdcf5f25 | 161,711,921,971,924,990,000,000,000,000,000,000,000 | 41 | Fixed bug #69364 - use smart_str to assemble strings |
static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flags,
struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,
enum nl80211_commands cmd)
{
struct net_device *dev = wdev->netdev;
void *hdr;
WARN_ON(cmd != NL80211_CMD_NEW_INTERFACE &&
cmd != NL8021... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 310,965,981,382,548,850,000,000,000,000,000,000,000 | 102 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
TEST_F(HttpConnectionManagerImplTest, ServerHeaderPassthroughAbsent) {
server_transformation_ = HttpConnectionManagerProto::PASS_THROUGH;
setup(false, "custom-value", false);
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
const ResponseHeaderMap* altered_headers =
sendResponseHeader... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 262,232,910,942,741,300,000,000,000,000,000,000,000 | 12 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static bool fm10k_set_rss_queues(struct fm10k_intfc *interface)
{
struct fm10k_ring_feature *f;
u16 rss_i;
f = &interface->ring_feature[RING_F_RSS];
rss_i = min_t(u16, interface->hw.mac.max_queues, f->limit);
/* record indices and power of 2 mask for RSS */
f->indices = rss_i;
f->mask = BIT(fls(rss_i - 1)) - 1... | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 194,738,617,299,447,700,000,000,000,000,000,000,000 | 17 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
Http::Stream::noteSentBodyBytes(size_t bytes)
{
debugs(33, 7, bytes << " body bytes");
http->out.offset += bytes;
if (!http->request->range)
return;
if (http->range_iter.debt() != -1) {
http->range_iter.debt(http->range_iter.debt() - bytes);
assert (http->range_iter.debt() >= 0... | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 30,549,609,184,643,312,000,000,000,000,000,000,000 | 16 | Handle more partial responses (#791) |
OVS_REQUIRES(ctb->lock)
{
ovs_assert(conn->conn_type == CT_CONN_TYPE_DEFAULT);
if (conn->alg) {
expectation_clean(ct, &conn->key, ct->hash_basis);
}
ovs_list_remove(&conn->exp_node);
hmap_remove(&ctb->connections, &conn->node);
atomic_count_dec(&ct->n_conn);
if (conn->nat_info) ... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 181,635,839,246,425,500,000,000,000,000,000,000,000 | 16 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
uint32 get_next_partition_id_list(PARTITION_ITERATOR *part_iter)
{
if (part_iter->part_nums.cur >= part_iter->part_nums.end)
{
if (part_iter->ret_null_part)
{
part_iter->ret_null_part= FALSE;
return part_iter->part_info->has_null_part_id;
}
part_iter->part_nums.cur= part_iter->part_nums.... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 198,178,455,831,943,070,000,000,000,000,000,000,000 | 25 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
_gnutls_cipher_is_block (gnutls_cipher_algorithm_t algorithm)
{
size_t ret = 0;
GNUTLS_ALG_LOOP (ret = p->block);
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 257,563,511,092,459,800,000,000,000,000,000,000,000 | 8 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
static int jffs2_acl_count(size_t size)
{
size_t s;
size -= sizeof(struct jffs2_acl_header);
if (size < 4 * sizeof(struct jffs2_acl_entry_short)) {
if (size % sizeof(struct jffs2_acl_entry_short))
return -1;
return size / sizeof(struct jffs2_acl_entry_short);
} else {
s = size - 4 * sizeof(struct jffs2_ac... | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 116,295,177,095,418,800,000,000,000,000,000,000,000 | 16 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.