func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline bool cpu_has_broken_vmx_preemption_timer(void)
{
u32 eax = cpuid_eax(0x00000001), i;
/* Clear the reserved bits */
eax &= ~(0x3U << 14 | 0xfU << 28);
for (i = 0; i < ARRAY_SIZE(vmx_preemption_cpu_tfms); i++)
if (eax == vmx_preemption_cpu_tfms[i])
return true;
return false;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 190,034,452,163,550,930,000,000,000,000,000,000,000 | 12 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
explicit TProtocol(TTransport* ptrans)
: ptrans_(ptrans, [](TTransport*) {}) {} | 0 | [
"CWE-20",
"CWE-755"
] | fbthrift | 01686e15ec77ccb4d49a77d5bce3a01601e54d64 | 2,912,369,933,505,355,500,000,000,000,000,000,000 | 2 | Throw on skipping an invalid type.
Summary:
Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to
can cause thrift to loop unboundedly.
Reviewed By: spalamarchuk
Differential Revision: D15102451
fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f |
CModule::EModRet CModule::OnUserPart(CString& sChannel, CString& sMessage) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 244,647,921,483,421,470,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static int drbg_fini_sym_kernel(struct drbg_state *drbg)
{
struct crypto_cipher *tfm =
(struct crypto_cipher *)drbg->priv_data;
if (tfm)
crypto_free_cipher(tfm);
drbg->priv_data = NULL;
return 0;
} | 0 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 153,779,725,154,466,300,000,000,000,000,000,000,000 | 9 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
static void ohci_pmac_off(struct pci_dev *dev)
{
if (machine_is(powermac)) {
struct device_node *ofn = pci_device_to_OF_node(dev);
if (ofn) {
pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
}
}
} | 0 | [
"CWE-399"
] | linux-2.6 | 8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54 | 104,704,027,968,094,730,000,000,000,000,000,000,000 | 11 | firewire: ohci: handle receive packets with a data length of zero
Queueing to receive an ISO packet with a payload length of zero
silently does nothing in dualbuffer mode, and crashes the kernel in
packet-per-buffer mode. Return an error in dualbuffer mode, because
the DMA controller won't let us do what we want, and... |
term_get_winpos(int *x, int *y, varnumber_T timeout)
{
int count = 0;
int prev_winpos_x = winpos_x;
int prev_winpos_y = winpos_y;
if (*T_CGP == NUL || !can_get_termresponse())
return FAIL;
winpos_x = -1;
winpos_y = -1;
++did_request_winpos;
termrequest_sent(&winpos_status);
OUT_STR... | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 93,688,303,670,314,640,000,000,000,000,000,000,000 | 42 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
set_action_important (GtkUIManager *ui,
const char *action_name)
{
GtkAction *action;
action = gtk_ui_manager_get_action (ui, action_name);
g_object_set (action, "is_important", TRUE, NULL);
g_object_unref (action);
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 300,082,451,394,327,040,000,000,000,000,000,000,000 | 9 | libarchive: sanitize filenames before extracting |
lexer_convert_push_number_to_push_literal (parser_context_t *context_p) /**< context */
{
ecma_integer_value_t value;
bool two_literals = context_p->last_cbc_opcode >= CBC_PUSH_LITERAL_PUSH_NUMBER_0;
if (context_p->last_cbc_opcode == CBC_PUSH_NUMBER_0 || context_p->last_cbc_opcode == CBC_PUSH_LITERAL_PUSH_NUMBER... | 0 | [
"CWE-288"
] | jerryscript | f3a420b672927037beb4508d7bdd68fb25d2caf6 | 189,416,465,098,236,400,000,000,000,000,000,000,000 | 73 | Fix class static block opening brace parsing (#4942)
The next character should not be consumed after finding the static block opening brace.
This patch fixes #4916.
JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu |
static void kiocb_done(struct io_kiocb *req, ssize_t ret,
unsigned int issue_flags)
{
struct io_async_rw *io = req->async_data;
/* add previously done IO, if any */
if (req_has_async_data(req) && io->bytes_done > 0) {
if (ret < 0)
ret = io->bytes_done;
else
ret += io->bytes_done;
}
if (req->fl... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 271,705,554,605,056,600,000,000,000,000,000,000,000 | 28 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
flatpak_deploy_data_get_string (GVariant *deploy_data, const char *key)
{
g_autoptr(GVariant) metadata = g_variant_get_child_value (deploy_data, 4);
const char *value = NULL;
g_variant_lookup (metadata, key, "&s", &value);
return value;
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 300,025,231,630,742,900,000,000,000,000,000,000,000 | 9 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static void _6502_anal_update_flags(RAnalOp *op, int flags) {
/* FIXME: $b9 instead of $b8 to prevent the bug triggered by: A = 0 - 0xff - 1 */
if (flags & _6502_FLAGS_B) r_strbuf_append (&op->esil, ",$b9,C,=");
if (flags & _6502_FLAGS_C) r_strbuf_append (&op->esil, ",$c7,C,=");
if (flags & _6502_FLAGS_Z) r_strbuf_... | 0 | [
"CWE-190",
"CWE-125"
] | radare2 | bbb4af56003c1afdad67af0c4339267ca38b1017 | 41,757,974,845,205,630,000,000,000,000,000,000,000 | 7 | Fix #10294 - crash in r2_hoobr__6502_op |
TEST_F(AsStringGraphTest, FillWithSpace) {
TF_ASSERT_OK(Init(DT_INT64, /*fill=*/" ", /*width=*/4));
AddInputFromArray<int64>(TensorShape({3}), {-42, 0, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRING, TensorShape({3}));
test::FillValues<tstring>(&expected, {" -42", " 0", " 42"});... | 0 | [
"CWE-20",
"CWE-134",
"CWE-703"
] | tensorflow | 33be22c65d86256e6826666662e40dbdfe70ee83 | 301,774,215,974,638,440,000,000,000,000,000,000,000 | 9 | Prevent format string vulnerability in `tf.strings.as_string`.
The `printf` format specifier only allows `#`, `0`, `-`, `+` and space as flag characters. Others are interpreted as width/precision/length modifier or conversion specifiers. If a character does not fit into any of these sets `printf` just displays it.
Al... |
bool PM_io_parser<PMDEC>::read_face(Face_handle f)
{ // syntax: index { halfedge, fclist, ivlist, mark }
int n, ei, vi; Mark m;
if ( !(in >> n) || !check_sep("{") ) return false;
if ( !(in >> ei) || !check_sep(",") ) return false;
if (ei >= 0) f->set_halfedge(Halfedge_of[ei]);
while (in >> ei) {
CGAL_asse... | 1 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 192,304,973,916,903,900,000,000,000,000,000,000,000 | 20 | Fix Nef_2 and Nef_S2 IO |
void InstanceKlass::set_package(ClassLoaderData* loader_data, PackageEntry* pkg_entry, TRAPS) {
// ensure java/ packages only loaded by boot or platform builtin loaders
// not needed for shared class since CDS does not archive prohibited classes.
if (!is_shared()) {
check_prohibited_package(name(), loader_da... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 270,194,484,612,566,740,000,000,000,000,000,000,000 | 76 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
xmlAttrPtr ret;
if (cur == NULL) return(NULL);
if ((target != NULL) && (target->type != XML_ELEMENT_NODE))
return(NULL);
if (target != NULL)
ret = xmlNewDocProp(target->doc, cur->name, NULL);
else if (doc != NULL)
ret... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 7,200,537,421,229,152,000,000,000,000,000,000,000 | 96 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
static void login_failed(pool *p, const char *user) {
#ifdef HAVE_LOGINFAILED
const char *host, *sess_ttyname;
int res, xerrno;
host = pr_netaddr_get_dnsstr(session.c->remote_addr);
sess_ttyname = pr_session_get_ttyname(p);
PRIVS_ROOT
res = loginfailed((char *) user, (char *) host, (char *) sess_ttyname,
... | 0 | [
"CWE-59",
"CWE-295"
] | proftpd | 349addc3be4fcdad9bd4ec01ad1ccd916c898ed8 | 267,989,670,144,159,160,000,000,000,000,000,000,000 | 21 | Walk the entire DefaultRoot path, checking for symlinks of any component,
when AllowChrootSymlinks is disabled. |
static int winbind_chauthtok_request(struct pwb_context *ctx,
const char *user,
const char *oldpass,
const char *newpass,
time_t pwd_last_set)
{
wbcErr wbc_status;
struct wbcChangePasswordParams params;
struct wbcAuthErrorInfo *error = NULL;
struct wbcUserPasswordPolicyInfo *poli... | 0 | [
"CWE-20"
] | samba | f62683956a3b182f6a61cc7a2b4ada2e74cde243 | 316,557,875,878,466,270,000,000,000,000,000,000,000 | 121 | fail authentication for single group name which cannot be converted to sid
furthermore if more than one name is supplied and no sid is converted
then also fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8598
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed... |
static void addrconf_gre_config(struct net_device *dev)
{
struct inet6_dev *idev;
ASSERT_RTNL();
idev = ipv6_find_idev(dev);
if (idev == NULL) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
addrconf_addr_gen(idev, true);
} | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 94,173,716,735,443,160,000,000,000,000,000,000,000 | 14 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
box_blur_line (gint box_width, gint even_offset,
guchar *src, guchar *dest,
gint len, gint bpp)
{
gint i;
gint lead; /* This marks the leading edge of the kernel */
gint output; /* This marks the center of the kernel */
gint trail; ... | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 88,484,071,694,117,850,000,000,000,000,000,000,000 | 129 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
\param y1 Ending Y-coordinates of image regions to read (~0U for max).
\param z1 Ending Z-coordinates of image regions to read (~0U for max).
\param c1 Ending C-coordinates of image regions to read (~0U for max).
**/
CImgList<T>& load_cimg(const char *const filename,
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 84,939,751,007,623,350,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
send_dbus_boolean_signal (GSListener *listener,
const char *name,
gboolean value)
{
DBusMessage *message;
DBusMessageIter iter;
g_return_if_fail (listener != NULL);
message = dbus_message_new_signal (GS_LISTENER_PATH,
... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 154,740,305,313,031,400,000,000,000,000,000,000,000 | 22 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
bool val_native(THD *thd, Native *to)
{
return Time(thd, this).to_native(to, decimals);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 282,761,323,918,606,000,000,000,000,000,000,000,000 | 4 | 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 ... |
const Type_handler *type_handler() const { return (*ref)->type_handler(); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 103,879,598,283,428,740,000,000,000,000,000,000,000 | 1 | 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 int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype type)
{
struct ieee80211_local *local = sdata->local;
int ret, err;
enum nl80211_iftype internal_type = type;
bool p2p = false;
ASSERT_RTNL();
if (!local->ops->change_interface)
return -EBUSY;
switch ... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 137,248,422,688,421,840,000,000,000,000,000,000,000 | 70 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
extract_task_thread_func (GTask *task,
gpointer source_object,
gpointer task_data,
GCancellable *cancellable)
{
ExtractJob *extract_job = task_data;
GList *l;
GList *existing_output_files = NULL;
gint total_fi... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 338,786,515,747,347,900,000,000,000,000,000,000,000 | 124 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void rtl8139_MultiIntr_write(RTL8139State *s, uint32_t val)
{
DPRINTF("MultiIntr write(w) val=0x%04x\n", val);
/* mask unwritable bits */
val = SET_MASKED(val, 0xf000, s->MultiIntr);
s->MultiIntr = val;
} | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 99,977,744,240,916,030,000,000,000,000,000,000,000 | 9 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
FixedBuffer(Char *array, std::size_t size) : fmt::Buffer<Char>(array, size) {} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 328,398,400,063,290,460,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
static unsigned interleave_nodes(struct mempolicy *policy)
{
unsigned next;
struct task_struct *me = current;
next = next_node_in(me->il_prev, policy->v.nodes);
if (next < MAX_NUMNODES)
me->il_prev = next;
return next;
} | 0 | [
"CWE-416"
] | linux | 73223e4e2e3867ebf033a5a8eb2e5df0158ccc99 | 149,195,202,327,445,060,000,000,000,000,000,000,000 | 10 | mm/mempolicy: fix use after free when calling get_mempolicy
I hit a use after free issue when executing trinity and repoduced it
with KASAN enabled. The related call trace is as follows.
BUG: KASan: use after free in SyS_get_mempolicy+0x3c8/0x960 at addr ffff8801f582d766
Read of size 2 by task syz-executor1/798
... |
int input_device_register(struct btd_service *service)
{
struct btd_device *device = btd_service_get_device(service);
const char *path = device_get_path(device);
struct input_device *idev;
DBG("%s", path);
idev = input_device_new(service);
if (!idev)
return -EINVAL;
if (uhid_enabled) {
idev->uhid = bt_uhi... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 86,585,095,734,637,960,000,000,000,000,000,000,000 | 35 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
static int query_formats(AVFilterContext *ctx)
{
LutContext *s = ctx->priv;
const enum AVPixelFormat *pix_fmts = s->is_rgb ? rgb_pix_fmts :
s->is_yuv ? yuv_pix_fmts : all_pix_fmts;
ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 4,603,536,022,782,102,000,000,000,000,000,000,000 | 10 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void CZNC::BackupConfigOnce(const CString& sSuffix) {
static bool didBackup = false;
if (didBackup) return;
didBackup = true;
CUtils::PrintAction("Creating a config backup");
CString sBackup = CDir::ChangeDir(m_sConfigFile, "../znc.conf." + sSuffix);
if (CFile::Copy(m_sConfigFile, sBackup))
... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 141,673,500,240,609,660,000,000,000,000,000,000,000 | 13 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
int BN_is_one(const BIGNUM *a)
{
return BN_abs_is_word(a, 1) && !a->neg;
} | 0 | [
"CWE-310"
] | openssl | aab7c770353b1dc4ba045938c8fb446dd1c4531e | 222,841,968,349,573,250,000,000,000,000,000,000,000 | 4 | Elliptic curve scalar multiplication with timing attack defenses
Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com>
Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi>
Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt... |
void tcp_attach(struct socket *so)
{
so->so_tcpcb = tcp_newtcpcb(so);
insque(so, &so->slirp->tcb);
} | 0 | [
"CWE-787"
] | libslirp | 2655fffed7a9e765bcb4701dd876e9dab975f289 | 265,472,502,272,502,430,000,000,000,000,000,000,000 | 5 | tcp_emu: Fix oob access
The main loop only checks for one available byte, while we sometimes
need two bytes. |
int __get_unused_fd_flags(unsigned flags, unsigned long nofile)
{
return __alloc_fd(current->files, 0, nofile, flags);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 10,246,009,562,625,573,000,000,000,000,000,000,000 | 4 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
explicit UnicodeDecodeOp(OpKernelConstruction* ctx)
: UnicodeDecodeBaseOp<SPLITS_TYPE>(ctx, false) {} | 0 | [
"CWE-824",
"CWE-787"
] | tensorflow | 2e0ee46f1a47675152d3d865797a18358881d7a6 | 36,864,342,802,887,346,000,000,000,000,000,000,000 | 2 | Ensure non-empty input_splits in tf.raw_ops.UnicodeEncode
PiperOrigin-RevId: 387170080
Change-Id: I3b489acc51c5cb4124c535b9df7cc6e62ef21766 |
redisOptions get_redis_tcp_options(struct config config) {
redisOptions options = {0};
REDIS_OPTIONS_SET_TCP(&options, config.tcp.host, config.tcp.port);
return options;
} | 0 | [
"CWE-190",
"CWE-680"
] | redis | 0215324a66af949be39b34be2d55143232c1cb71 | 204,404,474,789,854,100,000,000,000,000,000,000,000 | 5 | Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587)
The redis-cli command line tool and redis-sentinel service may be vulnerable
to integer overflow when parsing specially crafted large multi-bulk network
replies. This is a result of a vulnerability in the underlying hiredis
library wh... |
void ssl_calc_verify_tls_sha256( ssl_context *ssl, unsigned char hash[32] )
{
sha2_context sha2;
SSL_DEBUG_MSG( 2, ( "=> calc verify sha256" ) );
memcpy( &sha2, &ssl->handshake->fin_sha2, sizeof(sha2_context) );
sha2_finish( &sha2, hash );
SSL_DEBUG_BUF( 3, "calculated verify result", hash, 32 );... | 0 | [
"CWE-310"
] | polarssl | 4582999be608c9794d4518ae336b265084db9f93 | 226,918,410,450,146,680,000,000,000,000,000,000,000 | 14 | Fixed timing difference resulting from badly formatted padding. |
fill_one_private_key (NMConnection *connection,
const char *pk_tag,
const char *pk_prop,
const char *cc_prop)
{
const char *filename;
NMSetting8021x *tmp;
NMSetting8021xCKType pk_type = NM_SETTING_802_1X_CK_TYPE_UNKNOWN;
gboolean need_client_cert = T... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 211,052,175,286,128,250,000,000,000,000,000,000,000 | 35 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint32_t val;
k->get_config(vdev, vdev->config);
if (addr > (vdev->config_len - sizeof(val)))
return (uint32_t)-1;
val = ldl_p(vdev->config + addr);
return val;
} | 1 | [
"CWE-269"
] | qemu | 5f5a1318653c08e435cfa52f60b6a712815b659d | 242,956,484,040,927,100,000,000,000,000,000,000,000 | 13 | virtio: properly validate address before accessing config
There are several several issues in the current checking:
- The check was based on the minus of unsigned values which can overflow
- It was done after .{set|get}_config() which can lead crash when config_len
is zero since vdev->config is NULL
Fix this by:
... |
static av_cold int rpza_decode_init(AVCodecContext *avctx)
{
RpzaContext *s = avctx->priv_data;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_RGB555;
avcodec_get_frame_defaults(&s->frame);
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 3819db745da2ac7fb3faacb116788c32f4753f34 | 332,459,694,754,974,400,000,000,000,000,000,000,000 | 11 | avcodec/rpza: Perform pointer advance and checks before using the pointers
Fixes out of array accesses
Fixes Ticket2850
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
StringInputBuffer* objects_string_compare_buffer_a() {
return &objects_string_compare_buffer_a_;
} | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 233,699,257,036,891,800,000,000,000,000,000,000,000 | 3 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
static enum sas_device_type to_dev_type(struct discover_resp *dr)
{
/* This is detecting a failure to transmit initial dev to host
* FIS as described in section J.5 of sas-2 r16
*/
if (dr->attached_dev_type == SAS_PHY_UNUSED && dr->attached_sata_dev &&
dr->linkrate >= SAS_LINK_RATE_1_5_GBPS)
return SAS_SAT... | 0 | [
"CWE-399",
"CWE-772"
] | linux | 4a491b1ab11ca0556d2fda1ff1301e862a2d44c4 | 124,879,607,833,913,500,000,000,000,000,000,000,000 | 11 | scsi: libsas: fix memory leak in sas_smp_get_phy_events()
We've got a memory leak with the following producer:
while true;
do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null;
done
The buffer req is allocated and not freed after we return. Fix it.
Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
S... |
validate_proto_tree_add_bytes_ftype(const enum ftenum type)
{
return (type == FT_BYTES ||
type == FT_UINT_BYTES ||
type == FT_OID ||
type == FT_REL_OID ||
type == FT_SYSTEM_ID );
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 1,410,015,719,840,519,700,000,000,000,000,000,000 | 8 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static void encode_wavelet_transform(VC2EncContext *s)
{
encode_transform_params(s);
avpriv_align_put_bits(&s->pb);
/* Continued after DWT in encode_transform_data() */
} | 0 | [
"CWE-125"
] | FFmpeg | 94e538aebbc9f9c529e8b1f2eda860cfb8c473b1 | 303,210,405,757,866,970,000,000,000,000,000,000,000 | 6 | vc2enc_dwt: pad the temporary buffer by the slice size
Since non-Haar wavelets need to look into pixels outside the frame, we
need to pad the buffer. The old factor of two seemed to be a workaround
that fact and only padded to the left and bottom. This correctly pads
by the slice size and as such reduces memory usage ... |
log_rr (const char server[4], const char *q, const char type[2],
const char *buf, unsigned int len, unsigned int ttl)
{
int i = 0;
string ("rr ");
ip (server);
space ();
number (ttl);
space ();
logtype (type);
space ();
name (q);
space ();
for (i = 0; i <... | 0 | [
"CWE-362"
] | ndjbdns | 847523271f3966cf4618c5689b905703c41dec1c | 13,797,210,337,760,079,000,000,000,000,000,000,000 | 27 | Merge identical outgoing requests.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. This fixes one of the cache poisoning vulnerability
reported by Mr Mark Johnson
-> https://bugzilla.redhat.com/show_bug.cgi?id... |
QByteArray CoreNetwork::channelEncode(const QString &bufferName, const QString &string) const
{
if (!bufferName.isEmpty()) {
IrcChannel *channel = ircChannel(bufferName);
if (channel)
return channel->encodeString(string);
}
return encodeString(string);
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 90,087,315,020,331,440,000,000,000,000,000,000,000 | 9 | 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... |
void Filter::onUpstreamConnection() {
connecting_ = false;
// Re-enable downstream reads now that the upstream connection is established
// so we have a place to send downstream data to.
read_callbacks_->connection().readDisable(false);
read_callbacks_->upstreamHost()->outlierDetector().putResult(
Upst... | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 38,500,394,183,455,427,000,000,000,000,000,000,000 | 32 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
const char *unit_description(Unit *u) {
assert(u);
if (u->description)
return u->description;
return strna(u->id);
} | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 337,463,749,969,755,760,000,000,000,000,000,000,000 | 8 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
static void ssl_write_hostname_ext( ssl_context *ssl,
unsigned char *buf,
size_t *olen )
{
unsigned char *p = buf;
const unsigned char *end = ssl->out_msg + SSL_MAX_CONTENT_LEN;
*olen = 0;
if( ssl->hostname == NULL )
retur... | 1 | [
"CWE-119"
] | mbedtls | 643a922c56b77235e88f106fb1b41c1a764cea5f | 21,560,836,709,804,590,000,000,000,000,000,000,000 | 56 | Reordered extension fields and added to ChangeLog
Reordered the transmission sequence of TLS extension fields in client hello
and added to ChangeLog. |
void ESTreeIRGen::initCaptureStateInES5FunctionHelper() {
// Capture "this", "new.target" and "arguments" if there are inner arrows.
if (!curFunction()->getSemInfo()->containsArrowFunctions)
return;
auto *scope = curFunction()->function->getFunctionScope();
// "this".
curFunction()->capturedThis = Build... | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 274,022,340,102,903,600,000,000,000,000,000,000,000 | 36 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
rhn_int_t r_jwe_get_header_int_value(jwe_t * jwe, const char * key) {
if (jwe != NULL) {
return _r_json_get_int_value(jwe->j_header, key);
}
return 0;
} | 0 | [
"CWE-787"
] | rhonabwy | b4c2923a1ba4fabf9b55a89244127e153a3e549b | 180,306,169,963,112,460,000,000,000,000,000,000,000 | 6 | Fix buffer overflow on r_jwe_aesgcm_key_unwrap |
static void mon_text_read_isodesc(struct mon_reader_text *rp,
struct mon_text_ptr *p, const struct mon_event_text *ep)
{
int ndesc; /* Display this many */
int i;
const struct mon_iso_desc *dp;
p->cnt += snprintf(p->pbuf + p->cnt, p->limit - p->cnt,
" %d", ep->numdesc);
ndesc = ep->numdesc;
if (ndesc > ISO... | 0 | [
"CWE-787"
] | linux | a5f596830e27e15f7a0ecd6be55e433d776986d8 | 317,750,948,704,422,160,000,000,000,000,000,000,000 | 21 | usb: usbmon: Read text within supplied buffer size
This change fixes buffer overflows and silent data corruption with the
usbmon device driver text file read operations.
Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by... |
int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, const char **value)
{
if (fs == NULL || !fs->tagname)
return -EINVAL;
if (name)
*name = fs->tagname;
if (value)
*value = fs->tagval;
return 0;
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 62,050,271,884,812,300,000,000,000,000,000,000,000 | 10 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static inline void SetPageHugeTemporary(struct page *page)
{
page[2].mapping = (void *)-1U;
} | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 254,907,091,934,071,440,000,000,000,000,000,000,000 | 4 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
__gdata_service_query (GDataService *self, GDataAuthorizationDomain *domain, const gchar *feed_uri, GDataQuery *query, GType entry_type,
GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error,
gboolean is_async)
... | 0 | [
"CWE-20"
] | libgdata | 6799f2c525a584dc998821a6ce897e463dad7840 | 125,754,757,836,788,830,000,000,000,000,000,000,000 | 39 | core: Validate SSL certificates for all connections
This prevents MitM attacks which use spoofed SSL certificates.
Note that this bumps our libsoup requirement to 2.37.91.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535 |
gst_rtsp_connection_write (GstRTSPConnection * conn, const guint8 * data,
guint size, GTimeVal * timeout)
{
guint offset;
GstClockTime to;
GstRTSPResult res;
g_return_val_if_fail (conn != NULL, GST_RTSP_EINVAL);
g_return_val_if_fail (data != NULL || size == 0, GST_RTSP_EINVAL);
g_return_val_if_fail (co... | 0 | [] | gst-plugins-base | f672277509705c4034bc92a141eefee4524d15aa | 29,488,283,473,599,914,000,000,000,000,000,000,000 | 23 | 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. |
_gnutls_handshake_client (gnutls_session_t session)
{
int ret = 0;
#ifdef HANDSHAKE_DEBUG
char buf[64];
if (session->internals.resumed_security_parameters.session_id_size > 0)
_gnutls_handshake_log ("HSK[%x]: Ask to resume: %s\n", session,
_gnutls_bin2hex (session->internals.
resumed_security... | 0 | [
"CWE-189"
] | gnutls | bc8102405fda11ea00ca3b42acc4f4bce9d6e97b | 251,332,432,924,244,000,000,000,000,000,000,000,000 | 114 | Fix GNUTLS-SA-2008-1 security vulnerabilities.
See http://www.gnu.org/software/gnutls/security.html for updates. |
static BOOL update_send_desktop_resize(rdpContext* context)
{
return rdp_server_reactivate(context->rdp);
} | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 75,396,790,086,508,050,000,000,000,000,000,000,000 | 4 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
POINTER_COLOR_UPDATE* update_read_pointer_color(rdpUpdate* update, wStream* s, BYTE xorBpp)
{
POINTER_COLOR_UPDATE* pointer_color = calloc(1, sizeof(POINTER_COLOR_UPDATE));
if (!pointer_color)
goto fail;
if (!_update_read_pointer_color(s, pointer_color, xorBpp))
goto fail;
return pointer_color;
fail:
free_p... | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 237,438,429,491,696,300,000,000,000,000,000,000,000 | 15 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
AppProto AppLayerProtoDetectGetProto(AppLayerProtoDetectThreadCtx *tctx,
Flow *f,
uint8_t *buf, uint32_t buflen,
uint8_t ipproto, uint8_t direction)
{
SCEnter();
SCLogDebug("buflen %u for %s direction"... | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 200,181,786,607,726,400,000,000,000,000,000,000,000 | 51 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
struct socket_context *tls_init_server(struct tls_params *params,
struct socket_context *socket,
struct tevent_fd *fde,
const char *plain_chars)
{
return NULL;
} | 0 | [] | samba | 22af043d2f20760f27150d7d469c7c7b944c6b55 | 145,681,383,664,071,300,000,000,000,000,000,000,000 | 7 | CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem)
If the tls key is not owned by root or has not mode 0600 samba will not
start up.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@s... |
static void sctp_insert_list(struct list_head *head, struct list_head *new)
{
struct list_head *pos;
struct sctp_chunk *nchunk, *lchunk;
__u32 ntsn, ltsn;
int done = 0;
nchunk = list_entry(new, struct sctp_chunk, transmitted_list);
ntsn = ntohl(nchunk->subh.data_hdr->tsn);
list_for_each(pos, head) {
lchunk =... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 181,439,910,975,091,730,000,000,000,000,000,000,000 | 22 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static int _nfs4_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs4_opendata *opendata;
int ret;
opendata = nfs4_open_recoverdata_alloc(ctx, state,
NFS4_OPEN_CLAIM_FH);
if (IS_ERR(opendata))
return PTR_ERR(opendata);
ret = nfs4_open_recover(opendata, state);
if (ret == -ESTAL... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 264,835,609,958,504,900,000,000,000,000,000,000,000 | 15 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
struct mallinfo nedpmallinfo(nedpool *p) THROWSPEC
{
int n;
struct mallinfo ret={0};
if(!p) { p=&syspool; if(!syspool.threads) InitPool(&syspool, 0, -1); }
for(n=0; p->m[n]; n++)
{
struct mallinfo t=mspace_mallinfo(p->m[n]);
ret.arena+=t.arena;
ret.ordblks+=t.ordblks;
ret.hblkhd+=t.hblkhd;
ret.usmblks+=t... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 186,175,417,581,917,180,000,000,000,000,000,000,000 | 18 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
static int ntop_similar_host_activity(lua_State* vm) {
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
char *host_ip;
u_int16_t vlan_id = 0;
char buf[64];
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONS... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 46,777,882,262,476,210,000,000,000,000,000,000,000 | 19 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
static void __dmar_remove_one_dev_info(struct device_domain_info *info)
{
struct intel_iommu *iommu;
unsigned long flags;
assert_spin_locked(&device_domain_lock);
if (WARN_ON(!info))
return;
iommu = info->iommu;
if (info->dev) {
if (dev_is_pci(info->dev) && sm_supported(iommu))
intel_pasid_tear_down_en... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 117,368,283,774,026,500,000,000,000,000,000,000,000 | 30 | 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... |
S_edit_distance(const UV* src,
const UV* tgt,
const STRLEN x, /* length of src[] */
const STRLEN y, /* length of tgt[] */
const SSize_t maxDistance
)
{
item *head = NULL;
UV swapCount,swapScore,targetCharCount,i,j;
UV *s... | 0 | [
"CWE-125"
] | perl5 | 43b2f4ef399e2fd7240b4eeb0658686ad95f8e62 | 330,970,365,130,305,000,000,000,000,000,000,000,000 | 62 | regcomp.c: Convert some strchr to memchr
This allows things to work properly in the face of embedded NULs.
See the branch merge message for more information. |
static VirtioNetRscChain *virtio_net_rsc_lookup_chain(VirtIONet *n,
NetClientState *nc,
uint16_t proto)
{
VirtioNetRscChain *chain;
if ((proto != (uint16_t)ETH_P_IP) && (proto != (uint16_t)ETH_P_IPV6)) {... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 115,282,812,654,953,020,000,000,000,000,000,000,000 | 35 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
sraClipRect2(int *x, int *y, int *x2, int *y2,
int cx, int cy, int cx2, int cy2) {
if (*x < cx)
*x = cx;
if (*y < cy)
*y = cy;
if (*x >= cx2)
*x = cx2-1;
if (*y >= cy2)
*y = cy2-1;
if (*x2 <= cx)
*x2 = cx+1;
if (*y2 <= cy)
*y2 = cy+1;
if (*x2 > cx2)
*x2 = cx2;
if (*y2 > ... | 0 | [
"CWE-476"
] | libvncserver | 38e98ee61d74f5f5ab4aa4c77146faad1962d6d0 | 253,095,548,307,648,770,000,000,000,000,000,000,000 | 20 | libvncserver: add missing NULL pointer checks |
smtp_report_tx_reset(struct smtp_session *s, uint32_t msgid)
{
if (! SESSION_FILTERED(s))
return;
report_smtp_tx_reset("smtp-in", s->id, msgid);
} | 0 | [
"CWE-78",
"CWE-252"
] | src | 9dcfda045474d8903224d175907bfc29761dcb45 | 238,417,734,484,542,100,000,000,000,000,000,000,000 | 7 | Fix a security vulnerability discovered by Qualys which can lead to a
privileges escalation on mbox deliveries and unprivileged code execution
on lmtp deliveries, due to a logic issue causing a sanity check to be
missed.
ok eric@, millert@ |
void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event)
{
struct brcmf_if *ifp;
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
struct brcmf_pub *drvr = bus_if->drvr;
brcmf_dbg(DATA, "Enter: %s: rxp=%p\n", dev_name(dev), skb);
if (brcmf_rx_hdrpull(drvr, skb, &ifp))
return;
if (brcmf_... | 1 | [
"CWE-20"
] | linux | a4176ec356c73a46c07c181c6d04039fafa34a9f | 271,582,910,145,944,160,000,000,000,000,000,000,000 | 21 | brcmfmac: add subtype check for event handling in data path
For USB there is no separate channel being used to pass events
from firmware to the host driver and as such are passed over the
data path. In order to detect mock event messages an additional
check is needed on event subtype. This check is added conditionally... |
xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
int cur, len;
int start = -1;
int end = -1;
if (CUR == '\0') {
ERROR("Expecting ']'");
return;
}
cur = CUR;
if (cur == '\\') {
NEXT;
cur = CUR;
switch (cur) {
case 'n': start = 0xA; break;
case 'r': start = 0xD; break;
... | 1 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 196,571,993,590,706,900,000,000,000,000,000,000,000 | 83 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)
{
return do_pipe2(fildes, flags);
} | 0 | [
"CWE-362"
] | linux | 189b0ddc245139af81198d1a3637cac74f96e13a | 27,237,274,068,113,868,000,000,000,000,000,000,000 | 4 | pipe: Fix missing lock in pipe_resize_ring()
pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to
prevent post_one_notification() from trying to insert into the ring
whilst the ring is being replaced.
The occupancy check must be done after the lock is taken, and the lock
must be taken after the new rin... |
apply_cmdmod(cmdmod_T *cmod)
{
#ifdef HAVE_SANDBOX
if ((cmod->cmod_flags & CMOD_SANDBOX) && !cmod->cmod_did_sandbox)
{
++sandbox;
cmod->cmod_did_sandbox = TRUE;
}
#endif
if (cmod->cmod_verbose > 0)
{
if (cmod->cmod_verbose_save == 0)
cmod->cmod_verbose_save = p_verbose + 1;
p_verbose = cmod... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 166,058,179,750,195,700,000,000,000,000,000,000,000 | 42 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
int tipc_crypto_key_init(struct tipc_crypto *c, struct tipc_aead_key *ukey,
u8 mode, bool master_key)
{
struct tipc_aead *aead = NULL;
int rc = 0;
/* Initiate with the new user key */
rc = tipc_aead_init(&aead, ukey, mode);
/* Attach it to the crypto */
if (likely(!rc)) {
rc = tipc_crypto_key_attach(c, ae... | 0 | [
"CWE-20"
] | linux | fa40d9734a57bcbfa79a280189799f76c88f7bb0 | 56,980,621,520,606,860,000,000,000,000,000,000,000 | 18 | tipc: fix size validations for the MSG_CRYPTO type
The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages
to receive keys from other nodes in the cluster in order to decrypt any
further messages from them.
This patch verifies that any supplied sizes in the message body are
valid for the received message... |
Load_data_outvar *get_load_data_outvar()
{
return this;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 113,894,527,382,861,270,000,000,000,000,000,000,000 | 4 | 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.... |
fr_clipboard_get (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
guint info,
gpointer user_data_or_owner)
{
FrWindow *window = user_data_or_owner;
char *data;
if (gtk_selection_data_get_target (selection_data) != FR_SPECIAL_URI_LIST)
return;
data = get_select... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 128,195,403,340,598,900,000,000,000,000,000,000,000 | 21 | libarchive: sanitize filenames before extracting |
static int ehci_state_fetchsitd(EHCIState *ehci, int async)
{
uint32_t entry;
EHCIsitd sitd;
assert(!async);
entry = ehci_get_fetch_addr(ehci, async);
if (get_dwords(ehci, NLPTR_GET(entry), (uint32_t *)&sitd,
sizeof(EHCIsitd) >> 2) < 0) {
return 0;
}
ehci_trace_s... | 0 | [] | qemu | 791f97758e223de3290592d169f8e6339c281714 | 205,342,562,555,129,670,000,000,000,000,000,000,000 | 25 | usb: ehci: fix memory leak in ehci_init_transfer
In ehci_init_transfer function, if the 'cpage' is bigger than 4,
it doesn't free the 'p->sgl' once allocated previously thus leading
a memory leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog... |
off_t enc_untrusted_lseek(int fd, off_t offset, int whence) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_lseek, fd,
offset, whence);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 161,553,316,585,450,470,000,000,000,000,000,000,000 | 4 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
{
if (group->meth->group_set_curve == 0)
{
ECerr(EC_F_EC_GROUP_SET_CURVE_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
return group->meth->group_set_curve(group, p, a, b, ctx);
} | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 263,346,785,891,699,900,000,000,000,000,000,000,000 | 9 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
xmlGetMaxOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
int min, int max, int def, const char *expected)
{
const xmlChar *val, *cur;
int ret = 0;
xmlAttrPtr attr;
attr = xmlSchemaGetPropNode(node, "maxOccurs");
if (attr == NULL)
return (def);
val = xmlSchemaGetNodeContent(ctxt, (xmlNod... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 305,243,997,853,470,520,000,000,000,000,000,000,000 | 54 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
int ncp_get_directory_info(struct ncp_server* server, __u8 n,
struct ncp_volume_info* target) {
int result;
int len;
ncp_init_request_s(server, 45);
ncp_add_byte(server, n);
if ((result = ncp_request(server, 22)) != 0) {
goto out;
}
target->total_blocks = ncp_reply_dword_lh(server, 0);
target->free_b... | 0 | [
"CWE-119"
] | staging | 4c41aa24baa4ed338241d05494f2c595c885af8f | 84,215,624,838,807,695,000,000,000,000,000,000,000 | 33 | 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... |
dirserv_have_any_microdesc(const smartlist_t *fps)
{
microdesc_cache_t *cache = get_microdesc_cache();
SMARTLIST_FOREACH(fps, const char *, fp,
if (microdesc_cache_lookup_by_digest256(cache, fp))
return 1);
return 0;
} | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 273,859,810,000,047,950,000,000,000,000,000,000,000 | 8 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
cib_ccm_msg_callback(oc_ed_t event, void *cookie, size_t size, const void *data)
{
gboolean update_id = FALSE;
const oc_ev_membership_t *membership = data;
CRM_ASSERT(membership != NULL);
crm_info("Processing CCM event=%s (id=%d)", ccm_event_name(event), membership->m_instance);
if (current_insta... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 301,951,682,564,682,050,000,000,000,000,000,000,000 | 58 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
onig_parse_tree(Node** root, const UChar* pattern, const UChar* end,
regex_t* reg, ScanEnv* env)
{
int r;
UChar* p;
#ifdef USE_CALLOUT
RegexExt* ext;
#endif
names_clear(reg);
scan_env_clear(env);
env->options = reg->options;
env->case_fold_flag = reg->case_fold_flag;
env->enc ... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 194,609,602,944,492,660,000,000,000,000,000,000,000 | 51 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
static void platform_drv_shutdown(struct device *_dev)
{
struct platform_driver *drv = to_platform_driver(_dev->driver);
struct platform_device *dev = to_platform_device(_dev);
if (drv->shutdown)
drv->shutdown(dev);
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 315,983,035,548,186,730,000,000,000,000,000,000,000 | 8 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
bool mysql_test_parse_for_slave(THD *thd, char *rawbuf, uint length)
{
LEX *lex= thd->lex;
bool error= 0;
DBUG_ENTER("mysql_test_parse_for_slave");
Parser_state parser_state;
if (!(error= parser_state.init(thd, rawbuf, length)))
{
lex_start(thd);
thd->reset_for_next_command();
if (!parse_sql(t... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 142,447,705,563,062,760,000,000,000,000,000,000,000 | 20 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static SORT_KEY_BLOCKS *alloc_key_blocks(MI_CHECK *param, uint blocks,
uint buffer_length)
{
reg1 uint i;
SORT_KEY_BLOCKS *block;
DBUG_ENTER("alloc_key_blocks");
if (!(block=(SORT_KEY_BLOCKS*) my_malloc((sizeof(SORT_KEY_BLOCKS)+
buffer_length+IO_SIZE)*blocks,
... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 166,161,434,742,311,270,000,000,000,000,000,000,000 | 21 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
static uint8_t channel_pair_element(NeAACDecStruct *hDecoder, bitfile *ld,
uint8_t channels, uint8_t *tag)
{
ALIGN int16_t spec_data1[1024] = {0};
ALIGN int16_t spec_data2[1024] = {0};
element cpe = {0};
ic_stream *ics1 = &(cpe.ics1);
ic_stream *ics2 = &(cpe.ics2)... | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 135,802,193,814,216,600,000,000,000,000,000,000,000 | 128 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
void cluster_unintern(struct cluster_list *cluster)
{
if (cluster->refcnt)
cluster->refcnt--;
if (cluster->refcnt == 0) {
hash_release(cluster_hash, cluster);
cluster_free(cluster);
}
} | 0 | [
"CWE-20",
"CWE-436"
] | frr | 943d595a018e69b550db08cccba1d0778a86705a | 59,214,677,665,201,960,000,000,000,000,000,000,000 | 10 | bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <lberger@labn.net> |
void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
u32 exit_intr_info, unsigned long exit_qualification)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
/* trying to cancel vmlaunch/vmresume is a bug */
WARN_ON_ONCE(vmx->nested.nested_run_pending);
leave_gues... | 0 | [
"CWE-863"
] | kvm | acff78477b9b4f26ecdf65733a4ed77fe837e9dc | 49,744,348,699,105,230,000,000,000,000,000,000,000 | 143 | KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887)
The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the
x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a
result, we discovered the potential for a buggy or malicious L1 to get
access to L0's x2APIC MSRs, via an L2, as follo... |
ct_error_string (long err)
{
switch (err)
{
case 0: return "okay";
case -1: return "invalid data";
case -8: return "ct error";
case -10: return "transmission error";
case -11: return "memory allocation error";
case -128: return "HTSI error";
default: return "unknown CT-API error";
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 290,602,335,281,830,200,000,000,000,000,000,000,000 | 13 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
winlink_stack_remove(struct winlink_stack *stack, struct winlink *wl)
{
struct winlink *wl2;
if (wl == NULL)
return;
TAILQ_FOREACH(wl2, stack, sentry) {
if (wl2 == wl) {
TAILQ_REMOVE(stack, wl, sentry);
return;
}
}
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 292,050,016,693,482,900,000,000,000,000,000,000,000 | 14 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
static int vivid_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
return 0;
} | 0 | [
"CWE-200"
] | linux-next | eda98796aff0d9bf41094b06811f5def3b4c333c | 100,650,961,489,204,040,000,000,000,000,000,000,000 | 4 | [media] media/vivid-osd: fix info leak in ioctl
The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of
struct fb_vblank after the ->hcount member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Salva Peiró <speirofr@gmail.com>
Signed-off-by: Hans Verkuil... |
zzip_mem_disk_fdopen(int fd)
{
ZZIP_DISK *disk = zzip_disk_mmap(fd);
if (! disk)
{
debug2("can not open disk fd %i", fd);
return 0;
}
___ ZZIP_MEM_DISK *dir = zzip_mem_disk_new();
zzip_mem_disk_load(dir, disk);
return dir;
____;
} | 1 | [] | zziplib | 72ec933663f738d8e166979aa7fd5590b2104a07 | 36,708,080,456,019,545,000,000,000,000,000,000,000 | 13 | need to check on endbuf for stored files #15 |
int ssl3_get_server_done(SSL *s)
{
int ok, ret = 0;
long n;
/* Second to last param should be very small, like 0 :-) */
n = s->method->ssl_get_message(s,
SSL3_ST_CR_SRVR_DONE_A,
SSL3_ST_CR_SRVR_DONE_B,
... | 0 | [
"CWE-310"
] | openssl | 63830384e90d9b36d2793d4891501ec024827433 | 63,530,359,408,585,540,000,000,000,000,000,000,000 | 23 | client: reject handshakes with DH parameters < 768 bits.
Since the client has no way of communicating her supported parameter
range to the server, connections to servers that choose weak DH will
simply fail.
Reviewed-by: Kurt Roeckx <kurt@openssl.org> |
char *mnt_fs_get_vfs_options_all(struct libmnt_fs *fs)
{
const struct libmnt_optmap *map = mnt_get_builtin_optmap(MNT_LINUX_MAP);
const struct libmnt_optmap *ent;
const char *opts = mnt_fs_get_options(fs);
char *result = NULL;
unsigned long flags = 0;
if (!opts || mnt_optstr_get_flags(opts, &flags, map))
retur... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 42,903,738,322,395,460,000,000,000,000,000,000,000 | 23 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static void call_trans2setfsinfo(connection_struct *conn,
struct smb_request *req,
char **pparams, int total_params,
char **ppdata, int total_data,
unsigned int max_data_bytes)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
struct smbXsrv_connection *xconn = re... | 0 | [
"CWE-787"
] | samba | 22b4091924977f6437b59627f33a8e6f02b41011 | 4,853,266,663,165,331,000,000,000,000,000,000,000 | 204 | CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs
This is an internal xattr that should not be user visible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static inline int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc)
{
return -EOPNOTSUPP;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 293,504,869,468,623,100,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... |
void set_pfnblock_flags_mask(struct page *page, unsigned long flags,
unsigned long pfn,
unsigned long end_bitidx,
unsigned long mask)
{
unsigned long *bitmap;
unsigned long bitidx, word_bitidx;
unsigned long old_word, word;
BUILD_BUG_ON(NR_PAGEBLOCK_BITS != 4);
bitmap = get_pageblock_bitmap(page, ... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 190,512,676,998,026,600,000,000,000,000,000,000,000 | 30 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.