project string | commit_id string | target int64 | func string | cwe string | big_vul_idx string | idx int64 | hash string | size float64 | message string | dataset string |
|---|---|---|---|---|---|---|---|---|---|---|
linux | efe4186e6a1b54bf38b9e05450d43b0da1fd7739 | 1 | static void sixpack_close(struct tty_struct *tty)
{
struct sixpack *sp;
write_lock_irq(&disc_data_lock);
sp = tty->disc_data;
tty->disc_data = NULL;
write_unlock_irq(&disc_data_lock);
if (!sp)
return;
/*
* We have now ensured that nobody can start using ap from now on, but
* we have to wait for all exist... | null | null | 204,814 | 34119603289207627346986497632030740076 | 35 | drivers: hamradio: 6pack: fix UAF bug caused by mod_timer()
When a 6pack device is detaching, the sixpack_close() will act to cleanup
necessary resources. Although del_timer_sync() in sixpack_close()
won't return if there is an active timer, one could use mod_timer() in
sp_xmit_on_air() to wake up timer again by calli... | other |
linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 1 | struct vfsmount *clone_private_mount(const struct path *path)
{
struct mount *old_mnt = real_mount(path->mnt);
struct mount *new_mnt;
if (IS_MNT_UNBINDABLE(old_mnt))
return ERR_PTR(-EINVAL);
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
if (IS_ERR(new_mnt))
return ERR_CAST(new_mnt);
/* Longterm m... | null | null | 204,830 | 94389509905056133386308491228723938372 | 17 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... | other |
radare2 | 153bcdc29f11cd8c90e7d639a7405450f644ddb6 | 1 | RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) {
RList *segments = bin->segments;
if (!segments) {
return NULL;
}
RList *entries = bin->entries;
if (!entries) {
return NULL;
}
RList *symbols = bin->symbols;
if (!symbols) {
return NULL;
}
ut16 *modref = calloc (bin->ne_header->ModRefs, sizeof (ut16));
... | null | null | 205,570 | 43335819365967830774615638271493426454 | 162 | Fix oobread in NE parser ##crash
* Reported by @hmsec via huntr.dev
* Reproducer: necrash
* BountyID: 52b57274-0e1a-4d61-ab29-1373b555fea0/ | other |
ghostpdl | 79cccf641486a6595c43f1de1cd7ade696020a31 | 1 | gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
pgs->memory);
if (code < 0)
return code;
/*
... | null | null | 205,619 | 320988381385389776461252779550920204607 | 33 | Bug 699654(2): preserve LockSafetyParams in the nulldevice
The nulldevice does not necessarily use the normal setpagedevice machinery,
but can be set using the nulldevice operator. In which case, we don't preserve
the settings from the original device (in the way setpagedevice does).
Since nulldevice does nothing, th... | other |
linux | 32452a3eb8b64e01e2be717f518c0be046975b9d | 1 | static int io_rw_init_file(struct io_kiocb *req, fmode_t mode)
{
struct kiocb *kiocb = &req->rw.kiocb;
struct io_ring_ctx *ctx = req->ctx;
struct file *file = req->file;
int ret;
if (unlikely(!file || !(file->f_mode & mode)))
return -EBADF;
if (!io_req_ffs_set(req))
req->flags |= io_file_get_flags(file) << ... | null | null | 205,630 | 96047674375362496799593517379205519403 | 42 | io_uring: fix uninitialized field in rw io_kiocb
io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll
reads kiocb->private it can contain uninitialized data.
Fixes: 3e08773c3841 ("block: switch polling to be bio based")
Signed-off-by: Joseph Ravichandran <jravi@mit.edu>
Signed-off-by: Jens Axbo... | other |
linux | a2ef990ab5a6705a356d146dd773a3b359787497 | 1 | static int proc_pid_permission(struct inode *inode, int mask)
{
struct pid_namespace *pid = inode->i_sb->s_fs_info;
struct task_struct *task;
bool has_perms;
task = get_proc_task(inode);
has_perms = has_pid_permissions(pid, task, 1);
put_task_struct(task);
if (!has_perms) {
if (pid->hide_pid == 2) {
/*
... | null | null | 205,663 | 135255628387104225960874778723471285920 | 25 | proc: fix null pointer deref in proc_pid_permission()
get_proc_task() can fail to search the task and return NULL,
put_task_struct() will then bomb the kernel with following oops:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: [<ffffffff81217d34>] proc_pid_permission+0x64/0xe0
PGD... | other |
rizin | 38d8006cd609ac75de82b705891d3508d2c218d5 | 1 | static pyc_object *get_complex_object(RzBinPycObj *pyc, RzBuffer *buffer) {
pyc_object *ret = NULL;
bool error = false;
ut32 size = 0;
ut32 n1 = 0;
ut32 n2 = 0;
ret = RZ_NEW0(pyc_object);
if (!ret) {
return NULL;
}
if ((pyc->magic_int & 0xffff) <= 62061) {
n1 = get_ut8(buffer, &error);
} else {
n1 = g... | null | null | 205,734 | 45385170421195869750980807202859649234 | 65 | fix #2963 - oob write (1 byte) in pyc/marshal.c | other |
linux | 775c5033a0d164622d9d10dd0f0a5531639ed3ed | 1 | static inline void fuse_make_bad(struct inode *inode)
{
set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state);
} | null | null | 205,736 | 307092165948896268565711171016597318269 | 4 | fuse: fix live lock in fuse_iget()
Commit 5d069dbe8aaf ("fuse: fix bad inode") replaced make_bad_inode()
in fuse_iget() with a private implementation fuse_make_bad().
The private implementation fails to remove the bad inode from inode
cache, so the retry loop with iget5_locked() finds the same bad inode
and marks it ... | other |
linux | 0b9111922b1f399aba6ed1e1b8f2079c3da1aed8 | 1 | static void sixpack_close(struct tty_struct *tty)
{
struct sixpack *sp;
write_lock_irq(&disc_data_lock);
sp = tty->disc_data;
tty->disc_data = NULL;
write_unlock_irq(&disc_data_lock);
if (!sp)
return;
/*
* We have now ensured that nobody can start using ap from now on, but
* we have to wait for all exist... | null | null | 205,747 | 249805018278643935871389223895747450083 | 33 | hamradio: defer 6pack kfree after unregister_netdev
There is a possible race condition (use-after-free) like below
(USE) | (FREE)
dev_queue_xmit |
__dev_queue_xmit |
__dev_xmit_skb |
sch_direct_xmit | ...
xmit_one |
... | other |
Singular | 5f28fbf066626fa9c4a8f0e6408c0bb362fb386c | 1 | void sdb_edit(procinfo *pi)
{
char * filename = omStrDup("/tmp/sd000000");
sprintf(filename+7,"%d",getpid());
FILE *fp=fopen(filename,"w");
if (fp==NULL)
{
Print("cannot open %s\n",filename);
omFree(filename);
return;
}
if (pi->language!= LANG_SINGULAR)
{
Print("cannot edit type %d\n",pi... | null | null | 205,806 | 25730383295969775485586037725138837363 | 88 | use mkstemp for sdb | other |
date | 376c65942bd1d81803f14d37351737df60ec4664 | 1 | check_limit(VALUE str, VALUE opt)
{
if (NIL_P(str)) return;
StringValue(str);
size_t slen = RSTRING_LEN(str);
size_t limit = get_limit(opt);
if (slen > limit) {
rb_raise(rb_eArgError,
"string length (%"PRI_SIZE_PREFIX"u) exceeds the limit %"PRI_SIZE_PREFIX"u", slen, limit);
}
} | null | null | 205,807 | 136825502050184594453138943655153134771 | 12 | check_limit: also handle symbols | other |
linux | fdac1e0697356ac212259f2147aa60c72e334861 | 1 | static int irda_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
struct irda_device_list list;
struct irda_device_info *discoveries;
struct irda_ias_set * ias_opt; /* IAS get/query params */
s... | null | null | 205,821 | 206723367980818827503124126810367962719 | 360 | irda: prevent integer underflow in IRLMP_ENUMDEVICES
If the user-provided len is less than the expected offset, the
IRLMP_ENUMDEVICES getsockopt will do a copy_to_user() with a very large
size value. While this isn't be a security issue on x86 because it will
get caught by the access_ok() check, it may leak large amo... | other |
ovs | 803ed12e31b0377c37d7aa8c94b3b92f2081e349 | 1 | ipf_extract_frags_from_batch(struct ipf *ipf, struct dp_packet_batch *pb,
ovs_be16 dl_type, uint16_t zone, long long now,
uint32_t hash_basis)
{
const size_t pb_cnt = dp_packet_batch_size(pb);
int pb_idx; /* Index in a packet batch. */
struct dp_pack... | null | null | 205,823 | 7422800219328489278084315046345573051 | 25 | ipf: release unhandled packets from the batch
Since 640d4db788ed ("ipf: Fix a use-after-free error, ...") the ipf
framework unconditionally allocates a new dp_packet to track
individual fragments. This prevents a use-after-free. However, an
additional issue was present - even when the packet buffer is cloned,
if the... | other |
vim | 2bdad6126778f907c0b98002bfebf0e611a3f5db | 1 | get_one_sourceline(source_cookie_T *sp)
{
garray_T ga;
int len;
int c;
char_u *buf;
#ifdef USE_CRNL
int has_cr; // CR-LF found
#endif
int have_read = FALSE;
// use a growarray to store the sourced line
ga_init2(&ga, 1, 250);
// Loop until there is a finished line (or end... | null | null | 205,838 | 88460604221903194796888834018848217667 | 113 | patch 8.2.4647: "source" can read past end of copied line
Problem: "source" can read past end of copied line.
Solution: Add a terminating NUL. | other |
radare2 | 515e592b9bea0612bc63d8e93239ff35bcf645c7 | 1 | static RList *symbols(RBinFile *bf) {
RList *res = r_list_newf ((RListFree)r_bin_symbol_free);
r_return_val_if_fail (res && bf->o && bf->o->bin_obj, res);
RCoreSymCacheElement *element = bf->o->bin_obj;
size_t i;
HtUU *hash = ht_uu_new0 ();
if (!hash) {
return res;
}
bool found = false;
for (i = 0; i < eleme... | null | null | 205,870 | 198849166368149647611847610342973507929 | 38 | Fix null deref in bin.symbols ##crash
* Reported by cnitlrt via huntr.dev | other |
evolution-data-server | 5d8b92c622f6927b253762ff9310479dd3ac627d | 1 | gpg_ctx_add_recipient (struct _GpgCtx *gpg,
const gchar *keyid)
{
if (gpg->mode != GPG_CTX_MODE_ENCRYPT && gpg->mode != GPG_CTX_MODE_EXPORT)
return;
if (!gpg->recipients)
gpg->recipients = g_ptr_array_new ();
g_ptr_array_add (gpg->recipients, g_strdup (keyid));
} | null | null | 206,025 | 141933283002790613862782726205564754266 | 11 | CamelGpgContext: Enclose email addresses in brackets.
The recipient list for encrypting can be specified by either key ID or
email address. Enclose email addresses in brackets to ensure an exact
match, as per the gpg man page:
HOW TO SPECIFY A USER ID
...
By exact match on an email address.
... | other |
gimp | c57f9dcf1934a9ab0cd67650f2dea18cb0902270 | 1 | load_image (const gchar *filename,
GError **error)
{
gchar *name;
gint fd;
BrushHeader bh;
guchar *brush_buf = NULL;
gint32 image_ID;
gint32 layer_ID;
GimpParasite *parasite;
GimpDrawable *drawable;
GimpPix... | null | null | 206,043 | 221229682723113616266713040940895760659 | 274 | Bug 790784 - (CVE-2017-17784) heap overread in gbr parser / load_image.
We were assuming the input name was well formed, hence was
nul-terminated. As any data coming from external input, this has to be
thorougly checked.
Similar to commit 06d24a79af94837d615d0024916bb95a01bf3c59 but adapted
to older gimp-2-8 code. | other |
tigervnc | d61a767d6842b530ffb532ddd5a3d233119aad40 | 1 | void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
rdr::ZlibInStream* zis,
const PixelFormat& pf, ModifiablePixelBuffer* pb)
{
int length = is->readU32();
zis->setUnderlying(is, length);
Rect t;
PIXEL_T buf[64 * 64];
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) {
... | null | null | 206,044 | 82608106785632412803943463047285938092 | 130 | Make ZlibInStream more robust against failures
Move the checks around to avoid missing cases where we might access
memory that is no longer valid. Also avoid touching the underlying
stream implicitly (e.g. via the destructor) as it might also no
longer be valid.
A malicious server could theoretically use this for rem... | other |
radare2 | 1dd65336f0f0c351d6ea853efcf73cf9c0030862 | 1 | RCoreSymCacheElement *r_coresym_cache_element_new(RBinFile *bf, RBuffer *buf, ut64 off, int bits, char * file_name) {
RCoreSymCacheElement *result = NULL;
ut8 *b = NULL;
RCoreSymCacheElementHdr *hdr = r_coresym_cache_element_header_new (buf, off, bits);
if (!hdr) {
return NULL;
}
if (hdr->version != 1) {
epri... | null | null | 206,123 | 257777219606277295538493654390747819137 | 242 | Fix oobread bug in NE parser ##crash
* Reported by @cnitlrt via huntrdev
* BountyID: 02b4b563-b946-4343-9092-38d1c5cd60c9
* Reproducer: neoobread | other |
vim | f50808ed135ab973296bca515ae4029b321afe47 | 1 | parse_command_modifiers(
exarg_T *eap,
char **errormsg,
cmdmod_T *cmod,
int skip_only)
{
char_u *cmd_start = NULL;
char_u *p;
int starts_with_colon = FALSE;
int vim9script = in_vim9script();
int has_visual_range = FALSE;
CLEAR_POINTER(cmod);
cmod->cmod_flags... | null | null | 206,210 | 263926808274265121339372549336624390231 | 339 | patch 8.2.4763: using invalid pointer with "V:" in Ex mode
Problem: Using invalid pointer with "V:" in Ex mode.
Solution: Correctly handle the command being changed to "+". | other |
vim | c6fdb15d423df22e1776844811d082322475e48a | 1 | parse_command_modifiers(
exarg_T *eap,
char **errormsg,
cmdmod_T *cmod,
int skip_only)
{
char_u *orig_cmd = eap->cmd;
char_u *cmd_start = NULL;
int use_plus_cmd = FALSE;
int starts_with_colon = FALSE;
int vim9script = in_vim9script();
int has_visual_range = F... | null | null | 206,262 | 23783941848142444822455321328938674747 | 362 | patch 9.0.0025: accessing beyond allocated memory with the cmdline window
Problem: Accessing beyond allocated memory when using the cmdline window in
Ex mode.
Solution: Use "*" instead of "'<,'>" for Visual mode. | other |
radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 1 | static void extract_arg(RAnal *anal, RAnalFunction *fcn, RAnalOp *op, const char *reg, const char *sign, char type) {
st64 ptr = 0;
char *addr, *esil_buf = NULL;
const st64 maxstackframe = 1024 * 8;
r_return_if_fail (anal && fcn && op && reg);
size_t i;
for (i = 0; i < R_ARRAY_SIZE (op->src); i++) {
if (op->... | null | null | 206,273 | 77495307470538236846309620865126244810 | 177 | 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... | other |
vim | 0971c7a4e537ea120a6bb2195960be8d0815e97b | 1 | ins_bs(
int c,
int mode,
int *inserted_space_p)
{
linenr_T lnum;
int cc;
int temp = 0; // init for GCC
colnr_T save_col;
colnr_T mincol;
int did_backspace = FALSE;
int in_indent;
int oldState;
int cpc[MAX_MCO]; // composing characters
int call_fix_in... | null | null | 206,417 | 177296164879678018526622038270274780805 | 400 | patch 8.2.5162: reading before the start of the line with BS in Replace mode
Problem: Reading before the start of the line with BS in Replace mode.
Solution: Check the cursor column is more than zero. | other |
linux | 7fc3b7c2981bbd1047916ade327beccb90994eee | 1 | int udf_expand_file_adinicb(struct inode *inode)
{
struct page *page;
char *kaddr;
struct udf_inode_info *iinfo = UDF_I(inode);
int err;
struct writeback_control udf_wbc = {
.sync_mode = WB_SYNC_NONE,
.nr_to_write = 1,
};
WARN_ON_ONCE(!inode_is_locked(inode));
if (!iinfo->i_lenAlloc) {
if (UDF_QUERY_FLAG... | null | null | 206,510 | 295537766096851531358039660611370806725 | 72 | udf: Fix NULL ptr deref when converting from inline format
udf_expand_file_adinicb() calls directly ->writepage to write data
expanded into a page. This however misses to setup inode for writeback
properly and so we can crash on inode->i_wb dereference when submitting
page for IO like:
BUG: kernel NULL pointer dere... | other |
php-src | cc08cbc84d46933c1e9e0149633f1ed5d19e45e9 | 1 | static int dynamicGetbuf (gdIOCtxPtr ctx, void *buf, int len)
{
int rlen, remain;
dpIOCtxPtr dctx;
dynamicPtr *dp;
dctx = (dpIOCtxPtr) ctx;
dp = dctx->dp;
remain = dp->logicalSize - dp->pos;
if (remain >= len) {
rlen = len;
} else {
if (remain == 0) {
return EOF;
}
rlen = remain;
}
memcpy(buf, (... | null | null | 206,555 | 276412319745045670976321362892432796885 | 24 | Fix #73280: Stack Buffer Overflow in GD dynamicGetbuf
We make sure to never pass a negative `rlen` as size to memcpy().
Cf. <https://github.com/libgd/libgd/commit/53110871>. | other |
php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 1 | gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
{
int lastBorder;
/* Seek left */
int leftLimit, rightLimit;
int i;
leftLimit = (-1);
if (border < 0)
{
/* Refuse to fill to a non-solid border */
return;
}
for (i = x; (i >= 0); i--)
{
if (gdImageGetPix... | null | null | 206,588 | 184041259400366666213082744805348296992 | 84 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). | other |
raptor | 590681e546cd9aa18d57dc2ea1858cb734a3863f | 1 | raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
raptor_xml_element* element,
int auto_empty)
{
raptor_iostream* iostr = xml_writer->iostr;
raptor_namespace_stack *nstack = xml_writer->nstack;
int depth = xml_writer... | null | null | 206,625 | 238676757986848816974955818012445883188 | 220 | Calcualte max nspace declarations correctly for XML writer
(raptor_xml_writer_start_element_common): Calculate max including for
each attribute a potential name and value.
Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617
and #0000618 http://bugs.librdf.org/mantis/view.php?id=618 | other |
linux | e02f0d3970404bfea385b6edb86f2d936db0ea2b | 1 | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
struct nft_data_desc *desc, const struct nlattr *nla)
{
u8 genmask = nft_genmask_next(ctx->net);
struct nlattr *tb[NFTA_VERDICT_MAX + 1];
struct nft_chain *chain;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, n... | null | null | 206,639 | 271815403301886464376637210871387795530 | 64 | netfilter: nf_tables: disallow binding to already bound chain
Update nft_data_init() to report EINVAL if chain is already bound.
Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Reported-by: Gwangun Jung <exsociety@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | other |
radare2 | ca8d8b39f3e34a4fd943270330b80f1148129de4 | 1 | static void parse_relocation_info(struct MACH0_(obj_t) *bin, RSkipList *relocs, ut32 offset, ut32 num) {
if (!num || !offset || (st32)num < 0) {
return;
}
ut64 total_size = num * sizeof (struct relocation_info);
if (offset > bin->size) {
return;
}
if (total_size > bin->size) {
total_size = bin->size - offs... | null | null | 206,665 | 266652469078373975899292101322144867802 | 57 | Fix oobread in the macho parser ##crash
* Reported by @Han0nly via huntr.dev
* Reproducers: heapoverflow1
* BountyID: e589bd97-4c74-4e79-93b5-0951a281facc | other |
nbdkit | 6c5faac6a37077cf2366388a80862bb00616d0d8 | 1 | negotiate_handshake_newstyle_options (void)
{
GET_CONN;
struct nbd_new_option new_option;
size_t nr_options;
bool list_seen = false;
uint64_t version;
uint32_t option;
uint32_t optlen;
struct nbd_export_name_option_reply handshake_finish;
const char *optname;
uint64_t exportsize;
struct backend *b... | null | null | 206,670 | 200168996418018549739827057336110204071 | 536 | server: reset meta context replies on starttls
Related to CVE-2021-3716, but not as severe. No compliant client will
send NBD_CMD_BLOCK_STATUS unless it first negotiates
NBD_OPT_SET_META_CONTEXT. If an attacker injects a premature
SET_META_CONTEXT, either the client will never notice (because it
never uses BLOCK_STA... | other |
vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 1 | update_topline(void)
{
long line_count;
int halfheight;
int n;
linenr_T old_topline;
#ifdef FEAT_DIFF
int old_topfill;
#endif
#ifdef FEAT_FOLDING
linenr_T lnum;
#endif
int check_topline = FALSE;
int check_botline = FALSE;
long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_... | null | null | 206,676 | 21920694119130798358880555597268839959 | 242 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. | other |
vim | 5921aeb5741fc6e84c870d68c7c35b93ad0c9f87 | 1 | unix_expandpath(
garray_T *gap,
char_u *path,
int wildoff,
int flags, // EW_* flags
int didstar) // expanded "**" once already
{
char_u *buf;
char_u *path_end;
char_u *p, *s, *e;
int start_len = gap->ga_len;
char_u *pat;
regmatch_T regmatch;
int starts_with_dot;
... | null | null | 206,677 | 100021614777278550143078607475257899138 | 211 | patch 8.2.4418: crash when using special multi-byte character
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character. | other |
linux | bb458c644a59dbba3a1fe59b27106c5e68e1c4bd | 1 | static struct file *path_openat(int dfd, struct filename *pathname,
struct nameidata *nd, const struct open_flags *op, int flags)
{
struct file *base = NULL;
struct file *file;
struct path path;
int opened = 0;
int error;
file = get_empty_filp();
if (IS_ERR(file))
return file;
file->f_flags = op->open_fla... | null | null | 206,720 | 254660321291828395776330198697429452775 | 70 | Safer ABI for O_TMPFILE
[suggested by Rasmus Villemoes] make O_DIRECTORY | O_RDWR part of O_TMPFILE;
that will fail on old kernels in a lot more cases than what I came up with.
And make sure O_CREAT doesn't get there...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | other |
php-src | 8f4a6d6e1b6c36259a5dc865d16f0dad76f2f2c9 | 1 | ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
{
php_stream *tmpstream = NULL;
databuf_t *data = NULL;
char *ptr;
int ch, lastch;
int size, rcvd;
int lines;
char **ret = NULL;
char **entry;
char *text;
if ((tmpstream = php_stream_fopen_tmpfile()) == NULL) {
php_error_docref... | null | null | 206,736 | 302942434357671754880081705319332171860 | 102 | Clean up this weird safe_emalloc() call | other |
qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 1 | bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/) {
// Allocate LWPolyline vertices (group code 90):
if (groupCode==90) {
maxVertices = toInt(groupValue);
if (maxVertices>0) {
if (vertices!=NULL) {
delete[] vertices;
}
... | null | null | 206,771 | 134344988205843061499740631870829315798 | 39 | check vertexIndex which might be -1 for broken DXF | other |
linux | ea8569194b43f0f01f0a84c689388542c7254a1f | 1 | int udf_expand_file_adinicb(struct inode *inode)
{
struct page *page;
char *kaddr;
struct udf_inode_info *iinfo = UDF_I(inode);
int err;
WARN_ON_ONCE(!inode_is_locked(inode));
if (!iinfo->i_lenAlloc) {
if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
iinfo->i_alloc_type = ICBTAG_FLAG_AD_SHORT;
else... | null | null | 206,781 | 270315145277637123624366603400735225286 | 70 | udf: Restore i_lenAlloc when inode expansion fails
When we fail to expand inode from inline format to a normal format, we
restore inode to contain the original inline formatting but we forgot to
set i_lenAlloc back. The mismatch between i_lenAlloc and i_size was then
causing further problems such as warnings and lost ... | other |
ImageMagick | c111ed9b035532c2c81ea569f2d22fded9517287 | 1 | static MagickBooleanType SetGrayscaleImage(Image *image,
ExceptionInfo *exception)
{
CacheView
*image_view;
MagickBooleanType
status;
PixelInfo
*colormap;
register ssize_t
i;
ssize_t
*colormap_index,
j,
y;
assert(image != (Image *) NULL);
assert(image->signature == Magic... | null | null | 206,815 | 234306727854259574245146352374101011950 | 161 | https://github.com/ImageMagick/ImageMagick/issues/1540 | other |
linux | 5934d9a0383619c14df91af8fd76261dc3de2f5f | 1 | static unsigned long get_ctl_id_hash(const struct snd_ctl_elem_id *id)
{
int i;
unsigned long h;
h = id->iface;
h = MULTIPLIER * h + id->device;
h = MULTIPLIER * h + id->subdevice;
for (i = 0; id->name[i] && i < SNDRV_CTL_ELEM_ID_NAME_MAXLEN; i++)
h = MULTIPLIER * h + id->name[i];
h = MULTIPLIER * h + id->ind... | null | null | 206,845 | 54061121856741822206519852015957604149 | 14 | ALSA: control: Re-order bounds checking in get_ctl_id_hash()
These two checks are in the reverse order so it might read one element
beyond the end of the array. First check if the "i" is within bounds
before using it.
Fixes: 6ab55ec0a938 ("ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()")
Signed-off-by:... | other |
jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 1 | void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
Klass::metaspace_pointers_do(it);
if (log_is_enabled(Trace, cds)) {
ResourceMark rm;
log_trace(cds)("Iter(InstanceKlass): %p (%s)", this, external_name());
}
it->push(&_annotations);
it->push((Klass**)&_array_klasses);
it->push(&_co... | null | null | 206,865 | 22807728774700435545631777459334663989 | 44 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 | other |
vim | 6456fae9ba8e72c74b2c0c499eaf09974604ff30 | 1 | regmatch(
char_u *scan, // Current node.
proftime_T *tm UNUSED, // timeout limit or NULL
int *timed_out UNUSED) // flag set on timeout or NULL
{
char_u *next; // Next node.
int op;
int c;
regitem_T *rp;
int no;
int status; // one of the RA_ values:
#ifdef FEAT_RELTIME
int tm_... | null | null | 206,921 | 14507096832468276355973161027739212088 | 1,481 | patch 8.2.4440: crash with specific regexp pattern and string
Problem: Crash with specific regexp pattern and string.
Solution: Stop at the start of the string. | other |
vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 1 | eval_string(char_u **arg, typval_T *rettv, int evaluate, int interpolate)
{
char_u *p;
char_u *end;
int extra = interpolate ? 1 : 0;
int off = interpolate ? 0 : 1;
int len;
// Find the end of the string, skipping backslashed characters.
for (p = *arg + off; *p != NUL && *p != '"'; MB_PTR... | null | null | 206,942 | 251995737585653065338836952190224629996 | 158 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. | other |
jasper | d99636fad60629785efd1ef72da772a8ef68f54c | 1 | cmdopts_t *cmdopts_parse(int argc, char **argv)
{
enum {
CMDOPT_HELP = 0,
CMDOPT_VERBOSE,
CMDOPT_QUIET,
CMDOPT_INFILE,
CMDOPT_INFMT,
CMDOPT_INOPT,
CMDOPT_OUTFILE,
CMDOPT_OUTFMT,
CMDOPT_OUTOPT,
CMDOPT_VERSION,
CMDOPT_DEBUG,
CMDOPT_CMPTNO,
CMDOPT_SRGB,
CMDOPT_MAXMEM,
CMDOPT_LIST_ENABLED_COD... | null | null | 206,946 | 258953396805315249695947632067343414397 | 168 | fix memory leaks in function cmdopts_parse | other |
flatpak | fb473cad801c6b61706353256cab32330557374a | 1 | apply_extra_data (FlatpakDir *self,
GFile *checkoutdir,
GCancellable *cancellable,
GError **error)
{
g_autoptr(GFile) metadata = NULL;
g_autofree char *metadata_contents = NULL;
gsize metadata_size;
g_autoptr(GKeyFile) metakey = NULL;
g_autof... | null | null | 206,989 | 62902606532827421827792118702945647615 | 172 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... | other |
xorg-xserver | c06e27b2f6fd9f7b9f827623a48876a225264132 | 1 | ProcXkbSetDeviceInfo(ClientPtr client)
{
DeviceIntPtr dev;
unsigned change;
char * wire;
xkbExtensionDeviceNotify ed;
REQUEST(xkbSetDeviceInfoReq);
REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
if (!(client->xkbClientFlags&_XkbClientInitialized))
return BadAccess;
change= stuff->change;
CHK_A... | null | null | 206,992 | 228648490563771292194907521710038828836 | 83 | xkb: ProcXkbSetDeviceInfo should work on all attached SDs.
If called with XkbUseCoreKbd, run through all attached SDs and replicate the
call. This way, we keep the SDs in sync with the MD as long as core clients
control the MDs. | other |
linux | cc7a0bb058b85ea03db87169c60c7cfdd5d34678 | 1 | static ssize_t remove_slot_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t nbytes)
{
char drc_name[MAX_DRC_NAME_LEN];
int rc;
char *end;
if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
end = strchr(drc_name, '\n');
if (!end)
end = &drc_na... | null | null | 207,068 | 66377107202241996731442605907157187034 | 24 | PCI: rpadlpar: Fix potential drc_name corruption in store functions
Both add_slot_store() and remove_slot_store() try to fix up the
drc_name copied from the store buffer by placing a NUL terminator at
nbyte + 1 or in place of a '\n' if present. However, the static buffer
that we copy the drc_name data into is not zero... | other |
linux | cc7a0bb058b85ea03db87169c60c7cfdd5d34678 | 1 | static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t nbytes)
{
char drc_name[MAX_DRC_NAME_LEN];
char *end;
int rc;
if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
end = strchr(drc_name, '\n');
if (!end)
end = &drc_name[n... | null | null | 207,069 | 115299723316486657840703980559738544414 | 23 | PCI: rpadlpar: Fix potential drc_name corruption in store functions
Both add_slot_store() and remove_slot_store() try to fix up the
drc_name copied from the store buffer by placing a NUL terminator at
nbyte + 1 or in place of a '\n' if present. However, the static buffer
that we copy the drc_name data into is not zero... | other |
samba | 60f922bf1bd8816eacbb32c24793ad1f97a1d9f2 | 1 | static NTSTATUS create_file_unixpath(connection_struct *conn,
struct smb_request *req,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
uint32_t create_options,
uint32_t file_attributes,
uint... | null | null | 207,070 | 86756942410942814677576331572585726402 | 351 | Fix bug #10229 - No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10229
We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.
Signed-off-by: Jeremy Allison <jr... | other |
openexr | 467be80b75642efbbe6bdace558079f68c16acb1 | 1 | DeepTiledInputFile::initialize ()
{
if (_data->partNumber == -1)
if (_data->header.type() != DEEPTILE)
throw IEX_NAMESPACE::ArgExc ("Expected a deep tiled file but the file is not deep tiled.");
if(_data->header.version()!=1)
{
THROW(IEX_NAMESPACE::ArgExc, "Version " << _data->heade... | null | null | 207,071 | 53867069728921487090628063652681608429 | 91 | Fix overflow computing deeptile sample table size (#861)
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> | other |
squirrel | a6413aa690e0bdfef648c68693349a7b878fe60d | 1 | static SQInteger thread_call(HSQUIRRELVM v)
{
SQObjectPtr o = stack_get(v,1);
if(sq_type(o) == OT_THREAD) {
SQInteger nparams = sq_gettop(v);
_thread(o)->Push(_thread(o)->_roottable);
for(SQInteger i = 2; i<(nparams+1); i++)
sq_move(_thread(o),v,i);
if(SQ_SUCCEEDED(sq... | null | null | 207,150 | 306139211902210519273801023569379950602 | 18 | fix in thread.call | other |
samba | 86fe9d48883f87c928bf31ccbd275db420386803 | 1 | static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
{
struct ldap_SearchRequest *req = &call->request->r.SearchRequest;
struct ldap_Result *done;
struct ldapsrv_reply *done_r;
TALLOC_CTX *local_ctx;
struct ldapsrv_context *callback_ctx = NULL;
struct ldb_context *samdb = talloc_get_type(call->conn->l... | null | null | 207,250 | 60235456371507544999726672828529582162 | 228 | CVE-2021-3670 ldap_server: Set timeout on requests based on MaxQueryDuration
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | other |
vim | 826bfe4bbd7594188e3d74d2539d9707b1c6a14b | 1 | win_redr_status(win_T *wp, int ignore_pum UNUSED)
{
int row;
char_u *p;
int len;
int fillchar;
int attr;
int this_ru_col;
static int busy = FALSE;
// It's possible to get here recursively when 'statusline' (indirectly)
// invokes ":redrawstatus". Simply ignore the call then.
... | null | null | 207,280 | 86191050608755204136835057171061669117 | 144 | patch 8.2.3487: illegal memory access if buffer name is very long
Problem: Illegal memory access if buffer name is very long.
Solution: Make sure not to go over the end of the buffer. | other |
autotrace | e96bffadc25ff0ba0e10745f8012efcc5f920ea9 | 1 | at_bitmap input_bmp_reader(gchar * filename, at_input_opts_type * opts, at_msg_func msg_func, gpointer msg_data, gpointer user_data)
{
FILE *fd;
unsigned char buffer[64];
int ColormapSize, rowbytes, Maps;
gboolean Grey = FALSE;
unsigned char ColorMap[256][3];
at_bitmap image = at_bitmap_init(0, 0, 0, 1);
... | null | null | 207,461 | 311893824732578184343032245071313510065 | 354 | input-bmp: Increase header buffer in some cases
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> | other |
rizin | aa6917772d2f32e5a7daab25a46c72df0b5ea406 | 1 | static const ut8 *parse_die(const ut8 *buf, const ut8 *buf_end, RzBinDwarfDebugInfo *info, RzBinDwarfAbbrevDecl *abbrev,
RzBinDwarfCompUnitHdr *hdr, RzBinDwarfDie *die, const ut8 *debug_str, size_t debug_str_len, bool big_endian) {
size_t i;
const char *comp_dir = NULL;
ut64 line_info_offset = UT64_MAX;
for (i = 0... | null | null | 207,520 | 275181739878774751439131693186874981050 | 39 | Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086) | other |
libtiff | f1b94e8a3ba49febdd3361c0214a1d1149251577 | 1 | cpTags(TIFF* in, TIFF* out)
{
struct cpTag *p;
for (p = tags; p < &tags[NTAGS]; p++)
cpTag(in, out, p->tag, p->count, p->type);
} | null | null | 207,644 | 89435351062227040282236387912359292339 | 6 | only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4 | other |
EternalTerminal | 900348bb8bc96e1c7ba4888ac8480f643c43d3c3 | 1 | TerminalUserInfo UserTerminalRouter::getInfoForId(const string &id) {
auto it = idInfoMap.find(id);
if (it == idInfoMap.end()) {
STFATAL << " Tried to read from an id that no longer exists";
}
return it->second;
} | null | null | 207,700 | 8175819761864654166650714063570358802 | 7 | red fixes (#468)
* red fixes
* remove magic number | other |
EternalTerminal | 900348bb8bc96e1c7ba4888ac8480f643c43d3c3 | 1 | set<int> PipeSocketHandler::listen(const SocketEndpoint& endpoint) {
lock_guard<std::recursive_mutex> guard(globalMutex);
string pipePath = endpoint.name();
if (pipeServerSockets.find(pipePath) != pipeServerSockets.end()) {
throw runtime_error("Tried to listen twice on the same path");
}
sockaddr_un loc... | null | null | 207,703 | 213532589714760033098624205385113026093 | 26 | red fixes (#468)
* red fixes
* remove magic number | other |
vim | e98c88c44c308edaea5994b8ad4363e65030968c | 1 | display_dollar(colnr_T col)
{
colnr_T save_col;
if (!redrawing())
return;
cursor_off();
save_col = curwin->w_cursor.col;
curwin->w_cursor.col = col;
if (has_mbyte)
{
char_u *p;
// If on the last byte of a multi-byte move to the first byte.
p = ml_get_curline();
curwin->w_cursor.col -... | null | null | 207,719 | 265859281386315904319491494691513391643 | 26 | patch 9.0.0218: reading before the start of the line
Problem: Reading before the start of the line.
Solution: When displaying "$" check the column is not negative. | other |
linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 1 | static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t bytes,
struct iov_iter *i)
{
struct pipe_inode_info *pipe = i->pipe;
struct pipe_buffer *buf;
unsigned int p_tail = pipe->tail;
unsigned int p_mask = pipe->ring_size - 1;
unsigned int i_head = i->head;
size_t off;
if (unlikely(byt... | null | null | 207,753 | 166347789945326473978894278006579209282 | 47 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... | other |
linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 1 | static size_t push_pipe(struct iov_iter *i, size_t size,
int *iter_headp, size_t *offp)
{
struct pipe_inode_info *pipe = i->pipe;
unsigned int p_tail = pipe->tail;
unsigned int p_mask = pipe->ring_size - 1;
unsigned int iter_head;
size_t off;
ssize_t left;
if (unlikely(size > i->count))
size = i->count;
i... | null | null | 207,754 | 158977810766051483126143018257673420675 | 47 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... | other |
php-src | 095cbc48a8f0090f3b0abc6155f2b61943c9eafb | 1 | PHP_FUNCTION(openssl_encrypt)
{
zend_bool raw_output = 0;
char *data, *method, *password, *iv = "";
int data_len, method_len, password_len, iv_len = 0, max_iv_len;
const EVP_CIPHER *cipher_type;
EVP_CIPHER_CTX cipher_ctx;
int i, outlen, keylen;
unsigned char *outbuf, *key;
zend_bool free_iv;
if (zend_parse_pa... | null | null | 207,755 | 69106918490575140688987216670085944855 | 70 | Fix segfault in older versions of OpenSSL (before 0.9.8i) | other |
nbdkit | 09a13dafb7bb3a38ab52eb5501cba786365ba7fd | 1 | negotiate_handshake_newstyle_options (void)
{
GET_CONN;
struct nbd_new_option new_option;
size_t nr_options;
bool list_seen = false;
uint64_t version;
uint32_t option;
uint32_t optlen;
struct nbd_export_name_option_reply handshake_finish;
const char *optname;
uint64_t exportsize;
struct backend *b... | null | null | 207,762 | 262726525276367986643973964343375138207 | 535 | server: CVE-2021-3716 reset structured replies on starttls
https://nostarttls.secvuln.info/ pointed out a series of CVEs in
common implementation flaw in various SMTP and IMAP clients and
servers, all with a common thread of improperly caching plaintext
state across the STARTTLS encryption boundary; and recommended th... | other |
radare2 | 2b77b277d67ce061ee6ef839e7139ebc2103c1e3 | 1 | static RList *create_cache_bins(RBinFile *bf, RDyldCache *cache) {
RList *bins = r_list_newf ((RListFree)free_bin);
ut16 *depArray = NULL;
cache_imgxtr_t *extras = NULL;
if (!bins) {
return NULL;
}
char *target_libs = NULL;
RList *target_lib_names = NULL;
int *deps = NULL;
target_libs = r_sys_getenv ("R_DYL... | null | null | 207,780 | 180694851627521696664028718644842779676 | 167 | Fix oobread in dyldcache ##crash
* Reported by @hdthky via huntr.dev
* Reproducers: poc1
* BountyID: 8ae2c61a-2220-47a5-bfe8-fe6d41ab1f82 | other |
linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 1 | void add_interrupt_randomness(int irq, int irq_flags)
{
struct entropy_store *r;
struct fast_pool *fast_pool = this_cpu_ptr(&irq_randomness);
struct pt_regs *regs = get_irq_regs();
unsigned long now = jiffies;
cycles_t cycles = random_get_entropy();
__u32 c_high, j_high;
__u64 ip;
unsigned long seed;
i... | null | null | 207,803 | 93078228868817235538615789338167903266 | 64 | 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'... | other |
linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 1 | void update_process_times(int user_tick)
{
struct task_struct *p = current;
/* Note: this timer irq context must be accounted for as well. */
account_process_tick(p, user_tick);
run_local_timers();
rcu_sched_clock_irq(user_tick);
#ifdef CONFIG_IRQ_WORK
if (in_irq())
irq_work_tick();
#endif
scheduler_tick();
... | null | null | 207,804 | 33405367387359628492741828293788263595 | 16 | 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'... | other |
linux | 86cdf8e38792545161dbe3350a7eced558ba4d15 | 1 | inline int nci_request(struct nci_dev *ndev,
void (*req)(struct nci_dev *ndev,
const void *opt),
const void *opt, __u32 timeout)
{
int rc;
if (!test_bit(NCI_UP, &ndev->flags))
return -ENETDOWN;
/* Serialize all requests */
mutex_lock(&ndev->req_lock);
rc = __nci_request(ndev, req, opt,... | null | null | 207,826 | 66021090386999143440826290693907389327 | 17 | NFC: reorganize the functions in nci_request
There is a possible data race as shown below:
thread-A in nci_request() | thread-B in nci_close_device()
| mutex_lock(&ndev->req_lock);
test_bit(NCI_UP, &ndev->flags); |
... | test_and_clear_bit(NCI_UP, &nde... | other |
pesign | 12f16710ee44ef64ddb044a3523c3c4c4d90039a | 1 | handle_unlock_token(context *ctx, struct pollfd *pollfd, socklen_t size)
{
struct msghdr msg;
struct iovec iov;
ssize_t n;
int rc = cms_context_alloc(&ctx->cms);
if (rc < 0) {
send_response(ctx, ctx->backup_cms, pollfd, rc);
return;
}
steal_from_cms(ctx->backup_cms, ctx->cms);
char *buffer = malloc(size)... | null | null | 207,873 | 336651457369522937879967751310608385506 | 103 | Rework the wildly undocumented NSS password file goo.
This probably doesn't work yet. | other |
pesign | 12f16710ee44ef64ddb044a3523c3c4c4d90039a | 1 | void cms_set_pw_data(cms_context *cms, void *pwdata)
{
cms->pwdata = pwdata;
} | null | null | 207,874 | 39431258010802991871202478740642266914 | 4 | Rework the wildly undocumented NSS password file goo.
This probably doesn't work yet. | other |
pcre2 | 03654e751e7f0700693526b67dfcadda6b42c9d0 | 1 | static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend,
BOOL *needs_control_head, BOOL *has_quit, BOOL *has_accept)
{
int length = 1;
int size;
PCRE2_SPTR alternative;
BOOL quit_found = FALSE;
BOOL accept_found = FALSE;
BOOL setsom_found = FALSE;
BOOL setmark_found = FALSE;
BOOL c... | null | null | 207,990 | 271890704880282234244724577171237704348 | 217 | Fixed an issue affecting recursions in JIT | other |
radare2 | 18d1d064bf599a255d55f09fca3104776fc34a67 | 1 | RList *r_bin_ne_get_entrypoints(r_bin_ne_obj_t *bin) {
RList *entries = r_list_newf (free);
if (!entries) {
return NULL;
}
RList *segments = r_bin_ne_get_segments (bin);
if (!segments) {
r_list_free (entries);
return NULL;
}
if (bin->ne_header->csEntryPoint) {
RBinAddr *entry = R_NEW0 (RBinAddr);
if (!... | null | null | 208,076 | 311431254745849220001801039617784937971 | 73 | Fix null deref in the ne parser ##crash
* Reported by @hmsec via huntr.dev
* Reproducer: nepoc00
* BountyID: bfeb8fb8-644d-4587-80d4-cb704c404013 | other |
linux | 054aa8d439b9185d4f5eb9a90282d1ce74772969 | 1 | static struct file *__fget_files(struct files_struct *files, unsigned int fd,
fmode_t mask, unsigned int refs)
{
struct file *file;
rcu_read_lock();
loop:
file = files_lookup_fd_rcu(files, fd);
if (file) {
/* File object ref couldn't be taken.
* dup2() atomicity guarantee is the reason
* we loop to ca... | null | null | 208,085 | 236448832030969755251234701523533614254 | 22 | fget: check that the fd still exists after getting a ref to it
Jann Horn points out that there is another possible race wrt Unix domain
socket garbage collection, somewhat reminiscent of the one fixed in
commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK").
See the extended comment about the garbage colle... | other |
linux | f85daf0e725358be78dfd208dea5fd665d8cb901 | 1 | static int xfrm_expand_policies(const struct flowi *fl, u16 family,
struct xfrm_policy **pols,
int *num_pols, int *num_xfrms)
{
int i;
if (*num_pols == 0 || !pols[0]) {
*num_pols = 0;
*num_xfrms = 0;
return 0;
}
if (IS_ERR(pols[0]))
return PTR_ERR(pols[0]);
*num_xfrms = pols[0]->xfrm_nr;
#ifdef ... | null | null | 208,107 | 160505295107260782838646323717685740675 | 44 | xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of
pols[0]. This refcount can be dropped in xfrm_expand_policies() when
xfrm_expand_policies() return error. pols[0]'s refcount is balanced in
here. But xfrm_bundle_look... | other |
linux | d0d62baa7f505bd4c59cd169692ff07ec49dde37 | 1 | static int xemaclite_of_probe(struct platform_device *ofdev)
{
struct resource *res;
struct net_device *ndev = NULL;
struct net_local *lp = NULL;
struct device *dev = &ofdev->dev;
int rc = 0;
dev_info(dev, "Device Tree Probing\n");
/* Create an ethernet device instance */
ndev = alloc_etherdev(sizeof(struct ... | null | null | 208,115 | 206871728932650153351585055932751180331 | 89 | net: xilinx_emaclite: Do not print real IOMEM pointer
Printing kernel pointers is discouraged because they might leak kernel
memory layout. This fixes smatch warning:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn:
argument 4 to %08lX specifier is cast from pointer
Signed-off-by: YueH... | other |
util-linux | 5ebbc3865d1e53ef42e5f121c41faab23dd59075 | 1 | int main(int argc, char **argv)
{
int c, rc = MOUNT_EX_SUCCESS, all = 0, show_labels = 0;
struct libmnt_context *cxt;
struct libmnt_table *fstab = NULL;
char *srcbuf = NULL;
char *types = NULL;
unsigned long oper = 0;
enum {
MOUNT_OPT_SHARED = CHAR_MAX + 1,
MOUNT_OPT_SLAVE,
MOUNT_OPT_PRIVATE,
MOUNT_OPT_... | null | null | 208,140 | 28463599175286661619944378926902691836 | 310 | mount: sanitize paths from non-root users
$ mount /root/.ssh/../../dev/sda2
mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot
this is too promiscuous. It seems better to ignore on command line
specified paths which are not resolve-able for non-root users.
Fixed version:
$ mount /root... | other |
vim | 806d037671e133bd28a7864248763f643967973a | 1 | bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
{
int c;
char_u buf[NUMBUFLEN + MB_MAXBYTES];
int idx = 0;
char_u *end = find_termcode((char_u *)"PE");
int ret_char = -1;
int save_allow_keys = allow_keys;
int save_paste = p_paste;
// If the end code is too long we can't... | null | null | 208,370 | 254669502955167580665201581449085115752 | 96 | patch 8.2.4218: illegal memory access with bracketed paste in Ex mode
Problem: Illegal memory access with bracketed paste in Ex mode.
Solution: Reserve space for the trailing NUL. | other |
vim | 27efc62f5d86afcb2ecb7565587fe8dea4b036fe | 1 | check_termcode(
int max_offset,
char_u *buf,
int bufsize,
int *buflen)
{
char_u *tp;
char_u *p;
int slen = 0; // init for GCC
int modslen;
int len;
int retval = 0;
int offset;
char_u key_name[2];
int modifiers;
char_u *modifiers_start = NULL;
int key... | null | null | 208,411 | 141177609605865586721920240131748064761 | 604 | patch 9.0.0018: going over the end of the typahead
Problem: Going over the end of the typahead.
Solution: Put a NUL after the typeahead. | other |
vim | c5274dd12224421f2430b30c53b881b9403d649e | 1 | ex_diffgetput(exarg_T *eap)
{
linenr_T lnum;
int count;
linenr_T off = 0;
diff_T *dp;
diff_T *dprev;
diff_T *dfree;
int idx_cur;
int idx_other;
int idx_from;
int idx_to;
int i;
int added;
char_u *p;
aco_save_T aco;
buf_T *buf;
int start_skip, end_s... | null | null | 208,421 | 58922319338264688518591068281475702979 | 325 | patch 9.0.0026: accessing freed memory with diff put
Problem: Accessing freed memory with diff put.
Solution: Bail out when diff pointer is no longer valid. | other |
linux | 717adfdaf14704fd3ec7fa2c04520c0723247eac | 1 | static ssize_t hid_debug_events_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&... | null | null | 208,430 | 155206844330449950846334904452225854896 | 73 | HID: debug: check length before copy_to_user()
If our length is greater than the size of the buffer, we
overflow the buffer
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | other |
linux | ec6af094ea28f0f2dda1a6a33b14cd57e36a9755 | 1 | static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
int closing, int tx_ring)
{
struct pgv *pg_vec = NULL;
struct packet_sock *po = pkt_sk(sk);
unsigned long *rx_owner_map = NULL;
int was_running, order = 0;
struct packet_ring_buffer *rb;
struct sk_buff_head *rb_queue;
__be16 num;
int err;... | null | null | 208,464 | 200165837155630935603644589325319442945 | 165 | net/packet: rx_owner_map depends on pg_vec
Packet sockets may switch ring versions. Avoid misinterpreting state
between versions, whose fields share a union. rx_owner_map is only
allocated with a packet ring (pg_vec) and both are swapped together.
If pg_vec is NULL, meaning no packet ring was allocated, then neither
w... | other |
at-spi2-core | c2e87fe00b596dba20c9d57d406ab8faa744b15a | 1 | unix_read_all_fd_to_string (int fd,
char *buf,
ssize_t max_bytes)
{
ssize_t bytes_read;
while (max_bytes > 1 && (bytes_read = read (fd, buf, MAX (4096, max_bytes - 1))))
{
if (bytes_read < 0)
return FALSE;
buf += bytes_read;
... | null | null | 208,489 | 150591971212711102629762668927420518838 | 16 | Fix inverted logic.
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124 | other |
tor | 57e35ad3d91724882c345ac709666a551a977f0f | 1 | networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
networkstatus_type_t ns_type)
{
smartlist_t *tokens = smartlist_create();
smartlist_t *rs_tokens = NULL, *footer_tokens = NULL;
networkstatus_voter_info_t *voter = NULL;
networkstatus_t *ns = NULL;
d... | null | null | 208,505 | 320303562647980943317783282141447596021 | 536 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. | other |
heimdal | 04171147948d0a3636bc6374181926f0fb2ec83a | 1 | tgs_build_reply(astgs_request_t priv,
hdb_entry_ex *krbtgt,
krb5_enctype krbtgt_etype,
const krb5_keyblock *replykey,
int rk_is_subkey,
krb5_ticket *ticket,
const char **e_text,
AuthorizationData **auth_data,
const struct sockaddr *from_addr)
{
krb5_context context = priv->context;
krb5_kdc_conf... | null | null | 208,506 | 172674879650950329667725116403393224452 | 1,038 | kdc: validate sname in TGS-REQ
In tgs_build_reply(), validate the server name in the TGS-REQ is present before
dereferencing. | other |
unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 1 | dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg)
{
size_t i, j;
// Insert 'local-zone: "2.dnscrypt-cert.example.com" deny'
if(!cfg_str2list_insert(&cfg->local_zones,
strdup(dnscenv->provider_name),
strdup("deny"))) {
log_err... | null | null | 208,522 | 610710673926578047133575486433853683 | 70 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. | other |
vim | 6046aded8da002b08d380db29de2ba0268b6616e | 1 | cmdline_insert_reg(int *gotesc UNUSED)
{
int i;
int c;
#ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; // disallow scrolling here
#endif
putcmdline('"', TRUE);
++no_mapping;
++allow_keys;
i = c = plain_vgetc(); // CTRL-R <char>
if (i == Ctrl_O)
i = Ctrl_R; // CTRL-R CTRL-O == CTRL-R CT... | null | null | 208,525 | 225374604065010647908706692694589619090 | 70 | patch 8.2.5148: invalid memory access when using expression on command line
Problem: Invalid memory access when using an expression on the command line.
Solution: Make sure the position does not go negative. | other |
libxml2 | b1d34de46a11323fccffa9fadeb33be670d602f5 | 1 | xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
int what, xmlChar end, xmlChar end2, xmlChar end3) {
xmlChar *buffer = NULL;
size_t buffer_size = 0;
size_t nbchars = 0;
xmlChar *current = NULL;
xmlChar *rep = NULL;
const xmlChar *last;
xmlEntityPtr en... | null | null | 208,533 | 301710766906450297101615067146831788109 | 164 | Fix inappropriate fetch of entities content
For https://bugzilla.gnome.org/show_bug.cgi?id=761430
libfuzzer regression testing exposed another case where the parser would
fetch content of an external entity while not in validating mode.
Plug that hole | other |
rizin | 58926dffbe819fe9ebf5062f7130e026351cae01 | 1 | static RzList *relocs(RzBinFile *bf) {
rz_return_val_if_fail(bf && bf->o, NULL);
QnxObj *qo = bf->o->bin_obj;
return rz_list_clone(qo->fixups);
} | null | null | 208,535 | 115023292561390646487128713150698949735 | 5 | fix #2964 - double-free in bin_qnx.c | other |
php-src | cab1c3b3708eead315e033359d07049b23b147a3 | 1 | PHP_MINIT_FUNCTION(snmp)
{
netsnmp_log_handler *logh;
zend_class_entry ce, cex;
le_snmp_session = zend_register_list_destructors_ex(php_snmp_session_destructor, NULL, PHP_SNMP_SESSION_RES_NAME, module_number);
init_snmp("snmpapp");
#ifdef NETSNMP_DS_LIB_DONT_PERSIST_STATE
/* Prevent update of the snmpapp.conf f... | null | null | 208,654 | 206527472711439509880743098822926959732 | 85 | Fixed bug #72479 - same as #72434 | other |
flatpak | e2c4ded323161f47609d0af97d00019d04a635f1 | 1 | handle_spawn (PortalFlatpak *object,
GDBusMethodInvocation *invocation,
GUnixFDList *fd_list,
const gchar *arg_cwd_path,
const gchar *const *arg_argv,
GVariant *arg_fds,
GVariant ... | null | null | 208,673 | 190053802695498490428664499416244210335 | 639 | portal: Let --env= and --env-fd= take precedence over extra-args
Previously, if you launched a subsandbox while specifying environment
variable overrides, any environment variable overrides that existed
in the parent Flatpak app would take precedence:
host$ flatpak run --env=FOO=1 --command=bash example.app
[... | other |
radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 1 | R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
bool cfg_anal_strings = r_config_get_i (core->config, "anal.strings");
bool emu_lazy = r_config_get_i (core->config, "emu.lazy");
bool gp_fixed = r_config_get_i (core->config, "anal.gpfixed");
RAnalEsil *ESIL = core->anal->esil;
ut64 r... | null | null | 208,680 | 336460335272336496527727478453878770582 | 464 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get | other |
jdk17u | 860464e46105b98ccf21e98abe2dc6e80155887c | 1 | void LinkResolver::resolve_handle_call(CallInfo& result,
const LinkInfo& link_info,
TRAPS) {
// JSR 292: this must be an implicitly generated method MethodHandle.invokeExact(*...) or similar
Klass* resolved_klass = link_info.resolved_kla... | null | null | 208,699 | 30695701720337285266835790248006528789 | 12 | 8281866: Enhance MethodHandle invocations
Reviewed-by: mbaesken
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 | other |
libxml2 | 03c6723043775122313f107695066e5744189a08 | 1 | */
static int
xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
{
int total = 0;
int equal, ret;
xmlXPathCompExprPtr comp;
xmlXPathObjectPtr arg1, arg2;
xmlNodePtr bak;
xmlDocPtr bakd;
int pp;
int cs;
CHECK_ERROR0;
comp = ctxt->comp;
switch (op->op) {
... | null | null | 208,741 | 90052071217259512981949438005234061143 | 878 | Handling of XPath function arguments in error case
The XPath engine tries to guarantee that every XPath function can pop
'nargs' non-NULL values off the stack. libxslt, for example, relies on
this assumption. But the check isn't thorough enough if there are errors
during the evaluation of arguments. This can lead to s... | other |
gnupg | b0b3803e8c2959dd67ca96debc54b5c6464f0d41 | 1 | cmd_readkey (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
unsigned char *cert = NULL;
size_t ncert, n;
ksba_cert_t kc = NULL;
ksba_sexp_t p;
unsigned char *pk;
size_t pklen;
if ((rc = open_card (ctrl, NULL)))
return rc;
line = xstrdup (line); /* Need a co... | null | null | 208,760 | 317911316520292420537394099555416973180 | 72 | scd: Avoid double-free on error condition in scd
* scd/command.c (cmd_readkey): avoid double-free of cert
--
When ksba_cert_new() fails, cert will be double-freed.
Debian-Bug-Id: 773471
Original patch changed by wk to do the free only at leave. | other |
vim | 1c3dd8ddcba63c1af5112e567215b3cec2de11d0 | 1 | getcmdline_int(
int firstc,
long count UNUSED, // only used for incremental search
int indent, // indent for inside conditionals
int clear_ccline) // clear ccline first
{
static int depth = 0; // call depth
int c;
int i;
int j;
int gotesc = FALSE; // TRUE when <ESC> just... | null | null | 208,912 | 4331970736416170867022307973835499272 | 1,011 | patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid. | other |
jasper | c54113d6fa49f8f26d1572e972b806276c5b05d5 | 1 | jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t *cdef... | null | null | 208,983 | 202294942807550333016367317921252998953 | 338 | CVE-2014-8138 | other |
MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 1 | PlayerGeneric::~PlayerGeneric()
{
if (mixer)
delete mixer;
if (player)
{
if (mixer->isActive() && !mixer->isDeviceRemoved(player))
mixer->removeDevice(player);
delete player;
}
delete[] audioDriverName;
delete listener;
} | null | null | 208,987 | 92094026136705352235035243298769766413 | 16 | Fix use-after-free in PlayerGeneric destructor | other |
libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 1 | virNodeDeviceGetMdevTypesCaps(const char *sysfspath,
virMediatedDeviceTypePtr **mdev_types,
size_t *nmdev_types)
{
virMediatedDeviceTypePtr *types = NULL;
size_t ntypes = 0;
size_t i;
/* this could be a refresh, so clear out the old data */
... | null | null | 209,026 | 28606370464435655007062922198657708535 | 22 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... | other |
libxml2 | f1063fdbe7fa66332bbb76874101c2a7b51b519f | 1 | xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
const xmlChar **URI, int *tlen) {
const xmlChar *localname;
const xmlChar *prefix;
const xmlChar *attname;
const xmlChar *aprefix;
const xmlChar *nsname;
xmlChar *attvalue;
const xmlChar **atts = ctxt->atts;
... | null | null | 209,049 | 250291329740874587936948809023195704384 | 443 | CVE-2015-7500 Fix memory access error due to incorrect entities boundaries
For https://bugzilla.gnome.org/show_bug.cgi?id=756525
handle properly the case where we popped out of the current entity
while processing a start tag
Reported by Kostya Serebryany @ Google
This slightly modifies the output of 754946 in regress... | other |
vim | 80525751c5ce9ed82c41d83faf9ef38667bf61b1 | 1 | do_mouse(
oparg_T *oap, // operator argument, can be NULL
int c, // K_LEFTMOUSE, etc
int dir, // Direction to 'put' if necessary
long count,
int fixindent) // PUT_FIXINDENT if fixing indent necessary
{
static int do_always = FALSE; // ignore 'mouse' setting next time
static int got_cli... | null | null | 209,102 | 159266025064479013943001437579885155483 | 829 | patch 9.0.0259: crash with mouse click when not initialized
Problem: Crash with mouse click when not initialized.
Solution: Check TabPageIdxs[] is not NULL. | other |
linux | 5352a761308397a0e6250fdc629bb3f615b94747 | 1 | static int ax25_release(struct socket *sock)
{
struct sock *sk = sock->sk;
ax25_cb *ax25;
ax25_dev *ax25_dev;
if (sk == NULL)
return 0;
sock_hold(sk);
lock_sock(sk);
sock_orphan(sk);
ax25 = sk_to_ax25(sk);
ax25_dev = ax25->ax25_dev;
if (ax25_dev) {
dev_put_track(ax25_dev->dev, &ax25_dev->dev_tracker);
... | null | null | 209,106 | 64131604211410647910287923265003264859 | 86 | ax25: fix UAF bug in ax25_send_control()
There are UAF bugs in ax25_send_control(), when we call ax25_release()
to deallocate ax25_dev. The possible race condition is shown below:
(Thread 1) | (Thread 2)
ax25_dev_device_up() //(1) |
| ax25_kill_by_device()
ax25_... | other |
quagga | 099ed6744881e71957f2bfeebc4c0727714d2394 | 1 | ospf_packet_add_top (struct ospf_interface *oi, struct ospf_packet *op)
{
if (!oi->obuf)
{
zlog_err("ospf_packet_add(interface %s in state %d [%s], packet type %s, "
"destination %s) called with NULL obuf, ignoring "
"(please report this bug)!\n",
IF_NAME(oi), oi->state, LOOKUP (ospf... | null | null | 209,771 | 147568580972588828700710848557085359496 | 19 | ospfd: fix ospf_packet_add_top() to use LOOKUP() | other |
mujs | f5b3c703e18725e380b83427004632e744f85a6f | 1 | void jsP_dumpsyntax(js_State *J, js_Ast *prog, int dominify)
{
minify = dominify;
if (prog->type == AST_LIST)
pstmlist(-1, prog);
else {
pstm(0, prog);
nl();
}
if (minify > 1)
putchar('\n');
} | null | null | 209,801 | 179855345628520056045814922229839668834 | 12 | Issue #161: Cope with empty programs in mujs-pp. | other |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.