func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(RouterTest, UpstreamPerTryTimeoutExcludesNewStream) {
InSequence s;
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
Http::ConnectionPool::Callbacks* pool_callbacks;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(... | 0 | [
"CWE-703"
] | envoy | 5bf9b0f1e7f247a4eee7180849cb0823926f7fff | 67,051,234,165,542,970,000,000,000,000,000,000,000 | 54 | [1.21] CVE-2022-21655
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
GF_Err gf_isom_sdp_add_track_line(GF_ISOFile *the_file, u32 trackNumber, const char *text)
{
GF_TrackBox *trak;
GF_UserDataMap *map;
GF_HintTrackInfoBox *hnti;
GF_SDPBox *sdp;
GF_Err e;
char *buf;
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak) return GF_BAD_PARAM;
//currently, only RTP... | 0 | [
"CWE-787"
] | gpac | 86c1566f040b2b84c72afcb6cbd444c5aff56cfe | 127,277,058,262,359,230,000,000,000,000,000,000,000 | 47 | fixed #1894 |
protocol_handshake_oldstyle (struct connection *conn)
{
struct old_handshake handshake;
int64_t r;
uint64_t exportsize;
uint16_t gflags, eflags;
/* In --tls=require / FORCEDTLS mode, old style handshakes are
* rejected because they cannot support TLS.
*/
if (tls == 2) {
nbdkit_error ("non-TLS cli... | 1 | [
"CWE-406"
] | nbdkit | e06cde00659ff97182173d0e33fff784041bcb4a | 252,984,692,221,004,500,000,000,000,000,000,000,000 | 47 | server: Wait until handshake complete before calling .open callback
Currently we call the plugin .open callback as soon as we receive a
TCP connection:
$ nbdkit -fv --tls=require --tls-certificates=tests/pki null \
--run "telnet localhost 10809"
[...]
Trying ::1...
Connected to localhost.
Escape ... |
ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len,
const u_char *ep _U_, uint32_t phase _U_,
uint32_t doi0 _U_,
uint32_t proto0 _U_, int depth _U_)
{
const struct ikev1_pl_cert *p;
struct ikev1_pl_cert cert;
static const char *certstr[] = {
"none", ... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 8dca25d26c7ca2caf6138267f6f17111212c156e | 336,760,601,846,577,360,000,000,000,000,000,000,000 | 31 | CVE-2017-13690/IKEv2: Fix some bounds checks.
Use a pointer of the correct type in ND_TCHECK(), or use ND_TCHECK2()
and provide the correct length.
While we're at it, remove the blank line between some checks and the
UNALIGNED_MEMCPY()s they protect.
Also, note the places where we print the entire payload.
This fix... |
static struct dmar_domain *find_domain(struct device *dev)
{
struct device_domain_info *info;
/* No lock here, assumes no domain exit in normal case */
info = dev->archdata.iommu;
if (likely(info))
return info->domain;
return NULL;
} | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 219,175,773,518,738,100,000,000,000,000,000,000,000 | 10 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
static DBusMessage *connect_device(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
struct btd_adapter *adapter = user_data;
DBusMessageIter iter, subiter, dictiter, value;
uint8_t addr_type = BDADDR_BREDR;
bdaddr_t addr = *BDADDR_ANY;
DBG("sender %s", dbus_message_get_sender(msg));
if (!btd_adap... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 334,868,299,927,801,600,000,000,000,000,000,000,000 | 78 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
static int handle_ipmb_get_msg_cmd(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct cmd_rcvr *rcvr;
int rv = 0;
unsigned char netfn;
unsigned char cmd;
unsigned char chan;
struct ipmi_user *user = NULL;
struct ipmi_ipmb_addr ... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 52,146,365,252,894,510,000,000,000,000,000,000,000 | 112 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
u32 skip_to_seq)
{
if (skb && after(TCP_SKB_CB(skb)->seq, skip_to_seq))
return skb;
return tcp_sacktag_bsearch(sk, skip_to_seq);
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 211,051,044,306,868,450,000,000,000,000,000,000,000 | 8 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static void edge_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned int cflag;
cflag = tty->termios.c_cflag;
dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__,
tty->termios.c_cf... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1ee0a224bc9aad1de496c795f96bc6ba2c394811 | 217,644,277,682,224,240,000,000,000,000,000,000,000 | 19 | USB: io_ti: Fix NULL dereference in chase_port()
The tty is NULL when the port is hanging up.
chase_port() needs to check for this.
This patch is intended for stable series.
The behavior was observed and tested in Linux 3.2 and 3.7.1.
Johan Hovold submitted a more elaborate patch for the mainline kernel.
[ 56.277... |
njs_vmcode_regexp(njs_vm_t *vm, u_char *pc)
{
njs_regexp_t *regexp;
njs_vmcode_regexp_t *code;
code = (njs_vmcode_regexp_t *) pc;
regexp = njs_regexp_alloc(vm, code->pattern);
if (njs_fast_path(regexp != NULL)) {
njs_set_regexp(&vm->retval, regexp);
return sizeof(njs_vmc... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 222d6fdcf0c6485ec8e175f3a7b70d650c234b4e | 143,608,953,291,338,020,000,000,000,000,000,000,000 | 17 | Fixed njs_vmcode_interpreter() when "toString" conversion fails.
Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens. This is not correct
because the current frame has to be unwound (or exception caught)
first.
The fix is exit through only 5 appropr... |
static void emulator_write_gpr(struct x86_emulate_ctxt *ctxt, unsigned reg, ulong val)
{
kvm_register_write_raw(emul_to_vcpu(ctxt), reg, val);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 12,517,335,706,504,188,000,000,000,000,000,000,000 | 4 | 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... |
static int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_ring_ctx *ctx = req->ctx;
io_async_find_and_cancel(ctx, req, req->cancel.addr, 0);
return 0; | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 127,426,586,446,834,420,000,000,000,000,000,000,000 | 7 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static ssize_t ucma_query(struct ucma_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_query cmd;
struct ucma_context *ctx;
void __user *response;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
response = (void __user *)(unsigned long) cmd.resp... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 75,410,918,601,191,890,000,000,000,000,000,000,000 | 35 | 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 em28xx_card_setup(struct em28xx *dev)
{
int i, j, idx;
bool duplicate_entry;
/*
* If the device can be a webcam, seek for a sensor.
* If sensor is not found, then it isn't a webcam.
*/
if (dev->is_webcam) {
em28xx_detect_sensor(dev);
if (dev->em28xx_sensor == EM28XX_NOSENSOR)
/* NOTE: erro... | 0 | [
"CWE-416"
] | linux | c08eadca1bdfa099e20a32f8fa4b52b2f672236d | 112,958,459,243,266,600,000,000,000,000,000,000,000 | 188 | media: em28xx: initialize refcount before kref_get
The commit 47677e51e2a4("[media] em28xx: Only deallocate struct
em28xx after finishing all extensions") adds kref_get to many init
functions (e.g., em28xx_audio_init). However, kref_init is called too
late in em28xx_usb_probe, since em28xx_init_dev before will invoke
... |
static struct ea_list *read_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size)
{
struct ea_list *ea_list_head = NULL;
size_t offset = 0;
size_t bytes_used = 0;
while (offset < data_size) {
struct ea_list *eal = read_ea_list_entry(ctx, pdata + offset, data_size - offset, &bytes_used);
if (!eal) {
... | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 296,115,860,915,939,030,000,000,000,000,000,000,000 | 19 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
_lasso_saml20_login_decrypt_assertion(LassoLogin *login, LassoSamlp2Response *samlp2_response)
{
GList *encryption_private_keys = NULL;
GList *it = NULL;
gboolean at_least_one_decryption_failture = FALSE;
gboolean at_least_one_malformed_element = FALSE;
if (! samlp2_response->EncryptedAssertion)
return 0; /* no... | 0 | [
"CWE-347"
] | lasso | ea7e5efe9741e1b1787a58af16cb15b40c23be5a | 285,297,905,311,899,900,000,000,000,000,000,000,000 | 62 | Fix signature checking on unsigned response with multiple assertions
CVE-2021-28091 : when AuthnResponse messages are not signed (which is
permitted by the specifiation), all assertion's signatures should be
checked, but currently after the first signed assertion is checked all
following assertions are accepted withou... |
pattern_apply_fallback (gpointer data, gpointer fallback_data)
{
RsvgPattern *pattern;
RsvgPattern *fallback;
pattern = data;
fallback = fallback_data;
if (!pattern->hasx && fallback->hasx) {
pattern->hasx = TRUE;
pattern->x = fallback->x;
}
if (!pattern->hasy && fallback->... | 1 | [
"CWE-125"
] | librsvg | 0035e95118a60c0cd3949c2300472d805e16a022 | 258,204,166,555,578,120,000,000,000,000,000,000,000 | 47 | bgo#744299 - Ensure the type of pattern fallbacks
Atte Kettunen's fuzz testing yielded an SVG with a pattern paint server that
had an xlink:href to a *rect*, not to another patern. Since we were not checking
type type of resolved nodes when applying pattern fallbacks, we were using a
structure of the wrong type.
Fix... |
static void flatviews_reset(struct uc_struct *uc)
{
AddressSpace *as;
if (uc->flat_views) {
g_hash_table_destroy(uc->flat_views);
uc->flat_views = NULL;
}
flatviews_init(uc);
/* Render unique FVs */
QTAILQ_FOREACH(as, &uc->address_spaces, address_spaces_link) {
MemoryRe... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 291,706,769,398,550,150,000,000,000,000,000,000,000 | 21 | Fix crash when mapping a big memory and calling uc_close |
_xfs_buf_map_pages(
xfs_buf_t *bp,
uint flags)
{
ASSERT(bp->b_flags & _XBF_PAGES);
if (bp->b_page_count == 1) {
/* A single page buffer is always mappable */
bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset;
} else if (flags & XBF_UNMAPPED) {
bp->b_addr = NULL;
} else {
int retried = 0;
do {... | 0 | [
"CWE-20",
"CWE-703"
] | linux | eb178619f930fa2ba2348de332a1ff1c66a31424 | 287,447,986,641,742,180,000,000,000,000,000,000,000 | 28 | xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
When _xfs_buf_find is passed an out of range address, it will fail
to find a relevant struct xfs_perag and oops with a null
dereference. This can happen when trying to walk a filesystem with a
metadata inode that has a partially corrupted extent map (i.e.... |
ip_printroute(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register u_int ptr;
register u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
return;
}
if ((length + 1) & 3)
ND_PRINT((ndo, " [bad length %u]", length));
ptr = cp[2] - 1;
if (ptr < 3 |... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | eee0b04bcfdae319c242b0b8fc3d07029ee65b8c | 25,321,456,828,578,444,000,000,000,000,000,000,000 | 22 | CVE-2017-13022/IP: Add bounds checks to ip_printroute().
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't be rejected as an invalid capture. |
hb_set_is_equal (const hb_set_t *set,
const hb_set_t *other)
{
return set->is_equal (*other);
} | 0 | [
"CWE-787"
] | harfbuzz | d3e09bf4654fe5478b6dbf2b26ebab6271317d81 | 300,891,512,319,880,650,000,000,000,000,000,000,000 | 5 | [set] Make all operators null-safe again
Changed my mind.
Also for hb_map_clear().
Part of https://github.com/harfbuzz/harfbuzz/pull/3162 |
static void __clear_all_pkt_pointers(struct bpf_verifier_env *env,
struct bpf_func_state *state)
{
struct bpf_reg_state *regs = state->regs, *reg;
int i;
for (i = 0; i < MAX_BPF_REG; i++)
if (reg_is_pkt_pointer_any(®s[i]))
mark_reg_unknown(env, regs, i);
for (i = 0; i < state->allocated_stack / B... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 253,189,167,706,260,600,000,000,000,000,000,000,000 | 18 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
njs_generate_inc_dec_operation_prop(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_bool_t post;
njs_index_t index, dest_index;
njs_parser_node_t *lvalue;
njs_vmcode_3addr_t *code;
njs_vmcode_prop_get_t *pr... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 48,267,799,262,112,810,000,000,000,000,000,000,000 | 72 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
bool Item_field::switch_to_nullable_fields_processor(void *arg)
{
Field **new_fields= (Field **)arg;
set_field_to_new_field(&field, new_fields);
set_field_to_new_field(&result_field, new_fields);
maybe_null= field && field->maybe_null();
return 0;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 42,590,926,071,387,300,000,000,000,000,000,000,000 | 8 | 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. |
exit_ext2_xattr(void)
{
} | 1 | [
"CWE-241",
"CWE-19"
] | linux | be0726d33cb8f411945884664924bed3cb8c70ee | 126,079,429,352,286,640,000,000,000,000,000,000,000 | 3 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the 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
sti... |
static inline unsigned int xfrm_spdinfo_msgsize(void)
{
return NLMSG_ALIGN(4)
+ nla_total_size(sizeof(struct xfrmu_spdinfo))
+ nla_total_size(sizeof(struct xfrmu_spdhinfo))
+ nla_total_size(sizeof(struct xfrmu_spdhthresh))
+ nla_total_size(sizeof(struct xfrmu_spdhthresh));
} | 0 | [
"CWE-125"
] | linux | b805d78d300bcf2c83d6df7da0c818b0fee41427 | 11,920,478,840,667,498,000,000,000,000,000,000,000 | 8 | xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink
UBSAN report this:
UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24
index 6 is out of range for type 'unsigned int [6]'
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13
Hardware name: QEMU Standard PC (i440FX + P... |
inbound_upart (server *serv, char *chan, char *ip, char *reason,
const message_tags_data *tags_data)
{
session *sess = find_channel (serv, chan);
if (sess)
{
if (*reason)
EMIT_SIGNAL_TIMESTAMP (XP_TE_UPARTREASON, sess, serv->nick, ip, chan,
reason, 0, tags_data->timestamp);
else
EMIT_SIGNA... | 0 | [
"CWE-22"
] | hexchat | 4e061a43b3453a9856d34250c3913175c45afe9d | 6,674,901,300,520,027,000,000,000,000,000,000,000 | 15 | Clean up handling CAP LS |
e_ews_connection_move_items (EEwsConnection *cnc,
gint pri,
const gchar *folder_id,
gboolean docopy,
const GSList *ids,
GCancellable *cancellable,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 92,925,801,399,658,730,000,000,000,000,000,000,000 | 68 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
create_job (GIOSchedulerJob *io_job,
GCancellable *cancellable,
gpointer user_data)
{
CreateJob *job;
CommonJob *common;
int count;
GFile *dest;
char *filename, *filename2, *new_filename;
char *dest_fs_type;
GError *error;
gboolean res;
gboolean filename_is_utf8;
char *primary, *secondary, *details;... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 115,263,080,618,813,320,000,000,000,000,000,000,000 | 245 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
static int compat_ipt_standard_fn(void *target,
void **dstptr, int *size, int convert)
{
struct compat_ipt_standard_target compat_st, *pcompat_st;
struct ipt_standard_target st, *pst;
int ret;
ret = 0;
switch (convert) {
case COMPAT_TO_USER:
pst = target;
memcpy(&compat_st.target, &pst->target,
size... | 1 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 24,958,980,121,627,183,000,000,000,000,000,000,000 | 43 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
_copyNamedArgExpr(const NamedArgExpr *from)
{
NamedArgExpr *newnode = makeNode(NamedArgExpr);
COPY_NODE_FIELD(arg);
COPY_STRING_FIELD(name);
COPY_SCALAR_FIELD(argnumber);
COPY_LOCATION_FIELD(location);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 220,362,134,202,422,600,000,000,000,000,000,000,000 | 11 | 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... |
virtual GBool axialShadedFill(GfxState * /*state*/, GfxAxialShading * /*shading*/, double /*tMin*/, double /*tMax*/)
{ return gFalse; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 89,518,579,064,756,300,000,000,000,000,000,000,000 | 2 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
has_server_privilege_id_name(PG_FUNCTION_ARGS)
{
Oid roleid = PG_GETARG_OID(0);
text *servername = PG_GETARG_TEXT_P(1);
text *priv_type_text = PG_GETARG_TEXT_P(2);
Oid serverid;
AclMode mode;
AclResult aclresult;
serverid = convert_server_name(servername);
mode = convert_server_priv_string(priv_type... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 54,434,581,753,883,950,000,000,000,000,000,000,000 | 16 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
static int perf_event_set_bpf_handler(struct perf_event *event, u32 prog_fd)
{
return -EOPNOTSUPP;
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 245,912,827,945,159,550,000,000,000,000,000,000,000 | 4 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static int bnx2x_reset_hw(struct bnx2x *bp, u32 load_code)
{
struct bnx2x_func_state_params func_params = {NULL};
/* Prepare parameters for function state transitions */
__set_bit(RAMROD_COMP_WAIT, &func_params.ramrod_flags);
func_params.f_obj = &bp->func_obj;
func_params.cmd = BNX2X_F_CMD_HW_RESET;
func_param... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 56,842,151,505,983,470,000,000,000,000,000,000,000 | 14 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta,
int len, unsigned short flags)
{
unsigned short type;
memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
while (RTA_OK(rta, len)) {
type = rta->rta_type & ~flags;
if ((type <= max) && (!tb[type]))
tb[type] = rta;
rta = RTA_N... | 0 | [] | iproute2 | 8c50b728b226f6254251282697ce38a72639a6fc | 56,143,589,537,143,550,000,000,000,000,000,000,000 | 17 | libnetlink: fix use-after-free of message buf
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically
allocated 'buf' that is used to store netlink messages. If netlink message
is an error message, buf is deallocated before returning with error code.
However, on return err->error code is checked one ... |
void svc_enable_interrupts(void) {
__asm__ __volatile__("svc %0" ::"i"(SVC_ENA_INTR) : "memory");
} | 0 | [
"CWE-668",
"CWE-125"
] | keepkey-firmware | 447c1f038a31378ab9589965c098467d9ea6cccc | 240,656,086,870,212,600,000,000,000,000,000,000,000 | 3 | fix: more robust address range checks in svhandler_flash_* |
ews_backend_source_changed_cb (ESource *source,
EEwsBackend *backend)
{
if (!e_source_get_enabled (source)) {
backend->priv->need_update_folders = TRUE;
return;
}
if (!backend->priv->need_update_folders)
return;
ews_backend_populate (E_COLLECTION_BACKEND (backend));
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 194,436,225,756,179,660,000,000,000,000,000,000,000 | 13 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
gst_rtsp_connection_get_ip (const GstRTSPConnection * conn)
{
g_return_val_if_fail (conn != NULL, NULL);
return conn->remote_ip;
} | 0 | [] | gst-plugins-base | f672277509705c4034bc92a141eefee4524d15aa | 231,364,903,714,723,800,000,000,000,000,000,000,000 | 6 | gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes. |
InsertImagePackage (
IN VOID *PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,
OUT HII_IMAGE_PACKAGE_INSTANCE **Package
)
{
HII_IMAGE_PACKAGE_INSTANCE *ImagePackage;
UINT32 ... | 0 | [
"CWE-416"
] | edk2 | c32be82e99ef272e7fa742c2f06ff9a4c3756613 | 167,210,245,043,756,300,000,000,000,000,000,000,000 | 105 | MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995
Fix the corner case issue that the original configuration runtime
memory is freed, but it is still exposed to the OS runtime.
So this patch is to remove the configuration table to a... |
static void tx_result(struct sock *sk, unsigned long cookie, int result)
{
struct sk_buff *skb = alloc_skb(0, GFP_ATOMIC);
struct ec_cb *eb;
struct sockaddr_ec *sec;
if (skb == NULL)
{
printk(KERN_DEBUG "ec: memory squeeze, transmit result dropped.\n");
return;
}
eb = (struct ec_cb *)&skb->cb;
sec = (stru... | 0 | [
"CWE-200"
] | linux-2.6 | 80922bbb12a105f858a8f0abb879cb4302d0ecaa | 51,821,705,811,276,815,000,000,000,000,000,000,000 | 22 | econet: Fix econet_getname() leak
econet_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
Item_result cmp_type() const { return type_handler()->cmp_type(); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 309,696,976,514,517,170,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
fatal_error_handler (j_common_ptr cinfo)
{
struct error_handler_data *errmgr;
errmgr = (struct error_handler_data *) cinfo->err;
if ((errmgr->error != NULL) && (*errmgr->error == NULL)) {
char buffer[JMSG_LENGTH_MAX];
/* Create the message */
(* cinfo->err->format_message) (cinfo, buffer);
g_set_error (er... | 0 | [
"CWE-787"
] | gthumb | 4faa5ce2358812d23a1147953ee76f59631590ad | 172,248,178,011,225,900,000,000,000,000,000,000,000 | 19 | jpeg loader: do not scan more than output_height lines |
_rpc_daemon_status(slurm_msg_t *msg)
{
slurm_msg_t resp_msg;
slurmd_status_t *resp = NULL;
resp = xmalloc(sizeof(slurmd_status_t));
resp->actual_cpus = conf->actual_cpus;
resp->actual_boards = conf->actual_boards;
resp->actual_sockets = conf->actual_sockets;
resp->actual_cores = conf-... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 164,604,414,957,761,060,000,000,000,000,000,000,000 | 29 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
static UINT drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp,
int cbChId, wStream* s)
{
UINT status;
if (!drdynvc)
return CHANNEL_RC_BAD_INIT_HANDLE;
if (Stream_GetRemainingLength(s) < 3)
return ERROR_INVALID_DATA;
WLog_Print(drdynvc->log, WLOG_TRACE, "capability_request Sp=%d cbChId... | 0 | [
"CWE-125"
] | FreeRDP | baee520e3dd9be6511c45a14c5f5e77784de1471 | 119,038,761,637,250,900,000,000,000,000,000,000,000 | 33 | Fix for #4866: Added additional length checks |
XMLRPC_VALUE XMLRPC_CreateValueInt(const char* id, int i) {
XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
if(val) {
XMLRPC_SetValueInt(val, i);
if(id) {
XMLRPC_SetValueID(val, id, 0);
}
}
return val;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 244,391,414,228,607,600,000,000,000,000,000,000,000 | 10 | Fix bug #68027 - fix date parsing in XMLRPC lib |
static apr_table_t* oidc_request_state(request_rec *rr) {
/* our state is always stored in the main request */
request_rec *r = (rr->main != NULL) ? rr->main : rr;
/* our state is a table, get it */
apr_table_t *state = NULL;
apr_pool_userdata_get((void**) &state, OIDC_USERDATA_KEY, r->pool);
/* if it does not... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 18,231,092,597,549,315,000,000,000,000,000,000,000 | 18 | Add a function to escape Javascript characters |
find_dequeue_entry(struct nfqnl_instance *queue, unsigned int id)
{
struct nf_queue_entry *entry = NULL, *i;
spin_lock_bh(&queue->lock);
list_for_each_entry(i, &queue->queue_list, list) {
if (i->id == id) {
entry = i;
break;
}
}
if (entry)
__dequeue_entry(queue, entry);
spin_unlock_bh(&queue->lock... | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 57,052,912,689,164,630,000,000,000,000,000,000,000 | 20 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
static void Ins_SWAP( INS_ARG )
{
Long L;
(void)exc;
L = args[0];
args[0] = args[1];
args[1] = L;
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 80,442,774,168,086,480,000,000,000,000,000,000,000 | 9 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static void jas_icctxt_destroy(jas_iccattrval_t *attrval)
{
jas_icctxt_t *txt = &attrval->data.txt;
if (txt->string) {
jas_free(txt->string);
txt->string = 0;
}
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 70,096,534,267,163,090,000,000,000,000,000,000,000 | 8 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static struct net_device *get_dev_from_nl(struct net *net,
struct nlattr **attrs)
{
int ifindex = nla_get_u32(attrs[MACSEC_ATTR_IFINDEX]);
struct net_device *dev;
dev = __dev_get_by_index(net, ifindex);
if (!dev)
return ERR_PTR(-ENODEV);
if (!netif_is_macsec(dev))
return ERR_PTR(-ENODEV);
return dev... | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 261,659,489,275,595,170,000,000,000,000,000,000,000 | 15 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
int cipso_v4_getattr(const unsigned char *cipso,
struct netlbl_lsm_secattr *secattr)
{
int ret_val = -ENOMSG;
u32 doi;
struct cipso_v4_doi *doi_def;
if (cipso_v4_cache_check(cipso, cipso[1], secattr) == 0)
return 0;
doi = get_unaligned_be32(&cipso[2]);
rcu_read_lock();
doi_def = cipso_v4_doi_search(do... | 0 | [
"CWE-835"
] | linux | 40413955ee265a5e42f710940ec78f5450d49149 | 258,459,121,296,549,270,000,000,000,000,000,000,000 | 39 | Cipso: cipso_v4_optptr enter infinite loop
in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop.
Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue
Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-o... |
static uint32_t count_object_type(struct bitmap *objects,
enum object_type type)
{
struct eindex *eindex = &bitmap_git.ext_index;
uint32_t i = 0, count = 0;
struct ewah_iterator it;
eword_t filter;
switch (type) {
case OBJ_COMMIT:
ewah_iterator_init(&it, bitmap_git.commits);
break;
case OBJ_TREE:
... | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 252,893,018,831,941,180,000,000,000,000,000,000,000 | 43 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static int on_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)
{
VTermState *state = user;
int leader_byte = 0;
int intermed_byte = 0;
VTermPos oldpos = state->pos;
/* Some temporaries for later code */
int count, val;
int row, col;
VTermRect rect... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 33,034,021,712,414,907,000,000,000,000,000,000,000 | 596 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config)
{
int64_t infilesize, total_samples;
DFFFileHeader dff_file_header;
DFFChunkHeader dff_chunk_header;
uint32_t bcount;
infilesize = DoGetFileSize (infile);
memcpy (&dff_file_hea... | 1 | [
"CWE-787"
] | WavPack | 6f8bb34c2993a48ab9afbe353e6d0cff7c8d821d | 220,094,443,953,232,950,000,000,000,000,000,000,000 | 232 | issue #33, sanitize size of unknown chunks before malloc() |
static void set_max_drc(void)
{
#define NFSD_DRC_SIZE_SHIFT 10
nfsd_drc_max_mem = (nr_free_buffer_pages()
>> NFSD_DRC_SIZE_SHIFT) * PAGE_SIZE;
nfsd_drc_mem_used = 0;
spin_lock_init(&nfsd_drc_lock);
dprintk("%s nfsd_drc_max_mem %lu \n", __func__, nfsd_drc_max_mem);
} | 0 | [
"CWE-20"
] | linux | e6838a29ecb484c97e4efef9429643b9851fba6e | 15,835,561,479,302,202,000,000,000,000,000,000,000 | 9 | nfsd: check for oversized NFSv2/v3 arguments
A client can append random data to the end of an NFSv2 or NFSv3 RPC call
without our complaining; we'll just stop parsing at the end of the
expected data and ignore the rest.
Encoded arguments and replies are stored together in an array of pages,
and if a call is too large... |
static int kvm_ioctl_create_device(struct kvm *kvm,
struct kvm_create_device *cd)
{
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
if (cd->type >= ARRAY_SIZE(kvm_device_ops_table))
return -ENODEV;
ops = kvm_device_ops_table[cd->type];... | 1 | [
"CWE-416",
"CWE-284"
] | linux | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | 8,731,509,033,071,288,000,000,000,000,000,000,000 | 51 | KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: ... |
static int pmu_get(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
/* Build tests */
BUILD_BUG_ON(TSO(siar) + sizeof(unsigned long) != TSO(sdar));
BUILD_BUG_ON(TSO(sdar) + sizeof(unsigned long) != TSO(sier));... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 98,539,132,597,234,100,000,000,000,000,000,000,000 | 18 | 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... |
static double mp_eye(_cimg_math_parser& mp) {
double *ptrd = &_mp_arg(1) + 1;
const unsigned int k = (unsigned int)mp.opcode[2];
CImg<doubleT>(ptrd,k,k,1,1,true).identity_matrix();
return cimg::type<double>::nan();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 326,683,652,637,509,800,000,000,000,000,000,000,000 | 6 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void __net_exit dccp_v6_exit_batch(struct list_head *net_exit_list)
{
inet_twsk_purge(&dccp_hashinfo, AF_INET6);
} | 0 | [
"CWE-241"
] | linux | 83eaddab4378db256d00d295bda6ca997cd13a52 | 296,101,169,547,651,620,000,000,000,000,000,000,000 | 4 | ipv6/dccp: do not inherit ipv6_mc_list from parent
Like commit 657831ffc38e ("dccp/tcp: do not inherit mc_list from parent")
we should clear ipv6_mc_list etc. for IPv6 sockets too.
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
S... |
static struct binder_work *binder_dequeue_work_head(
struct binder_proc *proc,
struct list_head *list)
{
struct binder_work *w;
binder_inner_proc_lock(proc);
w = binder_dequeue_work_head_ilocked(list);
binder_inner_proc_unlock(proc);
return w;
} | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 114,928,460,323,508,440,000,000,000,000,000,000,000 | 11 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
static void bind_ssbo_locs(struct vrend_linked_shader_program *sprog,
int id)
{
int i;
char name[32];
if (!has_feature(feat_ssbo))
return;
if (sprog->ss[id]->sel->sinfo.ssbo_used_mask) {
const char *prefix = pipe_shader_to_prefix(id);
uint32_t mask = sprog->ss[id... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 177,976,696,302,851,200,000,000,000,000,000,000,000 | 21 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static void __guc_ads_init(struct intel_guc *guc)
{
struct intel_gt *gt = guc_to_gt(guc);
struct __guc_ads_blob *blob = guc->ads_blob;
const u32 skipped_size = LRC_PPHWSP_SZ * PAGE_SIZE + LR_HW_CONTEXT_SIZE;
u32 base;
u8 engine_class;
/* GuC scheduling policies */
guc_policies_init(&blob->policies);
/*
* Gu... | 1 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 243,503,101,089,237,630,000,000,000,000,000,000,000 | 60 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
int gnutls_x509_crt_get_serial(gnutls_x509_crt_t cert, void *result,
size_t * result_size)
{
int ret, len;
if (cert == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
len = *result_size;
ret =
asn1_read_value(cert->cert, "tbsCertificate.serialNumber", result,
&len);
... | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 165,013,015,429,863,490,000,000,000,000,000,000,000 | 23 | some changes for 64bit machines. |
void vrend_renderer_resource_detach_iov(int res_handle,
struct iovec **iov_p,
int *num_iovs_p)
{
struct vrend_resource *res;
res = vrend_resource_lookup(res_handle, 0);
if (!res) {
return;
}
if (iov_p)
*iov_p = re... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 34,559,945,078,212,340,000,000,000,000,000,000,000 | 22 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
smpl_t aubio_onset_get_minioi_ms(const aubio_onset_t * o) {
return aubio_onset_get_minioi_s (o) * 1000.;
} | 0 | [] | aubio | e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 | 303,862,411,149,089,000,000,000,000,000,000,000,000 | 3 | [onset] safer deletion method |
static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx)
{
struct aio_kiocb *req;
req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL);
if (unlikely(!req))
return NULL;
percpu_ref_get(&ctx->reqs);
req->ki_ctx = ctx;
INIT_LIST_HEAD(&req->ki_list);
refcount_set(&req->ki_refcnt, 0);
req->ki_eventfd = NULL;
... | 0 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 129,591,606,786,815,520,000,000,000,000,000,000,000 | 15 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
gs_manager_new (void)
{
GObject *manager;
manager = g_object_new (GS_TYPE_MANAGER, NULL);
return GS_MANAGER (manager);
} | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 219,714,282,968,495,170,000,000,000,000,000,000,000 | 8 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
static void hub_event(struct work_struct *work)
{
struct usb_device *hdev;
struct usb_interface *intf;
struct usb_hub *hub;
struct device *hub_dev;
u16 hubstatus;
u16 hubchange;
int i, ret;
hub = container_of(work, struct usb_hub, events);
hdev = hub->hdev;
hub_dev = hub->intfdev;
intf = to_usb_interface(hu... | 0 | [
"CWE-703"
] | linux | e50293ef9775c5f1cf3fcc093037dd6a8c5684ea | 180,281,663,883,344,560,000,000,000,000,000,000,000 | 122 | USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. ... |
_XkbWriteAtoms(char *wire, Atom *atoms, int maxAtoms, int swap)
{
register unsigned int i;
Atom *atm;
atm = (Atom *) wire;
for (i = 0; i < maxAtoms; i++) {
if (atoms[i] != None) {
*atm = atoms[i];
if (swap) {
swapl(atm);
}
atm++;
... | 0 | [
"CWE-119"
] | xserver | f7cd1276bbd4fe3a9700096dec33b52b8440788d | 252,597,430,817,513,420,000,000,000,000,000,000,000 | 17 | Correct bounds checking in XkbSetNames()
CVE-2020-14345 / ZDI 11428
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
long __sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags)
{
int fput_needed, err;
struct msghdr msg_sys;
struct socket *sock;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
goto out;
err = ___sys_sendmsg(sock, msg, &msg_sys, flags, NULL);
fput_light(sock->file, fput_needed);
out:... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 147,179,518,996,812,940,000,000,000,000,000,000,000 | 16 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
void
mono_image_register_token (MonoDynamicImage *assembly, guint32 token, MonoObject *obj)
{ | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 303,956,544,097,163,870,000,000,000,000,000,000,000 | 3 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
parse_keyword_arg_i(VALUE key, VALUE value, VALUE self)
{
if (key == ID2SYM(rb_intern("name"))) {
rb_iv_set(self, "@name", value);
} else {
rb_raise(rb_eArgError, "unknown keyword: %"PRIsVALUE, key);
}
return ST_CONTINUE;
} | 0 | [
"CWE-264"
] | ruby | c7d7ff45f1e0d6fad28e53c02108d4b067e843c3 | 185,523,272,455,070,730,000,000,000,000,000,000,000 | 9 | * 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 |
soup_auth_ntlm_create_connection_state (SoupConnectionAuth *auth)
{
SoupNTLMConnectionState *conn;
conn = g_slice_new0 (SoupNTLMConnectionState);
conn->state = SOUP_NTLM_NEW;
return conn;
} | 0 | [
"CWE-125"
] | libsoup | f8a54ac85eec2008c85393f331cdd251af8266ad | 320,220,331,559,603,340,000,000,000,000,000,000,000 | 9 | NTLM: Avoid a potential heap buffer overflow in v2 authentication
Check the length of the decoded v2 challenge before attempting to
parse it, to avoid reading past it.
Fixes #173 |
int mp_prime_is_prime(mp_int* a, int t, int* result)
{
return fp_isprime_ex(a, t, result);
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 302,809,959,524,961,860,000,000,000,000,000,000,000 | 4 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
mode_t cmnd_umask, char *iolog_path, void *v)
{
struct sudoers_exec_args *exec_args = v;
char **command_info;
int info_len = 0;
debug_decl(sudoers_policy_store_result, SUDOERS_DEBUG_PLUGIN);
if (exec_args == NULL)
debug_ret... | 0 | [
"CWE-193"
] | sudo | c4d384082fdbc8406cf19e08d05db4cded920a55 | 193,675,677,893,941,720,000,000,000,000,000,000,000 | 306 | Add sudoedit flag checks in plugin that are consistent with front-end.
Don't assume the sudo front-end is sending reasonable mode flags.
These checks need to be kept consistent between the sudo front-end
and the sudoers plugin. |
static int mem_close(jas_stream_obj_t *obj)
{
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
if (m->myalloc_ && m->buf_) {
jas_free(m->buf_);
m->buf_ = 0;
}
jas_free(obj);
return 0;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 286,688,447,784,317,230,000,000,000,000,000,000,000 | 10 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
parse_codes(struct archive_read *a)
{
int i, j, val, n, r;
unsigned char bitlengths[MAX_SYMBOLS], zerocount, ppmd_flags;
unsigned int maxorder;
struct huffman_code precode;
struct rar *rar = (struct rar *)(a->format->data);
struct rar_br *br = &(rar->br);
free_codes(a);
/* Skip to the next byte */
r... | 1 | [
"CWE-415"
] | libarchive | 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 | 141,480,178,588,213,500,000,000,000,000,000,000,000 | 271 | Avoid a double-free when a window size of 0 is specified
new_size can be 0 with a malicious or corrupted RAR archive.
realloc(area, 0) is equivalent to free(area), so the region would
be free()d here and the free()d again in the cleanup function.
Found with a setup running AFL, afl-rb, and qsym. |
static inline void highlight(const int s, const int e)
{
invert_screen(sel_cons, s, e-s+2, 1);
} | 0 | [
"CWE-399"
] | linux-2.6 | 878b8619f711280fd05845e21956434b5e588cc4 | 264,097,763,409,958,500,000,000,000,000,000,000,000 | 4 | Fix memory corruption in console selection
Fix an off-by-two memory error in console selection.
The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character. This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.
This patch fixes... |
TEST_F(DocumentSourceMatchTest, ShouldAddOuterFieldToDependenciesIfElemMatchContainsNoFieldNames) {
auto match =
DocumentSourceMatch::create(fromjson("{a: {$elemMatch: {$gt: 1, $lt: 5}}}"), getExpCtx());
DepsTracker dependencies;
ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, match->getDependencies(&de... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 178,373,784,412,181,170,000,000,000,000,000,000,000 | 10 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
list_running_jobs (format)
int format;
{
cleanup_dead_jobs ();
map_over_jobs (print_job, format, (int)JRUNNING);
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 329,390,796,709,325,550,000,000,000,000,000,000,000 | 6 | bash-4.4-rc2 release |
_rsvg_node_switch_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate)
{
guint i;
rsvg_state_reinherit_top (ctx, self->state, dominate);
rsvg_push_discrete_layer (ctx);
for (i = 0; i < self->children->len; i++) {
RsvgNode *drawable = g_ptr_array_index (self->children, i);
if (d... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 9,179,736,023,118,015,000,000,000,000,000,000,000 | 22 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void ListenerImpl::buildOriginalDstListenerFilter() {
// Add original dst listener filter if 'use_original_dst' flag is set.
if (PROTOBUF_GET_WRAPPED_OR_DEFAULT(config_, hidden_envoy_deprecated_use_original_dst, false)) {
auto& factory =
Config::Utility::getAndCheckFactoryByName<Configuration::NamedList... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 88,733,207,097,877,870,000,000,000,000,000,000,000 | 12 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static const struct content_encoding *find_encoding(const char *name,
size_t len)
{
const struct content_encoding * const *cep;
for(cep = encodings; *cep; cep++) {
const struct content_encoding *ce = *cep;
if((strncasecompare(name, ce->name, len) && !ce->... | 0 | [] | curl | 3a09fbb7f264c67c438d01a30669ce325aa508e2 | 116,230,812,511,690,860,000,000,000,000,000,000,000 | 13 | content_encoding: return error on too many compression steps
The max allowed steps is arbitrarily set to 5.
Bug: https://curl.se/docs/CVE-2022-32206.html
CVE-2022-32206
Reported-by: Harry Sintonen
Closes #9049 |
static int session_call_on_begin_headers(nghttp2_session *session,
nghttp2_frame *frame) {
int rv;
DEBUGF("recv: call on_begin_headers callback stream_id=%d\n",
frame->hd.stream_id);
if (session->callbacks.on_begin_headers_callback) {
rv = session->callbacks.o... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 168,044,736,727,835,780,000,000,000,000,000,000,000 | 17 | Add nghttp2_option_set_max_outbound_ack |
static int __init init_opl3 (void)
{
printk(KERN_INFO "YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996\n");
if (io != -1) /* User loading pure OPL3 module */
{
if (!opl3_detect(io))
{
return -ENODEV;
}
me = opl3_init(io, THIS_MODULE);
}
return 0;
} | 0 | [
"CWE-119",
"CWE-264",
"CWE-284"
] | linux | 4d00135a680727f6c3be78f8befaac009030e4df | 225,412,327,475,874,800,000,000,000,000,000,000,000 | 16 | sound/oss/opl3: validate voice and channel indexes
User-controllable indexes for voice and channel values may cause reading
and writing beyond the bounds of their respective arrays, leading to
potentially exploitable memory corruption. Validate these indexes.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
C... |
tor_tls_check_lifetime(tor_tls_t *tls, int tolerance)
{
time_t now, t;
X509 *cert;
int r = -1;
now = time(NULL);
if (!(cert = SSL_get_peer_certificate(tls->ssl)))
goto done;
t = now + tolerance;
if (X509_cmp_time(X509_get_notBefore(cert), &t) > 0) {
log_cert_lifetime(cert, "not yet valid");
... | 0 | [
"CWE-264"
] | tor | 638fdedcf16cf7d6f7c586d36f7ef335c1c9714f | 27,785,080,857,397,230,000,000,000,000,000,000,000 | 31 | Don't send a certificate chain on outgoing TLS connections from non-relays |
virDomainBlkioDeviceParseXML(xmlNodePtr root,
virBlkioDevicePtr dev)
{
xmlNodePtr node;
g_autofree char *c = NULL;
node = root->children;
while (node) {
if (node->type == XML_ELEMENT_NODE) {
if (virXMLNodeNameEqual(node, "path") && !dev->path) {
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 123,214,787,249,547,790,000,000,000,000,000,000,000 | 72 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
set_global_features(void)
{
int drvidx;
dev->global_features = 0;
for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) {
if (!dev->drv[drvidx])
continue;
if (dev->drv[drvidx]->interface)
dev->global_features |= dev->drv[drvidx]->interface->features;
}
} | 0 | [
"CWE-119"
] | linux-2.6 | eafe1aa37e6ec2d56f14732b5240c4dd09f0613a | 102,688,599,978,227,730,000,000,000,000,000,000,000 | 12 | I4L: fix isdn_ioctl memory overrun vulnerability
Fix possible memory overrun issue in the isdn ioctl code.
Found by ADLAB <adlab@venustech.com.cn>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Cc: ADLAB <adlab@venustech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off... |
inline double atof(const char *const str) {
double x = 0, y = 1;
return str && cimg_sscanf(str,"%lf/%lf",&x,&y)>0?x/y:0;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 296,311,396,545,935,100,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
X509 *X509_find_by_subject(STACK_OF(X509) *sk, const X509_NAME *name)
{
X509 *x509;
int i;
for (i = 0; i < sk_X509_num(sk); i++) {
x509 = sk_X509_value(sk, i);
if (X509_NAME_cmp(X509_get_subject_name(x509), name) == 0)
return x509;
}
return NULL;
} | 0 | [
"CWE-476"
] | openssl | 8130d654d1de922ea224fa18ee3bc7262edc39c0 | 220,138,723,995,543,350,000,000,000,000,000,000,000 | 12 | Fix Null pointer deref in X509_issuer_and_serial_hash()
The OpenSSL public API function X509_issuer_and_serial_hash() attempts
to create a unique hash value based on the issuer and serial number data
contained within an X509 certificate. However it fails to correctly
handle any errors that may occur while parsing the ... |
static int stread(char *buf, size_t len, LibRaw_abstract_datastream *fp)
{
int r = fp->read(buf,len,1);
buf[len-1] = 0;
return r;
} | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 23,371,994,274,448,474,000,000,000,000,000,000,000 | 6 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
static int ntop_interface_host_trigger_alerts(lua_State* vm, bool trigger) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
char *host_ip;
u_int16_t vlan_id = 0;
char buf[64];
Host *h;
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 333,194,555,987,674,940,000,000,000,000,000,000,000 | 27 | Security fix: prevents empty host from being used |
static bool tcp_v4_inbound_md5_hash(struct sock *sk, const struct sk_buff *skb)
{
/*
* This gets called for each TCP segment that arrives
* so we want to be efficient.
* We have 3 drop cases:
* o No MD5 hash and one expected.
* o MD5 hash and we're not expecting one.
* o MD5 hash and its wrong.
*/
const... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 171,806,076,037,135,940,000,000,000,000,000,000,000 | 52 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int jpc_dec_process_ppm(jpc_dec_t *dec, jpc_ms_t *ms)
{
jpc_ppm_t *ppm = &ms->parms.ppm;
jpc_ppxstabent_t *ppmstabent;
if (!dec->ppmstab) {
if (!(dec->ppmstab = jpc_ppxstab_create())) {
return -1;
}
}
if (!(ppmstabent = jpc_ppxstabent_create())) {
return -1;
}
ppmstabent->ind = ppm->ind;
ppmst... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 278,723,784,230,943,260,000,000,000,000,000,000,000 | 23 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
gnutls_handshake_set_random(gnutls_session_t session,
const gnutls_datum_t * random)
{
if (random->size != GNUTLS_RANDOM_SIZE)
return GNUTLS_E_INVALID_REQUEST;
session->internals.sc_random_set = 1;
if (session->security_parameters.entity == GNUTLS_CLIENT)
memcpy(session->internals.resumed_security_parame... | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 276,199,294,697,092,240,000,000,000,000,000,000,000 | 16 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
static void free_sched_group_rcu(struct rcu_head *rhp)
{
/* now it should be safe to free those cfs_rqs */
free_sched_group(container_of(rhp, struct task_group, rcu));
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 32,471,959,853,173,586,000,000,000,000,000,000,000 | 5 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
std::string CanonicalQuery::toString() const {
str::stream ss;
ss << "ns=" << _qr->nss().ns();
if (_qr->getBatchSize()) {
ss << " batchSize=" << *_qr->getBatchSize();
}
if (_qr->getLimit()) {
ss << " limit=" << *_qr->getLimit();
}
if (_qr->getSkip()) {
ss << " skip... | 0 | [
"CWE-755"
] | mongo | c8ced6df8f620daaa2e539f192f2eef356c63e9c | 38,054,856,336,751,965,000,000,000,000,000,000,000 | 29 | SERVER-47773 Error consistently when tailable cursors and $near are used together |
virtual Status checkAuthForCommand(Client* client,
const std::string& dbname,
const BSONObj& cmdObj) {
return auth::checkAuthForCreateRoleCommand(client, dbname, cmdObj);
} | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 314,700,905,993,601,150,000,000,000,000,000,000,000 | 5 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
int size, unsigned int truesize)
{
skb_fill_page_desc(skb, i, page, off, size);
skb->len += size;
skb->data_len += size;
skb->truesize += truesize;
} | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 113,728,236,886,340,380,000,000,000,000,000,000,000 | 8 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.