func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
alloc_email(char *addr)
{
size_t size = strlen(addr);
char *new;
new = (char *) MALLOC(size + 1);
memcpy(new, addr, size + 1);
list_add(global_data->email, new);
} | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 71,162,051,915,266,255,000,000,000,000,000,000,000 | 10 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
process_cmd_maxdelay(CMD_Request *msg, char *line)
{
IPAddr address;
double max_delay;
int ok;
if (read_address_double(line, &address, &max_delay)) {
UTI_IPHostToNetwork(&address, &msg->data.modify_maxdelay.address);
msg->data.modify_maxdelay.new_max_delay = UTI_FloatHostToNetwork(max_delay);
msg... | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 25,979,513,290,691,430,000,000,000,000,000,000,000 | 18 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
static int __init intel_iommu_setup(char *str)
{
if (!str)
return -EINVAL;
while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;
pr_info("IOMMU enabled\n");
} else if (!strncmp(str, "off", 3)) {
dmar_disabled = 1;
no_platform_optin = 1;
pr_info("IOMMU disabled\n");
} else if (!strncmp... | 0 | [] | linux | fb58fdcd295b914ece1d829b24df00a17a9624bc | 294,463,727,588,579,300,000,000,000,000,000,000,000 | 45 | iommu/vt-d: Do not enable ATS for untrusted devices
Currently Linux automatically enables ATS (Address Translation Service)
for any device that supports it (and IOMMU is turned on). ATS is used to
accelerate DMA access as the device can cache translations locally so
there is no need to do full translation on IOMMU sid... |
void start_deadline(/*int timeout = 5*/)
{
cancel_deadline_timer();
task_id_ = task_timer_.schedule([this] {
if (!adaptor_.is_open())
{
return;
}
adaptor_.shutdown_readwrite();
ad... | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 205,575,157,677,885,250,000,000,000,000,000,000,000 | 14 | Prevent HTTP pipelining which Crow doesn't support. |
sh_un_double_quote (string)
char *string;
{
register int c, pass_next;
char *result, *r, *s;
r = result = (char *)xmalloc (strlen (string) + 1);
for (pass_next = 0, s = string; s && (c = *s); s++)
{
if (pass_next)
{
*r++ = c;
pass_next = 0;
continue;
}
if (c == '\\' && (sh_synt... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 107,873,788,364,090,820,000,000,000,000,000,000,000 | 27 | commit bash-20120224 snapshot |
watch_bg_preferences (GSManager *manager)
{
g_assert (manager->priv->bg_notify_id == 0);
gconf_client_add_dir (manager->priv->client,
GNOME_BG_KEY_DIR,
GCONF_CLIENT_PRELOAD_NONE,
NULL);
manager->priv->bg_n... | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 299,190,231,075,089,900,000,000,000,000,000,000,000 | 15 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
static void ipgre_tunnel_uninit(struct net_device *dev)
{
struct net *net = dev_net(dev);
struct ipgre_net *ign = net_generic(net, ipgre_net_id);
ipgre_tunnel_unlink(ign, netdev_priv(dev));
dev_put(dev);
} | 0 | [] | linux-2.6 | c2892f02712e9516d72841d5c019ed6916329794 | 254,847,422,468,145,800,000,000,000,000,000,000,000 | 8 | gre: fix netns vs proto registration ordering
GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().
This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.
... |
int sas_get_report_phy_sata(struct domain_device *dev, int phy_id,
struct smp_resp *rps_resp)
{
int res;
u8 *rps_req = alloc_smp_req(RPS_REQ_SIZE);
u8 *resp = (u8 *)rps_resp;
if (!rps_req)
return -ENOMEM;
rps_req[1] = SMP_REPORT_PHY_SATA;
rps_req[9] = phy_id;
res = smp_execute_task(dev, rps_req, RPS_... | 0 | [
"CWE-399",
"CWE-772"
] | linux | 4a491b1ab11ca0556d2fda1ff1301e862a2d44c4 | 50,614,906,736,158,120,000,000,000,000,000,000,000 | 39 | 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... |
njs_generate_throw_statement(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_generator_next(generator, njs_generate, node->right);
return njs_generator_after(vm, generator,
njs_queue_first(&generator->stack), node,
njs_g... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 316,995,878,200,522,000,000,000,000,000,000,000,000 | 9 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
static zend_object_value spl_heap_object_new_ex(zend_class_entry *class_type, spl_heap_object **obj, zval *orig, int clone_orig TSRMLS_DC) /* {{{ */
{
zend_object_value retval;
spl_heap_object *intern;
zend_class_entry *parent = class_type;
int inherited = 0;
intern = ecalloc(1, sizeof(spl_heap... | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 134,732,124,378,421,120,000,000,000,000,000,000,000 | 86 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error |
int cil_resolve_bounds(struct cil_tree_node *current, void *extra_args, enum cil_flavor flavor, enum cil_flavor attr_flavor)
{
int rc = SEPOL_ERR;
struct cil_bounds *bounds = current->data;
enum cil_sym_index index;
struct cil_symtab_datum *parent_datum = NULL;
struct cil_symtab_datum *child_datum = NULL;
rc = c... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 47,770,380,706,293,620,000,000,000,000,000,000,000 | 81 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
snarf_hosts_from_file (filename)
char *filename;
{
FILE *file;
char *temp, buffer[256], name[256];
register int i, start;
file = fopen (filename, "r");
if (file == 0)
return;
while (temp = fgets (buffer, 255, file))
{
/* Skip to first character. */
for (i = 0; buffer[i] && cr_whit... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 118,398,499,455,750,350,000,000,000,000,000,000,000 | 64 | Bash-4.4 patch 7 |
run_question (CommonJob *job,
char *primary_text,
char *secondary_text,
const char *details_text,
gboolean show_all,
...)
{
va_list varargs;
int res;
va_start (varargs, show_all);
res = run_simple_dialog_va (job,
... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 34,003,752,092,352,040,000,000,000,000,000,000,000 | 22 | 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... |
save_singleton_type(PicklerObject *self, PyObject *obj, PyObject *singleton)
{
PyObject *reduce_value;
int status;
reduce_value = Py_BuildValue("O(O)", &PyType_Type, singleton);
if (reduce_value == NULL) {
return -1;
}
status = save_reduce(self, reduce_value, obj);
Py_DECREF(reduce_... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 300,763,176,654,403,800,000,000,000,000,000,000,000 | 13 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static CURLcode smtp_dophase_done(struct connectdata *conn,
bool connected)
{
struct FTP *smtp = conn->data->state.proto.smtp;
struct smtp_conn *smtpc = &conn->proto.smtpc;
(void)connected;
if(smtp->transfer != FTPTRANSFER_BODY)
/* no data to transfer */
Curl_setup_tra... | 0 | [
"CWE-89"
] | curl | 75ca568fa1c19de4c5358fed246686de8467c238 | 252,011,631,732,625,570,000,000,000,000,000,000,000 | 16 | URL sanitize: reject URLs containing bad data
Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a
decoded manner now use the new Curl_urldecode() function to reject URLs
with embedded control codes (anything that is or decodes to a byte value
less than 32).
URLs containing such codes could easily oth... |
PHP_MINFO_FUNCTION(basic) /* {{{ */
{
php_info_print_table_start();
BASIC_MINFO_SUBMODULE(dl)
BASIC_MINFO_SUBMODULE(mail)
php_info_print_table_end();
BASIC_MINFO_SUBMODULE(assert)
} | 0 | [
"CWE-601"
] | php-src | 98b9dfaec95e6f910f125ed172cdbd25abd006ec | 243,308,258,991,416,150,000,000,000,000,000,000,000 | 8 | Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment |
gif_get16le(gif_context_t *s)
{
int z = gif_get8(s);
return z + (gif_get8(s) << 8);
} | 0 | [
"CWE-703",
"CWE-787"
] | libsixel | 7808a06b88c11dbc502318cdd51fa374f8cd47ee | 244,548,608,183,478,940,000,000,000,000,000,000,000 | 5 | gif loader: check LZW code size (Issue #75) |
void PackLinuxElf32x86::addStubEntrySections(Filter const *ft)
{
int const n_mru = ft->n_mru; // FIXME: belongs to filter? packerf?
// Rely on "+80CXXXX" [etc] in getDecompressorSections() packer_c.cpp */
// // Here is a quick summary of the format of the output file:
// linker->setLoaderAlignOffset(
// ... | 0 | [
"CWE-476",
"CWE-415"
] | upx | 90279abdfcd235172eab99651043051188938dcc | 214,858,611,166,440,100,000,000,000,000,000,000,000 | 79 | PackLinuxElf::canUnpack must checkEhdr() for ELF input
https://github.com/upx/upx/issues/485
modified: p_lx_elf.cpp |
e_strftime (gchar *string,
gsize max,
const gchar *fmt,
const struct tm *tm)
{
#ifndef HAVE_LKSTRFTIME
gchar *c, *ffmt, *ff;
#endif
gsize ret;
g_return_val_if_fail (string != NULL, 0);
g_return_val_if_fail (fmt != NULL, 0);
g_return_val_if_fail (tm != NULL, 0);
#ifdef HAVE_LKS... | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 79,020,144,721,163,300,000,000,000,000,000,000,000 | 48 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
zip* getZip() {
return m_zip;
} | 0 | [
"CWE-22"
] | hhvm | 65c95a01541dd2fbc9c978ac53bed235b5376686 | 337,512,294,428,077,400,000,000,000,000,000,000,000 | 3 | ZipArchive::extractTo bug 70350
Summary:Don't allow upward directory traversal when extracting zip archive files.
Files in zip files with `..` or starting at main root `/` should be normalized
to something where the file being extracted winds up within the directory or
a subdirectory where the actual extraction is ta... |
bool Monitor::ms_verify_authorizer(Connection *con, int peer_type,
int protocol, bufferlist& authorizer_data,
bufferlist& authorizer_reply,
bool& isvalid, CryptoKey& session_key)
{
dout(10) << "ms_verify_authorizer " << con->get_peer_addr()
<< " " << ceph_entity_type_name(peer_type)
<< " ... | 1 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 98,766,920,817,949,250,000,000,000,000,000,000,000 | 39 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
EX_T(opline->result.u.var).tmp_var = *value;
if (!1) {
zval_copy_ctor(&EX_T(opline->result.u.var)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 119,956,564,533,212,070,000,000,000,000,000,000,000 | 13 | - 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 |
Supports_Condition_Obj Parser::parse_supports_condition(bool top_level)
{
lex < css_whitespace >();
Supports_Condition_Obj cond;
if ((cond = parse_supports_negation())) return cond;
if ((cond = parse_supports_operator(top_level))) return cond;
if ((cond = parse_supports_interpolation())) return ... | 0 | [
"CWE-674"
] | libsass | f2db04883e5fff4e03777dcc1eb60d4373c45be1 | 269,128,618,592,195,600,000,000,000,000,000,000,000 | 9 | Make `parse_css_variable_value` non-recursive
Fixes #2658 stack overflow |
*/
void register_phpinfo_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("INFO_GENERAL", PHP_INFO_GENERAL, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_CREDITS", PHP_INFO_CREDITS, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_CONFIGURATION", PHP_INFO_CONFIGURATION, CONST_PERSISTENT|CONST_C... | 0 | [
"CWE-200"
] | php-src | 3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9 | 115,094,691,055,620,860,000,000,000,000,000,000,000 | 19 | Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability |
static int ptype_seq_show(struct seq_file *seq, void *v)
{
struct packet_type *pt = v;
if (v == SEQ_START_TOKEN)
seq_puts(seq, "Type Device Function\n");
else if (pt->dev == NULL || dev_net(pt->dev) == seq_file_net(seq)) {
if (pt->type == htons(ETH_P_ALL))
seq_puts(seq, "ALL ");
else
seq_printf(seq... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 264,125,226,951,511,020,000,000,000,000,000,000,000 | 18 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
static void dp8393x_do_transmit_packets(dp8393xState *s)
{
NetClientState *nc = qemu_get_queue(s->nic);
int width, size;
int tx_len, len;
uint16_t i;
width = (s->regs[SONIC_DCR] & SONIC_DCR_DW) ? 2 : 1;
while (1) {
/* Read memory */
size = sizeof(uint16_t) * 6 * width;
... | 1 | [] | qemu | 915976bd98a9286efe6f2e573cb4f1360603adf9 | 11,220,231,438,507,240,000,000,000,000,000,000,000 | 109 | hw/net/dp8393x: fix integer underflow in dp8393x_do_transmit_packets()
An integer underflow could occur during packet transmission due to 'tx_len' not
being updated if SONIC_TFC register is set to zero. Check for negative 'tx_len'
when removing existing FCS.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1899722
S... |
const BigInt& EC_Group::get_g_y() const
{
return data().g_y();
} | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 18,212,643,111,407,700,000,000,000,000,000,000,000 | 4 | Address DSA/ECDSA side channel |
BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map,
u64, flags)
{
u32 max_depth = map->value_size / stack_map_data_size(map);
/* stack_map_alloc() checks that max_depth <= sysctl_perf_event_max_stack */
u32 init_nr = sysctl_perf_event_max_stack - max_depth;
bool user = flags & BPF_F_USER_... | 0 | [
"CWE-190",
"CWE-787"
] | linux | 30e29a9a2bc6a4888335a6ede968b75cd329657a | 51,263,994,428,799,650,000,000,000,000,000,000,000 | 23 | bpf: Fix integer overflow in prealloc_elems_and_freelist()
In prealloc_elems_and_freelist(), the multiplication to calculate the
size passed to bpf_map_area_alloc() could lead to an integer overflow.
As a result, out-of-bounds write could occur in pcpu_freelist_populate()
as reported by KASAN:
[...]
[ 16.968613] BU... |
multi_reap_new(int buckets_per_pass)
{
struct multi_reap *mr;
ALLOC_OBJ(mr, struct multi_reap);
mr->bucket_base = 0;
mr->buckets_per_pass = buckets_per_pass;
mr->last_call = now;
return mr;
} | 0 | [
"CWE-362",
"CWE-476"
] | openvpn | 37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab | 120,420,810,722,886,680,000,000,000,000,000,000,000 | 9 | Fix illegal client float (CVE-2020-11810)
There is a time frame between allocating peer-id and initializing data
channel key (which is performed on receiving push request or on async
push-reply) in which the existing peer-id float checks do not work right.
If a "rogue" data channel packet arrives during that time fra... |
DecodeIPV6ExtHdrs(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, uint16_t len, PacketQueue *pq)
{
SCEnter();
uint8_t *orig_pkt = pkt;
uint8_t nh = 0; /* careful, 0 is actually a real type */
uint16_t hdrextlen = 0;
uint16_t plen;
char dstopts = 0;
char exthdr_fh_done = 0;
... | 1 | [
"CWE-20"
] | suricata | 11f3659f64a4e42e90cb3c09fcef66894205aefe | 11,063,526,706,223,362,000,000,000,000,000,000,000 | 409 | teredo: be stricter on what to consider valid teredo
Invalid Teredo can lead to valid DNS traffic (or other UDP traffic)
being misdetected as Teredo. This leads to false negatives in the
UDP payload inspection.
Make the teredo code only consider a packet teredo if the encapsulated
data was decoded without any 'invali... |
static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *len, int peer)
{
struct sockaddr_l2 *la = (struct sockaddr_l2 *) addr;
struct sock *sk = sock->sk;
BT_DBG("sock %p, sk %p", sock, sk);
addr->sa_family = AF_BLUETOOTH;
*len = sizeof(struct sockaddr_l2);
if (peer) {
la->l2_psm = l2c... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | linux | f2fcfcd670257236ebf2088bbdf26f6a8ef459fe | 272,302,677,380,208,160,000,000,000,000,000,000,000 | 22 | Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming
mode. If the remote device specifies ERTM or Streaming mode, then the
same mode is proposed. Otherwise ERTM or Basic mode is used. And in case
of a state 2 device, the remote device... |
CModule::EModRet CModule::OnChanNoticeMessage(CNoticeMessage& Message) {
CString sText = Message.GetText();
EModRet ret = OnChanNotice(Message.GetNick(), *Message.GetChan(), sText);
Message.SetText(sText);
return ret;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 147,742,916,078,011,400,000,000,000,000,000,000,000 | 6 | 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 |
int fx_init(struct kvm_vcpu *vcpu)
{
int err;
err = fpu_alloc(&vcpu->arch.guest_fpu);
if (err)
return err;
fpu_finit(&vcpu->arch.guest_fpu);
/*
* Ensure guest xcr0 is valid for loading
*/
vcpu->arch.xcr0 = XSTATE_FP;
vcpu->arch.cr0 |= X86_CR0_ET;
return 0;
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 256,501,627,208,800,800,000,000,000,000,000,000,000 | 19 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
virtual GBool tilingPatternFill(GfxState * /*state*/, Catalog * /*cat*/, Object * /*str*/,
double * /*pmat*/, int /*paintType*/, Dict * /*resDict*/,
double * /*mat*/, double * /*bbox*/,
int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/,
double /*xStep*/, double /*yStep*/)
{ return gFalse; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 20,420,238,462,559,320,000,000,000,000,000,000,000 | 6 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
PHP_FUNCTION(readlink)
{
char *link;
size_t link_len;
char target[MAXPATHLEN];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &link, &link_len) == FAILURE) {
return;
}
if (OPENBASEDIR_CHECKPATH(link)) {
RETURN_FALSE;
}
if (php_sys_readlink(link, target, MAXPATHLEN) == -1) {
php_error_docref(NULL, E_WA... | 0 | [] | php-src | 0e6c0654ed06751ced134515f7629c40bd979d7f | 145,571,832,830,787,090,000,000,000,000,000,000,000 | 20 | Fix #78862: link() silently truncates after a null byte on Windows
Since link() is supposed to accepts paths (i.e. strings without NUL
bytes), we must not accept arbitrary strings. |
void dolist(char *arg, const int on_ctrl_conn)
{
int c;
void *tls_fd = NULL;
matches = 0U;
opt_a = opt_C = opt_d = opt_F = opt_R = opt_r = opt_t = opt_S = 0;
opt_l = 1;
if (force_ls_a != 0) {
opt_a = 1;
}
if (arg != NULL) {
while (isspace((unsigned char) *arg)) {
... | 0 | [
"CWE-400",
"CWE-703"
] | pure-ftpd | aea56f4bcb9948d456f3fae4d044fd3fa2e19706 | 9,798,644,639,691,809,000,000,000,000,000,000,000 | 206 | listdir(): reuse a single buffer to store every file name to display
Allocating a new buffer for each entry is useless.
And as these buffers are allocated on the stack, on systems with a
small stack size, with many entries, the limit can easily be reached,
causing a stack exhaustion and aborting the user session.
Re... |
const KeyInfo * next() {
if (i == cd->keyinfo_end) {
if (include_extra)
i = cd->extra_begin;
else
i = cd->extra_end;
}
module_changed = false;
if (i == cd->extra_end) {
m = cd->filter_modules.pbegin();
if (!include_modules || m == cd->filter_modules.pend()) return 0;
else {... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 284,818,698,529,244,620,000,000,000,000,000,000,000 | 37 | Fix various bugs found by OSS-Fuze. |
process_request(isc_httpd_t *httpd, isc_region_t *region, size_t *buflen) {
char *s = NULL, *p = NULL, *urlend = NULL;
const char *content_length = NULL;
size_t limit = sizeof(httpd->recvbuf) - httpd->recvlen - 1;
size_t len = region->length;
size_t clen = 0;
int delim;
bool truncated = false;
if (len > limit)... | 0 | [] | bind9 | d4c5d1c650ae0e97a083b0ce7a705c20fc001f07 | 108,690,042,871,305,430,000,000,000,000,000,000,000 | 232 | Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.
Improve the httpd.c:process_request() function with t... |
CAMLprim value caml_string_get32(value str, value index)
{
intnat res;
unsigned char b1, b2, b3, b4;
intnat idx = Long_val(index);
if (idx < 0 || idx + 3 >= caml_string_length(str)) caml_array_bound_error();
b1 = Byte_u(str, idx);
b2 = Byte_u(str, idx + 1);
b3 = Byte_u(str, idx + 2);
b4 = Byte_u(str, id... | 0 | [
"CWE-200"
] | ocaml | 659615c7b100a89eafe6253e7a5b9d84d0e8df74 | 310,523,793,472,074,530,000,000,000,000,000,000,000 | 17 | fix PR#7003 and a few other bugs caused by misuse of Int_val
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 |
TEE_Result syscall_asymm_operate(unsigned long state,
const struct utee_attribute *usr_params,
size_t num_params, const void *src_data, size_t src_len,
void *dst_data, uint64_t *dst_len)
{
TEE_Result res;
struct tee_cryp_state *cs;
struct tee_ta_session *sess;
uint64_t dlen64;
size_t dlen;
struct tee_obj... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | 70697bf3c5dc3d201341b01a1a8e5bc6d2fb48f8 | 190,165,319,663,390,820,000,000,000,000,000,000,000 | 172 | svc: check for allocation overflow in crypto calls part 2
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that it might
lead to a heap based overflow with attacker controlled data written
outside the boundaries of the buffer.
Fixes: OP-TE... |
static void prb_open_block(struct tpacket_kbdq_core *pkc1,
struct tpacket_block_desc *pbd1)
{
struct timespec64 ts;
struct tpacket_hdr_v1 *h1 = &pbd1->hdr.bh1;
smp_rmb();
/* We could have just memset this but we will lose the
* flexibility of making the priv area sticky
*/
BLOCK_SNUM(pbd1) = pkc1->knxt_seq... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 85,321,625,979,004,470,000,000,000,000,000,000,000 | 36 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
long vhost_dev_check_owner(struct vhost_dev *dev)
{
/* Are you the owner? If not, I don't think you mean to do that */
return dev->mm == current->mm ? 0 : -EPERM;
} | 0 | [] | linux-2.6 | bd97120fc3d1a11f3124c7c9ba1d91f51829eb85 | 20,681,796,355,933,808,000,000,000,000,000,000,000 | 5 | vhost: fix length for cross region descriptor
If a single descriptor crosses a region, the
second chunk length should be decremented
by size translated so far, instead it includes
the full descriptor length.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: D... |
CURLUcode curl_url_get(CURLU *u, CURLUPart what,
char **part, unsigned int flags)
{
char *ptr;
CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
char portbuf[7];
bool urldecode = (flags & CURLU_URLDECODE)?1:0;
bool urlencode = (flags & CURLU_URLENCODE)?1:0;
bool plusdecode = FALSE;
(void)f... | 0 | [] | curl | 914aaab9153764ef8fa4178215b8ad89d3ac263a | 201,537,061,782,142,180,000,000,000,000,000,000,000 | 234 | urlapi: reject percent-decoding host name into separator bytes
CVE-2022-27780
Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-27780.html
Closes #8826 |
void qemu_input_event_sync_impl(void)
{
QemuInputHandlerState *s;
trace_input_event_sync();
QTAILQ_FOREACH(s, &handlers, node) {
if (!s->events) {
continue;
}
if (s->handler->sync) {
s->handler->sync(s->dev);
}
s->events = 0;
}
} | 0 | [
"CWE-772"
] | qemu | fa18f36a461984eae50ab957e47ec78dae3c14fc | 216,401,683,042,550,160,000,000,000,000,000,000,000 | 16 | input: limit kbd queue depth
Apply a limit to the number of items we accept into the keyboard queue.
Impact: Without this limit vnc clients can exhaust host memory by
sending keyboard events faster than qemu feeds them to the guest.
Fixes: CVE-2017-8379
Cc: P J P <ppandit@redhat.com>
Cc: Huawei PSIRT <PSIRT@huawei.c... |
__fire_sched_out_preempt_notifiers(struct task_struct *curr,
struct task_struct *next)
{
struct preempt_notifier *notifier;
hlist_for_each_entry(notifier, &curr->preempt_notifiers, link)
notifier->ops->sched_out(notifier, next);
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 175,692,641,460,420,700,000,000,000,000,000,000,000 | 8 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) {
int32_t year, month, dayOfMonth, dayOfYear;
int32_t daysSinceEpoch = julianDay - PERSIAN_EPOCH;
year = 1 + ClockMath::floorDivide(33 * daysSinceEpoch + 3, 12053);
int32_t farvardin1 = 365 * (year - 1) + ClockMath::f... | 1 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 260,377,809,021,071,400,000,000,000,000,000,000,000 | 23 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
g_file_get_basename (GFile *file)
{
GFileIface *iface;
g_return_val_if_fail (G_IS_FILE (file), NULL);
iface = G_FILE_GET_IFACE (file);
return (* iface->get_basename) (file);
} | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 101,727,020,612,477,910,000,000,000,000,000,000,000 | 10 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
REDIS_STATIC int __quicklistDecompressNode(quicklistNode *node) {
#ifdef REDIS_TEST
node->attempted_compress = 0;
#endif
void *decompressed = zmalloc(node->sz);
quicklistLZF *lzf = (quicklistLZF *)node->zl;
if (lzf_decompress(lzf->compressed, lzf->sz, decompressed, node->sz) == 0) {
/* Someone ... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 331,486,006,581,005,800,000,000,000,000,000,000,000 | 17 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
static void _fb_rdlock(void)
{
slurm_mutex_lock(&file_bcast_mutex);
while (1) {
if ((fb_write_wait_lock == 0) && (fb_write_lock == 0)) {
fb_read_lock++;
break;
} else { /* wait for state change and retry */
pthread_cond_wait(&file_bcast_cond, &file_bcast_mutex);
}
}
slurm_mutex_unlock(&file_bcast_mut... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 257,276,566,003,290,070,000,000,000,000,000,000,000 | 13 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
struct iattr *sattr)
{
struct inode *inode = dentry->d_inode;
struct rpc_cred *cred = NULL;
struct nfs4_state *state = NULL;
int status;
nfs_fattr_init(fattr);
/* Search for an existing open(O_WRITE) file */
if (sattr->ia_valid & ATTR_FILE)... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 92,562,055,677,133,600,000,000,000,000,000,000,000 | 26 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
njs_string_from_char_code(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t is_point)
{
double num;
u_char *p, *start, *end;
ssize_t len;
int32_t code;
uint32_t cp;
uint64_t length, size;
njs... | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 51,990,064,606,650,190,000,000,000,000,000,000,000 | 109 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
explicit SplitVOpGPU(OpKernelConstruction* c) : Base(c) {} | 0 | [
"CWE-703"
] | tensorflow | 25d622ffc432acc736b14ca3904177579e733cc6 | 135,013,824,659,041,890,000,000,000,000,000,000,000 | 1 | A negative size in one of the split sizes allowed the computed size of another
to exceed the total dimension, leading to a segfault and security vulnerability.
Adding a check for negative sizes prevents this.
PiperOrigin-RevId: 401035665
Change-Id: I79bbe329787dac82aa4bf60397a9129b716aedab |
static int kdc_server_destroy(struct kdc_server *kdc)
{
if (kdc->private_data != NULL) {
kadm5_destroy(kdc->private_data);
}
return 0;
} | 0 | [
"CWE-288"
] | samba | 827dc6a61e6bd01531da0cc8e10f1e54ad400359 | 286,348,505,574,241,800,000,000,000,000,000,000,000 | 8 | CVE-2022-32744 s4:kdc: Rename keytab_name -> kpasswd_keytab_name
This makes explicitly clear the purpose of this keytab.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15074
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org> |
feTurbulence_init (RsvgFilterPrimitiveTurbulence * filter)
{
double s;
int i, j, k, lSeed;
lSeed = feTurbulence_setup_seed (filter->seed);
for (k = 0; k < 4; k++) {
for (i = 0; i < feTurbulence_BSize; i++) {
filter->uLatticeSelector[i] = i;
for (j = 0; j < 2; j++)
... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 148,289,367,266,747,700,000,000,000,000,000,000,000 | 39 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
usage(char *name)
{
fprintf(stderr,
_("usage: %s [-x db_args]* [-d dbpathname] [-r dbrealmname]\n"
"\t\t[-R replaycachename] [-m] [-k masterenctype]\n"
"\t\t[-M masterkeyname] [-p port] [-P pid_file]\n"
"\t\t[-n] [-w numworkers] [/]\n\n"
"where,\n"... | 0 | [
"CWE-476"
] | krb5 | 5d2d9a1abe46a2c1a8614d4672d08d9d30a5f8bf | 81,243,371,298,263,770,000,000,000,000,000,000,000 | 14 | Multi-realm KDC null deref [CVE-2013-1418]
If a KDC serves multiple realms, certain requests can cause
setup_server_realm() to dereference a null pointer, crashing the KDC.
CVSSv2: AV:N/AC:M/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C
A related but more minor vulnerability requires authentication to
exploit, and is only prese... |
static const char *set_flush_max_pipelined(cmd_parms *cmd, void *d_,
const char *arg)
{
core_server_config *conf =
ap_get_core_module_config(cmd->server->module_config);
apr_off_t num;
char *end;
if (apr_strtoff(&num, arg, &end, 10)
|| *end... | 0 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 175,617,990,826,846,570,000,000,000,000,000,000,000 | 19 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
suspend_or_pushdata(struct table *tbl, char *line)
{
if (tbl->flag & TBL_IN_COL)
pushdata(tbl, tbl->row, tbl->col, line);
else {
if (!tbl->suspended_data)
tbl->suspended_data = newTextList();
pushText(tbl->suspended_data, line ? line : "");
}
} | 0 | [
"CWE-119"
] | w3m | 67a3db378f5ee3047c158eae4342f7e3245a2ab1 | 87,243,751,187,189,420,000,000,000,000,000,000,000 | 10 | Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19
Bug-Debian: https://github.com/tats/w3m/issues/8 |
static int perf_event_set_bpf_handler(struct perf_event *event, u32 prog_fd)
{
struct bpf_prog *prog;
if (event->overflow_handler_context)
/* hw breakpoint or kernel counter */
return -EINVAL;
if (event->prog)
return -EEXIST;
prog = bpf_prog_get_type(prog_fd, BPF_PROG_TYPE_PERF_EVENT);
if (IS_ERR(prog))
... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 326,539,363,058,083,640,000,000,000,000,000,000,000 | 20 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
int write, struct page **pages, int *nr)
{
unsigned long next;
pmd_t *pmdp;
pmdp = pmd_offset(&pud, addr);
do {
pmd_t pmd = READ_ONCE(*pmdp);
next = pmd_addr_end(addr, end);
if (pmd_none(pmd))
return 0;
if (unlikely(pmd_trans... | 0 | [
"CWE-362"
] | linux | 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 | 200,646,738,966,285,900,000,000,000,000,000,000,000 | 41 | mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_p... |
static struct xfrm_state *pfkey_xfrm_state_lookup(struct net *net, const struct sadb_msg *hdr, void * const *ext_hdrs)
{
const struct sadb_sa *sa;
const struct sadb_address *addr;
uint16_t proto;
unsigned short family;
xfrm_address_t *xaddr;
sa = ext_hdrs[SADB_EXT_SA - 1];
if (sa == NULL)
return NULL;
prot... | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 150,430,795,809,414,230,000,000,000,000,000,000,000 | 40 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
static int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_provide_buf *p = &req->pbuf;
struct io_ring_ctx *ctx = req->ctx;
struct io_buffer *head, *list;
int ret = 0;
bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
io_ring_submit_lock(ctx, !force_nonblock);
lockdep_asse... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 79,896,909,987,168,780,000,000,000,000,000,000,000 | 27 | 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... |
get_user_cmd_flags(expand_T *xp UNUSED, int idx)
{
static char *user_cmd_flags[] = {
"addr", "bang", "bar", "buffer", "complete",
"count", "nargs", "range", "register", "keepscript"
};
if (idx >= (int)ARRAY_LENGTH(user_cmd_flags))
return NULL;
return (char_u *)user_cmd_flags[idx];
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 339,716,602,354,660,900,000,000,000,000,000,000,000 | 11 | 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. |
ex_bprevious(exarg_T *eap)
{
if (ERROR_IF_ANY_POPUP_WINDOW)
return;
goto_buffer(eap, DOBUF_CURRENT, BACKWARD, (int)eap->line2);
if (eap->do_ecmd_cmd != NULL)
do_cmd_argument(eap->do_ecmd_cmd);
} | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 104,026,823,621,172,610,000,000,000,000,000,000,000 | 9 | 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. |
static int bpf_prog_release(struct inode *inode, struct file *filp)
{
struct bpf_prog *prog = filp->private_data;
bpf_prog_put(prog);
return 0;
} | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 218,883,827,055,216,060,000,000,000,000,000,000,000 | 7 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
uint32 bps = tif->tif_dir.td_bitspersample / 8;
tmsize_t wc = cc / bps;
tmsize_t count;
uint8 *cp = (uint8 *) cp0;
uint8 *tmp;
if((cc%(bps*stride))!=0)
{
TIFFErrorExt(tif->tif_clientdata, "fpDiff",
... | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 6a984bf7905c6621281588431f384e79d11a2e33 | 126,590,063,590,666,020,000,000,000,000,000,000,000 | 40 | * libtiff/tif_predic.c: fix memory leaks in error code paths added in
previous commit (fix for MSVR 35105) |
static apr_bucket *h2_beam_bucket_create(h2_bucket_beam *beam,
apr_bucket *bsender,
apr_bucket_alloc_t *list,
apr_size_t n)
{
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
APR_BUCKET... | 0 | [
"CWE-400"
] | mod_h2 | 83a2e3866918ce6567a683eb4c660688d047ee81 | 82,758,117,561,480,790,000,000,000,000,000,000,000 | 12 | * fixes a race condition where aborting streams triggers an unnecessary timeout. |
static inline void timer_sync_wait_running(struct timer_base *base) { } | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 116,630,259,572,600,150,000,000,000,000,000,000,000 | 1 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_type, zval *return_value TSRMLS_DC) /* {{{ */
{
spl_SplObjectStorageElement *element;
zval *it, *retval = NULL;
int valid = 1, num_elements;
num_elements = zend_hash_num_elements(&intern-... | 1 | [
"CWE-416"
] | php-src | c2e197e4efc663ca55f393bf0e799848842286f3 | 278,158,721,443,330,700,000,000,000,000,000,000,000 | 66 | Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage |
int cil_gen_catorder(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
struct cil_catorder *catorder = NULL;
struct cil_list_item *curr = NULL;
i... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 286,256,626,485,395,260,000,000,000,000,000,000,000 | 46 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static void launch(OpKernelContext* context, const Tensor& tensor_in,
const std::array<int64, 3>& window,
const std::array<int64, 3>& stride,
const std::array<int64, 3>& padding,
TensorFormat data_format, Padding padding_type,
... | 0 | [
"CWE-369",
"CWE-787"
] | tensorflow | 63c6a29d0f2d692b247f7bf81f8732d6442fad09 | 199,293,253,097,067,880,000,000,000,000,000,000,000 | 11 | Add missing validation, prevent heap OOB
PiperOrigin-RevId: 372246723
Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf |
GF_Err trep_Size(GF_Box *s)
{
GF_TrackExtensionPropertiesBox *ptr = (GF_TrackExtensionPropertiesBox *)s;
ptr->size += 4;
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 323,550,174,851,422,730,000,000,000,000,000,000,000 | 6 | fixed 2 possible heap overflows (inc. #1088) |
ipmb_checksum(unsigned char *data, int size)
{
unsigned char csum = 0;
for (; size > 0; size--, data++)
csum += *data;
return -csum;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 326,439,334,751,887,270,000,000,000,000,000,000,000 | 9 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
static void do_dec_rlimit_put_ucounts(struct ucounts *ucounts,
struct ucounts *last, enum ucount_type type)
{
struct ucounts *iter, *next;
for (iter = ucounts; iter != last; iter = next) {
long dec = atomic_long_sub_return(1, &iter->ucount[type]);
WARN_ON_ONCE(dec < 0);
next = iter->ns->ucounts;
if (dec =... | 0 | [
"CWE-416"
] | linux | f9d87929d451d3e649699d0f1d74f71f77ad38f5 | 264,107,800,436,358,420,000,000,000,000,000,000,000 | 12 | ucount: Make get_ucount a safe get_user replacement
When the ucount code was refactored to create get_ucount it was missed
that some of the contexts in which a rlimit is kept elevated can be
the only reference to the user/ucount in the system.
Ordinary ucount references exist in places that also have a reference
to ... |
__libxml2_xzopen(const char *path, const char *mode)
{
return xz_open(path, -1, mode);
} | 0 | [
"CWE-399"
] | libxml2 | f0709e3ca8f8947f2d91ed34e92e38a4c23eae63 | 279,592,111,148,744,200,000,000,000,000,000,000,000 | 4 | CVE-2015-8035 Fix XZ compression support loop
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
DoS when parsing specially crafted XML document if XZ support
is compiled in (which wasn't the case for 2.9.2 and master since
Nov 2013, fixed in next commit !) |
u64 kvm_read_l1_tsc(struct kvm_vcpu *vcpu, u64 host_tsc)
{
return vcpu->arch.l1_tsc_offset +
kvm_scale_tsc(vcpu, host_tsc, vcpu->arch.l1_tsc_scaling_ratio);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 263,008,925,944,568,230,000,000,000,000,000,000,000 | 5 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static void icmpv6_echo_reply(struct sk_buff *skb)
{
struct net *net = dev_net(skb->dev);
struct sock *sk;
struct inet6_dev *idev;
struct ipv6_pinfo *np;
const struct in6_addr *saddr = NULL;
struct icmp6hdr *icmph = icmp6_hdr(skb);
struct icmp6hdr tmp_hdr;
struct flowi6 fl6;
struct icmpv6_msg msg;
struct dst_... | 0 | [
"CWE-20",
"CWE-200"
] | linux | 79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2 | 236,758,889,017,524,500,000,000,000,000,000,000,000 | 82 | net: handle no dst on skb in icmp6_send
Andrey reported the following while fuzzing the kernel with syzkaller:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked in:
CPU: 0 PID: 3859 Comm: a.out Not tainted... |
static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
{
return nla_total_size(16) /* dst */
+ nla_total_size(16); /* src */
} | 0 | [
"CWE-772",
"CWE-401"
] | linux | ca7a03c4175366a92cee0ccc4fec0038c3266e26 | 26,009,083,380,589,876,000,000,000,000,000,000,000 | 5 | ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule
Commit 7d9e5f422150 removed references from certain dsts, but accounting
for this never translated down into the fib6 suppression code. This bug
was triggered by WireGuard users who use wg-quick(8), which uses the
"suppress-prefix" directive to ip-rule(8... |
static void node_init_caches(unsigned int nid)
{
INIT_LIST_HEAD(&node_devices[nid]->cache_attrs);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 323,719,117,750,160,480,000,000,000,000,000,000,000 | 4 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
int getfreqcount(int valid)
{
int i=0, freq_count=0;
while(G.own_frequencies[i])
{
i++;
if(G.own_frequencies[i] != -1)
freq_count++;
}
if(valid) return freq_count;
return i;
} | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 21,268,838,440,223,040,000,000,000,000,000,000,000 | 14 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
double Field_timestamp::val_real(void)
{
return (double) Field_timestamp::val_int();
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 231,063,880,757,614,850,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int ssl_write_server_key_exchange( mbedtls_ssl_context *ssl )
{
int ret;
size_t n = 0;
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
ssl->transform_negotiate->ciphersuite_info;
#if defined(MBEDTLS_KEY_EXCHANGE__SOME_PFS__ENABLED)
unsigned char *p = ssl->out_msg ... | 0 | [
"CWE-20",
"CWE-190"
] | mbedtls | 83c9f495ffe70c7dd280b41fdfd4881485a3bc28 | 48,611,034,816,903,630,000,000,000,000,000,000,000 | 417 | Prevent bounds check bypass through overflow in PSK identity parsing
The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is
unsafe because `*p + n` might overflow, thus bypassing the check. As
`n` is a user-specified value up to 65K, this is relevant if the
library happens to be located in the last 65K o... |
void DocumentSourceGraphLookUp::detachFromOperationContext() {
_fromExpCtx->opCtx = nullptr;
} | 0 | [
"CWE-416"
] | mongo | d6133a3a5464fac202f512b0310dfeb200c126f9 | 188,465,303,790,879,240,000,000,000,000,000,000,000 | 3 | SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context |
**/
CImg<T>& operator>>=(const char *const expression) {
return *this>>=(+*this)._fill(expression,true,true,0,0,"operator>>=",this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 98,389,221,333,740,500,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void WlmActivityManager::HandleAssociation( T_ASC_Association *assoc )
// Date : December 10, 2001
// Author : Thomas Wilkens
// Task : This function takes care of handling the other DICOM application's request. After
// having accomplished all necessary steps, the association will ... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 237,611,939,844,467,940,000,000,000,000,000,000,000 | 40 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
int SSL_add_client_CA(SSL *ssl,X509 *x)
{
return(add_client_CA(&(ssl->client_CA),x));
} | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 115,227,037,019,129,400,000,000,000,000,000,000,000 | 4 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
static int comedi_close(struct inode *inode, struct file *file)
{
const unsigned minor = iminor(inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
struct comedi_device *dev = dev_file_info->device;
struct comedi_subdevice *s = NULL;
int i;
mutex_lock(&dev->mutex);
... | 0 | [
"CWE-200"
] | linux | 819cbb120eaec7e014e5abd029260db1ca8c5735 | 83,654,183,843,573,550,000,000,000,000,000,000,000 | 37 | staging: comedi: fix infoleak to userspace
driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: stable <sta... |
static inline void trigger_load_balance(struct rq *rq, int cpu)
{
#ifdef CONFIG_NO_HZ
/*
* If we were in the nohz mode recently and busy at the current
* scheduler tick, then check if we need to nominate new idle
* load balancer.
*/
if (rq->in_nohz_recently && !rq->idle_at_tick) {
rq->in_nohz_recently = 0;
... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 46,554,874,229,980,420,000,000,000,000,000,000,000 | 53 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static int __init acpi_parse_sbf(struct acpi_table_header *table)
{
struct acpi_table_boot *sb = (struct acpi_table_boot *)table;
sbf_port = sb->cmos_index; /* Save CMOS port */
return 0;
} | 0 | [
"CWE-120"
] | linux | dad5ab0db8deac535d03e3fe3d8f2892173fa6a4 | 71,119,432,253,549,320,000,000,000,000,000,000,000 | 8 | x86/acpi: Prevent out of bound access caused by broken ACPI tables
The bus_irq argument of mp_override_legacy_irq() is used as the index into
the isa_irq_to_gsi[] array. The bus_irq argument originates from
ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI
tables, but is nowhere sanity checked.
Th... |
static void XYcZ_add(uECC_word_t * X1,
uECC_word_t * Y1,
uECC_word_t * X2,
uECC_word_t * Y2,
uECC_Curve curve) {
/* t1 = X1, t2 = Y1, t3 = X2, t4 = Y2 */
uECC_word_t t5[uECC_MAX_WORDS];
wordcount_t num_words = curve->num_wor... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 221,089,528,411,991,250,000,000,000,000,000,000,000 | 26 | Fix for #168 |
Network::SocketOptRef sharedSocket() const override { return absl::nullopt; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 339,756,389,053,549,930,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
QList<Smb4KShare*> Smb4KGlobal::findInaccessibleShares()
{
QList<Smb4KShare *> inaccessible_shares;
mutex.lock();
for ( int i = 0; i < p->mountedSharesList.size(); ++i )
{
if ( p->mountedSharesList.at( i )->isInaccessible() )
{
inaccessible_shares.append( p->mountedSharesList.at( i ) );
c... | 0 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 41,505,571,933,647,070,000,000,000,000,000,000,000 | 24 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
char* skipSpaces( char* ptr )
{
bool is_eof = false;
bool is_completed = false;
while ( is_eof == false && is_completed == false )
{
if (!ptr)
CV_PARSE_ERROR_CPP("Invalid input");
switch ( *ptr )
{
/* comment */... | 0 | [
"CWE-787"
] | opencv | f42d5399aac80d371b17d689851406669c9b9111 | 226,100,961,117,023,600,000,000,000,000,000,000,000 | 103 | core(persistence): add more checks for implementation limitations |
Check_table_name_prm(LEX_CSTRING _db, LEX_CSTRING _table_name) :
db(_db), table_name(_table_name) {} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 310,660,426,478,510,980,000,000,000,000,000,000,000 | 2 | 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.... |
static inline void sctp_v6_pf_init(void) { return; } | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 316,915,034,401,011,350,000,000,000,000,000,000,000 | 1 | 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.
... |
void setupUpstreamTap(envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
auto* transport_socket =
bootstrap.mutable_static_resources()->mutable_clusters(0)->mutable_transport_socket();
transport_socket->set_name("envoy.transport_sockets.tap");
envoy::config::core::v3::TransportSocket raw_transp... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 132,120,247,954,552,940,000,000,000,000,000,000,000 | 11 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int io_prep_sfr(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
struct io_ring_ctx *ctx = req->ctx;
if (!req->file)
return -EBADF;
if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
return -EINVAL;
if (unlikely(sqe->addr || sqe->ioprio || sqe->buf_index))
return -EINVAL;
req->sync.off = READ_O... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 212,810,801,849,157,880,000,000,000,000,000,000,000 | 17 | 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> |
R_API R_BORROW RAnalVar *r_anal_function_get_var_byname(RAnalFunction *fcn, const char *name) {
r_return_val_if_fail (fcn && name, NULL);
void **it;
r_pvector_foreach (&fcn->vars, it) {
RAnalVar *var = *it;
if (!strcmp (var->name, name)) {
return var;
}
}
return NULL;
} | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 144,703,749,993,481,000,000,000,000,000,000,000,000 | 11 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
static inline void write_reg(struct pf_unit *pf, int reg, int val)
{
pi_write_regr(pf->pi, 0, reg, val);
} | 0 | [
"CWE-476",
"CWE-125"
] | linux | 58ccd2d31e502c37e108b285bf3d343eb00c235b | 97,540,614,331,225,140,000,000,000,000,000,000,000 | 4 | paride/pf: Fix potential NULL pointer dereference
Syzkaller report this:
pf: pf version 1.04, major 47, cluster 64, nice 0
pf: No ATAPI disk detected
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 9887... |
int aarp_proxy_probe_network(struct atalk_iface *atif, struct atalk_addr *sa)
{
int hash, retval = -EPROTONOSUPPORT;
struct aarp_entry *entry;
unsigned int count;
/*
* we don't currently support LocalTalk or PPP for proxy AARP;
* if someone wants to try and add it, have fun
*/
if (atif->dev->type == ARPHRD_... | 0 | [
"CWE-476"
] | linux | 9804501fa1228048857910a6bf23e085aade37cc | 263,181,746,404,362,100,000,000,000,000,000,000,000 | 59 | appletalk: Fix potential NULL pointer dereference in unregister_snap_client
register_snap_client may return NULL, all the callers
check it, but only print a warning. This will result in
NULL pointer dereference in unregister_snap_client and other
places.
It has always been used like this since v2.6
Reported-by: Dan ... |
static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
struct snd_pcm_sync_ptr __user *_sync_ptr)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_pcm_sync_ptr sync_ptr;
volatile struct snd_pcm_mmap_status *status;
volatile struct snd_pcm_mmap_control *control;
int err;
memset(... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 274,920,230,748,859,420,000,000,000,000,000,000,000 | 48 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.