func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int snd_c400_create_effect_volume_ctl(struct usb_mixer_interface *mixer)
{
static const char name[] = "Effect Volume";
const unsigned int id = 0x43;
const int val_type = USB_MIXER_U8;
const unsigned int control = 3;
const unsigned int cmask = 0;
return snd_create_std_mono_ctl(mixer, id, control, cmask, va... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 2,855,847,229,732,054,000,000,000,000,000,000,000 | 11 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
static __net_exit void pppol2tp_exit_net(struct net *net)
{
remove_proc_entry("pppol2tp", net->proc_net);
} | 0 | [
"CWE-416"
] | linux | f026bc29a8e093edfbb2a77700454b285c97e8ad | 287,448,041,922,935,300,000,000,000,000,000,000,000 | 4 | l2tp: pass tunnel pointer to ->session_create()
Using l2tp_tunnel_find() in pppol2tp_session_create() and
l2tp_eth_create() is racy, because no reference is held on the
returned session. These functions are only used to implement the
->session_create callback which is run by l2tp_nl_cmd_session_create().
Therefore sea... |
njs_string_concat(njs_vm_t *vm, njs_value_t *val1, njs_value_t *val2)
{
u_char *start;
size_t size, length;
njs_string_prop_t string1, string2;
(void) njs_string_prop(&string1, val1);
(void) njs_string_prop(&string2, val2);
/*
* A result of concatenation of Byte a... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 222d6fdcf0c6485ec8e175f3a7b70d650c234b4e | 282,913,642,775,575,660,000,000,000,000,000,000,000 | 35 | Fixed njs_vmcode_interpreter() when "toString" conversion fails.
Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens. This is not correct
because the current frame has to be unwound (or exception caught)
first.
The fix is exit through only 5 appropr... |
static int atif_proxy_probe_device(struct atalk_iface *atif,
struct atalk_addr* proxy_addr)
{
int netrange = ntohs(atif->nets.nr_lastnet) -
ntohs(atif->nets.nr_firstnet) + 1;
/* we probe the interface's network */
int probe_net = ntohs(atif->address.s_net);
int probe_node = ATADDR_ANYNODE; /* we'll ta... | 0 | [] | history | 7ab442d7e0a76402c12553ee256f756097cae2d2 | 257,219,258,093,388,800,000,000,000,000,000,000,000 | 43 | [DDP]: Convert to new protocol interface.
Convert ddp to the new protocol interface which means it has to
handle fragmented skb's. The only big change is in the checksum
routine which has to do more work (like skb_checksum).
Minor speedup is folding the carry to avoid a branch.
Tested against a 2.4 system and by ru... |
static ssize_t f_midi_opts_id_show(struct config_item *item, char *page)
{
struct f_midi_opts *opts = to_f_midi_opts(item);
int result;
mutex_lock(&opts->lock);
if (opts->id) {
result = strlcpy(page, opts->id, PAGE_SIZE);
} else {
page[0] = 0;
result = 0;
}
mutex_unlock(&opts->lock);
return result;
} | 0 | [
"CWE-415"
] | linux | 7fafcfdf6377b18b2a726ea554d6e593ba44349f | 96,863,931,833,366,130,000,000,000,000,000,000,000 | 17 | USB: gadget: f_midi: fixing a possible double-free in f_midi
It looks like there is a possibility of a double-free vulnerability on an
error path of the f_midi_set_alt function in the f_midi driver. If the
path is feasible then free_ep_req gets called twice:
req->complete = f_midi_complete;
err = us... |
CNF_GetRtcSync(void)
{
return rtc_sync;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 297,158,437,058,852,600,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
void visit(Reference & /*ope*/) override { name = "Reference"; } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 252,847,324,603,541,240,000,000,000,000,000,000,000 | 1 | Fix #122 |
static void php_session_rfc1867_cleanup(php_session_rfc1867_progress *progress TSRMLS_DC) /* {{{ */
{
php_session_initialize(TSRMLS_C);
PS(session_status) = php_session_active;
IF_SESSION_VARS() {
zend_hash_del(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1);
}
php_session_flush(TSRMLS_C... | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 236,264,892,563,586,700,000,000,000,000,000,000,000 | 9 | Strict session |
void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
{
__sync_task_rss_stat(task, mm);
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 78,787,046,968,419,280,000,000,000,000,000,000,000 | 4 | 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(... |
strip_special_chars (std::string& str, char* special_chars, bool start)
{
std::string::size_type idx;
unsigned i = 0;
while (i < strlen (special_chars)) {
idx = str.find_first_of (special_chars[i]);
if (idx != std::string::npos) {
if (start)
str = str.substr (idx+1);
else
str ... | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 97,576,642,082,163,490,000,000,000,000,000,000,000 | 16 | Validate UTF-8 strings before showing them
Closes bug #653009. |
static int loop_lookup(struct loop_device **l, int i)
{
struct loop_device *lo;
int ret = -ENODEV;
if (i < 0) {
int err;
err = idr_for_each(&loop_index_idr, &find_free_cb, &lo);
if (err == 1) {
*l = lo;
ret = lo->lo_number;
}
goto out;
}
/* lookup and return a specific i */
lo = idr_find(&loop_... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 50,708,828,267,330,700,000,000,000,000,000,000,000 | 25 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
md_is_setext_underline(MD_CTX* ctx, OFF beg, OFF* p_end, unsigned* p_level)
{
OFF off = beg + 1;
while(off < ctx->size && CH(off) == CH(beg))
off++;
/* Optionally, space(s) can follow. */
while(off < ctx->size && CH(off) == _T(' '))
off++;
/* But nothing more is allowed on the... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 139,408,997,667,961,000,000,000,000,000,000,000,000 | 19 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
redrawNLine(Buffer *buf, int n)
{
Line *l;
int i;
#ifdef USE_COLOR
if (useColor) {
EFFECT_ANCHOR_END_C;
#ifdef USE_BG_COLOR
setbcolor(bg_color);
#endif /* USE_BG_COLOR */
}
#endif /* USE_COLOR */
if (nTab > 1
#ifdef USE_MOUSE
|| mouse_action.menu_str
#endif
) {
TabBuffer *t;
int l;
mo... | 0 | [
"CWE-119"
] | w3m | 0c3f5d0e0d9269ad47b8f4b061d7818993913189 | 321,259,707,014,656,930,000,000,000,000,000,000,000 | 79 | Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38 |
de265_error decoder_context::read_sei_NAL(bitreader& reader, bool suffix)
{
logdebug(LogHeaders,"----> read SEI\n");
sei_message sei;
//push_current_picture_to_output_queue();
de265_error err = DE265_OK;
if ((err=read_sei(&reader,&sei, suffix, current_sps.get())) == DE265_OK) {
dump_sei(&sei, current_... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 70,030,114,770,957,940,000,000,000,000,000,000,000 | 23 | fix streams where SPS image size changes without refreshing PPS (#299) |
write_VD(struct archive_write *a, struct vdd *vdd)
{
struct iso9660 *iso9660;
unsigned char *bp;
uint16_t volume_set_size = 1;
char identifier[256];
enum VD_type vdt;
enum vdc vdc;
unsigned char vd_ver, fst_ver;
int r;
iso9660 = a->format_data;
switch (vdd->vdd_type) {
case VDD_JOLIET:
vdt = VDT_SUPPLEMEN... | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 171,882,396,911,428,130,000,000,000,000,000,000,000 | 142 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, bool restart)
{
if (hrtimer_is_queued(timer)) {
u8 state = timer->state;
int reprogram;
/*
* Remove the timer and force reprogramming when high
* resolution mode is active and the timer is on the current
* CPU. If we remove a timer ... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 236,408,172,614,713,970,000,000,000,000,000,000,000 | 25 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static void __io_commit_cqring_flush(struct io_ring_ctx *ctx)
{
if (ctx->off_timeout_used || ctx->drain_active) {
spin_lock(&ctx->completion_lock);
if (ctx->off_timeout_used)
io_flush_timeouts(ctx);
if (ctx->drain_active)
io_queue_deferred(ctx);
io_commit_cqring(ctx);
spin_unlock(&ctx->completion_lock)... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 134,825,412,578,716,960,000,000,000,000,000,000,000 | 14 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
rl_callback_read_char ()
{
char *line;
int eof, jcode;
static procenv_t olevel;
if (rl_linefunc == NULL)
{
_rl_errmsg ("readline_callback_read_char() called with no handler!");
abort ();
}
memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t));
#if defined (HAVE_POSIX_SIGSETJ... | 1 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 84,500,524,310,821,720,000,000,000,000,000,000,000 | 169 | bash-4.4-rc2 release |
static int unix_stream_recv_urg(struct unix_stream_read_state *state)
{
struct socket *sock = state->socket;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
int chunk = 1;
struct sk_buff *oob_skb;
mutex_lock(&u->iolock);
unix_state_lock(sk);
if (sock_flag(sk, SOCK_URGINLINE) || !u->oob_skb) {
... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 321,057,221,863,492,080,000,000,000,000,000,000,000 | 40 | 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... |
static int process_spin_lock(struct bpf_verifier_env *env, int regno,
bool is_lock)
{
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
struct bpf_verifier_state *cur = env->cur_state;
bool is_const = tnum_is_const(reg->var_off);
struct bpf_map *map = reg->map_ptr;
u64 val = reg->var_off.val... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 93,872,621,143,610,940,000,000,000,000,000,000,000 | 65 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
config_interface(void)
{
struct Interface *iface;
for(iface=IfaceList; iface; iface=iface->next)
{
if (iface->AdvLinkMTU)
set_interface_linkmtu(iface->Name, iface->AdvLinkMTU);
if (iface->AdvCurHopLimit)
set_interface_curhlim(iface->Name, iface->AdvCurHopLimit);
if (iface->AdvReachableTime)
set_interf... | 0 | [
"CWE-20"
] | radvd | 2c50375043186e133f15135f4c93ca964238ee60 | 119,657,634,496,263,950,000,000,000,000,000,000,000 | 15 | main() must fail on privsep_init() errors, it must not run
without privilege separation as privsep is expected. |
static Status Compute(OpKernelContext* context,
const typename TTypes<Tidx, 1>::ConstTensor& arr,
const typename TTypes<T, 1>::ConstTensor& weights,
typename TTypes<T, 1>::Tensor& output,
const Tidx num_bins) {
Tensor ... | 0 | [
"CWE-125"
] | tensorflow | f410212e373eb2aec4c9e60bf3702eba99a38aba | 330,845,062,667,674,300,000,000,000,000,000,000,000 | 79 | Prevent out-of-bound accesses in SparseBincount.
PiperOrigin-RevId: 399918616
Change-Id: I11d154f4444d3fde1f09c5c40628b8671791a30d |
static int gs_can_close(struct net_device *netdev)
{
int rc;
struct gs_can *dev = netdev_priv(netdev);
struct gs_usb *parent = dev->parent;
netif_stop_queue(netdev);
/* Stop polling */
if (atomic_dec_and_test(&parent->active_channels))
usb_kill_anchored_urbs(&parent->rx_submitted);
/* Stop sending URBs */
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c919a3069c775c1c876bec55e00b2305d5125caa | 280,865,531,634,252,380,000,000,000,000,000,000,000 | 32 | can: gs_usb: Don't use stack memory for USB transfers
Fixes: 05ca5270005c can: gs_usb: add ethtool set_phys_id callback to locate physical device
The gs_usb driver is performing USB transfers using buffers allocated on
the stack. This causes the driver to not function with vmapped stacks.
Instead, allocate memory for... |
bool tcp_syn_flood_action(struct sock *sk,
const struct sk_buff *skb,
const char *proto)
{
const char *msg = "Dropping request";
bool want_cookie = false;
struct listen_sock *lopt;
#ifdef CONFIG_SYN_COOKIES
if (sysctl_tcp_syncookies) {
msg = "Sending cookies";
want_cookie = true;
NET_INC_STATS_BH(s... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 29,969,477,896,693,423,000,000,000,000,000,000,000 | 27 | 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... |
bool routerSuppressEnvoyHeaders() const { return std::get<1>(GetParam()); } | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 131,275,065,712,642,950,000,000,000,000,000,000,000 | 1 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void __xen_evtchn_do_upcall(void)
{
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
int cpu = smp_processor_id();
do {
vcpu_info->evtchn_upcall_pending = 0;
xen_evtchn_handle_events(cpu);
BUG_ON(!irqs_disabled());
virt_rmb(); /* Hypervisor can set upcall pending. */
} while (vcpu_info->... | 1 | [
"CWE-362",
"CWE-476"
] | linux | 073d0552ead5bfc7a3a9c01de590e924f11b5dd2 | 317,871,950,432,047,820,000,000,000,000,000,000,000 | 16 | xen/events: avoid removing an event channel while handling it
Today it can happen that an event channel is being removed from the
system while the event handling loop is active. This can lead to a
race resulting in crashes or WARN() splats when trying to access the
irq_info structure related to the event channel.
Fix... |
int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
long *timeo, struct sock *ssk)
{
struct netlink_sock *nlk;
nlk = nlk_sk(sk);
if ((atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
test_bit(NETLINK_CONGESTED, &nlk->state)) &&
!netlink_skb_is_mmaped(skb)) {
DECLARE_WAITQUEUE(wait, c... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 281,390,141,500,999,240,000,000,000,000,000,000,000 | 40 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void json_tokener_reset_level(struct json_tokener *tok, int depth)
{
tok->stack[depth].state = json_tokener_state_eatws;
tok->stack[depth].saved_state = json_tokener_state_start;
json_object_put(tok->stack[depth].current);
tok->stack[depth].current = NULL;
free(tok->stack[depth].obj_field_name);
tok-... | 0 | [
"CWE-119",
"CWE-310"
] | json-c | 64e36901a0614bf64a19bc3396469c66dcd0b015 | 276,482,434,399,079,770,000,000,000,000,000,000,000 | 9 | Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int |
new_msg_ready_notify (u_int32_t seqnr, u_char lsa_type,
u_char opaque_type, struct in_addr addr)
{
struct msg_ready_notify rmsg;
rmsg.lsa_type = lsa_type;
rmsg.opaque_type = opaque_type;
memset (&rmsg.pad, 0, sizeof (rmsg.pad));
rmsg.addr = addr;
return msg_new (MSG_READY_NOTIFY, &rmsg, seqnr,
... | 0 | [
"CWE-119"
] | quagga | 3f872fe60463a931c5c766dbf8c36870c0023e88 | 82,324,501,314,541,220,000,000,000,000,000,000,000 | 13 | ospfd: CVE-2013-2236, stack overrun in apiserver
the OSPF API-server (exporting the LSDB and allowing announcement of
Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads
to an exploitable stack overflow.
For this condition to occur, the following two conditions must be true:
- Quagga is configured... |
void __init rtnetlink_init(void)
{
int i;
rtattr_max = 0;
for (i = 0; i < ARRAY_SIZE(rta_max); i++)
if (rta_max[i] > rtattr_max)
rtattr_max = rta_max[i];
rta_buf = kmalloc(rtattr_max * sizeof(struct rtattr *), GFP_KERNEL);
if (!rta_buf)
panic("rtnetlink_init: cannot allocate rta_buf\n");
rtnl = netlink_k... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 314,288,940,762,538,640,000,000,000,000,000,000,000 | 20 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int crypt_init_data_device(struct crypt_device **cd, const char *device, const char *data_device)
{
int r;
if (!cd)
return -EINVAL;
r = crypt_init(cd, device);
if (r || !data_device || !strcmp(device, data_device))
return r;
log_dbg(NULL, "Setting ciphertext data device to %s.", data_device);
r = _crypt_se... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 324,872,425,858,704,100,000,000,000,000,000,000,000 | 20 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
STATIC U8 *
S_reghopmaybe3(U8* s, SSize_t off, const U8* lim)
{
PERL_ARGS_ASSERT_REGHOPMAYBE3;
if (off >= 0) {
while (off-- && s < lim) {
/* XXX could check well-formedness here */
s += UTF8SKIP(s);
}
if (off >= 0)
return NULL;
}
else {
while (off++ && s > lim) {
s... | 1 | [
"CWE-416"
] | perl5 | 22b433eff9a1ffa2454e18405a56650f07b385b5 | 130,297,332,912,152,780,000,000,000,000,000,000,000 | 26 | PATCH [perl #123562] Regexp-matching "hangs"
The regex engine got into an infinite loop because of the malformation.
It is trying to back-up over a sequence of UTF-8 continuation bytes.
But the character just before the sequence should be a start byte. If
not, there is a malformation. I added a test to croak if that... |
static void bnx2x_wr_sp_sb_data(struct bnx2x *bp,
struct hc_sp_status_block_data *sp_sb_data)
{
int func = BP_FUNC(bp);
int i;
for (i = 0; i < sizeof(struct hc_sp_status_block_data)/sizeof(u32); i++)
REG_WR(bp, BAR_CSTRORM_INTMEM +
CSTORM_SP_STATUS_BLOCK_DATA_OFFSET(func) +
i*sizeof(u32),
*((u32 *)sp_sb... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 281,934,877,498,702,170,000,000,000,000,000,000,000 | 11 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static inline void ncp_init_request_s(struct ncp_server *server, int subfunction)
{
ncp_lock_server(server);
server->current_size = sizeof(struct ncp_request_header) + 2;
ncp_add_byte(server, subfunction);
server->has_subfunction = 1;
} | 0 | [
"CWE-119"
] | staging | 4c41aa24baa4ed338241d05494f2c595c885af8f | 303,859,040,957,999,320,000,000,000,000,000,000,000 | 9 | staging: ncpfs: memory corruption in ncp_read_kernel()
If the server is malicious then *bytes_read could be larger than the
size of the "target" buffer. It would lead to memory corruption when we
do the memcpy().
Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Dan Ca... |
static void egg_free_egg_file(egg_file* file)
{
uint32_t i = 0;
if (NULL != file->filename.name_utf8) {
free(file->filename.name_utf8);
file->filename.name_utf8 = NULL;
}
if (NULL != file->blocks) {
for (i = 0; i < file->nBlocks; i++) {
egg_free_egg_block(file->block... | 0 | [
"CWE-476"
] | clamav-devel | 8bb3716be9c7ab7c6a3a1889267b1072f48af87b | 218,719,498,909,493,700,000,000,000,000,000,000,000 | 27 | fuzz-22348 null deref in egg utf8 conversion
Corrected memory leaks and a null dereference in the egg utf8 conversion. |
pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func,
int coff, int bytes, uint32_t *eax)
{
struct businfo *bi;
struct slotinfo *si;
struct pci_vdev *dev;
struct pci_vdev_ops *ops;
int idx, needcfg;
uint64_t addr, bar, mask;
bi = pci_businfo[bus];
if (bi != NULL) {
si = &bi->slotinfo... | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 6199e653418eda58cd698d8769820904453e2535 | 233,017,563,176,079,300,000,000,000,000,000,000,000 | 150 | dm: validate the input in 'pci_emul_mem_handler()'
checking the inputs explicitly instead of using Assert.
Tracked-On: #4003
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com> |
bool is_valid(CephContext *cct) const {
if (!is_valid_status(status)) {
ldout(cct, 5) << "NOTICE: bad status provided in rule (status=" << status << ")" << dendl;
return false;
}
if ((filter && !filter->is_valid(cct)) ||
(delete_marker_replication && !delete_marker_replic... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 183,391,380,603,890,740,000,000,000,000,000,000,000 | 11 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
show_tty_change(TTY * old_settings,
TTY * new_settings,
const char *name,
int which,
unsigned def)
{
unsigned older, newer;
char *p;
newer = new_settings->c_cc[which];
older = old_settings->c_cc[which];
if (older == newer && older == def)
return;
(void) fprintf(stderr, "%s %s ", name... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 46,280,389,420,052,910,000,000,000,000,000,000,000 | 35 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) {
if (loca1.origOffset == loca2.origOffset) {
return loca1.idx < loca2.idx;
}
return loca1.origOffset < loca2.origOffset;
} | 0 | [
"CWE-125"
] | poppler | cdb7ad95f7c8fbf63ade040d8a07ec96467042fc | 186,428,907,954,749,860,000,000,000,000,000,000,000 | 6 | Fix malformed file crash in bug #85243 |
JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8* result)
{
if (data->bufferbytesleft==0)
{
uint32 m;
if (data->filebytesleft==0)
return(0);
if (!data->filepositioned)
{
TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET);
data->filepositioned=1;
}
m=data->buffersiz... | 0 | [
"CWE-369"
] | libtiff | 47f2fb61a3a64667bce1a8398a8fcb1b348ff122 | 263,341,726,374,288,300,000,000,000,000,000,000,000 | 28 | * libtiff/tif_jpeg.c: avoid integer division by zero in
JPEGSetupEncode() when horizontal or vertical sampling is set to 0.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 |
GF_Err tims_box_dump(GF_Box *a, FILE * trace)
{
GF_TSHintEntryBox *p;
p = (GF_TSHintEntryBox *)a;
gf_isom_box_dump_start(a, "RTPTimeScaleBox", trace);
gf_fprintf(trace, "TimeScale=\"%d\">\n", p->timeScale);
gf_isom_box_dump_done("RTPTimeScaleBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 205,610,261,711,165,400,000,000,000,000,000,000,000 | 9 | fixed #2138 |
int ha_partition::set_up_table_before_create(TABLE *tbl,
const char *partition_name_with_path,
HA_CREATE_INFO *info,
uint part_id,
partition_element *part_elem)
{
int error= 0;
const char *partition_name;
THD *thd= ha_thd();
DBUG_E... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 207,994,171,427,631,300,000,000,000,000,000,000,000 | 35 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
void oom(const char *msg) {
redisLog(REDIS_WARNING, "%s: Out of memory\n",msg);
sleep(1);
abort();
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 262,486,499,561,867,770,000,000,000,000,000,000,000 | 5 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
GF_Err gen_sample_entry_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e = gf_isom_base_sample_entry_read((GF_SampleEntryBox *)s, bs);
if (e) return e;
ISOM_DECREASE_SIZE(s, 8);
return gf_isom_box_array_read(s, bs);
} | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 163,226,566,724,443,760,000,000,000,000,000,000,000 | 7 | fixed #1757 |
static int shash_update_unaligned(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
struct crypto_shash *tfm = desc->tfm;
struct shash_alg *shash = crypto_shash_alg(tfm);
unsigned long alignmask = crypto_shash_alignmask(tfm);
unsigned int unaligned_len = alignmask + 1 -
((unsigned long)dat... | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 139,828,981,860,006,240,000,000,000,000,000,000,000 | 23 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
static void cleanup_ipv6_mibs(void)
{
snmp_mib_free((void **)ipv6_statistics);
snmp_mib_free((void **)icmpv6_statistics);
snmp_mib_free((void **)icmpv6msg_statistics);
snmp_mib_free((void **)udp_stats_in6);
snmp_mib_free((void **)udplite_stats_in6);
} | 0 | [] | linux-2.6 | 2e761e0532a784816e7e822dbaaece8c5d4be14d | 223,929,389,971,211,900,000,000,000,000,000,000,000 | 8 | ipv6 netns: init net is used to set bindv6only for new sock
The bindv6only is tuned via sysctl. It is already on a struct net
and per-net sysctls allow for its modification (ipv6_sysctl_net_init).
Despite this the value configured in the init net is used for the
rest of them.
Signed-off-by: Pavel Emelyanov <xemul@op... |
int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct sock_exterr_skb *serr;
struct sk_buff *skb, *skb2;
struct sockaddr_in6 *sin;
struct {
struct sock_extended_err ee;
struct sockaddr_in6 offender;
} errhdr;
int err;
int copied;
err = -EAGAIN;
... | 1 | [
"CWE-20"
] | net | 85fbaa75037d0b6b786ff18658ddf0b4014ce2a4 | 39,842,192,481,739,240,000,000,000,000,000,000,000 | 100 | inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage
of uninitialized memory to user in recv syscalls") conditionally updated
addr_len if the msg_name is written to. The recv_error and rxpmtu
functions relied on the re... |
Magick_png_read_raw_profile(png_struct *ping,Image *image,
const ImageInfo *image_info, png_textp text,int ii,ExceptionInfo *exception)
{
register ssize_t
i;
register unsigned char
*dp;
register png_charp
sp;
size_t
extent,
nibbles;
ssize_t
length;
StringInfo
*profile;
... | 0 | [
"CWE-416"
] | ImageMagick | 916d7bbd2c66a286d379dbd94bc6035c8fab937c | 286,604,805,179,870,120,000,000,000,000,000,000,000 | 114 | Removed invalid free reported in #1791. |
CImg<T> get_slice(const int z0) const {
return get_slices(z0,z0);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 162,452,273,503,149,550,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
string_translate(PyStringObject *self, PyObject *args)
{
register char *input, *output;
const char *table;
register Py_ssize_t i, c, changed = 0;
PyObject *input_obj = (PyObject*)self;
const char *output_start, *del_table=NULL;
Py_ssize_t inlen, tablen, dellen = 0;
PyObject *result;
int ... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 110,702,310,926,885,950,000,000,000,000,000,000,000 | 115 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
static const char *md_config_set_ca(cmd_parms *cmd, void *dc, const char *value)
{
md_srv_conf_t *sc = md_config_get(cmd->server);
const char *err;
(void)dc;
if (!inside_md_section(cmd) && (err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
return err;
}
sc->ca_url = value;
return NUL... | 0 | [
"CWE-476"
] | mod_md | e71001955809247b3aa4d269e1e0741b4fe0fc3d | 9,786,617,446,861,523,000,000,000,000,000,000,000 | 12 | v1.1.12, notifycmd improvements |
static int sas_rediscover(struct domain_device *dev, const int phy_id)
{
struct expander_device *ex = &dev->ex_dev;
struct ex_phy *changed_phy = &ex->ex_phy[phy_id];
int res = 0;
int i;
bool last = true; /* is this the last phy of the port */
pr_debug("ex %016llx phy%02d originated BROADCAST(CHANGE)\n",
SAS_A... | 0 | [
"CWE-401"
] | linux | 3b0541791453fbe7f42867e310e0c9eb6295364d | 333,617,329,596,934,400,000,000,000,000,000,000,000 | 28 | scsi: libsas: delete sas port if expander discover failed
The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be
deleted when the expander failed to discover. This will cause resource leak
and a further issue of kernel BUG like below:
[159785.843156] port-2:17:29: trying to add phy phy-2:17:29 f... |
static void shrink_readahead_size_eio(struct file *filp,
struct file_ra_state *ra)
{
if (!ra->ra_pages)
return;
ra->ra_pages /= 4;
} | 0 | [
"CWE-193"
] | linux-2.6 | 94ad374a0751f40d25e22e036c37f7263569d24c | 131,854,324,328,610,210,000,000,000,000,000,000,000 | 8 | Fix off-by-one error in iov_iter_advance()
The iov_iter_advance() function would look at the iov->iov_len entry
even though it might have iterated over the whole array, and iov was
pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a
kernel page fault if the allocation was at the end of a page, and th... |
char *ndpi_strnstr(const char *s, const char *find, size_t slen) {
char c;
size_t len;
if((c = *find++) != '\0') {
len = strnlen(find, slen);
do {
char sc;
do {
if(slen-- < 1 || (sc = *s++) == '\0')
return(NULL);
} while (sc != c);
if(len > slen)
return(NULL);
} while (s... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 210,817,651,595,225,540,000,000,000,000,000,000,000 | 21 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
tree_mod_log_eb_move(struct btrfs_fs_info *fs_info, struct extent_buffer *dst,
int dst_offset, int src_offset, int nr_items)
{
int ret;
ret = tree_mod_log_insert_move(fs_info, dst, dst_offset, src_offset,
nr_items, GFP_NOFS);
BUG_ON(ret < 0);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 | 307,380,436,129,444,600,000,000,000,000,000,000,000 | 8 | Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the x... |
static int ext4_ordered_write_end(struct file *file,
struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
handle_t *handle = ext4_journal_current_handle();
struct inode *inode = mapping->host;
int ret = 0, ret2;
trace_ext4_ordered_write_end(... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 249,886,747,694,242,100,000,000,000,000,000,000,000 | 43 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p)
{
atomic_set(&mm->mm_users, 1);
atomic_set(&mm->mm_count, 1);
init_rwsem(&mm->mmap_sem);
INIT_LIST_HEAD(&mm->mmlist);
mm->flags = (current->mm) ?
(current->mm->flags & MMF_INIT_MASK) : default_dump_filter;
mm->core_state = NULL;
mm->... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e66eded8309ebf679d3d3c1f5820d1f2ca332c71 | 174,323,231,102,557,500,000,000,000,000,000,000,000 | 26 | userns: Don't allow CLONE_NEWUSER | CLONE_FS
Don't allowing sharing the root directory with processes in a
different user namespace. There doesn't seem to be any point, and to
allow it would require the overhead of putting a user namespace
reference in fs_struct (for permission checks) and incrementing that
reference... |
static Image *ReadHEICImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
const char
*option;
const StringInfo
*profile;
heif_item_id
exif_id;
Image
*image;
int
count,
stride_y,
stride_cb,
stride_cr;
MagickBooleanType
status;
size_t
length;
ssi... | 1 | [
"CWE-125"
] | ImageMagick6 | 3456724dff047db5adb32f8cf70c903c1b7d16d4 | 126,205,623,246,026,880,000,000,000,000,000,000,000 | 281 | Always correct the width and height of the image. |
last_sync_action_show(struct mddev *mddev, char *page)
{
return sprintf(page, "%s\n", mddev->last_sync_action);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 322,136,566,919,672,050,000,000,000,000,000,000,000 | 4 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
static ssize_t select_padding_callback(nghttp2_session *session,
const nghttp2_frame *frame,
size_t max_payloadlen, void *user_data) {
my_user_data *ud = (my_user_data *)user_data;
(void)session;
return (ssize_t)nghttp2_min(max_payload... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 336,264,975,479,037,570,000,000,000,000,000,000,000 | 8 | Add nghttp2_option_set_max_outbound_ack |
static int net_param_nic(void *dummy, QemuOpts *opts, Error **errp)
{
char *mac, *nd_id;
int idx, ret;
NICInfo *ni;
const char *type;
type = qemu_opt_get(opts, "type");
if (type && g_str_equal(type, "none")) {
return 0; /* Nothing to do, default_net is cleared in vl.c */
}
i... | 0 | [
"CWE-835"
] | qemu | 705df5466c98f3efdd2b68d3b31dad86858acad7 | 84,985,470,135,702,350,000,000,000,000,000,000,000 | 61 | net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().
Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as pee... |
static void increment_offset(int64_t delta)
{
if (unlikely(delta == 0))
return;
location.offset += delta;
set_curr_offs(location.offset);
} | 0 | [
"CWE-476"
] | nasm | e996d28c70d45008085322b442b44a9224308548 | 303,584,892,898,863,920,000,000,000,000,000,000,000 | 8 | labels: Don't nil dereference if no label provided
An equ without label may cause nil dereference
| equ 0x100
Fixes 98578071b9d71ecaa2344dd9c185237c1765041e
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> |
static const char *set_document_root(cmd_parms *cmd, void *dummy,
const char *arg)
{
void *sconf = cmd->server->module_config;
core_server_config *conf = ap_get_core_module_config(sconf);
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
if (err != N... | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 4,116,115,794,100,462,400,000,000,000,000,000,000 | 41 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
psutil_proc_info(PyObject *self, PyObject *args) {
DWORD pid;
PSYSTEM_PROCESS_INFORMATION process;
PVOID buffer;
ULONG i;
ULONG ctx_switches = 0;
double user_time;
double kernel_time;
long long create_time;
SIZE_T mem_private;
PyObject *py_retlist;
if (! PyArg_ParseTuple(arg... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 239,887,198,922,587,300,000,000,000,000,000,000,000 | 78 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
static void myvar_set (const char* var, const char* val)
{
myvar_t** cur;
for (cur = &MyVars; *cur; cur = &((*cur)->next))
if (!mutt_strcmp ((*cur)->name, var))
break;
if (!*cur)
*cur = safe_calloc (1, sizeof (myvar_t));
if (!(*cur)->name)
(*cur)->name = safe_strdup (var);
mutt_str_r... | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 4,238,808,835,330,277,000,000,000,000,000,000,000 | 16 | use a 64-bit random value in temporary filenames.
closes #3158 |
static void cmd_newgroups(time_t tstamp __attribute__((unused)))
{
prot_printf(nntp_out, "503 Can't determine NEWGROUPS at this time\r\n");
#if 0
prot_printf(nntp_out, "231 List of new newsgroups follows:\r\n");
/* Do search of annotations here. */
prot_printf(nntp_out, ".\r\n");
#endif
} | 0 | [
"CWE-119"
] | cyrus-imapd | 0f8f026699829b65733c3081657b24e2174f4f4d | 663,630,455,439,326,400,000,000,000,000,000,000 | 11 | CVE-2011-3208 - fix buffer overflow in nntpd |
void fs_check_private_dir(void) {
invalid_filename(cfg.home_private);
// Expand the home directory
char *tmp = expand_home(cfg.home_private, cfg.homedir);
cfg.home_private = realpath(tmp, NULL);
free(tmp);
if (!cfg.home_private
|| !is_dir(cfg.home_private)
|| is_link(cfg.home_private)
|| strstr(cfg.home... | 0 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 55,396,707,962,096,740,000,000,000,000,000,000,000 | 35 | security fix |
re_alloc_pattern(regex_t** reg)
{
*reg = (regex_t* )xmalloc(sizeof(regex_t));
if (IS_NULL(*reg)) return ONIGERR_MEMORY;
return onig_reg_init(*reg, ONIG_OPTION_DEFAULT,
ONIGENC_CASE_FOLD_DEFAULT,
OnigEncDefaultCharEncoding,
OnigDefaultSyntax);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 207,380,325,591,128,730,000,000,000,000,000,000,000 | 10 | onig-5.9.2 |
#else
static int input (yyscan_t yyscanner)
#endif
{
int c;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
*yyg->yy_c_buf_p = yyg->yy_hold_char;
if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB c... | 1 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 71,815,573,856,830,810,000,000,000,000,000,000,000 | 76 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
static void Ins_NROUND( INS_ARG )
{
args[0] = Round_None( EXEC_ARGS
args[0],
CUR.metrics.compensations[CUR.opcode - 0x6C] );
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 76,143,509,240,235,590,000,000,000,000,000,000,000 | 6 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static void dwc3_gadget_hibernation_interrupt(struct dwc3 *dwc,
unsigned int evtinfo)
{
unsigned int is_ss = evtinfo & BIT(4);
/*
* WORKAROUND: DWC3 revison 2.20a with hibernation support
* have a known issue which can cause USB CV TD.9.23 to fail
* randomly.
*
* Because of this issue, core could generat... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 250,204,362,474,036,270,000,000,000,000,000,000,000 | 23 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
static boolean ReadIPTCProfile(j_decompress_ptr jpeg_info)
{
char
magick[MagickPathExtent];
ErrorManager
*error_manager;
ExceptionInfo
*exception;
Image
*image;
MagickBooleanType
status;
register ssize_t
i;
register unsigned char
*p;
size_t
length;
StringInfo
... | 0 | [
"CWE-416"
] | ImageMagick | 39f226a9c137f547e12afde972eeba7551124493 | 75,373,077,161,417,630,000,000,000,000,000,000,000 | 127 | https://github.com/ImageMagick/ImageMagick/issues/1641 |
static inline int pmd_none(pmd_t pmd)
{
/* Only check low word on 32-bit platforms, since it might be
out of sync with upper half. */
return (unsigned long)native_pmd_val(pmd) == 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 027ef6c87853b0a9df53175063028edb4950d476 | 104,712,837,556,179,320,000,000,000,000,000,000,000 | 6 | mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP
In many places !pmd_present has been converted to pmd_none. For pmds
that's equivalent and pmd_none is quicker so using pmd_none is better.
However (unless we delete pmd_present) we should provide an accurate
pmd_present too. This will avoid the ri... |
static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct vif_params params;
struct wireless_dev *wdev;
struct sk_buff *msg;
int err;
enum nl80211_iftype type = NL80211_IFTYPE_UNSPECIFIED;
/* to avoid failing a new interfa... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 18,398,583,420,531,294,000,000,000,000,000,000,000 | 97 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
int dsSet(redisDb *db, robj *key, robj *val) {
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 307,629,947,854,264,800,000,000,000,000,000,000,000 | 2 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
g_file_set_attribute_int64 (GFile *file,
const gchar *attribute,
gint64 value,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 312,519,134,823,395,880,000,000,000,000,000,000,000 | 11 | 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... |
__releases(fc->lock)
{
if (fc->minor < 16 || fc->forget_list_head.next->next == NULL)
return fuse_read_single_forget(fc, cs, nbytes);
else
return fuse_read_batch_forget(fc, cs, nbytes);
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | linux | c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae | 17,669,467,463,609,977,000,000,000,000,000,000,000 | 7 | fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message
FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
message processing could overrun and result in a "kernel BUG at
fs/fuse/dev.c:629!"
Reported-by: Han-Wen Nienhuys <hanwenn@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kern... |
static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
ieee80211_tx_result res = TX_CONTINUE;
if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
__skb_queue_tail(&tx->skbs, tx->skb);
tx->skb = NULL;
goto txh_done;
}
CALL_... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 234,711,176,731,198,170,000,000,000,000,000,000,000 | 36 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
static void adjust_branches(struct bpf_prog *prog, int pos, int delta)
{
struct bpf_insn *insn = prog->insnsi;
int insn_cnt = prog->len;
int i;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) != BPF_JMP ||
BPF_OP(insn->code) == BPF_CALL ||
BPF_OP(insn->code) == BPF_EXIT)
continu... | 1 | [
"CWE-200"
] | linux | a1b14d27ed0965838350f1377ff97c93ee383492 | 42,790,881,791,968,960,000,000,000,000,000,000,000 | 19 | bpf: fix branch offset adjustment on backjumps after patching ctx expansion
When ctx access is used, the kernel often needs to expand/rewrite
instructions, so after that patching, branch offsets have to be
adjusted for both forward and backward jumps in the new eBPF program,
but for backward jumps it fails to account ... |
static void copy_xauthority(void) {
// copy XAUTHORITY_FILE in the new home directory
char *src = RUN_XAUTHORITY_FILE ;
char *dest;
if (asprintf(&dest, "%s/.Xauthority", cfg.homedir) == -1)
errExit("asprintf");
// if destination is a symbolic link, exit the sandbox!!!
if (is_link(dest)) {
fprintf(stderr, "Er... | 1 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 4,113,619,106,277,059,000,000,000,000,000,000,000 | 41 | security fix |
cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
size_t ss = CDF_SEC_SIZE(h), i, j;
ssize_t nr;
scn->sst_len = cdf_count_chain(sat, sid, ss);
scn->sst_dirlen = len;
if (scn->sst_len == (size_t)-1)
return -1;
s... | 1 | [
"CWE-119"
] | file | 1140872578eedaeecf828f1841d17ff574372dba | 74,299,489,436,109,980,000,000,000,000,000,000,000 | 43 | - add float and double types
- fix debug printf formats
- fix short stream sizes
- don't fail if we don't know about a type |
static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = file_inode(file);
void *page;
ssize_t length;
struct task_struct *task = get_proc_task(inode);
length = -ESRCH;
if (!task)
goto out_no_task;
if (count > PAGE_SIZE)
coun... | 0 | [
"CWE-362"
] | linux | 8148a73c9901a8794a50f950083c00ccf97d43b3 | 144,075,957,250,219,700,000,000,000,000,000,000,000 | 41 | proc: prevent accessing /proc/<PID>/environ until it's ready
If /proc/<PID>/environ gets read before the envp[] array is fully set up
in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
read more bytes than are actually written, as env_start will already be
set but env_end will still be zero, makin... |
static void tcp_check_reno_reordering(struct sock *sk, const int addend)
{
struct tcp_sock *tp = tcp_sk(sk);
if (tcp_limit_reno_sacked(tp))
tcp_update_reordering(sk, tp->packets_out + addend, 0);
} | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 225,364,751,753,166,650,000,000,000,000,000,000,000 | 6 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
mark_fill_rect(int w, int h, byte *gs_restrict dst_ptr, byte *gs_restrict src, int num_comp, int num_spots, int first_blend_spot,
byte src_alpha, int rowstride, int planestride, bool additive, pdf14_device *pdev, gs_blend_mode_t blend_mode,
bool overprint, gx_color_index drawn_comps, int t... | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 21,806,586,178,724,500,000,000,000,000,000,000,000 | 10 | Bug 701795: Segv due to image mask issue |
virDomainXMLOptionGetSaveCookie(virDomainXMLOptionPtr xmlopt)
{
return &xmlopt->saveCookie;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 48,316,727,495,225,150,000,000,000,000,000,000,000 | 4 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static Image *XGetWindowImage(Display *display,const Window window,
const unsigned int borders,const unsigned int level,ExceptionInfo *exception)
{
typedef struct _ColormapInfo
{
Colormap
colormap;
XColor
*colors;
struct _ColormapInfo
*next;
} ColormapInfo;
typedef struct _Win... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 291,605,966,100,291,370,000,000,000,000,000,000,000 | 561 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static long do_get_mempolicy(int *policy, nodemask_t *nmask,
unsigned long addr, unsigned long flags)
{
int err;
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma = NULL;
struct mempolicy *pol = current->mempolicy;
if (flags &
~(unsigned long)(MPOL_F_NODE|MPOL_F_ADDR|MPOL_F_MEMS_ALLOWED))
... | 0 | [
"CWE-416"
] | linux | 73223e4e2e3867ebf033a5a8eb2e5df0158ccc99 | 47,455,398,018,484,180,000,000,000,000,000,000,000 | 84 | mm/mempolicy: fix use after free when calling get_mempolicy
I hit a use after free issue when executing trinity and repoduced it
with KASAN enabled. The related call trace is as follows.
BUG: KASan: use after free in SyS_get_mempolicy+0x3c8/0x960 at addr ffff8801f582d766
Read of size 2 by task syz-executor1/798
... |
void mark_mounts_for_expiry(struct list_head *mounts)
{
struct mount *mnt, *next;
LIST_HEAD(graveyard);
if (list_empty(mounts))
return;
namespace_lock();
lock_mount_hash();
/* extract from the expiration list every vfsmount that matches the
* following criteria:
* - only referenced by its parent vfsmount... | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 217,663,194,135,173,200,000,000,000,000,000,000,000 | 31 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp)
{
struct vdpa_callback cb;
int fd;
struct eventfd_ctx *ctx;
cb.callback = vhost_vdpa_config_cb;
cb.private = v;
if (copy_from_user(&fd, argp, sizeof(fd)))
return -EFAULT;
ctx = fd == VHOST_FILE_UNBIND ? NULL : eventfd_ctx_fdget(f... | 0 | [
"CWE-190"
] | linux | 870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 | 174,470,493,491,259,540,000,000,000,000,000,000,000 | 28 | vdpa: clean up get_config_size ret value handling
The return type of get_config_size is size_t so it makes
sense to change the type of the variable holding its result.
That said, this already got taken care of (differently, and arguably
not as well) by commit 3ed21c1451a1 ("vdpa: check that offsets are
within bounds"... |
int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
char *data, EVP_PKEY *pkey)
{
EVP_MD_CTX ctx;
const EVP_MD *type;
unsigned char *p,*buf_in=NULL;
int ret= -1,i,inl;
EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
{... | 1 | [
"CWE-310"
] | openssl | a8565530e27718760220df469f0a071c85b9e731 | 153,579,183,618,637,470,000,000,000,000,000,000,000 | 53 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
{
struct mkiss *ax = netdev_priv(dev);
unsigned char *p;
int actual, count;
if (ax->mtu != ax->dev->mtu + 73) /* Someone has been ifconfigging */
ax_changedmtu(ax);
if (len > ax->mtu) { /* Sigh, shouldn't occur BUT ... */
printk(KERN... | 0 | [
"CWE-416"
] | linux | b2f37aead1b82a770c48b5d583f35ec22aabb61e | 135,273,957,583,416,500,000,000,000,000,000,000,000 | 93 | hamradio: improve the incomplete fix to avoid NPD
The previous commit 3e0588c291d6 ("hamradio: defer ax25 kfree after
unregister_netdev") reorder the kfree operations and unregister_netdev
operation to prevent UAF.
This commit improves the previous one by also deferring the nullify of
the ax->tty pointer. Otherwise, ... |
GF_Err gf_isom_rewrite_track_dependencies(GF_ISOFile *movie, u32 trackNumber)
{
GF_TrackReferenceTypeBox *ref;
GF_TrackBox *trak, *a_trak;
u32 i, k;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak)
return GF_BAD_PARAM;
if (!trak->References)
return GF_OK;
i=0;
while ((ref = (GF_TrackRefe... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 253,767,209,462,067,150,000,000,000,000,000,000,000 | 28 | fixed #1706 |
static void hwsim_send_nullfunc_no_ps(void *dat, u8 *mac,
struct ieee80211_vif *vif)
{
struct mac80211_hwsim_data *data = dat;
hwsim_send_nullfunc(data, mac, vif, 0);
} | 0 | [
"CWE-703",
"CWE-772"
] | linux | 0ddcff49b672239dda94d70d0fcf50317a9f4b51 | 253,675,273,786,616,700,000,000,000,000,000,000,000 | 6 | mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <we... |
SigHupHandler(SIGNAL_ARGS)
{
int save_errno = errno;
got_SIGHUP = true;
SetLatch(MyLatch);
errno = save_errno;
} | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 50,148,943,987,659,870,000,000,000,000,000,000,000 | 9 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
static void hugetlbfs_i_callback(struct rcu_head *head)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode));
} | 0 | [] | linux | 1bfad99ab42569807d0ca1698449cae5e8c0334a | 1,862,268,500,372,613,600,000,000,000,000,000,000 | 5 | hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete
fallocate hole punch will want to unmap a specific range of pages.
Modify the existing hugetlb_vmtruncate_list() routine to take a
start/end range. If end is 0, this indicates all pages after start
should be unmapped. This is the same as the existi... |
GF_Err dvvC_box_dump(GF_Box *a, FILE * trace)
{
return dvcC_box_dump(a, trace);
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 165,728,370,550,924,250,000,000,000,000,000,000,000 | 4 | fixed #2138 |
static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
{
struct net *net = sock_net(skb->sk);
struct net *tgt_net = net;
int h, s_h;
int idx = 0, s_idx;
struct net_device *dev;
struct hlist_head *head;
struct nlattr *tb[IFLA_MAX+1];
u32 ext_filter_mask = 0;
const struct rtnl_link_ops *ki... | 1 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 167,847,471,087,966,860,000,000,000,000,000,000,000 | 92 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
void sctp_assoc_rwnd_increase(struct sctp_association *asoc, unsigned len)
{
struct sctp_chunk *sack;
struct timer_list *timer;
if (asoc->rwnd_over) {
if (asoc->rwnd_over >= len) {
asoc->rwnd_over -= len;
} else {
asoc->rwnd += (len - asoc->rwnd_over);
asoc->rwnd_over = 0;
}
} else {
asoc->rwnd +=... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 18,274,800,768,983,342,000,000,000,000,000,000,000 | 44 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
void IOBuf::decrementRefcount() noexcept {
// Externally owned buffers don't have a SharedInfo object and aren't managed
// by the reference count
SharedInfo* info = sharedInfo();
if (!info) {
return;
}
// Avoid doing atomic decrement if the refcount is 1.
// This is safe, because it means that we're... | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 153,910,011,951,553,780,000,000,000,000,000,000,000 | 47 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
static void perf_event_context_sched_out(struct task_struct *task, int ctxn,
struct task_struct *next)
{
struct perf_event_context *ctx = task->perf_event_ctxp[ctxn];
struct perf_event_context *next_ctx;
struct perf_event_context *parent;
struct perf_cpu_context *cpuctx;
int do_switch = 1;
if (likely(!ctx)... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 160,030,502,103,552,480,000,000,000,000,000,000,000 | 57 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.