func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void ql_get_phy_owner(struct ql3_adapter *qdev)
{
if (ql_this_adapter_controls_port(qdev))
set_bit(QL_LINK_MASTER, &qdev->flags);
else
clear_bit(QL_LINK_MASTER, &qdev->flags);
} | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 34,416,389,067,066,257,000,000,000,000,000,000,000 | 7 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
int __tlb_remove_page(struct mmu_gather *tlb, struct page *page)
{
struct mmu_gather_batch *batch;
VM_BUG_ON(!tlb->need_flush);
if (tlb_fast_mode(tlb)) {
free_page_and_swap_cache(page);
return 1; /* avoid calling tlb_flush_mmu() */
}
batch = tlb->active;
batch->pages[batch->nr++] = page;
if (batch->nr == ... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 145,837,758,820,207,970,000,000,000,000,000,000,000 | 22 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static void domain_remove_dev_info(struct dmar_domain *domain)
{
struct device_domain_info *info, *tmp;
unsigned long flags;
spin_lock_irqsave(&device_domain_lock, flags);
list_for_each_entry_safe(info, tmp, &domain->devices, link)
__dmar_remove_one_dev_info(info);
spin_unlock_irqrestore(&device_domain_lock, fl... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 297,276,801,379,305,260,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 void dcc_ctcp_redirect(CHAT_DCC_REC *dcc, const char *msg)
{
g_return_if_fail(msg != NULL);
g_return_if_fail(IS_DCC_CHAT(dcc));
signal_emit("ctcp msg dcc", 6, dcc->server, msg,
dcc->nick, "dcc", dcc->mynick, dcc);
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 165,797,335,201,062,500,000,000,000,000,000,000,000 | 8 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr, gfp_t gfp)
{
____ip_mc_inc_group(in_dev, addr, MCAST_EXCLUDE, gfp);
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 108,586,640,765,581,080,000,000,000,000,000,000,000 | 4 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
RPathCommand* Binary::rpath() {
return command<RPathCommand>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 267,805,580,858,541,060,000,000,000,000,000,000,000 | 3 | Resolve #764 |
static int handle_vmcall(struct kvm_vcpu *vcpu)
{
skip_emulated_instruction(vcpu);
kvm_emulate_hypercall(vcpu);
return 1;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 110,245,085,973,401,900,000,000,000,000,000,000,000 | 6 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
static __be32 cma_get_roce_udp_flow_label(struct rdma_id_private *id_priv)
{
struct sockaddr_in6 *addr6;
u16 dport, sport;
u32 hash, fl;
addr6 = (struct sockaddr_in6 *)cma_src_addr(id_priv);
fl = be32_to_cpu(addr6->sin6_flowinfo) & IB_GRH_FLOWLABEL_MASK;
if ((cma_family(id_priv) != AF_INET6) || !fl) {
dport = ... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 56,774,532,651,803,730,000,000,000,000,000,000,000 | 17 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
static const char * getPCPOpCodeStr(uint8_t opcode)
{
switch(opcode) {
case PCP_OPCODE_ANNOUNCE:
return "ANNOUNCE";
case PCP_OPCODE_MAP:
return "MAP";
case PCP_OPCODE_PEER:
return "PEER";
#ifdef PCP_SADSCP
case PCP_OPCODE_SADSCP:
return "SADSCP";
#endif /* PCP_SADSCP */
default:
return "UNKNOWN";
}
} | 0 | [
"CWE-476"
] | miniupnp | cb8a02af7a5677cf608e86d57ab04241cf34e24f | 41,978,211,609,233,120,000,000,000,000,000,000,000 | 17 | pcpserver.c: copyIPv6IfDifferent() check for NULL src argument |
R_API char *r_bin_java_get_this_class_name(RBinJavaObj *bin) {
return (bin->cf2.this_class_name ? strdup (bin->cf2.this_class_name) : strdup ("unknown"));
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 262,972,355,321,720,850,000,000,000,000,000,000,000 | 3 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
pkinit_get_certs_pkcs11(krb5_context context,
pkinit_plg_crypto_context plg_cryptoctx,
pkinit_req_crypto_context req_cryptoctx,
pkinit_identity_opts *idopts,
pkinit_identity_crypto_context id_cryptoctx,
... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 34,141,481,220,912,274,000,000,000,000,000,000,000 | 201 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
static int ucma_connect_event_handler(struct rdma_cm_id *cm_id,
struct rdma_cm_event *event)
{
struct ucma_context *listen_ctx = cm_id->context;
struct ucma_context *ctx;
struct ucma_event *uevent;
if (!atomic_add_unless(&listen_ctx->backlog, -1, 0))
return -ENOMEM;
ctx = ucma_alloc_ctx(listen_ctx->fi... | 0 | [
"CWE-416"
] | linux | f5449e74802c1112dea984aec8af7a33c4516af1 | 294,067,606,161,582,600,000,000,000,000,000,000,000 | 37 | RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy
ucma_destroy_id() assumes that all things accessing the ctx will do so via
the xarray. This assumption violated only in the case the FD is being
closed, then the ctx is reached via the ctx_list. Normally this is OK
since ucma_destroy_id() cannot run concu... |
tty_puts(struct tty *tty, const char *s)
{
if (*s != '\0')
tty_add(tty, s, strlen(s));
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 179,033,904,436,865,460,000,000,000,000,000,000,000 | 5 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
message_send_groupchat(const char *const roomjid, const char *const msg, const char *const oob_url)
{
xmpp_ctx_t * const ctx = connection_get_ctx();
char *id = create_unique_id("muc");
xmpp_stanza_t *message = xmpp_message_new(ctx, STANZA_TYPE_GROUPCHAT, roomjid, id);
xmpp_message_set_body(message, msg... | 0 | [
"CWE-20",
"CWE-346"
] | profanity | 8e75437a7e43d4c55e861691f74892e666e29b0b | 128,455,643,236,046,060,000,000,000,000,000,000,000 | 17 | Add carbons from check |
gs_heap_unregister_root(gs_memory_t * mem, gs_gc_root_t * rp,
client_name_t cname)
{
} | 0 | [] | ghostpdl | 0c0b0859ae1aba64861599f0e7f74f143f305932 | 38,165,614,318,274,640,000,000,000,000,000,000,000 | 4 | Bug 696041: sanity check for memory allocation.
In gs_heap_alloc_bytes(), add a sanity check to ensure we don't overflow the
variable holding the actual number of bytes we allocate.
No cluster differences |
void t_go_generator::generate_isset_helpers(ofstream& out,
t_struct* tstruct,
const string& tstruct_name,
bool is_result) {
(void)is_result;
const vector<t_field*>& fields = tstruct->g... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 258,301,482,014,531,000,000,000,000,000,000,000,000 | 35 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
static enum_func_status
MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory,
MYSQLND_ERROR_INFO * const error_info,
MYSQLND_UPSERT_STATUS * const upsert_status,
const zend_bool ignore_upsert_status, /* actually used ... | 0 | [
"CWE-120"
] | php-src | 58006537fc5f133ae8549efe5118cde418b3ace9 | 292,596,511,464,390,700,000,000,000,000,000,000,000 | 51 | Fix bug #81719: mysqlnd/pdo password buffer overflow |
int kvm_emulate_ap_reset_hold(struct kvm_vcpu *vcpu)
{
int ret = kvm_skip_emulated_instruction(vcpu);
return __kvm_emulate_halt(vcpu, KVM_MP_STATE_AP_RESET_HOLD,
KVM_EXIT_AP_RESET_HOLD) && ret;
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 339,602,976,348,033,160,000,000,000,000,000,000,000 | 7 | 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... |
inline void set_max_sum_func_level(THD *thd, SELECT_LEX *select)
{
if (thd->lex->in_sum_func &&
thd->lex->in_sum_func->nest_level >= select->nest_level)
set_if_bigger(thd->lex->in_sum_func->max_sum_func_level,
select->nest_level - 1);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 165,223,216,204,973,750,000,000,000,000,000,000,000 | 7 | 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. |
static void cma_release_dev(struct rdma_id_private *id_priv)
{
mutex_lock(&lock);
list_del(&id_priv->list);
cma_dev_put(id_priv->cma_dev);
id_priv->cma_dev = NULL;
id_priv->id.device = NULL;
if (id_priv->id.route.addr.dev_addr.sgid_attr) {
rdma_put_gid_attr(id_priv->id.route.addr.dev_addr.sgid_attr);
id_priv-... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 88,199,980,978,759,700,000,000,000,000,000,000,000 | 13 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie)
{
qemu_mutex_lock(&qxl->ssd.lock);
trace_qxl_render_update_area_done(cookie);
qemu_bh_schedule(qxl->update_area_bh);
qxl->render_update_cookie_num--;
qemu_mutex_unlock(&qxl->ssd.lock);
g_free(cookie);
} | 0 | [] | qemu | 9569f5cb5b4bffa9d3ebc8ba7da1e03830a9a895 | 275,999,419,891,723,300,000,000,000,000,000,000,000 | 9 | display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)
Avoid fetching 'width' and 'height' a second time to prevent possible
race condition. Refer to security advisory
https://starlabs.sg/advisories/22-4207/ for more information.
Fixes: CVE-2021-4207
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat... |
ExecContext *unit_get_exec_context(Unit *u) {
size_t offset;
assert(u);
if (u->type < 0)
return NULL;
offset = UNIT_VTABLE(u)->exec_context_offset;
if (offset <= 0)
return NULL;
return (ExecContext*) ((uint8_t*) u + offset);
} | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 192,720,870,698,862,440,000,000,000,000,000,000,000 | 13 | 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... |
void i8042_lock_chip(void)
{
mutex_lock(&i8042_mutex);
} | 0 | [
"CWE-476"
] | linux | 340d394a789518018f834ff70f7534fc463d3226 | 93,500,429,531,565,990,000,000,000,000,000,000,000 | 4 | Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_int... |
list_file (struct cpio_file_stat* file_hdr, int in_file_des)
{
if (verbose_flag)
{
#ifdef CP_IFLNK
if ((file_hdr->c_mode & CP_IFMT) == CP_IFLNK)
{
if (archive_format != arf_tar && archive_format != arf_ustar)
{
char *link_name = get_link_name (file_hdr, in_file_des);
if (link_name)
... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 57,766,514,191,557,180,000,000,000,000,000,000,000 | 49 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
MagickExport size_t GetMaxMemoryRequest(void)
{
#define MinMemoryRequest "16MiB"
if (max_memory_request == 0)
{
char
*value;
max_memory_request=(size_t) MagickULLConstant(~0);
value=GetPolicyValue("system:max-memory-request");
if (value != (char *) NULL)
{
/*
... | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 327,104,409,273,225,650,000,000,000,000,000,000,000 | 23 | possible divide by zero + clear buffers |
CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
{
cJSON *raw_item = cJSON_CreateRaw(raw);
if (add_item_to_object(object, name, raw_item, &global_hooks, false))
{
return raw_item;
}
cJSON_Delete(raw_item);
return NULL;
} | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 272,355,959,772,531,050,000,000,000,000,000,000,000 | 11 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
static void pi_post_block(struct kvm_vcpu *vcpu)
{
struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
struct pi_desc old, new;
unsigned int dest;
unsigned long flags;
if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
!irq_remapping_cap(IRQ_POSTING_CAP) ||
!kvm_vcpu_apicv_active(vcpu))
return;
do {
old.cont... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 335,671,201,699,647,070,000,000,000,000,000,000,000 | 41 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
_outIntoClause(StringInfo str, const IntoClause *node)
{
WRITE_NODE_TYPE("INTOCLAUSE");
WRITE_NODE_FIELD(rel);
WRITE_NODE_FIELD(colNames);
WRITE_NODE_FIELD(options);
WRITE_ENUM_FIELD(onCommit, OnCommitAction);
WRITE_STRING_FIELD(tableSpaceName);
WRITE_NODE_FIELD(viewQuery);
WRITE_BOOL_FIELD(skipData);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 61,375,024,957,171,260,000,000,000,000,000,000,000 | 12 | 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... |
pixFillMapHoles(PIX *pix,
l_int32 nx,
l_int32 ny,
l_int32 filltype)
{
l_int32 w, h, y, nmiss, goodcol, i, j, found, ival, valtest;
l_uint32 val, lastval;
NUMA *na; /* indicates if there is any data in the column */
PROCNAME("pixFillMapHoles");
if ... | 0 | [
"CWE-125"
] | leptonica | 3c18c43b6a3f753f0dfff99610d46ad46b8bfac4 | 178,690,173,702,785,800,000,000,000,000,000,000,000 | 90 | Fixing oss-fuzz issue 22512: Heap-buffer-overflow in rasteropGeneralLow()
* Simplified the hole-filling function
` |
static void LogPathInfo(const PathInfo *path_info)
{
register const PathInfo
*p;
(void) LogMagickEvent(DrawEvent,GetMagickModule()," begin vector-path");
for (p=path_info; p->code != EndCode; p++)
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
" %g,%g %s",p->point.x,p->point.y,p->code =... | 0 | [
"CWE-416"
] | ImageMagick | ecf7c6b288e11e7e7f75387c5e9e93e423b98397 | 3,458,046,932,491,367,000,000,000,000,000,000,000 | 14 | ... |
static int jpc_encrawrefpass(jpc_bitstream_t *out, int bitpos, int vcausalflag, jas_matrix_t *flags,
jas_matrix_t *data, int term, long *nmsedec)
{
int i;
int j;
int k;
int one;
int vscanlen;
int width;
int height;
int frowstep;
int drowstep;
int fstripestep;
int dstripestep;
jpc_fix_t *fstripestart;
jpc... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 109,937,138,750,337,750,000,000,000,000,000,000,000 | 76 | 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... |
struct sc_card_driver * sc_get_muscle_driver(void)
{
return sc_get_driver();
} | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 278,410,266,492,701,840,000,000,000,000,000,000,000 | 4 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
static int raw_init(struct sock *sk)
{
struct raw_sock *rp = raw_sk(sk);
if (inet_sk(sk)->inet_num == IPPROTO_ICMP)
memset(&rp->filter, 0, sizeof(rp->filter));
return 0;
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 74,733,966,713,948,905,000,000,000,000,000,000,000 | 8 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
bool Utility::UnZip(const QString &zippath, const QString &destpath)
{
int res = 0;
QDir dir(destpath);
if (!cp437) {
cp437 = new QCodePage437Codec();
}
#ifdef Q_OS_WIN32
zlib_filefunc64_def ffunc;
fill_win32_filefunc64W(&ffunc);
unzFile zfile = unzOpen2_64(Utility::QStringToStdWStri... | 0 | [
"CWE-22"
] | Sigil | 0979ba8d10c96ebca330715bfd4494ea0e019a8f | 293,725,010,701,499,600,000,000,000,000,000,000,000 | 146 | harden plugin unzipping to zip-slip attacks |
static void copy_peercred(struct sock *sk, struct sock *peersk)
{
put_pid(sk->sk_peer_pid);
if (sk->sk_peer_cred)
put_cred(sk->sk_peer_cred);
sk->sk_peer_pid = get_pid(peersk->sk_peer_pid);
sk->sk_peer_cred = get_cred(peersk->sk_peer_cred);
} | 1 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 180,022,557,266,429,700,000,000,000,000,000,000,000 | 8 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
is_global_option(int opt_idx)
{
return options[opt_idx].indir == PV_NONE;
} | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 154,062,490,729,275,950,000,000,000,000,000,000,000 | 4 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
static float powf64(float a, float b)
{
return powf_lim(a,b,64.f);
} | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 302,711,429,742,399,900,000,000,000,000,000,000,000 | 4 | fixed two more problems found by fuzzer |
TEST_F(AsStringGraphTest, FillWithChar4) {
Status s = Init(DT_INT32, /*fill=*/"n");
ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
ASSERT_TRUE(
absl::StrContains(s.error_message(), "Fill argument not supported"));
} | 0 | [
"CWE-20",
"CWE-134",
"CWE-703"
] | tensorflow | 33be22c65d86256e6826666662e40dbdfe70ee83 | 164,080,709,848,525,270,000,000,000,000,000,000,000 | 6 | 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... |
find_pipeline (pid, alive_only, jobp)
pid_t pid;
int alive_only;
int *jobp; /* index into jobs list or NO_JOB */
{
int job;
PROCESS *p;
/* See if this process is in the pipeline that we are building. */
if (jobp)
*jobp = NO_JOB;
if (the_pipeline)
{
p = the_pipeline;
do
{
... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 185,362,376,833,257,620,000,000,000,000,000,000,000 | 44 | bash-4.4-rc2 release |
term_get_status_text(term_T *term)
{
if (term->tl_status_text == NULL)
{
char_u *txt;
size_t len;
if (term->tl_normal_mode)
{
if (term_job_running(term))
txt = (char_u *)_("Terminal");
else
txt = (char_u *)_("Terminal-finished");
}
else if (term->tl_title != NULL)
txt = term->tl_title;... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 290,433,208,575,928,230,000,000,000,000,000,000,000 | 30 | 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. |
void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes)
{
char *outbuf;
if (!create_outbuf(req, req, (char *)req->inbuf, &outbuf, num_words,
num_bytes)) {
smb_panic("could not allocate output buffer\n");
}
req->outbuf = (uint8_t *)outbuf;
} | 0 | [] | samba | 25452a2268ac7013da28125f3df22085139af12d | 171,728,116,103,926,720,000,000,000,000,000,000,000 | 9 | s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.
Thanks!
Volker |
pdf14_output_page(gx_device * dev, int num_copies, int flush)
{
pdf14_device * pdev = (pdf14_device *)dev;
if (pdev->target != NULL)
return (*dev_proc(pdev->target, output_page)) (pdev->target, num_copies, flush);
return 0;
} | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 27,626,004,915,579,717,000,000,000,000,000,000,000 | 8 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
ByteVector &ByteVector::operator=(const char *data)
{
*this = ByteVector(data);
return *this;
} | 0 | [
"CWE-189"
] | taglib | dcdf4fd954e3213c355746fa15b7480461972308 | 299,953,218,619,961,750,000,000,000,000,000,000,000 | 5 | Avoid uint overflow in case the length + index is over UINT_MAX |
void BMK_SetBlocksize(int bsize)
{
chunkSize = bsize;
DISPLAY("-Using Block Size of %i KB-\n", chunkSize>>10);
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 238,814,491,289,838,700,000,000,000,000,000,000,000 | 5 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static struct hid_report *hid_get_report(struct hid_report_enum *report_enum,
const u8 *data)
{
struct hid_report *report;
unsigned int n = 0; /* Normally report number is 0 */
/* Device uses numbered reports, data[0] is report number */
if (report_enum->numbered)
n = *data;
report = report_enum->report_id_h... | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 189,940,109,977,836,360,000,000,000,000,000,000,000 | 16 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
user_to_context_sseu(struct drm_i915_private *i915,
const struct drm_i915_gem_context_param_sseu *user,
struct intel_sseu *context)
{
const struct sseu_dev_info *device = &RUNTIME_INFO(i915)->sseu;
/* No zeros in any field. */
if (!user->slice_mask || !user->subslice_mask ||
!user->min_eus_per_su... | 0 | [
"CWE-416"
] | linux | 7dc40713618c884bf07c030d1ab1f47a9dc1f310 | 279,082,238,304,489,400,000,000,000,000,000,000,000 | 96 | drm/i915: Introduce a mutex for file_priv->context_idr
Define a mutex for the exclusive use of interacting with the per-file
context-idr, that was previously guarded by struct_mutex. This allows us
to reduce the coverage of struct_mutex, with a view to removing the last
bits coordinating GEM context later. (In the sho... |
static TT_F26Dot6 Round_Up_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 63) & (-64);
if ( val < 0 )
val = 0;
}
els... | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 245,220,668,706,223,170,000,000,000,000,000,000,000 | 21 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
replace_delete_single_character(PyBytesObject *self,
char from_c, Py_ssize_t maxcount)
{
char *self_s, *result_s;
char *start, *next, *end;
Py_ssize_t self_len, result_len;
Py_ssize_t count;
PyBytesObject *result;
self_len = PyBytes_GET_SIZE(self);
self_s = P... | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 240,247,955,888,113,000,000,000,000,000,000,000,000 | 39 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
CImg<Tfloat> get_distance_eikonal(const unsigned int nb_iterations, const float band_size=0,
const float time_step=0.5f) const {
return CImg<Tfloat>(*this,false).distance_eikonal(nb_iterations,band_size,time_step);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 30,290,707,513,623,950,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. |
read_in_new_ascii (struct cpio_file_stat *file_hdr, int in_des)
{
struct new_ascii_header ascii_header;
tape_buffered_read (ascii_header.c_ino, in_des,
sizeof ascii_header - sizeof ascii_header.c_magic);
file_hdr->c_ino = FROM_HEX (ascii_header.c_ino);
file_hdr->c_mode = FROM_HEX (ascii_header.c_mode)... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 281,326,647,813,599,850,000,000,000,000,000,000,000 | 26 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
part_write_bodystructure_siblings(const struct message_part *part,
string_t *dest, bool extended)
{
for (; part != NULL; part = part->next) {
str_append_c(dest, '(');
imap_bodystructure_write(part, dest, extended);
str_append_c(dest, ')');
}
} | 0 | [
"CWE-20"
] | core | 266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19 | 168,209,437,827,606,120,000,000,000,000,000,000,000 | 9 | lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit
If the last MIME part was message/rfc822 and its child was truncated away,
BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by
writing empty dummy ones. |
R_API bool r_cmd_parsed_args_setargs(RCmdParsedArgs *a, int n_args, char **args) {
r_return_val_if_fail (a && a->argv && a->argv[0], false);
char **tmp = R_NEWS0 (char *, n_args + 1);
if (!tmp) {
return false;
}
tmp[0] = strdup (a->argv[0]);
int i;
for (i = 1; i < n_args + 1; i++) {
tmp[i] = strdup (args[i -... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 175,071,927,972,270,100,000,000,000,000,000,000,000 | 22 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
switch (req->opcode) {
case IORING_OP_NOP:
return 0;
case IORING_OP_READV:
case IORING_OP_READ_FIXED:
case IORING_OP_READ:
return io_read_prep(req, sqe);
case IORING_OP_WRITEV:
case IORING_OP_WRITE_FIXED:
case IORING_OP_WRITE:
... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 43,471,782,578,356,320,000,000,000,000,000,000,000 | 77 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static int drm_mode_attachmode(struct drm_device *dev,
struct drm_connector *connector,
struct drm_display_mode *mode)
{
int ret = 0;
list_add_tail(&mode->head, &connector->user_modes);
return ret;
} | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 240,755,201,725,943,400,000,000,000,000,000,000,000 | 9 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
int ssl3_get_client_key_exchange(SSL *s)
{
int i,al,ok;
long n;
unsigned long alg_k;
unsigned char *p;
#ifndef OPENSSL_NO_RSA
RSA *rsa=NULL;
EVP_PKEY *pkey=NULL;
#endif
#ifndef OPENSSL_NO_DH
BIGNUM *pub=NULL;
DH *dh_srvr;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifndef ... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 61,861,930,192,330,360,000,000,000,000,000,000,000 | 777 | Add SRP support. |
int qcow2_read_snapshots(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshotHeader h;
QCowSnapshotExtraData extra;
QCowSnapshot *sn;
int i, id_str_size, name_size;
int64_t offset;
uint32_t extra_data_size;
int ret;
if (!s->nb_snapshots) {
s->snapshots = NULL;... | 0 | [
"CWE-119"
] | qemu | c05e4667be91b46ab42b5a11babf8e84d476cc6b | 235,688,848,308,984,500,000,000,000,000,000,000,000 | 85 | qcow2: Fix L1 allocation size in qcow2_snapshot_load_tmp() (CVE-2014-0145)
For the L1 table to loaded for an internal snapshot, the code allocated
only enough memory to hold the currently active L1 table. If the
snapshot's L1 table is actually larger than the current one, this leads
to a buffer overflow.
Signed-off-b... |
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_FILE(
FLAC__StreamDecoder *decoder,
FILE *file,
FLAC__StreamDecoderWriteCallback write_callback,
FLAC__StreamDecoderMetadataCallback metadata_callback,
FLAC__StreamDecoderErrorCallback error_callback,
void *client_data
)
{
return init_FILE_inte... | 0 | [
"CWE-119"
] | flac | 5b3033a2b355068c11fe637e14ac742d273f076e | 144,749,327,442,196,990,000,000,000,000,000,000,000 | 11 | src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.
Reported-by: Michele Spagnuolo,
Google Security Team <mikispag@google.com> |
static int io_alloc_async_ctx(struct io_kiocb *req)
{
if (!io_op_defs[req->opcode].async_ctx)
return 0;
req->io = kmalloc(sizeof(*req->io), GFP_KERNEL);
return req->io == NULL;
} | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 140,381,671,947,342,280,000,000,000,000,000,000,000 | 7 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
int ssl3_do_write(SSL *s, int type)
{
int ret;
ret = ssl3_write_bytes(s, type, &s->init_buf->data[s->init_off],
s->init_num);
if (ret < 0)
return (-1);
if (type == SSL3_RT_HANDSHAKE)
/*
* should not be done for 'Hello Request's, but in that case we'll... | 0 | [
"CWE-125"
] | openssl | bb1a4866034255749ac578adb06a76335fc117b1 | 320,799,517,605,755,470,000,000,000,000,000,000,000 | 27 | Make message buffer slightly larger than message.
Grow TLS/DTLS 16 bytes more than strictly necessary as a precaution against
OOB reads. In most cases this will have no effect because the message buffer
will be large enough already.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 006a788c84e54... |
PHPAPI zend_string* php_swoole_serialize(zval *zvalue)
{
seriaString str;
swoole_string_new(SERIA_SIZE, &str, Z_TYPE_P(zvalue));
swoole_seria_dispatch(&str, zvalue); //serialize into a string
zend_string *z_str = (zend_string *) str.buffer;
z_str->len = str.offset - _STR_HEADER_SIZE;
z_str->va... | 0 | [
"CWE-200",
"CWE-502"
] | swoole-src | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | 77,314,618,603,077,510,000,000,000,000,000,000,000 | 16 | add buffer end check |
static int memory_access_size(MemoryRegion *mr, unsigned l, hwaddr addr)
{
unsigned access_size_max = mr->ops->valid.max_access_size;
/* Regions are assumed to support 1-4 byte accesses unless
otherwise specified. */
if (access_size_max == 0) {
access_size_max = 4;
}
/* Bound the m... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 2,367,026,194,864,668,800,000,000,000,000,000,000 | 26 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
RestorePosRendition()
{
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
LSetRendition(&curr->w_layer, &curr->w_rend);
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 255,195,740,984,009,250,000,000,000,000,000,000,000 | 5 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
load_xwd_f2_d16_b16 (const gchar *filename,
FILE *ifp,
L_XWDFILEHEADER *xwdhdr,
L_XWDCOLOR *xwdcolmap)
{
register guchar *dest, lsbyte_first;
gint width, height, linepad, i, j, c0, c1, ncols;
gint red, green... | 0 | [
"CWE-787"
] | gimp | 0b35f6a082a0b3c372c568ea6bde39a4796acde2 | 201,332,768,364,776,760,000,000,000,000,000,000,000 | 153 | Bug 687392 - Memory corruption vulnerability when reading XWD files
Applied and enhanced patch from andres which makes file-xwd detect
this kind of file corruption and abort loading with an error message. |
void ZlibDecompressorImpl::chargeErrorStats(const int result) {
switch (result) {
case Z_ERRNO:
stats_.zlib_errno_.inc();
break;
case Z_STREAM_ERROR:
stats_.zlib_stream_error_.inc();
break;
case Z_DATA_ERROR:
stats_.zlib_data_error_.inc();
break;
case Z_MEM_ERROR:
stats_.zlib_mem_e... | 0 | [] | envoy | cb4ef0b09200c720dfdb07e097092dd105450343 | 90,598,648,886,840,030,000,000,000,000,000,000,000 | 22 | decompressors: stop decompressing upon excessive compression ratio (#733)
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Co-authored-by: Ryan Hamilton <rch@google.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
getkey_next (getkey_ctx_t ctx, PKT_public_key *pk, kbnode_t *ret_keyblock)
{
int rc; /* Fixme: Make sure this is proper gpg_error */
/* We need to disable the caching so that for an exact key search we
won't get the result back from the cache and thus end up in an
endless loop. Disabling this here is s... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 35,708,842,020,718,430,000,000,000,000,000,000,000 | 16 | 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 ... |
sub_append_number (number, target, indx, size)
intmax_t number;
int *indx, *size;
char *target;
{
char *temp;
temp = itos (number);
return (sub_append_string (temp, target, indx, size));
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 321,177,006,198,531,900,000,000,000,000,000,000,000 | 10 | bash-4.4-rc2 release |
int main(int argc, char* argv[])
{
whoami = QUtil::getWhoami(argv[0]);
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{
usage();
}
char const* filename = argv[1];
try
{
create_pdf(filename);
}
catch (std::exception& ... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 321,986,204,608,353,700,000,000,000,000,000,000,000 | 27 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int cdrom_media_erasable(struct cdrom_device_info *cdi)
{
disc_information di;
int ret;
ret = cdrom_get_disc_info(cdi, &di);
if (ret < 0 || ret < offsetof(typeof(di), n_first_track))
return -1;
return di.erasable;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 260,219,370,294,195,300,000,000,000,000,000,000,000 | 11 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
static freelist_idx_t next_random_slot(union freelist_init_state *state)
{
return (state->list[state->pos++] + state->rand) % state->count;
} | 1 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 173,702,920,401,337,650,000,000,000,000,000,000,000 | 4 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
static enum test_return test_binary_getq_impl(const char *key, uint8_t cmd) {
const char *missing = "test_binary_getq_missing";
union {
protocol_binary_request_no_extras request;
protocol_binary_response_no_extras response;
char bytes[1024];
} send, temp, receive;
size_t len = st... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 25,728,482,100,822,308,000,000,000,000,000,000,000 | 35 | Issue 102: Piping null to the server will crash it |
int samdb_find_or_add_attribute(struct ldb_context *ldb, struct ldb_message *msg, const char *name, const char *set_value)
{
return samdb_find_or_add_attribute_ex(ldb, msg, name, set_value, LDB_FLAG_MOD_ADD, NULL);
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 264,251,158,473,353,330,000,000,000,000,000,000,000 | 4 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static int crypto_cbcmac_digest_update(struct shash_desc *pdesc, const u8 *p,
unsigned int len)
{
struct crypto_shash *parent = pdesc->tfm;
struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent);
struct cbcmac_desc_ctx *ctx = shash_desc_ctx(pdesc);
struct crypto_cipher *tfm = tctx->child;
int bs = crypt... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3b30460c5b0ed762be75a004e924ec3f8711e032 | 3,195,556,456,109,453,000,000,000,000,000,000,000 | 26 | crypto: ccm - move cbcmac input off the stack
Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver")
refactored the CCM driver to allow separate implementations of the
underlying MAC to be provided by a platform. However, in doing so, it
moved some data from the linear region to the stack, which violat... |
static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key)
{
return __htab_lru_map_lookup_elem(map, key, true);
} | 0 | [
"CWE-787"
] | bpf | c4eb1f403243fc7bbb7de644db8587c03de36da6 | 121,375,910,508,297,280,000,000,000,000,000,000,000 | 4 | bpf: Fix integer overflow involving bucket_size
In __htab_map_lookup_and_delete_batch(), hash buckets are iterated
over to count the number of elements in each bucket (bucket_size).
If bucket_size is large enough, the multiplication to calculate
kvmalloc() size could overflow, resulting in out-of-bounds write
as repor... |
static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS)
{
zval *SIM;
gdImagePtr im_src;
long brightness, tmp;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zll", &SIM, &tmp, &brightness) == FAILURE) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(im_src, gdImagePtr, &SIM, -1, "Image", le_gd);
if... | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 109,832,114,533,883,220,000,000,000,000,000,000,000 | 22 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
static int xennet_set_features(struct net_device *dev,
netdev_features_t features)
{
if (!(features & NETIF_F_SG) && dev->mtu > ETH_DATA_LEN) {
netdev_info(dev, "Reducing MTU because no SG offload");
dev->mtu = ETH_DATA_LEN;
}
return 0;
} | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 327,985,815,897,472,130,000,000,000,000,000,000,000 | 10 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
connect_with_timeout (assuan_fd_t sock,
struct sockaddr *addr, int addrlen,
unsigned int timeout)
{
gpg_error_t err;
int syserr;
socklen_t slen;
fd_set rset, wset;
struct timeval tval;
int n;
#ifndef HAVE_W32_SYSTEM
int oflags;
# define RESTORE_BLOCKING() do {... | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 232,748,332,033,610,100,000,000,000,000,000,000,000 | 108 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
unsigned long long blkid_partition_get_flags(blkid_partition par)
{
return par->flags;
} | 0 | [] | util-linux | 50d1594c2e6142a3b51d2143c74027480df082e0 | 68,236,339,347,655,360,000,000,000,000,000,000,000 | 4 | libblkid: avoid non-empty recursion in EBR
This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f.
We also need to detect non-empty recursion in the EBR chain. It's
possible to create standard valid logical partitions and in the last one
points back to the EBR chain. In this case all offsets will be ... |
static int ocfs2_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
int ret;
struct inode *inode = mapping->host;
ret = ocfs2_write_end_nolock(mapping, pos, len, copied, page, fsdata);
up_write(&OCFS2_I(inode)->ip_a... | 0 | [
"CWE-20"
] | linux-2.6 | 272b62c1f0f6f742046e45b50b6fec98860208a0 | 267,736,634,772,302,920,000,000,000,000,000,000,000 | 14 | Treat writes as new when holes span across page boundaries
When a hole spans across page boundaries, the next write forces
a read of the block. This could end up reading existing garbage
data from the disk in ocfs2_map_page_blocks. This leads to
non-zero holes. In order to avoid this, mark the writes as new
when the h... |
is_dbus_method_call (Header *header)
{
return
is_for_bus (header) &&
header->type == G_DBUS_MESSAGE_TYPE_METHOD_CALL &&
g_strcmp0 (header->interface, "org.freedesktop.DBus") == 0;
} | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 189,401,878,709,827,360,000,000,000,000,000,000,000 | 7 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
cib_remote_signon(cib_t * cib, const char *name, enum cib_conn_type type)
{
int rc = pcmk_ok;
cib_remote_opaque_t *private = cib->variant_opaque;
if (private->passwd == NULL) {
struct termios settings;
int rc;
rc = tcgetattr(0, &settings);
settings.c_lflag &= ~ECHO;
... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 172,637,999,932,432,040,000,000,000,000,000,000,000 | 58 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
static int jit_subprogs(struct bpf_verifier_env *env)
{
struct bpf_prog *prog = env->prog, **func, *tmp;
int i, j, subprog_start, subprog_end = 0, len, subprog;
struct bpf_map *map_ptr;
struct bpf_insn *insn;
void *old_bpf_func;
int err, num_exentries;
if (env->subprog_cnt <= 1)
return 0;
for (i = 0, insn =... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 205,052,169,927,047,700,000,000,000,000,000,000,000 | 226 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
R_API char *r_bin_java_get_field_name(RBinJavaObj *bin_obj, ut32 idx) {
char *name = NULL;
if (idx < r_list_length (bin_obj->fields_list)) {
RBinJavaField *fm_type = r_list_get_n (bin_obj->fields_list, idx);
name = strdup (fm_type->name);
}
return name;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 103,075,849,732,405,460,000,000,000,000,000,000,000 | 8 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
bool CudnnSupport::DoConvolveBackwardBias(
Stream* stream, const dnn::BatchDescriptor& input_descriptor,
const DeviceMemory<float>& input_data,
const dnn::BatchDescriptor& bias_descriptor,
DeviceMemory<float>* backward_bias_data) {
return IsStatusOk(
DoConvolveBackwardBiasImpl(stream, input_desc... | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 223,580,925,048,169,500,000,000,000,000,000,000,000 | 10 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
void CClient::RconAuth(const char *pName, const char *pPassword)
{
if(RconAuthed())
return;
CMsgPacker Msg(NETMSG_RCON_AUTH);
Msg.AddString(pName, 32);
Msg.AddString(pPassword, 32);
Msg.AddInt(1);
SendMsgEx(&Msg, MSGFLAG_VITAL);
} | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 226,741,143,099,317,000,000,000,000,000,000,000,000 | 11 | added some checks to snap handling |
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *result = &EX_T(opline->result.u.var).tmp_var;
compare_function(result,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_cv(&opline->o... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 194,761,121,212,317,200,000,000,000,000,000,000,000 | 14 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
unsigned long SSL_SESSION_hash(const SSL_SESSION *a)
{
unsigned long l;
l=(unsigned long)
((unsigned int) a->session_id[0] )|
((unsigned int) a->session_id[1]<< 8L)|
((unsigned long)a->session_id[2]<<16L)|
((unsigned long)a->session_id[3]<<24L);
return(l);
} | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 128,201,742,186,472,100,000,000,000,000,000,000,000 | 11 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
QPDFWriter::doWriteSetup()
{
if (this->m->did_write_setup)
{
return;
}
this->m->did_write_setup = true;
// Do preliminary setup
if (this->m->linearized)
{
this->m->qdf_mode = false;
}
if (this->m->pclm)
{
this->m->stream_decode_level = qpdf_dl_none;
th... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 235,894,867,448,516,700,000,000,000,000,000,000,000 | 166 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv)
{
php_com_dotnet_object *obj;
VARIANT v;
ZVAL_NULL(rv);
obj = CDNO_FETCH(object);
if (V_VT(&obj->v) == VT_DISPATCH) {
VariantInit(&v);
if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE,
DISPATCH_METHOD|DISPATCH_PROPE... | 0 | [
"CWE-502"
] | php-src | 115ee49b0be12e3df7d2c7027609fbe1a1297e42 | 118,673,646,087,934,420,000,000,000,000,000,000,000 | 35 | Fix #77177: Serializing or unserializing COM objects crashes
Firstly, we avoid returning NULL from the get_property handler, but
instead return an empty HashTable, which already prevents the crashes.
Secondly, since (de-)serialization obviously makes no sense for COM,
DOTNET and VARIANT objects (at least with the curr... |
int ha_maria::zerofill(THD * thd, HA_CHECK_OPT *check_opt)
{
int error;
HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param);
TRN *old_trn;
MARIA_SHARE *share= file->s;
if (!file || !param)
return HA_ADMIN_INTERNAL_ERROR;
unmap_file(file);
old_trn= file->trn;
maria_chk_init(param);
param->thd=... | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 315,279,068,664,998,400,000,000,000,000,000,000,000 | 38 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
MagickPrivate void ResetMaxMemoryRequest(void)
{
max_memory_request=0;
} | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 238,975,112,061,649,220,000,000,000,000,000,000,000 | 4 | possible divide by zero + clear buffers |
hit_return_msg(void)
{
int save_p_more = p_more;
p_more = FALSE; // don't want to see this message when scrolling back
if (msg_didout) // start on a new line
msg_putchar('\n');
if (got_int)
msg_puts(_("Interrupt: "));
msg_puts_attr(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
... | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 18,277,858,364,726,481,000,000,000,000,000,000,000 | 15 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
void ComputeAsync(OpKernelContext* context, DoneCallback done) override {
// The shape of 'image' is [batch_size, image_height, image_width,
// channels].
const Tensor& image = context->input(0);
// The shape of 'boxes' is [num_boxes, 4].
const Tensor& boxes = context->input(1);
// The shape o... | 0 | [
"CWE-119",
"CWE-787"
] | tensorflow | 3ade2efec2e90c6237de32a19680caaa3ebc2845 | 166,001,059,181,789,900,000,000,000,000,000,000,000 | 73 | Fix segmentation fault in tf.image.crop_and_resize when boxes is inf or nan
This fix tries to address the issue raised in 42129 where segmentation fault
happened in tf.image.crop_and_resize when boxes is inf or nan.
This fix adds the check to make sure boxes is not inf or nan (isfinite)
This fix fixes 42129.
Signed... |
struct libmnt_fs *get_next_fs(struct libmnt_table *tb,
struct libmnt_iter *itr)
{
struct libmnt_fs *fs = NULL;
if (is_listall_mode()) {
/*
* Print whole file
*/
if (mnt_table_next_fs(tb, itr, &fs) != 0)
return NULL;
} else if (is_mount_compatible_mode()) {
/*
* Look up for FS in the same... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 49,613,161,797,581,380,000,000,000,000,000,000,000 | 50 | 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... |
R_API int r_cmd_macro_cmd_args(RCmdMacro *mac, const char *ptr, const char *args, int nargs) {
int i, j;
char *pcmd, cmd[R_CMD_MAXLEN];
const char *arg = args;
for (*cmd=i=j=0; j<R_CMD_MAXLEN && ptr[j]; i++,j++) {
if (ptr[j]=='$') {
if (ptr[j+1]>='0' && ptr[j+1]<='9') {
int wordlen;
int w = ptr[j+1]-'... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 713,280,968,034,619,500,000,000,000,000,000,000 | 50 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
void PostgreSqlStorage::setNetworkConnected(UserId user, const NetworkId &networkId, bool isConnected)
{
QSqlQuery query(logDb());
query.prepare(queryString("update_network_connected"));
query.bindValue(":userid", user.toInt());
query.bindValue(":networkid", networkId.toInt());
query.bindValue(":con... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 207,078,125,378,765,950,000,000,000,000,000,000,000 | 10 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
struct tcp_sock *tp = tcp_sk(sk);
int answ;
bool slow;
switch (cmd) {
case SIOCINQ:
if (sk->sk_state == TCP_LISTEN)
return -EINVAL;
slow = lock_sock_fast(sk);
if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV))
answ = 0;
else if (s... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 264,270,885,245,947,440,000,000,000,000,000,000,000 | 55 | 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 inline unsigned short ScaleQuantumToShort(const Quantum quantum)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((unsigned short) quantum);
#else
if (quantum <= 0.0)
return(0);
if (quantum >= 65535.0)
return(65535);
return((unsigned short) (quantum+0.5));
#endif
} | 1 | [
"CWE-190"
] | ImageMagick | 95d4e94e0353e503b71a53f5e6fad173c7c70c90 | 58,503,853,811,996,045,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/1751 |
bool hasSessionSockets(const Json::Value &sockets) const {
Json::Value::const_iterator it, end = sockets.end();
for (it = sockets.begin(); it != end; it++) {
const Json::Value &socket = *it;
if (socket["protocol"] == "session" || socket["protocol"] == "http_session") {
return true;
}
}
return fal... | 0 | [
"CWE-200",
"CWE-61"
] | passenger | 4043718264095cde6623c2cbe8c644541036d7bf | 125,042,525,621,556,100,000,000,000,000,000,000,000 | 11 | Disable unused feature. |
theme_adium_iface_init (EmpathyChatViewIface *iface)
{
iface->append_message = theme_adium_append_message;
iface->append_event = theme_adium_append_event;
iface->append_event_markup = theme_adium_append_event_markup;
iface->edit_message = theme_adium_edit_message;
iface->scroll = theme_adium_scroll;
iface->scroll... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 132,905,486,010,272,170,000,000,000,000,000,000,000 | 18 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
uint32_t BinaryProtocolWriter::writeString(folly::StringPiece str) {
return writeBinary(str);
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 2,743,055,545,785,797,600,000,000,000,000,000,000 | 3 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.